CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Correct way of defning thermophysicalProperties for rhoCentralFoam (https://www.cfd-online.com/Forums/openfoam-programming-development/193471-correct-way-defning-thermophysicalproperties-rhocentralfoam.html)

vachan September 25, 2017 09:59

Correct way of defning thermophysicalProperties for rhoCentralFoam
 
Hi,

I am wondering what is the correct way of defining thermophysicalProperties for rhoCentralFoam. I am using openfoam v-4.1. In the shockTube tutorial case of rhoCentralFoam, thermophysicalProperties dictionary is as shown below.
Code:

// In shockTube case
thermoType
{
    type            hePsiThermo;
    mixture        pureMixture;
    transport      const;
    thermo          hConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleInternalEnergy;
}

mixture
{
    specie
    {
        nMoles          1;
        molWeight      28.96;
    }
    thermodynamics
    {
        Cp              1004.5;
        Hf              2.544e+06;
    }
    transport
    {
        mu              0;
        Pr              1;
    }
}

Whereas in forwardStep case of rhoCentralFoam, it is as follows.
Code:

// In forwardStep case
thermoType
{
    type            hePsiThermo;
    mixture        pureMixture;
    transport      const;
    thermo          hConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleInternalEnergy;
}

// Note: these are the properties for a "normalised" inviscid gas
//      for which the speed of sound is 1 m/s at a temperature of 1K
//      and gamma = 7/5
mixture
{
    specie
    {
        nMoles          1;
        molWeight      11640.3;
    }
    thermodynamics
    {
        Cp              2.5;
        Hf              0;
    }
    transport
    {
        mu              0;
        Pr              1;
    }
}

The values of properties are much different in comparison. In forwardStep case, its clearly mentioned that some kind of normalized properties must be used. But the way these properties are defined in shockTube case is different. I couldn't find any difference in any other files(except blockMeshDict ofcourse) relevant to solver.

How will the solver detect the way these properties are defined? Or do the units not matter at all? Any help would be greatly appreciated.

Thanks,
Vachan

fuad May 13, 2022 13:55

My case is diverging or giving error
 
Have you found any solution to this situation? I tried to build a case using OF-2106 rhoCentralFoam/forwardStep example case. I replaced the values in U, p, T in 0/ directory with values in S.I units. But the problem either diverges or shows error as following:

Code:

1] --> FOAM FATAL ERROR: (openfoam-2012 patch=210618)
[1] Maximum number of iterations exceeded: 100 when starting from T0:3.00001e-08 old T:14188.4 new T:14188.4 f:24591 p:-3.57235e-06 tol:3.00001e-12
[1]
[1]    From Foam::scalar Foam::species::thermo<Thermo, Type>::T(Foam::scalar, Foam::scalar, Foam::scalar, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar, Foam::scalar) const, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar, Foam::scalar) const, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar) const) const [with Thermo = Foam::hConstThermo<Foam::perfectGas<Foam::specie> >; Type = Foam::sensibleInternalEnergy; Foam::scalar = double; Foam::species::thermo<Thermo, Type> = Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy>]
[1]    in file /usr/src/packages/BUILD/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 76.
[1]



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