Hi,
you don't need freesteam to install my openFoam freesteam connection. You need freesteam (or better the dynamic library) to run a case. Have you installed (compiled) OpenFOAM correctly? The error suggests you haven't. The freesteam connection should not affect the other openfoam components. (Same is true for the real gas library classes) You can copy the dynamic library (by hand) in the folder described in the tutorial README (OpenFOAM/lib/"systemCompilerName"). /usr/lib/ might also work. Kind Regards, Christian |
Quote:
I have the same problems about how the psi is calculated in BasicThermo.H. Conceptually, psi=rho/p=1/(R*T). But does anyone know how psi is calculated? Thank you in advance. best regards, H |
Hi Christian,
I compiled the IAPWS package. Code:
cluster@node0:~/OpenFOAM/OpenFOAM-1.6-ext/src/thermophysicalModels/externalMedia/IAPWS_Waterproperties$ wmake libso Code:
cluster@node0:~/OpenFOAM/OpenFOAM-1.6-ext/tutorials/compressible/rhoPisoFoam/ras/IAPWS97_Pipe$ rhoPisoFoam Thank you, Best regards, Felipe Magazoni |
Christian,
Now it is working. I forgot to compile the themophysicalModels. Thanks very much. Kind regards, Felipe Magazoni |
Hi
@ hz283 have a look at the perfect gas class. @ Felipe did you change the freesteam source as stated in my tutorial case README file? Christian |
Quote:
In specieI.H, the gas constant is calculated as follows: R=RR/molweight_, RR=Na*Kb is universal gas constant. For my understanding, here molweight_ is the molar weight for only one species. in Openfoam, is there some methods to calculate the R for multi-gas composition? This is useful for the update of density of multi-gas mixing case. In the combustion solver, reactingFoam, the density is calculated like this: Info<< "Creating combustion model\n" << endl; autoPtr<combustionModels::psiChemistryCombustionMo del> combustion ( combustionModels::psiChemistryCombustionModel::New ( mesh ) ); psiChemistryModel& chemistry = combustion->pChemistry(); hsCombustionThermo& thermo = chemistry.thermo(); basicMultiComponentMixture& composition = thermo.composition(); PtrList<volScalarField>& Y = composition.Y(); word inertSpecie(thermo.lookup("inertSpecie")); volScalarField rho ( IOobject ( "rho", runTime.timeName(), mesh ), thermo.rho() ); I read the source code and found that in this solver the rho is still updated through p_*psi using EoS in basicPsiThermo. If my understanding is correct, how the effect of multi-gas on the gas constant is taken into consideration here. Actually, in CHEMKIN source package, the EoS is like this: p=Sum(rho*Yk / Wk)*RR*Tk. the subscript k stand for the individual species. Do you know something about this? Please help me point out if any incorrectness exists. best, H |
newer version of OF
Hej,
did anybody get this to work on a newer version of OF, like 2.0, 2.1 or 2.2? ~roman |
Hi,
in OF 2.0 and OF 2.1 it should be simple to use the water properties. I’m not sure about OF 2.2. 1. Copy externalMedia folder. Should work fine under OF 2.1 . 2. Add the new functions (do not copy the files) in basicPsiThermo (OF 1.6 ext) to basicPsiThermo (OF 2.0). Only the 3rd script in makeBasicThermo.H (OF 1.6 ext) is needed for the water properties (2nd is used for real gas thermo) 3. Copy the changes in rhoPisoFOAM (pEqn) into your solver 4. Compile everything. 5. Have a look at the tutorial provided by me. Hope I did not miss some code block you need. If it works, please report your result here :). Kind Regards, Christian |
It seems that the repo is down. at least the links provided in early posts to sourceforge do not work.
|
Hi,
yes, OpenFOAM 1.6 ext is down at the moment. It should be back online soon. I can send you the files, if you give me your mail adresse (e.g. via private message ..). Regards, Christian |
Hi,
OpenFoam ext is back online, but the address changed. YOu can find the branch with the water properties here: http://sourceforge.net/p/openfoam-ex...Thermo/~/tree/ Regards, Christian |
Quote:
Can you simply to explain the steps add equation of state in OF2.1.1? I want to add PR equation, which classes i need to have a modification? thank you very much ! sorry for my poor english. |
|
Quote:
wei |
Dear Chris,
My question is not about how to implement the external library, but when to call the density from the external library in the OF solver, like rhoPimpleFOAM. DID you directly replace the line thermo.rho()? Or did you call the external to get the density in other places of the solver rhoPimpleFOAM? Thank you very much. Quote:
|
Quote:
I will try to look into it and see if it can be adopted to run your code. |
HI,
You can download my library (also includes real gas thermodynamic classes) for OF 2.1 here: git clone https://github.com/morgoth541/of_realFluid.git Christian |
Quote:
|
Compiling fails
2 Attachment(s)
Quote:
I tried compiling it, however, the procedure fails. There is something wrong with the includes. I attached the full and the selective log file to this post. The selective log file will give you only the errors which occured. In which you will see that the linker has problems mostly with the following libraries Code:
/usr/bin/ld: cannot find -lcompressibleTurbulenceModel |
IAPWS-IF97 water properties for OF 2.2.1
Hi Christian,
I tried adjusting your external thermo library so that I can compile it in an OF 2.2.1 environment. However, I get one specific error from the IAPWSThermos.C file when compiling. Code:
/home/roman/Dropbox/uni/PhD/coding/IAPWSThermo/IAPWSThermo/IAPWSThermos.C:74: error: expected constructor, destructor, or type conversion before ‘;’ token Code:
|
All times are GMT -4. The time now is 08:16. |