CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Usage of PengRobinsonGas

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 3 Post By aunola
  • 1 Post By Krapf

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 27, 2016, 09:39
Default Usage of PengRobinsonGas
  #1
New Member
 
Join Date: Jun 2016
Posts: 1
Rep Power: 0
Hausmarke87 is on a distinguished road
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
Hausmarke87 is offline   Reply With Quote

Old   October 31, 2016, 05:07
Default
  #2
Member
 
Martin Aunskjaer
Join Date: Mar 2009
Location: Denmark
Posts: 53
Rep Power: 17
aunola is on a distinguished road
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.
aunola is offline   Reply With Quote

Old   September 8, 2020, 11:54
Default
  #3
New Member
 
Join Date: Sep 2019
Posts: 14
Rep Power: 7
saturn_K is on a distinguished road
Quote:
Originally Posted by aunola View Post
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?
saturn_K is offline   Reply With Quote

Old   September 8, 2020, 12:15
Default
  #4
Senior Member
 
Join Date: Oct 2017
Posts: 133
Rep Power: 9
Krapf is on a distinguished road
Hi saturn_K

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

Kind regards
Krapf
saturn_K likes this.
Krapf is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using PengRobinsonGas EoS with sprayFoam Jabo OpenFOAM Running, Solving & CFD 36 July 16, 2024 04:52
New workstation for different usage scenarios - CPU and RAM natem Hardware 6 August 7, 2013 03:47
Boosting CPU usage earlybird FLUENT 2 November 2, 2012 11:32
OpenFOAM Solver/BC usage description murrayjc OpenFOAM 3 August 25, 2009 05:48
Swap usage on parallel run nikhilesh OpenFOAM Running, Solving & CFD 0 April 30, 2009 10:50


All times are GMT -4. The time now is 21:13.