CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   janafThermo error T=0 (

mabinty May 24, 2010 07:48

janafThermo error T=0
Dear all!

I implemented a combustion model into chtMultiRegionFoam using the janafThermo<equationOfState> (hsPsiMixtureThermo<veryInhomogeneousMixture<suthe rlandTransport<specieThermo<janafThermo<perfectGas >>>>>). Any time when I apply the solidWallMixedTemperatureCoupled BC to couple the solid and fluid regions I get the following error:


attempt to use janafThermo<equationOfState> out of temperature range 200 -> 6000;  T = 0

    From function janafThermo<equationOfState>::checkT(const scalar T) const
    in file /home/aa/OpenFOAM/OpenFOAM-1.6.x/src/thermophysicalModels/specie/lnInclude/janafThermoI.H at line 64.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/"
#1  Foam::error::abort() in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/"
#2  Foam::hsPsiMixtureThermo<Foam::veryInhomogeneousMixture<Foam::sutherlandTransport<Foam::specieThermo<Foam::janafThermo<Foam::perfectGas> > > > >::hs(Foam::Field<double> const&, int) const in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/"
#3  Foam::mixedEnthalpyFvPatchScalarField::updateCoeffs() in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/"
#4  Foam::fvMatrix<double>::fvMatrix(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::dimensionSet const&) in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/"
#5  Foam::tmp<Foam::fvMatrix<double> > Foam::fvm::Sp<double>(Foam::DimensionedField<double, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&) in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/"
#6  Foam::radiation::radiationModel::Shs(Foam::basicThermo&) const in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/"
#7  main in "/home/aa/OpenFOAM/aa-1.6.x/applications/bin/linux64GccDPOpt/chtMultiRegionFireFoam"
#8  __libc_start_main in "/lib/"
#9  _start at /build/buildd/glibc-2.9/csu/../sysdeps/x86_64/elf/start.S:116

Following behavior is observed:
(1) The error disappears when any other BC than solidWallMixedTemperatureCoupled is applied at the solid-fluid interface.
(2) I checked the values of the solid-fluid interface and internal temperatures and all of them are greater than zero.
(3) The error happens at the first time the code enters the sensible enthalpy (hs) equation.
(4) The problem appears no matter the combustion model is en- or disabled.

Does anybody have made similar experience or have any idea what the problem could be? I greatly appreciat your comments!

Best regards,

chandramurthy May 24, 2010 07:57

it looks like the error relates to lower bound of JANAF table. try with manually changing the lower bound from 200 K to much lower value of about 50 K. initialize the T field above this value. probably this may fix it.

mabinty May 25, 2010 08:04

hi chandra,

thanks for your comment! I tried to set the the lower temperature to e.g. 50K but the problem persists. From somewhere the checkT-function gets a T-value equal to zero, but only when the mentioned BC is used; I couldn t figure out yet where or how T=0K occurs but I ll keep on digging.


CedricVH May 25, 2010 10:37

Have you already tried the new Janaf model?

mabinty May 25, 2010 14:16


i played arround with the initial temperatures of the fluid and solid regions and observed the following:

the "solidWallMixedTemperatureCoupled" BC is of type "mixedFvPatchScalarField", switching between "fixedValue" (if heat flux is outgoing) and "fixedGradient" (when flux is incoming) for the T. I figured out that the above mentioned error message from JANAF happens at the moment one of the fluid patches on the solid-fluid intreface is set to "fixedGradient" (no error if all patches ar set to "fixedValue"!). hence, I thought the problem depends on the sign of the heat flux or the T-gradient at the interface (as it governs the switching of the mixed BC) and used a "fixedGradient" BC with different signs of "gradient" for T on the fluid side. no error message was outputed, neither for a positive nor a negative T-gradient. therefore the problem is with the mixed BC in combination with JANAF. I ll keep on digging and report.

@cedric: thanks a lot for the hint! I ll have a look at the new JANAF model.


mabinty May 26, 2010 10:36

hi all!

finally i found the problem. when using the solidWallMixedTemperatureCoupled BC a mixedEnthalpyFvPatchScalarField is used to calculate the BC for hs when entering the hs-equation. there a refValue() for hs is determined as follows (see mixedEnthalpyFvPatchScalarField.C):

refValue() = thermo.hs(Tw.refValue(), patchi);

Tw is the temeperature field evaluated by the solidWallMixedTemperatureCoupled BC, where the Tw.refValue() is calculated as (see solidWallMixedTemperatureCoupledFvPatchScalarField .C):


// if outgoing flux use fixed value, else fixed gradient.
        if (normalGradient()[i] < 0.0)
            this->refValue()[i] = operator[](i);
            this->refGrad()[i] = 0.0;  // not used
            this->valueFraction()[i] = 1.0;
            this->refValue()[i] = 0.0;      // not used;
            this->refGrad()[i] = normalGradient()[i];
            this->valueFraction()[i] = 0.0;

in case the BC uses fixedValue, no problem; for fixedGradient the refValue() is set to 0.0 (not relevant as valueFraction() = 0.0), what is used to evaluate thermo.hs(Tw.refValue(), patchi), hence the error T=0 is sent. as the refValue() for the case of valueFraction() = 0.0 isn t used I set refValue()[i] = 200.0 and the problem doesn t appear anymore :)

best regards,

ps: should this be reported as a bug????

chandramurthy May 27, 2010 02:30

very nice troubleshooting!!!:)

All times are GMT -4. The time now is 03:48.