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

[Other] Tabulated thermophysicalProperties library

Register Blogs Community New Posts Updated Threads Search

Like Tree36Likes

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   September 17, 2014, 04:40
Default Tabulated thermophysicalProperties library
  #1
Senior Member
 
Join Date: Oct 2013
Posts: 397
Rep Power: 18
chriss85 will become famous soon enough
I've finally gotten around to cleaning up my code for using tabulated material properties so I can release it.

Keep in mind that it's still work in progress, so please tell me if you find any problems.

Currently there is support for:
  • Equation of state (rho(T,p))
  • Enthalpy (h(p,T))
  • Heat conductivity (kappa(T,p))
  • Viscosity (mu(T,p))
The properties will be linearly extrapolated outside the ranges of the provided tables.


The code is based on the compressibility based formulation hePsiThermo, so heRhoThermo based solvers may not be supported (or only partially, haven't tried).
Also multiphase flows are currently unsupported. If anyone wants to add them, go ahead! It basically comes down to implementing the operators in the classes properly I think.


If you use the tabulated enthalpy, it is suggested that you provide an inverted T(p,h) table and use heTabularThermo instead of hePsiThermo for much better performance.


An example thermophysicalProperties file may contain these entries:

Code:
thermoType
{
    type            heTabularThermo;
    mixture         pureMixture;
    transport       tabular;
    thermo          hTabular;
    equationOfState tabularEOS;
    specie          specie;
    energy          sensibleInternalEnergy;
}
The tables are placed in the constant directory, using these names:
  • densityTable
  • kappaTable
  • hTable
  • TTable
  • muTable
  • cpTable (if you use the enthalpy model in this library and don't use heTabularThermo model you will need the heat capacity. I strongly suggest using heTabularThermo instead.)
The code produces a libTabularThermophysicalModels library that can be included in solvers directly in code or (probably) through function objects (don't quote me on that, I don't use them).

A table file looks like this:
Code:
(
(temperature1 ((pressure1 value11)(pressure2 value12)...)
(temperature2 ((pressure1 value21)(pressure2 value22)...)
...
)
For hTable and TTable the temperatures and pressures are exchanged, so the rows of the table contain the pressure. This is neccessary because the inverted TTable is not an orthogonal grid of points anymore. Sorry for this inconsistency, feel free to modify it if this bothers you.
Attached Files
File Type: zip tabularProperties.zip (63.5 KB, 471 views)
chriss85 is offline   Reply With Quote

 


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
[Other] Multi species mass transport library [update] novyno OpenFOAM Community Contributions 111 November 9, 2021 23:37
ERROR: unable to find library HJH CFX 6 February 26, 2019 06:52
Forcing a solver to use your custom library. cdunn6754 OpenFOAM Programming & Development 0 March 30, 2017 16:05
Compiled library vs. inInclude Files, DSMC solver crashes after run GPesch OpenFOAM Programming & Development 8 April 18, 2013 07:17
OpenFOAM141dev linking error on IBM AIX 52 matthias OpenFOAM Installation 24 April 28, 2008 15:49


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