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

How to define multiple ranges for JANAF coefficients? (OF5/OF6)

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 14, 2019, 10:20
Default How to define multiple ranges for JANAF coefficients? (OF5/OF6)
  #1
Senior Member
 
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 8
deepbandivadekar is on a distinguished road
Hello,


I am accessing the CEA database of NASA for JANAF coefficients beyond the typical range of 200-6000 K. CEA data is expressed in 3 different ranges 200-1000, 1000-6000, 6000-20000 (see attached image for H2).

How do I incorporate three ranges in thermodynamics subdictionary? Is there any way? If not is there any alternative?

Does something like this work?
Code:
thermodynamics
    {
        Tlow1            200; 
        Thigh1           1000;
        Tcommon         1000;
        highCpCoeffs    ( 2.5000 0.0000000 0.00000 0.0000 0.0000 -745.37 4.37 );
        lowCpCoeffs     ( 2.5000 0.0000000 0.00000 0.0000 0.0000 -745.37 4.37 );


        Tlow2            1000;
        Thigh2           6000;
        Tcommon         1000;
        highCpCoeffs    ( 2.5000 0.0000000 0.00000 0.0000 0.0000 -745.37 4.37 );
        lowCpCoeffs     ( 2.5000 0.0000000 0.00000 0.0000 0.0000 -745.37 4.37 );


        Tlow3            6000;
        Thigh3           20000;
        Tcommon         1000;
        highCpCoeffs    ( 2.5000 0.0000000 0.00000 0.0000 0.0000 -745.37 4.37 );
        lowCpCoeffs     ( 2.5000 0.0000000 0.00000 0.0000 0.0000 -745.37 4.37 );
    }
Attached Images
File Type: png Screenshot from 2019-01-14 12-12-19.png (77.8 KB, 14 views)

Last edited by deepbandivadekar; January 15, 2019 at 12:41.
deepbandivadekar is offline   Reply With Quote

Old   January 14, 2019, 15:20
Default
  #2
Member
 
Join Date: Dec 2018
Location: Darmstadt, Germany
Posts: 87
Rep Power: 7
raumpolizei is on a distinguished road
hey deepbandivadekar,
Bad news first: I quickly checked the OFv6 implementation of the Janaf polynomials (https://cpp.openfoam.org/v6/janafThermo_8H_source.html) and it doesn't seem compatible.
Now the good news: It shouldn't be too complicated to implement this functionality in an extra class (ThreeRangeJanafThermo - this is the one you need to implement, basically like janafThermo but with some more if-statements and of course one coeffArray more for the mid range). This class and the mandatory myPsiThermos.C-file* (including your new class into the makeThermo-macros) should be compiled into a new library, which can then be linked to your application through your controlDict. I know it is quite vague (I'm super tired) but I think you can make it work by searching a bit through the forums and digging into the code. I wish you good luck!

Cheers
RP

*myPsiThermos.C or myRhoThermos.C, refering to the type of thermodynamics used in your application.
raumpolizei is offline   Reply With Quote

Old   January 15, 2019, 06:33
Default
  #3
Senior Member
 
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 8
deepbandivadekar is on a distinguished road
Quote:
Originally Posted by raumpolizei View Post
hey deepbandivadekar,
Bad news first: I quickly checked the OFv6 implementation of the Janaf polynomials (https://cpp.openfoam.org/v6/janafThermo_8H_source.html) and it doesn't seem compatible.
Now the good news: It shouldn't be too complicated to implement this functionality in an extra class (ThreeRangeJanafThermo - this is the one you need to implement, basically like janafThermo but with some more if-statements and of course one coeffArray more for the mid range). This class and the mandatory myPsiThermos.C-file* (including your new class into the makeThermo-macros) should be compiled into a new library, which can then be linked to your application through your controlDict. I know it is quite vague (I'm super tired) but I think you can make it work by searching a bit through the forums and digging into the code. I wish you good luck!

Cheers
RP

*myPsiThermos.C or myRhoThermos.C, refering to the type of thermodynamics used in your application.
Ok, this gives me some hints.
So it'd rather be like this:
Code:
thermodynamics
    {
        Tlow                   200;
        Tcommon1          1000;
        Tcommon2          6000;
        Thigh                  20000;

         highCpCoeffs    ( Coefficients corresponding to 6000 to 20000 );
        midCpCoeffs    ( Coefficients corresponding to 1000 to 6000 );
        lowCpCoeffs     ( Coefficients corresponding to 200 to 1000 );
 }
Right? I'll read more and update if I have more questions/updates.
Thanks!
deepbandivadekar is offline   Reply With Quote

Old   January 16, 2019, 07:35
Default
  #4
Member
 
Join Date: Dec 2018
Location: Darmstadt, Germany
Posts: 87
Rep Power: 7
raumpolizei is on a distinguished road
Yes, something like this is a good starting point, even though the final version will depend on how you implement it.
raumpolizei is offline   Reply With Quote

Reply

Tags
janaf, openfoam 5, openfoam 6, thermophysicalproperties

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Robin B.C. Yu FLUENT 3 May 27, 2012 04:19
REAL GAS UDF brian FLUENT 6 September 11, 2006 08:23
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 12:24
UDF FOR UNSTEADY TIME STEP mayur FLUENT 3 August 9, 2006 10:19
How to create and define multiple domain? mishar CFX 4 February 3, 2005 07:31


All times are GMT -4. The time now is 15:44.