|
[Sponsors] |
June 29, 2012, 09:46 |
Real Gas EOS
|
#1 |
Member
Francesco Capuano
Join Date: May 2010
Posts: 81
Rep Power: 16 |
Hi everybody,
I would like to implement a real-gas equation of state (e.g. Peng-Robinson). In a very old thread, http://www.cfd-online.com/Forums/ope...eal-gases.html some general tips were given; however, any further suggestions (particularly for OpenFOAM 2.0.x or 2.1.x) would be greatly appreciated. Besides, I was wondering if there are any already implemented versions of real-gas EOS which are available on the web. Thanks in advance. Francesco |
|
July 2, 2012, 04:17 |
|
#2 |
Senior Member
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 202
Rep Power: 18 |
Hi,
you can find a real gas implementation (redlich Kwong, Peng Robinson ...) for OpenFOAM in OpenFOAM ext. . http://openfoam-extend.git.sourcefor...-ext;a=summary Have a look at the branch feature/fullyIntegratedRealGasThermo. Best Regards, Christian |
|
July 2, 2012, 07:00 |
|
#3 |
Member
Francesco Capuano
Join Date: May 2010
Posts: 81
Rep Power: 16 |
Dear Christian,
thank you very much, that is exactly what I am looking for. I cannot compile it, though. Is it possible to make the library compatible with OpenFOAM v. 2.x? I see that many files are missing in the newer versions (for instance all those in the reaction/reactions folder). Thanks again, Francesco |
|
July 2, 2012, 08:01 |
|
#4 |
Senior Member
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 202
Rep Power: 18 |
Hi,
I have no version of the code for OpenFOAM 2.0 but you can rewrite the code yourself. Have you tried the code in OpenFOAM 1.6 ext.? Best Regards, Christian |
|
July 2, 2012, 09:47 |
|
#5 |
Member
Francesco Capuano
Join Date: May 2010
Posts: 81
Rep Power: 16 |
Thanks for your reply. I haven't tried it yet, but I will soon and let you know.
Best regards, Francesco |
|
July 5, 2012, 09:30 |
|
#6 |
Member
Gitesh
Join Date: Jan 2010
Location: Finland
Posts: 73
Rep Power: 16 |
Hello Christian,
Can you give some more detail for how to use these codes ? Regards, GP |
|
July 6, 2012, 04:19 |
|
#7 |
Senior Member
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 202
Rep Power: 18 |
Hi,
have a look at the pipe tutorial for rhoPisoFoam. All possible thermodynamic models are shown in the thermodynamicProperties dict. Additionally, have a look at the fvSolution of this case. The flag realFluid should be set to true (This changes the pressure equation a bit). For more infomation have a look at the solver code (rhoPisoFoam, pEqn). If you want to use a different solver, the pressure eqn. in this solver must be changed as well (as I did in rhoPisoFoam) If you have further questions, please ask By the way, I finished programming the steam tables and are testing them at the moment. Hope to upload them soon. Christian Last edited by Chris Lucas; July 6, 2012 at 04:46. |
|
July 13, 2012, 09:37 |
|
#8 |
Member
Francesco Capuano
Join Date: May 2010
Posts: 81
Rep Power: 16 |
Hi Chris,
I have installed OpenFOAM 1.6-ext but still have some problems with the real-gas libraries. I am particularly interested in simulations involving reacting mixtures: are your libraries able to deal with those cases? Which packages do I have to install from the repository? It seems to me that "real gas EOS for mixtures" and "mixture version of real gas EOS" are not sufficient, aren't they? Thank you very much, regards, Francesco |
|
July 13, 2012, 09:43 |
|
#9 |
Senior Member
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 202
Rep Power: 18 |
Hi,
"Which packages do I have to install from the repository?" --> the latest one "It seems to me that "real gas EOS for mixtures" and "mixture version of real gas EOS" are not sufficient, aren't they?" your correct, at the moment the real gas classes are not connected to the reaction library. You have to connect them yourself. I'm not sure how difficult this is. Regards, Christian Last edited by Chris Lucas; July 14, 2012 at 15:51. |
|
July 17, 2013, 06:36 |
records
|
#10 |
New Member
Sergey
Join Date: Jul 2013
Posts: 1
Rep Power: 0 |
Dear Christian,
I downloaded your real gas implementation code for OpenFoam. I have successfully modified it and now I'm using it for my needs. First of all thanks - great job. I want now to summarize my efforts. Do you have some documentation or records of what you did, that you can share? Best regards,
Sergey |
|
July 23, 2013, 06:15 |
Real gas implementation code for OpenFoam
|
#11 |
Member
Gitesh
Join Date: Jan 2010
Location: Finland
Posts: 73
Rep Power: 16 |
Hello Sergey,
Nice to know that! Could you tell me in which version of OpenFOAM you are using for Christian's real gas implementation? With regards, GP |
|
July 25, 2013, 04:21 |
|
#12 |
Senior Member
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 202
Rep Power: 18 |
Hi,
he is using OpenFOAM 2.1. I also have a real gas version for OF 2.1 and might release it soon (problem at the moment is to find the best way to do it). Sergey, you can add your stuff afterwards ( if you like ) Regards, Christian |
|
August 14, 2013, 12:32 |
|
#13 |
Senior Member
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 202
Rep Power: 18 |
HI,
I finally finished the work. You can download the real gas library for OF 2.1 here: git clone https://github.com/morgoth541/of_realFluid.git Christian |
|
August 26, 2013, 12:18 |
|
#14 |
New Member
Peter Bishop
Join Date: Jan 2012
Posts: 20
Rep Power: 14 |
Hi,
I downloaded your library from git repository and tried to compile on my exisiting installation of OF2.1, but when I try to compile thermophysicalModels/basic I get the following error psiThermo/realGasEThermo/realGasEThermos.C(61): error: argument list for class template "Foam::realGasEThermo" is missing I'm using Intel compiler 13.0.1. Moreover the following include appears in basicMixtures.C #include "binaryMixture.H" it seems this file does not exist anywhere. Thanks in advance for your reply and for sharing your work. |
|
August 26, 2013, 14:25 |
|
#15 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
Hi
how can download it in GitHub? is it applicable for 2.2.0 version? and which model is suitable for air in pressures in the range of:200000pa-1.8Mpa and temperatures of :300-1300K?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
August 27, 2013, 04:08 |
|
#16 |
Senior Member
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 202
Rep Power: 18 |
Hi Peter,
thank you for your response. I found the error (forgot to add one file) and I will push the update after work. @immortality it a git repository, use the command in the consol git clone https://github.com/morgoth541/of_realFluid.git Christian |
|
August 27, 2013, 06:46 |
|
#17 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
Hi dear Christian which model you have used in the code?Van Der Waals or what?
is it appropriate to my case in ranges of p and T I told before?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
August 29, 2013, 03:59 |
|
#18 |
Senior Member
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 202
Rep Power: 18 |
Hi
have a look at the repository README file. The new models are explained there. Christian |
|
September 20, 2013, 06:19 |
|
#19 |
New Member
Peter Bishop
Join Date: Jan 2012
Posts: 20
Rep Power: 14 |
Hi Chris,
I downloaded your real gas implementation from your repository and successfully compiled it on my existing of 2.1 installation. Everything works like a charm At the moment I'm trying to make some validation of realFluidPISOSolver, simulating transcritical injection of nitrogen jets, for which there are in literature some experimetal data. In this regard should be very useful to let the solver write the specific heat field, have you any suggestion? |
|
September 20, 2013, 09:18 |
|
#20 |
Senior Member
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 202
Rep Power: 18 |
Hi,
have a look at createFields: copy and rename "volScalarField rho". Change thermo.rho() to thermo.Cp(). Then, update the new field each time step. Christian |
|
Tags |
high pressure injection, openfoam 2.1.x, real gas |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
mass flow in is not equal to mass flow out | saii | CFX | 12 | March 19, 2018 06:21 |
error: uninitialized local variable 't' used | MASOUD | Fluent UDF and Scheme Programming | 5 | October 17, 2016 05:24 |
error message | cuteapathy | CFX | 14 | March 20, 2012 07:45 |
defining a term for a domain using DEFINE_ADJUST | MASOUD | Fluent UDF and Scheme Programming | 1 | September 24, 2010 06:08 |
Constant velocity of the material | Sas | CFX | 15 | July 13, 2010 09:56 |