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

Real gases

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By hjasak
  • 1 Post By haghajani
  • 1 Post By haghajani

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 22, 2006, 12:34
Default Hi to all. The problem I'm
  #1
New Member
 
Lorenzo
Join Date: Mar 2009
Posts: 2
Rep Power: 0
lorenzo is on a distinguished road
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 non-ideality according to Able-Nobel gas equation of state { P(1/rho-b)=RT ; b=const }?
Perfect gases are defined in OpenFOAM-1.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
lorenzo is offline   Reply With Quote

Old   March 23, 2006, 07:32
Default What you need to do is: - wri
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
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 run-time selection table in the application. Example is: $FOAM_TUTORIALS/sonicTurbFoam/nacaAirfoil/constant/thermophysicalProperties

Enjoy,

Hrv
rewol likes this.
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   March 23, 2006, 08:00
Default Thanks for guidelines. I will
  #3
New Member
 
Lorenzo
Join Date: Mar 2009
Posts: 2
Rep Power: 0
lorenzo is on a distinguished road
Thanks for guidelines.
I will try it in the next few days...

Regards

Lorenzo
lorenzo is offline   Reply With Quote

Old   March 26, 2009, 10:04
Default
  #4
Member
 
Ivor Clifford
Join Date: Mar 2009
Location: Switzerland
Posts: 94
Rep Power: 17
cliffoi is on a distinguished road
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
cliffoi is offline   Reply With Quote

Old   April 29, 2009, 03:32
Default Rks
  #5
Member
 
Marco Müller
Join Date: Mar 2009
Location: Germany
Posts: 94
Rep Power: 17
marico is on a distinguished road
Hi,

I just tried to implement the Redlich-Kwong-Soave equationofstate.
Therefore I defined the necessary constants and some "help-functions"
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 "help-function" 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 non-physical densities.
If the constants in the parentheses are not these used in the "help-functions"
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 08:30.
marico is offline   Reply With Quote

Old   August 11, 2009, 13:34
Default Real gas EOS for reactingFoamType solvers
  #6
Member
 
Hamed Aghajani
Join Date: Mar 2009
Location: London, UK
Posts: 77
Rep Power: 17
haghajani is on a distinguished road
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
rewol likes this.
haghajani is offline   Reply With Quote

Old   August 12, 2009, 13:58
Default Peng Robinson EOS implementation in OF-1.6
  #7
Member
 
Hamed Aghajani
Join Date: Mar 2009
Location: London, UK
Posts: 77
Rep Power: 17
haghajani is on a distinguished road
Dear All,

Please correct me if I am wrong;

To implement Peng Robinson EOS in OF-1.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
mm.abdollahzadeh likes this.
haghajani 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
non-condensable gases for water Xa CFX 0 April 4, 2008 07:51
Intermixing of gases Amar CFX 0 November 7, 2005 18:34
UDF condensation two gases Thaony A. FLUENT 0 July 1, 2004 15:04
Ion transport in gases Stanislav Pagur FLUENT 0 March 18, 2003 11:49
Gases from combustion Rodrigo Madariaga FLUENT 1 June 9, 2001 05:09


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