|
[Sponsors] |
How to define multiple ranges for JANAF coefficients? (OF5/OF6) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 14, 2019, 11:20 |
How to define multiple ranges for JANAF coefficients? (OF5/OF6)
|
#1 |
Senior Member
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 9 |
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 ); } Last edited by deepbandivadekar; January 15, 2019 at 13:41. |
|
January 14, 2019, 16:20 |
|
#2 |
Member
Join Date: Dec 2018
Location: Darmstadt, Germany
Posts: 87
Rep Power: 7 |
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. |
|
January 15, 2019, 07:33 |
|
#3 | |
Senior Member
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 9 |
Quote:
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 ); } Thanks! |
||
January 16, 2019, 08:35 |
|
#4 |
Member
Join Date: Dec 2018
Location: Darmstadt, Germany
Posts: 87
Rep Power: 7 |
Yes, something like this is a good starting point, even though the final version will depend on how you implement it.
|
|
Tags |
janaf, openfoam 5, openfoam 6, thermophysicalproperties |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Robin B.C. | Yu | FLUENT | 3 | May 27, 2012 05:19 |
REAL GAS UDF | brian | FLUENT | 6 | September 11, 2006 09:23 |
Free surface boudary conditions with SOLA-VOF | Fan | Main CFD Forum | 10 | September 9, 2006 13:24 |
UDF FOR UNSTEADY TIME STEP | mayur | FLUENT | 3 | August 9, 2006 11:19 |
How to create and define multiple domain? | mishar | CFX | 4 | February 3, 2005 08:31 |