CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   How can I use absoluteEnthalpy in thermo type in2.2.1 (http://www.cfd-online.com/Forums/openfoam-solving/123528-how-can-i-use-absoluteenthalpy-thermo-type-in2-2-1-a.html)

zqlhzx September 15, 2013 10:02

How can I use absoluteEnthalpy in thermo type in2.2.1
 
1 Attachment(s)
Dear Foamers:

Do some Foamers want to use absoluteEnthalpy in OF2.2.1?
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!

Please!here is my new thermotype libraryAttachment 25384

zqlhzx September 15, 2013 20:36

my owner solver do not solver transport(specise) equation,I have to use absoluteEnthalpy.Are not there Foamer using absoluteEnthalpy in 2.2.1?

wyldckat September 28, 2013 05:56

Greetings zqlhzx,

I saw that you've asked this question on several threads and gotten some answers on them:
Since you haven't managed to solve this problem and since I don't have much time this weekend, here's a quote of an answer I wrote some time ago on the first thread:

Quote:

Originally Posted by wyldckat (Post 417616)
I've checked the tutorials for ideas... the following command gathers information about the tutorials that are using "absoluteEnthalpy":
Code:

grep -R 'absoluteEnthalpy' $FOAM_TUTORIALS
Only the following ones appeared:
Code:

combustion/engineFoam/kivaTest/constant/thermophysicalProperties:    energy          absoluteEnthalpy;
combustion/XiFoam/ras/moriyoshiHomogeneous/constant/thermophysicalProperties:    energy          absoluteEnthalpy;
combustion/PDRFoam/flamePropagationWithObstacles/constant/thermophysicalProperties:    energy          absoluteEnthalpy;

After checking all other tutorials that use "sensibleEnthalpy", it seems that "absoluteEnthalpy" should be used along with the type "heheuPsiThermo", which seems to be specific to the "reactionThermo" library.

I'm not familiar with the specific details for each, but the tutorials seem to indicate that "sensibleEnthalpy" is the default option...
Although for this logic, it would mean that "absoluteInternalEnergy" is rarely used... there is only one reference to it in the tutorial "combustion/engineFoam/kivaTest".

I can only guess that the specific reasons depends on the chemical formulations behind it all.

I suggest you have a look into the library "reactionThermo" for more ideas. Run the following command to see where the library source code is located:
Code:

echo $FOAM_SRC/thermophysicalModels/reactionThermo
Good luck! Best regards,
Bruno

wyldckat October 13, 2013 06:06

1 Attachment(s)
Hi zqlhzx,

Attached is your library with a very minor modification, namely in the "Make/options" file.

I ran:
Code:

wclean libso
wmake libso

And it built just fine.

Therefore my questions are as follows:
  1. Have you found the solution?
  2. Can you share a simple test case where you want to use this library?
  3. What is the exact problem?
Best regards,
Bruno

zqlhzx October 15, 2013 08:46

Dear wyldckat:
Thank you for your replies!
Quote:

Have you found the solution?
I have not solved my problem untill now.
Quote:

Can you share a simple test case where you want to use this library?
The case I want to use with this library is not in OpenFOAM,and the solver which is linked to the library was developed by my teacher in OpenFOAM2.0.1,Now he asked me to modify the solver to be used in OF2.2.1.The solver uses absoluteEnthalpy in hEqn.
Quote:

What is the exact problem?
The link is my exact problem I writed in word2003:
HTML Code:

http://pan.baidu.com/share/home?uk=3977527442#category/type=0
Please have a look when you are not busy.Thanks in advance!If there is anything you do not understand my problem I did not explain clearly,please let me know.


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