Hi,
have you added the macros from "makeBasicPsiThermo.H" and "makeBasicMixture.h" used to create the IAPWS Thermo class? Christian PS. By the way, download the latest version I pushed, removed some bugs (non in the IAPWS Library) |
Quote:
No, I have not, where would I add those? In the *s.C in the .H or in the .C file? In the *s.C file I am using the makeThermo.H file, as this is the new base class in OF 2.2.1, makeBasicPsiThermo.H, makeBasicRhoThermo.H and makeBasicMixture.H do not exist anymore. |
HI,
not sure about OF2.2 but there should be a file where you find a marco (similar to the first one in "makeBasicPsiThermo.H"). Add the new macro (last one in "makeBasicPsiThermo.H"). Christian |
solution found
Hej Chris,
I have developed a solution and your input was helpful. Thanks. The solution for OF 2.2 and above can be found here http://www.cfd-online.com/Forums/ope...2-2-above.html or https://github.com/romansCode/IAPWS-IF97-OF |
Greetings to all!
@Roman: I've created a basic wiki page to help getting your toolkit known to the community that uses OpenFOAM technology: http://openfoamwiki.net/index.php/Contrib/IAPWS-IF97-OF May you or anyone else feel free to update that wiki page! Best regards, Bruno |
Quote:
this has been on my list for a while. I will undertake this as soon as possible. Best regards, Roman |
wiki page up
I finally got around to it and the page is now up.
|
3 Attachment(s)
I am trying to use the IAPWS-IF97-OF lib with the chtMultiregionSimpleFoam (SS CHT) solver in OF2.4.0.
I am operating at ~10MPa and 500-600K. I am not getting sensible results using the IAPWS-IF97 steam table lib with this solver. The density falls from the initial value (1e3kg/m^3) until it bottoms out at 2 kg/m^3. Visualizing the results shows that the pressure field is indeed around 1.e7 everywhere and that the temperature is around 500-550K. I attached the relevant case file for anyone to take a look at if they wish to help! In addition, I tried using this steam table lib with OF3.0.1 however the library would not compile. I submitted a pull request on the github page that seems to fix the compile issue. Edit: I resolved my issue. Forgot to update the density limits set in the SIMPLE block of fvSolution. |
5 Attachment(s)
Dear friends,
Recently I have been trying to implement IAPWS-IF97 into OpenFoam following the construction posted by Chris Lucas and Roman (https://openfoamwiki.net/index.php/C.../IAPWS-IF97-OF). My OpenFOAM is version 4.0 which is fully installed on Ubuntu 16.04. The freesteam is version 2.1, I believe it is successfully compiled because I tested it with both scons test && ./test and ipython. I clone the IAPWS-IF97-OF to my home folder, when I compile it using "wclean && wmake libso", I got the following errors. I have searched google and CFD-online for several days, but still couldn't solve the problem. Can anyone tell me what else should I do to correctly compile IAPWS? Any help will be greatly appreciated. Thanks. Have a happy new year everyone! Han |
kinda spit-balling here: maybe try compiling with -std=c++11 or -fpermissive flag. Similar thing here: https://github.com/ANTsX/ANTsR/issues/4
|
Quote:
Thanks for your quick reply. Could you please show me how to compile it with -std=c++11 flag, I can't do it correctly. Moreover, in the link that you provided, it is suggested adding "-DVCL_CAN_STATIC_CONST_INIT_FLOAT=0" somewhere. For this IAPWS-IF97 lib, where exactly should I add this line to? I am totally lost. Thank you. Han |
Try adding
Code:
- Wfpermissive \ In the make/options file in the iapws-if97-of source directory. See https://www.cfd-online.com/Forums/op...ons-wmake.html |
1 Attachment(s)
Quote:
Thanks for your suggestion. It didn't work with "-Wfpermissive ", but when I tried "-fpermissive ", all the errors turned into warnings. I tested the compiled lib by running a simple case, the results seem correct and all the properties vary with temperature. Thank you again for your kind help. One last problem, the following information keep flashing on my terminal window when the simulation is running, but it didn't appear in the output log file. What can I do to remove these flashing from my terminal window? https://www.cfd-online.com/Forums/da...BJRU5ErkJggg== |
Quote:
I have run a channel flow and compared the results with CFX, they agree with each other quite well. Thanks again for your help. Best, Han |
installation problem for IAPWS-IF97-OF
1 Attachment(s)
Hi all,
I am trying to install the the IAPWS-IF9 library to openfoam, using the link below: https://openfoamwiki.net/index.php/C.../IAPWS-IF97-OF I have cloned the files to OpenFoam-6/applications/utilities/ I get the following error after wmake: Please see the attachment for details The solver I am trying to use is rhoSimpleFoam Any idea guys? |
Hi John,
The library was originally written by me for up to version 2.4, a while ago :). It looks like a function in sensibleEnthalpy.H was changed from using 2 arguments to 3 arguments. Unfortunately, I do not have OpenFOAM installed on my computer anymore and will not be able to help you with this, but maybe someone else has an idea what was changed in release 6? Cheers, Roman |
Anyone else who has linked IAPWSIF97 library to OpenFoam-6?
|
How to add IAPWS-IF97 in OpenFOAM
Quote:
How to add these file in OpenFOAM, Please elaborate more I am new to OpenFOAM. I am running a simulation for superheated steam flow through pipe and using perfectGas as a equation of state which gives density values which is not the exact value. please guide me for this it will be very helpful for me. Thanking you |
Hi Roman,
Looks like I am alone on this one. I have some basic knowledge on C++, but not at the level of OpenFoam programming am quickly working my way up. If you can give me some hints on one of the bugs then it would be useful to build on. One of the error Quote:
OpenFoam 2.4 Quote:
Quote:
|
Hi to everyone.
I'm trying to use the IAPWS-IF97 water properties for OpenFOAM. I installed Freesteam and compiled the library, now I can use it in openFOAM. I would line to use it to calculate the steam properties for the design of a steam turbine, the range of pressure for the steam is from 1E4 Pa to 1E5 Pa. However, I can use the library of Roman only in a range of pressure of high values, as specified in the example from 221e5 to 300e5 Pa. Is it also possible to use it to calculate the properties of the steam in lower range of pressure? In alternative, could I simply link Freesteam to OpenFOAM? Is there any example? Thanks, WhiteW |
All times are GMT -4. The time now is 16:59. |