|
[Sponsors] |
March 26, 2020, 10:38 |
Modify a library
|
#1 |
New Member
james freak
Join Date: Jan 2020
Posts: 14
Rep Power: 6 |
Hi,
I am currently trying to run a simulation where I compute transport properties and Cp with polynome so my thermotype part of thermophysicalProperties looks like: Code:
thermoType { type hePsiThermo; mixture pureMixture; transport polynomial; thermo hPolynomial; equationOfState perfectGas; specie specie; energy sensibleEnthalpy; } when I run the code, I get: Code:
--> FOAM FATAL ERROR: Unknown fluidThermo type thermoType { type hePsiThermo; mixture pureMixture; transport polynomial; thermo hPolynomial; equationOfState perfectGas; specie specie; energy sensibleEnthalpy; } Valid fluidThermo types are: hePsiThermo homogeneousMixture const hConst perfectGas specie sensibleEnthalpy hePsiThermo homogeneousMixture sutherland hConst perfectGas specie sensibleEnthalpy ........ I think I have to add it in psiThermos.C, but I don't know a lot about programming OpenFOAM. I have found no tutorial explaining how to do it, but I have followed a tutorial that explain how to modify a solver (http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam), but I don't know how to adapt it to modify this library (or whatever it is called). Do you know a well explained tutorial for doing that? Thank you for your help. |
|
March 27, 2020, 06:15 |
|
#2 |
New Member
james freak
Join Date: Jan 2020
Posts: 14
Rep Power: 6 |
Ok I have found a way to do that, for those who are interested:
I have copied /opt/openfoam7/src/thermophysicalModels/basic/ into my user directoty Then add the wanted combination of properties into the file psiThermos.C (it is in the subdirectory psiThermo). Then replace "LIB = $(FOAM_LIBBIN)/libfluidThermophysicalModels" by "LIB = $(FOAM_USER_LIBBIN)/libfluidThermophysicalModels"in the "files" file of the Make subdirectory of the directoty basic run wclean run wmake. As I'm not very comfortable with openfoam programming, I would like to have a document that explain how to creates/change libraries. I have read the chapter 3 of the openfoam user guide but I find that it is quite light, do you have something to recommand ? Last edited by me45; March 27, 2020 at 13:06. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to set periodic boundary conditions | Ganesh | FLUENT | 15 | November 18, 2020 06:09 |
ERROR: unable to find library | HJH | CFX | 6 | February 26, 2019 06:52 |
Forcing a solver to use your custom library. | cdunn6754 | OpenFOAM Programming & Development | 0 | March 30, 2017 16:05 |
OpenFOAM141dev linking error on IBM AIX 52 | matthias | OpenFOAM Installation | 24 | April 28, 2008 15:49 |
fluent add additional zones for the mesh file | SSL | FLUENT | 2 | January 26, 2008 11:55 |