Non-uniform tabulated property function that linearly interpolates between the values. More...
Public Member Functions | |
TypeName ("nonUniformTable") | |
Runtime type information. More... | |
nonUniformTable (const word &name, const dictionary &dict) | |
Construct from entry name and dictionary. More... | |
nonUniformTable (const dictionary &dict) | |
Construct from dictionary. More... | |
const List< Tuple2< scalar, scalar > > & | values () const |
Return the non-uniform table of values. More... | |
scalar | f (scalar p, scalar T) const |
Evaluate the function and return the result. More... | |
scalar | dfdT (scalar p, scalar T) const |
Evaluate the derivative of the function and return the result. More... | |
void | write (Ostream &os) const |
Write the function coefficients. More... | |
Public Member Functions inherited from thermophysicalFunction | |
TypeName ("thermophysicalFunction") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, thermophysicalFunction, dictionary,(const dictionary &dict),(dict)) | |
thermophysicalFunction () | |
Construct null. More... | |
virtual | ~thermophysicalFunction () |
Destructor. More... | |
virtual void | write (Ostream &os, const word &name) const |
Write the function coefficients within the property sub-dictionary. More... | |
Protected Member Functions | |
label | index (scalar p, scalar T) const |
Return the lower index of the interval in the table. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from thermophysicalFunction | |
static autoPtr< thermophysicalFunction > | New (const dictionary &dict, const word &name) |
Return pointer to new thermophysicalFunction created from dict. More... | |
Non-uniform tabulated property function that linearly interpolates between the values.
To speed-up the search of the non-uniform table a uniform jump-table is created on construction which is used for fast indirect addressing into the table.
Example for the density of water between 280 and 350K
rho { type nonUniformTable; values ( (280 999.87) (300 995.1) (350 973.7) ); }
Definition at line 74 of file nonUniformTableThermophysicalFunction.H.
nonUniformTable | ( | const word & | name, |
const dictionary & | dict | ||
) |
Construct from entry name and dictionary.
Definition at line 56 of file nonUniformTableThermophysicalFunction.C.
References Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, forAll, Foam::min(), Foam::nl, and Foam::T().
nonUniformTable | ( | const dictionary & | dict | ) |
Construct from dictionary.
Definition at line 106 of file nonUniformTableThermophysicalFunction.C.
References nonUniformTable::f().
|
inlineprotected |
Return the lower index of the interval in the table.
corresponding to the given temperature
Definition at line 31 of file nonUniformTableThermophysicalFunctionI.H.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.
TypeName | ( | "nonUniformTable" | ) |
Runtime type information.
Return the non-uniform table of values.
Definition at line 123 of file nonUniformTableThermophysicalFunction.H.
References nonUniformTable::dfdT(), nonUniformTable::f(), and nonUniformTable::write().
Referenced by icoTabulated< Specie >::write().
|
virtual |
Evaluate the function and return the result.
Implements thermophysicalFunction.
Definition at line 117 of file nonUniformTableThermophysicalFunction.C.
References nonUniformTable::dfdT(), and lambda().
Referenced by tabulatedTransport< Thermo >::kappa(), tabulatedTransport< Thermo >::mu(), nonUniformTable::nonUniformTable(), and nonUniformTable::values().
Foam::scalar dfdT | ( | scalar | p, |
scalar | T | ||
) | const |
Evaluate the derivative of the function and return the result.
Definition at line 133 of file nonUniformTableThermophysicalFunction.C.
Referenced by nonUniformTable::f(), and nonUniformTable::values().
|
virtual |
Write the function coefficients.
Implements thermophysicalFunction.
Definition at line 146 of file nonUniformTableThermophysicalFunction.C.
References Foam::writeEntry().
Referenced by nonUniformTable::values(), and integratedNonUniformTable::write().