CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Entropy calculation in OpenFoam (https://www.cfd-online.com/Forums/openfoam/116694-entropy-calculation-openfoam.html)

wyldckat September 8, 2013 15:32

OpenFOAM hasn't implemented all possible combinations of thermodynamic options.
You have to first check the list of valid combinations, as implied here: http://www.openfoam.org/version2.2.0....php#x10-40000 - section "Dictionary-based Thermodynamics Selection".

In other words: did you first run the solver with those options in the dictionary file, to confirm if it works?

immortality September 8, 2013 16:09

Hi Bruno
yes that case is finished 10 days before and I'm engaging with making more than 150 plots,and its the thermodynamic dictionary:
Code:

thermoType
{
    type            hePsiThermo;
    mixture        pureMixture;
    transport      const;
    thermo          hConst;//janaf;//
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleEnthalpy;
}
mixture
{
    specie
    {
        nMoles          1;
        molWeight      28.96;
    }
    thermodynamics
    {
    /*Tlow 200;
    Thigh 6000;
    Tcommon 1000;
    highCpCoeffs (3.129672277499967 1.211766752750042e-3 -4.04761109000018e-7 6.409571300000324e-11 -3.780447620000211e-15 -.996955811e3 5.257756413);
    lowCpCoeffs  (3.593868050000014 -8.419292810001117e-4 2.08457592775033e-6 -5.938441825004294e-10 -2.456771699998039e-13 -1.0512181e3 3.140021718);*/
        Cp              1100;
        Hf              2.544e+06;
    }
    transport
    {
      /*As 1.4584e-6;
      Ts 110.4;*/
        mu              0;//1.84e-05
        Pr              0.75;
    }
}

maybe I have converted it by some mistakes.

wyldckat September 8, 2013 16:37

Hi Ehsan,

Unfortunately OpenFOAM doesn't have the calculation of entropy implemented for the "hConstThermo":
Quote:

From file "$FOAM_SRC/thermophysicalModels/specie/thermo/hConst/hConstThermoI.H":
Code:

template<class equationOfState>
inline Foam::scalar Foam::hConstThermo<equationOfState>::s
(
    const scalar p, const scalar T
) const
{
    notImplemented
    (
        "scalar hConstThermo<equationOfState>::"
        "s(const scalar p, const scalar T) const"
    );
    return T;
}


If you run this command:
Code:

ls -l $FOAM_SRC/thermophysicalModels/specie/thermo
You should see some of the possible options for the "thermo" option.

After looking at the source codes, only the following options have an implemented entropy calculation:
Code:

janaf
hPolynomial

Best regards,
Bruno

immortality September 8, 2013 17:18

many thanks Bruno for consideration and investigation,
when I wanted to run the "inviscid case" because its inviscid,so viscosity had to be 0(constant) then
Code:

transport      const;
had to be set and I wanted to set
Code:

thermo        janaf;// hConst;//
but it didn't accept it according to possible combinations:
Code:

Valid psiThermo types are:

type            mixture                    transport  thermo  equationOfState  specie  energy

hePsiThermo    homogeneousMixture        const      hConst  perfectGas      specie  sensibleEnthalpy
hePsiThermo    homogeneousMixture        sutherland  hConst  perfectGas      specie  sensibleEnthalpy
hePsiThermo    homogeneousMixture        sutherland  janaf  perfectGas      specie  sensibleEnthalpy
hePsiThermo    inhomogeneousMixture      const      hConst  perfectGas      specie  sensibleEnthalpy
hePsiThermo    inhomogeneousMixture      sutherland  hConst  perfectGas      specie  sensibleEnthalpy
hePsiThermo    inhomogeneousMixture      sutherland  janaf  perfectGas      specie  sensibleEnthalpy
hePsiThermo    multiComponentMixture      const      hConst  perfectGas      specie  sensibleEnthalpy
hePsiThermo    multiComponentMixture      sutherland  janaf  perfectGas      specie  sensibleEnthalpy
hePsiThermo    pureMixture                const      eConst  perfectGas      specie  sensibleInternalEnergy
hePsiThermo    pureMixture                const      hConst  perfectGas      specie  sensibleEnthalpy
hePsiThermo    pureMixture                const      hConst  perfectGas      specie  sensibleInternalEnergy
hePsiThermo    pureMixture                sutherland  eConst  perfectGas      specie  sensibleInternalEnergy
hePsiThermo    pureMixture                sutherland  hConst  perfectGas      specie  sensibleEnthalpy
hePsiThermo    pureMixture                sutherland  hConst  perfectGas      specie  sensibleInternalEnergy
hePsiThermo    pureMixture                sutherland  janaf  perfectGas      specie  sensibleEnthalpy
hePsiThermo    pureMixture                sutherland  janaf  perfectGas      specie  sensibleInternalEnergy
hePsiThermo    reactingMixture            const      hConst  perfectGas      specie  sensibleEnthalpy
hePsiThermo    reactingMixture            sutherland  janaf  perfectGas      specie  sensibleEnthalpy
hePsiThermo    singleStepReactingMixture  sutherland  janaf  perfectGas      specie  sensibleEnthalpy
hePsiThermo    veryInhomogeneousMixture  const      hConst  perfectGas      specie  sensibleEnthalpy
hePsiThermo    veryInhomogeneousMixture  sutherland  hConst  perfectGas      specie  sensibleEnthalpy
hePsiThermo    veryInhomogeneousMixture  sutherland  janaf  perfectGas      specie  sensibleEnthalpy
heheuPsiThermo  egrMixture                const      hConst  perfectGas      specie  absoluteEnthalpy
heheuPsiThermo  egrMixture                sutherland  janaf  perfectGas      specie  absoluteEnthalpy
heheuPsiThermo  egrMixture                sutherland  janaf  perfectGas      specie  absoluteInternalEnergy
heheuPsiThermo  homogeneousMixture        const      hConst  perfectGas      specie  absoluteEnthalpy
heheuPsiThermo  homogeneousMixture        sutherland  janaf  perfectGas      specie  absoluteEnthalpy
heheuPsiThermo  homogeneousMixture        sutherland  janaf  perfectGas      specie  absoluteInternalEnergy
heheuPsiThermo  inhomogeneousMixture      const      hConst  perfectGas      specie  absoluteEnthalpy
heheuPsiThermo  inhomogeneousMixture      sutherland  janaf  perfectGas      specie  absoluteEnthalpy
heheuPsiThermo  inhomogeneousMixture      sutherland  janaf  perfectGas      specie  absoluteInternalEnergy
heheuPsiThermo  veryInhomogeneousMixture  const      hConst  perfectGas      specie  absoluteEnthalpy
heheuPsiThermo  veryInhomogeneousMixture  sutherland  janaf  perfectGas      specie  absoluteEnthalpy
heheuPsiThermo  veryInhomogeneousMixture  sutherland  janaf  perfectGas      specie  absoluteInternalEnergy

it verifies what you mentioned,it doesn't calculate entropy because its not Janaf and it can't be set for constant transport parameters in ordinary thermodynamical combinations.


All times are GMT -4. The time now is 02:16.