|
[Sponsors] |
September 25, 2007, 04:23 |
Dear all,
I'm simulating he
|
#1 |
New Member
David Palko
Join Date: Mar 2009
Location: Stockholm
Posts: 17
Rep Power: 17 |
Dear all,
I'm simulating heat trasfer to water at pressures higher than critical (22.1MPa) and in this region, the results are extremely sensitive to the accuracy of thermo-physical properties implemented. Therefore their correct implementation is of a critical importance for me. New IAPWS-IF97 water properties standard functions shows a very high accuracy and therefore i would like to have them implemented to OpenFOAM. Basically, when hThermo model with pureMixture, sutherlandTransport, specieThermo, janafThermo, perfectGas is used as a template, methods in sutherlandTransport, janafThermo and perfectGas equations can be overloaded for this purpose. My question is: when i create new transport, thermo and equationOfState clases, how do i link them to the rest of the code, so for example buoyantSimpleFoam would use them in the following form, let's say: hThermo<puremixture<iapwstransport<speciethermo<ia pwsthermo<waterrealgas>>>>> Thank you in advance David |
|
September 25, 2007, 06:21 |
Hi David,
I've been discuss
|
#2 |
Member
|
Hi David,
I've been discussing this with both Henry and also Niklas Nordin who's responsible for much of the thermodynamics structure in OF. It seems from these discussions that one way to implement a full thermodynamics package like the IAPWS-IF97 for water and steam which return both transport and thermo properties is by introducing the following classes: IAPWSgas in addition to perfectGas IAPWSthermo in addition to hConstThermo/janafThermo IAPWStransport in addition to constTransport/sutherlandTtransport then we have the following thermoType (through changes in basicThermos.C) hThermo<puremixture<iapwstransport<speciethermo<ia pwsthermo<iapwsgas>>>>> For multiphase flows it might help with a waterSteamMixture class to help with voidfraction dependent properties but this is probably best implemented on application level together with the interface functions. We currently have all necessary IAPWS functions written in OpenFOAM syntax for implementation in the new classes. Niklas recently implemented Peng-Robinson equation of state which also might be helpful. Any new ideas would be much appreciated. //Eric |
|
October 2, 2007, 06:41 |
Hi all, if you are interested:
|
#3 |
Senior Member
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21 |
Hi all, if you are interested:
I found IAPWS'97 properties as C++ library (FreeSteam) in www.sourceforge.net I have already adpated this library to OpenFoam 1.4(but it really slows down the calculation process) If someone needs more information, please, write to my e-mail: mkraposhin@inbox.ru SORRY FOR BAD ENGLISH
__________________
MDPI Fluids (Q2) special issue for OSS software: https://www.mdpi.com/journal/fluids/..._modelling_OSS GitHub: https://github.com/unicfdlab Linkedin: https://linkedin.com/in/matvey-kraposhin-413869163 RG: https://www.researchgate.net/profile/Matvey_Kraposhin |
|
August 28, 2008, 07:51 |
Dear All,
Does anyone know
|
#4 |
New Member
David Palko
Join Date: Mar 2009
Location: Stockholm
Posts: 17
Rep Power: 17 |
Dear All,
Does anyone know what definition of compressibility does OpenFoam use? I found that perfectGas psi() function returns 1.0/(R()*T). Assuming that compressibility is defined as psi=(-1/rho)*(drho/dT) at constant pressure, psi function should return 1.0/T. I need the exact defintion in order to apply the compressibity for water in the correct way. Thank you so much in advance, David |
|
August 29, 2008, 03:54 |
Hi
my impression is that psi=
|
#5 |
New Member
Henrik Bergersen
Join Date: Mar 2009
Posts: 17
Rep Power: 17 |
Hi
my impression is that psi=rho/p. PerfectGasI.H, line 48: //- Return compressibility rho/p [s^2/m^2] This is in agreement with basicThermo.H, line 205 //- Density [kg/m^3] tmp<volscalarfield> rho() const { return p_*psi(); } It would be very interesting to hear about your progress in implementing IAPWS-IF97. Henrik |
|
August 29, 2008, 04:28 |
Thank you Henrik,
So the de
|
#6 |
New Member
David Palko
Join Date: Mar 2009
Location: Stockholm
Posts: 17
Rep Power: 17 |
Thank you Henrik,
So the definition of compressibility is psi=drho/dp at constant temperature which gives exactly rho/p for an ideal gas. Please could anyone confirm that i'm right? In that case the density which is returned by basicThermo.H, line 205 (see below) is valid only if we use ideal gas approximation. Am i right? //-Density [kg/m^3] tmp<volscalarfield> rho() const { return p_*psi(); } Thank you, David |
|
September 11, 2008, 10:20 |
hmm, thread started a year ago
|
#7 |
Member
Maxim Loginov
Join Date: Mar 2009
Posts: 33
Rep Power: 17 |
hmm, thread started a year ago...
is there anything new on freesteam/OpenFOAM integration? I'd like to try |
|
September 11, 2008, 13:16 |
Maxim,
The issue which i poi
|
#8 |
New Member
David Palko
Join Date: Mar 2009
Location: Stockholm
Posts: 17
Rep Power: 17 |
Maxim,
The issue which i pointed in the message above, Friday Aug-29 must be solved before you try anything. David |
|
September 15, 2008, 15:02 |
Hi David
I absence of input f
|
#9 |
New Member
Henrik Bergersen
Join Date: Mar 2009
Posts: 17
Rep Power: 17 |
Hi David
I absence of input from people who actually know things, allow me to speculate. Unfortunately my knowledge of c++ is rudimentary, so I can't offer any solutions. However, the problem seems to be two-fold: 1. rho is not stored explicity by basicThermo, but constructed as p*psi. Can this be avoided by having basicThermo fetch the density directly from the equation of state, thereby bypassing psi in the calculation of density? 2. The second problem is that psi itself is called from various bits of the source code. I guess that means that we still need a proper definition of psi, even if the density may be possible to calculate even without using psi. Best Regards Henrik |
|
September 16, 2008, 04:45 |
Hej Henrik,
I absolutely ag
|
#10 |
New Member
David Palko
Join Date: Mar 2009
Location: Stockholm
Posts: 17
Rep Power: 17 |
Hej Henrik,
I absolutely agree with your points. Rho should be fetched from the equation of state, i am just wondering why OpenFoam doesn't do it this way. And i also agree that psi must be correctly implemented into the equation of state ( in the form: psi=drho/dp at constant temperature). What i did until now is that i took the water properties, IAPWS-IF97 as implemented in matlab functions of XSteam and use them instead of mu(), kappa(), alpha(), cp(), h(), rho() and psi() functions in thermo, transport and equationOfState objects (one MSc student of Eric Lillberg helped with coding). These functions differs in different regions of phase diagram, resulting into quite an ugly piece of code. Moreover, when the functions are called directly, they slows down the CFD calculation rapidly. That's why i decided to use an other approach. Here i call the XSteam functions only when the contructor of thermo, transport or equationOfState is called and create the tables where user specifies the minimum and maximum temperature, number of points and reference pressure. Then all the points are generated at the begining of calculation (which takes around 1-2 minutes depending on the number of points) and during the run-time functions mu(), kappa() etc... use just the linear interpolation between two nearest points depending on the temperature. This approach is really fast and could be quite precise, depending on the size of your lookup table. I quickly wrote the code (except psi(), which is not defined by XSteam IAPWS functions) and as i remember it runs quite ok. Later i gave up my work on that because i didn't need water properties anymore and didn't even have time for that. If you are interested we can try to make it work and finally solve the issue of water properties, however i warn you, the code at this stage is quite ugly (i just cannot manage to make all the indentations, comments etc..) David |
|
September 16, 2008, 09:13 |
Hi David
Your work is very in
|
#11 |
New Member
Henrik Bergersen
Join Date: Mar 2009
Posts: 17
Rep Power: 17 |
Hi David
Your work is very interesting, but for my current projects the full IAPWS-IF97 is probably over-kill. Instead I have tried to write dedicated equations of state (e.g. rho as a polynomial function of T) to use mainly for flow of liquid water. To that end I still need to understand the function of psi. If you get any further with this, please let me know. Henrik |
|
June 16, 2009, 08:53 |
|
#12 | |
Member
Jagmohan Meena
Join Date: May 2009
Posts: 30
Rep Power: 17 |
Quote:
I am facing exactly same problem now. Please share your valuable thoughts if you have found solution of above 2 problems ? Best Regards, JM |
||
June 24, 2009, 06:53 |
IAPWS 97 Properties, liquid Sodium (Na), properties, Bismuth-Led (BiPb) properties
|
#13 |
Senior Member
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21 |
Dear friends, here is link to water, Na and BiPb properties
http://www.os-cfd.ru/mamb/index.php?...1a69&no_html=1 |
|
June 24, 2009, 07:06 |
|
#14 |
Member
Jagmohan Meena
Join Date: May 2009
Posts: 30
Rep Power: 17 |
Thankyou very much Matvej !!
JM |
|
November 25, 2011, 07:24 |
|
#15 |
Member
|
I am starting to investigate how to implement the water properties into openfoam at supercritical pressures. In IAPWS-97, the properties, such as specific heat capacity, are functions of density and temperature in the region 3 which includes the critical point. This does not agree with the style of thermalphysical model in OpenFOAM. Is there any smart solution for this?
Thanks in advance.
__________________
Jinbiao |
|
November 28, 2011, 23:34 |
|
#16 |
Member
|
I am keep going with the implementation of IAPWS-IF97 in OpenFOAM. My approach consists of the following steps.
1) build the interpolation table at constant pressure with T as the abscissa. The table is generated with the aid of freesteam which can generate all the properties I need, such as density, enthalpy, entropy, heat capacity, conductivity and dynamic viscosity etc. 2) interpolate the properties according to T The multi-layer implementation in my approach is hPsiThermo<pureMixture<iapwsTransport<specieThermo <iapwsThermo<iapwsEOS>>>>> This implementation is defined in thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermos.H with makeBasicPsiThermo ( hPsiThermo, pureMixture, iapwsTransport, iapwsThermo, iapwsEOS ); A basicMixture is also defined in thermophysicalModels/basic/mixtures/basicMixture/basicMixtures.C with makeBasicMixture ( pureMixture, iapwsTransport, iapwsThermo, iapwsEOS ); However, the above-mentioned modifications doesnot make the implementation work. When I try to test the implementation with the tutorial case, buoyantCavity, I got the error buoyantSimpleFoam: symbol lookup error: /home/jinbiao/OpenFOAM/OpenFOAM-2.0.1/platforms/linuxGccDPOpt/lib/libbasicThermophysicalModels.so: undefined symbol: _ZN4Foam14iapwsTransportINS_12specieThermoINS_11iapwsThermoINS_8iapwsEOSEEEEEEC1ERKNS_10dictionaryE There seems something wrong with the dictionary lookup. The exact problem is still to be debugged. Best,
__________________
Jinbiao |
|
November 29, 2011, 03:24 |
|
#17 |
Senior Member
Markus Rehm
Join Date: Mar 2009
Location: Erlangen (Germany)
Posts: 184
Rep Power: 17 |
Hello,
have you correctly included all libraries and paths for IAPWS-IF97? You should double check that. Do you plan to make your code available? Markus |
|
November 29, 2011, 22:33 |
|
#18 |
Member
|
Markus,
Thanks for your reply. I am also thinking about that there may be some mistakes in library linking. The implementation of thermophysical property in OF is complicated. I do not fully understand what is wrong. I will consider to make my code available. But I donot how to do that. Should I add to the OpenFOAM-2.0.1-extend for example?
__________________
Jinbiao |
|
November 30, 2011, 04:01 |
|
#19 |
Senior Member
Markus Rehm
Join Date: Mar 2009
Location: Erlangen (Germany)
Posts: 184
Rep Power: 17 |
Hi,
maybe the libbasicThermophysicalModels is missing the link to the IAPWS-IF97 library. And yes. The extend project is a good place. You can create an own account or have it put by another member. Markus |
|
November 30, 2011, 04:16 |
|
#20 |
Member
|
Hi Markus,
I have solved the problem. I missed the line which includes the iapwsThermo.C file into iapwsThermo.H. And the same mistake in iapwsTransport.H. These files are not complied in the libspecie. Instead they were included in files like basicMixtures.C and consequently compiled in libbasicThermophysicalModels. So the .C file should be included in the header files so that the libbasicThermophysicalModels can properly linked to them. Now I am testing the implementation. I will try to create an account in the extend project soon. If the testing is good, I will share it. Best,
__________________
Jinbiao |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
water properties in supercritical region | Naveen | CFX | 2 | April 14, 2009 14:45 |
standard water properties | Thilip Kumar | CFX | 1 | September 20, 2008 10:51 |
water vapour properties | manoj korde | FLUENT | 4 | June 2, 2006 01:47 |
shallow water VS deep water | Paul | Main CFD Forum | 10 | August 30, 2004 11:56 |
properties of water ? | mp | Main CFD Forum | 0 | March 5, 2003 04:41 |