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 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
 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 dictionary &dict),(name, dict))
 Declare runtime constructor selection table. More...
 
 Function2 (const word &name)
 Construct from name. More...
 
 Function2 (const Function2< Type > &f1)
 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...
 

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 dictionary &dict)
 Selector. More...
 
- Protected Member Functions inherited from refCount
 refCount ()
 Construct null initialising count to 0. 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 dictionary dict 
)

Construct from name and dictionary.

Definition at line 32 of file UniformTable2.C.

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 140 of file UniformTable2.H.

Referenced by rhoTabulated< Specie >::write().

Here is the caller graph for this function:

◆ value()

Type value ( scalar  x,
scalar  y 
) const
virtual

Evaluate the function and return the result.

Implements FieldFunction2< Type, UniformTable< Type > >.

Definition at line 93 of file UniformTable2.C.

Referenced by tabulatedTransport< Thermo >::kappa(), tabulatedTransport< Thermo >::mu(), UniformTable< scalar >::UniformTable(), and UniformTable< scalar >::values().

Here is the caller graph for this function:

◆ dfdp()

Type dfdp ( scalar  p,
scalar  T 
) const

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

Definition at line 130 of file UniformTable2.C.

Referenced by UniformTable< scalar >::value(), and UniformTable< scalar >::values().

Here is the caller graph for this function:

◆ 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.

Referenced by UniformTable< scalar >::dfdp(), and UniformTable< scalar >::values().

Here is the caller graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Write the function coefficients.

Implements Function2< Type >.

Definition at line 186 of file UniformTable2.C.

Referenced by UniformTable< scalar >::values().

Here is the caller graph for this function:

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