Besides the changes in the thermophysicalProperties dictionary, I also added the library containing the new EOS in the controlDict

Code:

libs
(
"icoIAPWS.so"
);

For now I just copied icoPolynomial and renamed it to icoIAWPS and I am trying to get it to be recognized by openfoam in one of the rhoThermo solvers like buoyantPimpleFOAM. However, I have been very unsuccessful in doing so.

However, I haven't really gotten behind this whole typedef and getting it onto the runtimeselection table. A first attempt is attached to this post.

Chris Lucas

August 22, 2013 03:21

Hi,

have you defined your new makeThermo in "rhoThermos.C"?

Christian

romant

August 22, 2013 04:07

Quote:

Originally Posted by Chris Lucas
(Post 447346)

Hi,

have you defined your new makeThermo in "rhoThermos.C"?

Christian

I have looked at it and I am wondering if there is a way to not have to recompile the full thermophysicalModels library/folder. Such as to include the makeThermo(...,...,...,) somehow into one of the source files of new equation of state which is supposed to be used.

Chris Lucas

August 22, 2013 04:26

Hi,

I don't think that this will work.

Your could copy the heRhoThermo and all related files, rename them and uses this new thermo model if you don't want to change the OF core files.

Christian

zqlhzx

September 15, 2013 21:08

Dear Chris Lucas and Romant:
I want use the thermo type as the following:

thermoType
{
type hePsiThermo;
mixture reactingMixture;
transport sutherland;
thermo janaf;
energy absoluteEnthalpy;
equationOfState perfectGas;
specie specie;
}
but class hePsiThermo only have "sensibleEnthalpy" insteadingof "absoluteEnthalpy".In 2.2.1,only when I use heheuPsiThermo,can I use "absoluteEnthalpy".So I have to according to class heheuPsiThermo to add "absoluteEnthalpy" in class hePsiThermo .However,when I run my case,the error showed me that there no change with "Valid psiThermo types ".In other word ,my modifies did not work.the file I modified is "thermophysicalModels/reactionThermo/psiReactionThermos.C"I just add the following code:
makeReactionThermo
(
PsiThermo,
PsiReactionThermo,
hePsiThermo,
reactingMixture,
sutherland,
absoluteEnthalpy,
janafThermo,
perfectGas,
specie;
) and #include "absoluteEntalpy.H" to psiReactionThermos.C.As you know ,it did not work.could you tell me how to modify psiReactionThermos.C to make my difined thermo type :
{
type hePsiThermo;
mixture reactingMixture;
transport sutherland;
thermo janaf;
energy absoluteEnthalpy;
equationOfState perfectGas;
specie specie;
}to be useful?
Or can I build myThermo library that include thermotype what I want to use?Please someone could give some advise!

Your could copy the heRhoThermo and all related files, rename them and uses this new thermo model if you don't want to change the OF core files.

That would be a rather bad idea! Lot of dublicated code and lot of work. Don't do that!

Roman, you are on the right track with the makeThermo(...). :)
I attached a zip archive that adds the missing pieces.
What I essentially did is:
1. copy icoPolynomial and rename it to icoIAPWS
2. Create icoIAPWSThermos.C, this is where the magic happens. ;)
you just compile this file and all the other stuff will be put to the right places by the OpenFOAM macros. (See also the Make folder).

To get it running:
1. wmake libso
2. Include this in your controlDict

Code:

libs
(
"libicoIAPWSThermo.so"
);

3. set the equation of state in thermophysicalProperties to 'icoIAPWS'