
[Sponsors] 
March 22, 2006, 12:34 
Hi to all.
The problem I'm

#1 
New Member
Lorenzo
Join Date: Mar 2009
Posts: 2
Rep Power: 0 
Hi to all.
The problem I'm pointing to is that OpenFOAM thermophysicalModels can only take account for ideal gases equation of state. In which manner can I take account for the real gases covolume nonideality according to AbleNobel gas equation of state { P(1/rhob)=RT ; b=const }? Perfect gases are defined in OpenFOAM1.2/src/thermophysicalModels/specie/equationofState/perfectGas. I think I can create a clone of this definition as ablenobleGas, and then? Have I to recompile OpenFOAM? How to select 'b' parameter? Thanks for any suggestion Lorenzo 

March 23, 2006, 07:32 
What you need to do is:
 wri

#2 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,769
Rep Power: 21 
What you need to do is:
 write the ablenobleGas implementation based on the perfectGas  have a look at the instantiated combinations of thermo using the gas equations of state. Examples are e.g. for basic thermo in: thermophysicalModels/basic/basicThermo/basicThermos.C for combustion in thermophysicalModels/combustion/hCombustionThermo/hCombustionThermos.C  instantiate the combinations you want for yourself and pick them from a runtime selection table in the application. Example is: $FOAM_TUTORIALS/sonicTurbFoam/nacaAirfoil/constant/thermophysicalProperties Enjoy, Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

March 23, 2006, 08:00 
Thanks for guidelines.
I will

#3 
New Member
Lorenzo
Join Date: Mar 2009
Posts: 2
Rep Power: 0 
Thanks for guidelines.
I will try it in the next few days... Regards Lorenzo 

March 26, 2009, 10:04 

#4 
Member
Ivor Clifford
Join Date: Mar 2009
Location: Switzerland
Posts: 91
Rep Power: 8 
This particular discussion is along the lines of the problem I am now looking at.
I have similar questions around implementing custom thermo functions? I am trying to implment the German KTA 3102.1 standard helium gas properties. As I see it, it's relatively straightforward to copy the perfectGas class and implement the required equation of state. I have a question around the definition of compressibility though. The comments in perfectGas say that it is rho/p and it looks like basicThermo calculates density using p*psi which supports this. I would have expected the derivative drho/dp to apply. Can somebody please tell me which is correct? I am finding the implementation of a new transport class somewhat trickier than originally expected as well. I have noticed in both constTransport and sutherlandTransport that mu, kappa and alpha are functions of temperature only. My question is, what are the implications of these being functions of both temperature and pressure? Thanks in advance Ivor 

April 29, 2009, 02:32 
Rks

#5 
Member
Marco Müller
Join Date: Mar 2009
Location: Germany
Posts: 94
Rep Power: 8 
Hi,
I just tried to implement the RedlichKwongSoave equationofstate. Therefore I defined the necessary constants and some "helpfunctions" for calculating rho analytically. These functions have the same definition "inline scalar perfectGas::FUNCTION() const" as rho, psi...: Last step I calculate psi with rho: 00077 // Return compressibility rho/p [s^2/m^2] 00078 inline scalar perfectGas:: psi(scalar, scalar T) const 00079 { 00080 return rho/p; 00081 } 1. sorry for no education: what excactly has to stand in the parentheses: e. g. perfectGas:: psi(scalar, scalar T) ...if I use a "helpfunction" perfectGas::sCoeff depending on T, and finally define the function perfectGas::rho... Has it to be T or sCoeff in the parentheses for rho??? 2. What are the member operators for (e.g. perfectGas:: operator+=) and the friend operators (e. g. operator+)?? My equationOfState gets compiled but makes nonphysical densities. If the constants in the parentheses are not these used in the "helpfunctions" I get the error message: invalid use of member (did you forget the '&'?) Thanks for Your help Marco Last edited by marico; April 30, 2009 at 07:30. 

August 11, 2009, 12:34 
Real gas EOS for reactingFoamType solvers

#6 
Member
Hamed Aghajani
Join Date: Mar 2009
Location: London, UK
Posts: 77
Rep Power: 8 
Dear all,
I added new Equation of state (peng Robinson), works with compressible solvers e.g."sonicTurbFoam", but I need to utilize reactingFoam to model high pressure carbon dioxide release in Air (near saturation line). Before reading this Thread, I created a new chemistryReader with sutherlandTransport<specieThermo<janafThermo<pengR obinson>>> defined in typedef. Then defined a new chemistry Model, new reacting mixture and new chemistrySolver to make reactingFoam read from pengRobinson Eos. Running the compiled updated solver throws a bad_cast error. Would you please share your idea, regarding defining a real gas model coupled with combustion solver as reactingfoam? Best regards, Hamed 

August 12, 2009, 12:58 
Peng Robinson EOS implementation in OF1.6

#7 
Member
Hamed Aghajani
Join Date: Mar 2009
Location: London, UK
Posts: 77
Rep Power: 8 
Dear All,
Please correct me if I am wrong; To implement Peng Robinson EOS in OF1.6, I should update hCombustionThermos.C, by adding: makeCombustionMixtureThermo ( hCombustionMixtureThermo, hPsiMixtureThermo, reactingMixture, mGasThermoPhysics // which I should modify in ThermoPhysicalTypes.H // its for is say.,sutherlandTransport<specieThermo<janafThermo<pengRobinson>>>mGasThermoPhysics ); Best regards, Hamed 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
noncondensable gases for water  Xa  CFX  0  April 4, 2008 06:51 
Intermixing of gases  Amar  CFX  0  November 7, 2005 18:34 
UDF condensation two gases  Thaony A.  FLUENT  0  July 1, 2004 14:04 
Ion transport in gases  Stanislav Pagur  FLUENT  0  March 18, 2003 11:49 
Gases from combustion  Rodrigo Madariaga  FLUENT  1  June 9, 2001 04:09 