CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Modify a library

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 26, 2020, 10:38
Default Modify a library
  #1
New Member
 
james freak
Join Date: Jan 2020
Posts: 14
Rep Power: 6
me45 is on a distinguished road
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 

........
So it seem that this combination is not available (why?) and so I need to add this it.

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.
me45 is offline   Reply With Quote

Old   March 27, 2020, 06:15
Default
  #2
New Member
 
james freak
Join Date: Jan 2020
Posts: 14
Rep Power: 6
me45 is on a distinguished road
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.
me45 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 03:07.