CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Usage of PengRobinsonGas (https://www.cfd-online.com/Forums/openfoam-solving/179307-usage-pengrobinsongas.html)

Hausmarke87 October 27, 2016 08:39

Usage of PengRobinsonGas
 
Dear Foamers,

I wanted to simulate some different configurations of gas seals (plane, laby, etc. ) for a colleague of mine. The application is for a extreme reduced scale heat pump compressor unit. Hence, we need a real gas implementation of r134a.
We want to simulate the problem in OpenFOAM(1.6 bzw. 2.40) using first of all the rhoSimpleFoam-solver.
For the real gas effect I decided to use the Peng-Robinson equation of state for density. For enthalpy (Cp) and transport coefficients I'm using polynomial.
Here the entries of my thermophysicalProperties-dict:

Code:

thermoType
{
    type            hePsiThermo;
    mixture        pureMixture;
    transport      polynomial;
    thermo          hPolynomial;
    equationOfState PengRobinsonGas;
    specie          specie;
    energy          sensibleEnthalpy;
}

mixture
{
    specie
    {
        nMoles      1;
        molWeight  102.03;
    }
    thermodynamics
    {
        Hf          0;
        Sf          0;
        CpCoeffs<8> (52367286.5893448 -896914.219387283 6582.94517048627 -26.8361997927846 0.0656209996118067 -9.62405000007278e-05 7.83825778586705e-08 -2.73466791894046e-11); //coef a + bT
    }
    transport
    {
        muCoeffs<8> (0.016573418676777 -2.826845960229125e-04 2.067315740077108e-06 -8.398268473071815e-09 2.046906026206883e-11 -2.992933918178494e-14 2.430706476585154e-17 -8.458094707595060e-21); //coef a + bT
        kappaCoeffs<8> (183.470981489914 -3.13705058768515 0.0229896256937105 -9.35908329326959e-05 2.28567649299967e-07 -3.34841920900134e-10 2.72430061543407e-13 -9.49579755132885e-17); //coef a + bT
    }
}

By running the solver I get the following error:

--> FOAM FATAL IO ERROR:
keyword equationOfState is undefined in dictionary "/home/lamduser/OpenFOAM/lamduser-2.4.0/run/tutorials/compressible/rhoSimpleFoam/planeSeal/constant/thermophysicalProperties.mixture"

file: /home/lamduser/OpenFOAM/lamduser-2.4.0/run/tutorials/compressible/rhoSimpleFoam/planeSeal/constant/thermophysicalProperties.mixture from line 33 to line 45.

From function dictionary::subDict(const word& keyword) const
in file db/dictionary/dictionary.C at line 648.

FOAM exiting

I guess I have to define some more coefficients for Peng Robinson, but I dont know what to do (I was already trying to understand the source code for that model but I dont get it).
Would be nice if somebody of you could help me to set up this case.

Regards,
Markus

aunola October 31, 2016 04:07

Have a look at the file /src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGas.C.

You need to define an equationOfState sub-dictionary within the mixture dictionary with constants appropriate for your gas. Something like:

Code:

equationOfState
{
  Tc  yourValue;
  Vc  yourValue;
  Pc  yourValue;
  omega  yourValue;
}

where Tc is the critical temperature, Vc the critical volume, Pc the critical pressure and omega the acentric factor.

saturn_K September 8, 2020 10:54

Quote:

Originally Posted by aunola (Post 623559)
Have a look at the file /src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGas.C.

You need to define an equationOfState sub-dictionary within the mixture dictionary with constants appropriate for your gas. Something like:

Code:

equationOfState
{
  Tc  yourValue;
  Vc  yourValue;
  Pc  yourValue;
  omega  yourValue;
}

where Tc is the critical temperature, Vc the critical volume, Pc the critical pressure and omega the acentric factor.

Dear Martin

According to the critical parameters that we should determine for the PengRobinsonGas EOS, do you know what is the unit of Vc? Is it [m3/kmol] or [m3/kg] or anything else?

Krapf September 8, 2020 11:15

Hi saturn_K

The unit of Vc is m^3/kmol: PengRobinsonGas.H.

Kind regards
Krapf


All times are GMT -4. The time now is 22:59.