uniformTotalPressureFvPatchScalarField Class Reference

This boundary condition provides a time-varying form of the uniform total pressure boundary condition Foam::totalPressureFvPatchField. More...

Inheritance diagram for uniformTotalPressureFvPatchScalarField:
Collaboration diagram for uniformTotalPressureFvPatchScalarField:

Public Member Functions

 TypeName ("uniformTotalPressure")
 Runtime type information. More...
 
 uniformTotalPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 Construct from patch and internal field. More...
 
 uniformTotalPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 uniformTotalPressureFvPatchScalarField (const uniformTotalPressureFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 Construct by mapping given patch field onto a new patch. More...
 
 uniformTotalPressureFvPatchScalarField (const uniformTotalPressureFvPatchScalarField &)=delete
 Disallow copy without setting internal field reference. More...
 
 uniformTotalPressureFvPatchScalarField (const uniformTotalPressureFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
 Copy constructor setting internal field reference. More...
 
virtual tmp< fvPatchScalarFieldclone (const DimensionedField< scalar, volMesh > &iF) const
 Construct and return a clone setting internal field reference. More...
 
const wordUName () const
 Return the name of the velocity field. More...
 
wordUName ()
 Return reference to the name of the velocity field. More...
 
scalar gamma () const
 Return the heat capacity ratio. More...
 
scalar & gamma ()
 Return reference to the heat capacity ratio to allow adjustment. More...
 
virtual void updateCoeffs (const vectorField &Up)
 Update the coefficients associated with the patch field. More...
 
virtual void updateCoeffs ()
 Update the coefficients associated with the patch field. More...
 
virtual void write (Ostream &) const
 Write. More...
 

Detailed Description

This boundary condition provides a time-varying form of the uniform total pressure boundary condition Foam::totalPressureFvPatchField.

Usage
Property Description Required Default value
U Velocity field name no U
phi Flux field name no phi
rho Density field name no rho
psi Compressibility field name no none
gamma (Cp/Cv) no 1
p0 Total pressure as a function of time yes

Example of the boundary condition specification:

    <patchName>
    {
        type            uniformTotalPressure;
        p0              uniform 1e5;
    }

The p0 entry is specified as a Function1 type, able to describe time varying functions.

See also
Foam::Function1s Foam::uniformFixedValueFvPatchField Foam::totalPressureFvPatchField
Source files

Definition at line 113 of file uniformTotalPressureFvPatchScalarField.H.

Constructor & Destructor Documentation

◆ uniformTotalPressureFvPatchScalarField() [1/5]

uniformTotalPressureFvPatchScalarField ( const fvPatch p,
const DimensionedField< scalar, volMesh > &  iF 
)

Construct from patch and internal field.

Definition at line 36 of file uniformTotalPressureFvPatchScalarField.C.

Referenced by uniformTotalPressureFvPatchScalarField::clone(), and uniformTotalPressureFvPatchScalarField::uniformTotalPressureFvPatchScalarField().

Here is the caller graph for this function:

◆ uniformTotalPressureFvPatchScalarField() [2/5]

uniformTotalPressureFvPatchScalarField ( const fvPatch p,
const DimensionedField< scalar, volMesh > &  iF,
const dictionary dict 
)

Construct from patch, internal field and dictionary.

Definition at line 53 of file uniformTotalPressureFvPatchScalarField.C.

References dictionary::found(), Foam::operator==(), scalarField(), fvPatch::size(), and uniformTotalPressureFvPatchScalarField::uniformTotalPressureFvPatchScalarField().

Here is the call graph for this function:

◆ uniformTotalPressureFvPatchScalarField() [3/5]

uniformTotalPressureFvPatchScalarField ( const uniformTotalPressureFvPatchScalarField ptf,
const fvPatch p,
const DimensionedField< scalar, volMesh > &  iF,
const fvPatchFieldMapper mapper 
)

Construct by mapping given patch field onto a new patch.

Definition at line 84 of file uniformTotalPressureFvPatchScalarField.C.

References Foam::operator==(), and uniformTotalPressureFvPatchScalarField::uniformTotalPressureFvPatchScalarField().

Here is the call graph for this function:

◆ uniformTotalPressureFvPatchScalarField() [4/5]

Disallow copy without setting internal field reference.

◆ uniformTotalPressureFvPatchScalarField() [5/5]

Copy constructor setting internal field reference.

Definition at line 108 of file uniformTotalPressureFvPatchScalarField.C.

References uniformTotalPressureFvPatchScalarField::updateCoeffs().

Here is the call graph for this function:

Member Function Documentation

◆ TypeName()

TypeName ( "uniformTotalPressure"  )

Runtime type information.

◆ clone()

virtual tmp<fvPatchScalarField> clone ( const DimensionedField< scalar, volMesh > &  iF) const
inlinevirtual

Construct and return a clone setting internal field reference.

Definition at line 186 of file uniformTotalPressureFvPatchScalarField.H.

References uniformTotalPressureFvPatchScalarField::uniformTotalPressureFvPatchScalarField().

Here is the call graph for this function:

◆ UName() [1/2]

const word& UName ( ) const
inline

Return the name of the velocity field.

Definition at line 202 of file uniformTotalPressureFvPatchScalarField.H.

◆ UName() [2/2]

word& UName ( )
inline

Return reference to the name of the velocity field.

to allow adjustment

Definition at line 209 of file uniformTotalPressureFvPatchScalarField.H.

◆ gamma() [1/2]

scalar gamma ( ) const
inline

Return the heat capacity ratio.

Definition at line 215 of file uniformTotalPressureFvPatchScalarField.H.

◆ gamma() [2/2]

scalar& gamma ( )
inline

Return reference to the heat capacity ratio to allow adjustment.

Definition at line 221 of file uniformTotalPressureFvPatchScalarField.H.

References uniformTotalPressureFvPatchScalarField::updateCoeffs(), and uniformTotalPressureFvPatchScalarField::write().

Here is the call graph for this function:

◆ updateCoeffs() [1/2]

void updateCoeffs ( const vectorField Up)
virtual

Update the coefficients associated with the patch field.

using the given patch velocity field

Definition at line 126 of file uniformTotalPressureFvPatchScalarField.C.

References Foam::dimDensity, Foam::dimPressure, Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::magSqr(), Foam::nl, Foam::operator==(), Foam::pos0(), Foam::pow(), and rho.

Here is the call graph for this function:

◆ updateCoeffs() [2/2]

void updateCoeffs ( )
virtual

Update the coefficients associated with the patch field.

Definition at line 203 of file uniformTotalPressureFvPatchScalarField.C.

Referenced by uniformTotalPressureFvPatchScalarField::gamma(), and uniformTotalPressureFvPatchScalarField::uniformTotalPressureFvPatchScalarField().

Here is the caller graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Write.

Definition at line 209 of file uniformTotalPressureFvPatchScalarField.C.

References Foam::makePatchTypeField(), fvPatchField< Type >::write(), and Foam::writeEntry().

Referenced by uniformTotalPressureFvPatchScalarField::gamma().

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: