UniformTable< Type > Class Template Reference

Tabulated property function that linearly interpolates between the uniformTable values. More...

Inheritance diagram for UniformTable< Type >:
Collaboration diagram for UniformTable< Type >:

Public Member Functions

 TypeName ("uniformTable")
 Runtime type information. More...
 
 UniformTable (const word &name, const unitConversions &units, const dictionary &dict)
 Construct from name and dictionary. More...
 
const RectangularMatrix< Type > & values () const
 Return the non-uniform table of values. More...
 
virtual Type value (scalar x, scalar y) const
 Evaluate the function and return the result. More...
 
Type dfdp (scalar p, scalar T) const
 Evaluate the derivative of the function w.r.t. p. More...
 
Type dfdT (scalar p, scalar T) const
 Evaluate the derivative of the function w.r.t. T. More...
 
void write (Ostream &os, const unitConversions &units) const
 Write the function coefficients. More...
 
- Public Member Functions inherited from FieldFunction2< Type, UniformTable< Type > >
 FieldFunction2 (const word &name)
 Construct from name. More...
 
virtual tmp< Function2< Type > > clone () const
 Construct and return a clone. More...
 
virtual ~FieldFunction2 ()
 Destructor. More...
 
virtual tmp< Field< Type > > value (const scalarField &x, const scalarField &y) const
 Return value as a function of two scalar fields. More...
 
- Public Member Functions inherited from Function2< Type >
 TypeName ("Function2")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, Function2, dictionary,(const word &name, const Function2s::unitConversions &units, const dictionary &dict),(name, units, dict))
 
 declareRunTimeSelectionTable (autoPtr, Function2, Istream,(const word &name, const Function2s::unitConversions &units, Istream &is),(name, units, is))
 
 Function2 (const word &name)
 Construct from name. More...
 
 Function2 (const Function2< Type > &f2)
 Copy constructor. More...
 
virtual ~Function2 ()
 Destructor. More...
 
const wordname () const
 Return the name of the entry. More...
 
void operator= (const Function2< Type > &)
 Assignment. More...
 
- Public Member Functions inherited from refCount
int count () const
 Return the current reference count. More...
 
bool unique () const
 Return true if the reference count is zero. More...
 
void operator++ ()
 Increment the reference count. More...
 
void operator++ (int)
 Increment the reference count. More...
 
void operator-- ()
 Decrement the reference count. More...
 
void operator-- (int)
 Decrement the reference count. More...
 
void operator= (const refCount &)=delete
 Disallow bitwise assignment. More...
 

Additional Inherited Members

- Public Types inherited from Function2< Type >
typedef Type returnType
 
- Static Public Member Functions inherited from Function2< Type >
static autoPtr< Function2< Type > > New (const word &name, const Function2s::unitConversions &units, const dictionary &dict)
 Select from dictionary. More...
 
static autoPtr< Function2< Type > > New (const word &name, const unitConversion &xUnits, const unitConversion &yUnits, const unitConversion &valueUnits, const dictionary &dict)
 Select from dictionary. More...
 
static autoPtr< Function2< Type > > New (const word &name, const Function2s::unitConversions &units, const word &Function2Type, Istream &is)
 Select from Istream. More...
 
static autoPtr< Function2< Type > > New (const word &name, const unitConversion &xUnits, const unitConversion &yUnits, const unitConversion &valueUnits, const word &Function2Type, Istream &is)
 Select from Istream. More...
 
- Protected Member Functions inherited from refCount
 refCount ()
 Construct null initialising count to 0. More...
 
 refCount (const refCount &)=delete
 Disallow copy. More...
 
- Protected Attributes inherited from Function2< Type >
const word name_
 Name of entry. More...
 

Detailed Description

template<class Type>
class Foam::Function2s::UniformTable< Type >

Tabulated property function that linearly interpolates between the uniformTable values.

Usage
Property Description
Tlow Lower temperature limit of the uniformTable
Thigh Upper temperature limit of the uniformTable
values Property values, assumed uniformly distributed

Example for the density of water from 1 to 3bar and 280 to 350K

    rho
    {
        type    uniformTable;

        low     (1e5 280);
        high    (3e5 350);

        values
        3 2
        (
            (991 992)
            (993 994)
            (995 996)
        );
    }

Definition at line 90 of file UniformTable2.H.

Constructor & Destructor Documentation

◆ UniformTable()

UniformTable ( const word name,
const unitConversions units,
const dictionary dict 
)

Construct from name and dictionary.

Definition at line 31 of file UniformTable2.C.

References Foam::assertNoConvertUnits(), dict, Foam::exit(), Foam::FatalError, FatalErrorInFunction, Pair< Type >::first(), Function2< Type >::name_, Foam::nl, Pair< Type >::second(), and Foam::units().

Here is the call graph for this function:

Member Function Documentation

◆ TypeName()

TypeName ( "uniformTable"  )

Runtime type information.

◆ values()

const RectangularMatrix<Type>& values ( ) const
inline

Return the non-uniform table of values.

Definition at line 145 of file UniformTable2.H.

◆ value()

Type value ( scalar  x,
scalar  y 
) const
virtual

Evaluate the function and return the result.

Implements FieldFunction2< Type, UniformTable< Type > >.

Definition at line 95 of file UniformTable2.C.

References x, and y.

◆ dfdp()

Type dfdp ( scalar  p,
scalar  T 
) const

Evaluate the derivative of the function w.r.t. p.

Definition at line 131 of file UniformTable2.C.

◆ dfdT()

Type dfdT ( scalar  p,
scalar  T 
) const

Evaluate the derivative of the function w.r.t. T.

Definition at line 159 of file UniformTable2.C.

◆ write()

void write ( Ostream os,
const unitConversions units 
) const
virtual

Write the function coefficients.

Implements Function2< Type >.

Definition at line 187 of file UniformTable2.C.

References Foam::writeEntry().

Here is the call graph for this function:

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