CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   Converting implicit solver to explicit one (

dohnie August 13, 2009 08:28

Converting implicit solver to explicit one
I'd like to simulate detonation instabilities. The reactingFoam solver is a good basis for this, however I removed the diffusive terms and now need an explicit formulation of the solver. So, my first approach was to use the fvc:: formulation instead of fvm:: wherever possible:

fvm::ddt(rho) + fvc::div(phi)
fvm::ddt(rho, U) + fvm::div(phi, U) == rho*g - fvc::grad(p)
fvm::ddt(rho, h) + mvConvection->fvmDiv(phi, h) == DpDt
fvm::ddt(rho, Yi) + mvConvection->fvmDiv(phi, Yi) == chemistry.RR(i)
fvm::ddt(rho) + fvc::div(phi)
fvm::ddt(rho, U) + fvc::div(phi, U) == rho*g - fvc::grad(p)
fvm::ddt(rho, h) + mvConvection->fvcDiv(phi, h) == DpDt
fvm::ddt(rho, Yi) + mvConvection->fvcDiv(phi, Yi) == chemistry.RR(i)

Is this really all? Do I now have an explicit solver?
So far, everything works. Now I have to handle the pressure-velocity coupling in the PISO loop. Initially it looks like this:

fvm::ddt(psi, p) + fvm::div(phid, p) - fvm::laplacian(rho*rUA, p)

Here, the solver crashes if I replace the fvm::'s in the respective terms. Can anybody explain the problem, please?

The error message:

lowerPtr_ or upperPtr_ unallocated#0 Foam::error::printStack(Foam::Ostream&) in "/nfs/opt/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/"
#1 Foam::error::abort() in "/nfs/opt/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/"
#2 Foam::Ostream& Foam::operator<< <Foam::error>(Foam::Ostream&, Foam::errorManip<Foam::error>) in "/nfs/home/ettner/OpenFOAM/ettner-1.5/applications/bin/linux64GccDPOpt/expReacEulerFoam"
#3 Foam::lduMatrix::lower() const in "/nfs/opt/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/"
#4 Foam::tmp<Foam::Field<double> > Foam::lduMatrix::faceH<double>(Foam::Field<double> const&) const in "/nfs/home/ettner/OpenFOAM/ettner-1.5/applications/bin/linux64GccDPOpt/expReacEulerFoam"
#5 Foam::fvMatrix<double>::flux() const in "/nfs/home/ettner/OpenFOAM/ettner-1.5/applications/bin/linux64GccDPOpt/expReacEulerFoam"
#6 main in "/nfs/home/ettner/OpenFOAM/ettner-1.5/applications/bin/linux64GccDPOpt/expReacEulerFoam"
#7 __libc_start_main in "/lib64/"
#8 _start at /usr/src/packages/BUILD/glibc-2.9/csu/../sysdeps/x86_64/elf/start.S:116

From function lduMatrix::lower() const
in file matrices/lduMatrix/lduMatrix/lduMatrix.C at line 206.

FOAM aborting

gricci October 1, 2009 17:46

Same error here trying to convert pisoFoam to explicit.
Any clue?

All times are GMT -4. The time now is 12:57.