How to add a new Equation of State
1 Attachment(s)
Hej,
I have been trying to find out how to add a new equation of state in such a way that OF 2.2.x can understand that it is part of the rhoThermo selection package. Like this Code:
thermoType Code:
libs I think it should be somehow related to typeDef such as in the case of http://www.cfd-online.com/Forums/ope...epository.html or http://www.cfd-online.com/Forums/ope...-openfoam.html 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. |
Hi,
have you defined your new makeThermo in "rhoThermos.C"? Christian |
Quote:
|
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 |
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! Please!here is my new thermotype librarymyThermo.zip |
1 Attachment(s)
Quote:
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 I already posted a similar thing in this thread: http://www.cfd-online.com/Forums/ope...tml#post451645 |
Thank you Armin, this worked.
|
Hi foamers
I have added a new simple equation of state to foam 4.0, but when I select it in a case, it can't find it! What's the problem? Thanks |
I'm trying to use the linear equation of State, and so far with no success, any tips?
Thanks in advance |
1 Attachment(s)
Hi, everyone!
First, many thanks to Armin. With your help, I have implemented a new linear equation of state successfully. It is worth mentioning that maybe because of the different OpenFOAM version, I failed at first. I use foam-extend-4.1. Hence I modified the code that Armin provided, and finally succeeded. Here is the code I use. Hope that helps.:) |
All times are GMT -4. The time now is 19:24. |