nonUniformTable Class Reference

Non-uniform tabulated property function that linearly interpolates between the values. More...

Inheritance diagram for nonUniformTable:
Collaboration diagram for nonUniformTable:

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< thermophysicalFunctionNew (const dictionary &dict, const word &name)
 Return pointer to new thermophysicalFunction created from dict. More...
 

Detailed Description

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.

Usage
Property | Description values | List of (temperature property) value pairs

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.

Constructor & Destructor Documentation

◆ nonUniformTable() [1/2]

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().

Here is the call graph for this function:

◆ nonUniformTable() [2/2]

nonUniformTable ( const dictionary dict)

Construct from dictionary.

Definition at line 106 of file nonUniformTableThermophysicalFunction.C.

References nonUniformTable::f().

Here is the call graph for this function:

Member Function Documentation

◆ index()

Foam::label index ( scalar  p,
scalar  T 
) const
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.

Here is the call graph for this function:

◆ TypeName()

TypeName ( "nonUniformTable"  )

Runtime type information.

◆ values()

const List<Tuple2<scalar, scalar> >& values ( ) const
inline

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ f()

Foam::scalar f ( scalar  p,
scalar  T 
) const
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dfdT()

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().

Here is the caller graph for this function:

◆ write()

void write ( Ostream os) const
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().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: