prghTotalPressureFvPatchScalarField Class Reference

This boundary condition provides static pressure condition for p_rgh, calculated as: More...

Inheritance diagram for prghTotalPressureFvPatchScalarField:
[legend]
Collaboration diagram for prghTotalPressureFvPatchScalarField:
[legend]

Public Member Functions

 TypeName ("prghTotalPressure")
 Runtime type information. More...
 
 prghTotalPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 Construct from patch and internal field. More...
 
 prghTotalPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 prghTotalPressureFvPatchScalarField (const prghTotalPressureFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 Construct by mapping given. More...
 
 prghTotalPressureFvPatchScalarField (const prghTotalPressureFvPatchScalarField &)
 Construct as copy. More...
 
virtual tmp< fvPatchScalarField > clone () const
 Construct and return a clone. More...
 
 prghTotalPressureFvPatchScalarField (const prghTotalPressureFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
 Construct as copy setting internal field reference. More...
 
virtual tmp< fvPatchScalarField > clone (const DimensionedField< scalar, volMesh > &iF) const
 Construct and return a clone setting internal field reference. More...
 
const scalarField & p0 () const
 Return the total pressure. More...
 
scalarField & p0 ()
 Return reference to the total pressure to allow adjustment. More...
 
virtual void autoMap (const fvPatchFieldMapper &)
 Map (and resize as needed) from self given a mapping object. More...
 
virtual void rmap (const fvPatchScalarField &, const labelList &)
 Reverse map the given fvPatchField onto this fvPatchField. More...
 
virtual void updateCoeffs ()
 Update the coefficients associated with the patch field. More...
 
virtual void write (Ostream &) const
 Write. More...
 

Protected Attributes

word UName_
 Name of the velocity field. More...
 
word phiName_
 Name of the flux transporting the field. More...
 
word rhoName_
 Name of phase-fraction field. More...
 
scalarField p0_
 Total pressure. More...
 

Detailed Description

This boundary condition provides static pressure condition for p_rgh, calculated as:

\[ p_rgh = p - \rho g.(h - hRef) \]

\[ p = p0 - 0.5 \rho |U|^2 \]

where

\( p_rgh \) = Pseudo hydrostatic pressure [Pa]
\( p \) = Static pressure [Pa]
\( p0 \) = Total pressure [Pa]
\( h \) = Height in the opposite direction to gravity
\( hRef \) = Reference height in the opposite direction to gravity
\( \rho \) = Density
\( g \) = Acceleration due to gravity [m/s^2]
Usage
Property Description Required Default value
U Velocity field name no U
phi Flux field name no phi
rho Density field name no rho
p0 Total pressure yes

Example of the boundary condition specification:

    <patchName>
    {
        type            prghTotalPressure;
        p0              uniform 0;
    }
See also
Foam::fixedValueFvPatchScalarField
Source files

Definition at line 147 of file prghTotalPressureFvPatchScalarField.H.

Constructor & Destructor Documentation

◆ prghTotalPressureFvPatchScalarField() [1/5]

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

Construct from patch and internal field.

Definition at line 39 of file prghTotalPressureFvPatchScalarField.C.

Referenced by prghTotalPressureFvPatchScalarField::clone().

Here is the caller graph for this function:

◆ prghTotalPressureFvPatchScalarField() [2/5]

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

Construct from patch, internal field and dictionary.

Definition at line 53 of file prghTotalPressureFvPatchScalarField.C.

References dict, and p.

◆ prghTotalPressureFvPatchScalarField() [3/5]

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

Construct by mapping given.

prghTotalPressureFvPatchScalarField onto a new patch

Definition at line 80 of file prghTotalPressureFvPatchScalarField.C.

◆ prghTotalPressureFvPatchScalarField() [4/5]

◆ prghTotalPressureFvPatchScalarField() [5/5]

Construct as copy setting internal field reference.

Definition at line 109 of file prghTotalPressureFvPatchScalarField.C.

Member Function Documentation

◆ TypeName()

TypeName ( "prghTotalPressure"  )

Runtime type information.

◆ clone() [1/2]

virtual tmp<fvPatchScalarField> clone ( ) const
inlinevirtual

Construct and return a clone.

Definition at line 209 of file prghTotalPressureFvPatchScalarField.H.

References prghTotalPressureFvPatchScalarField::prghTotalPressureFvPatchScalarField().

Here is the call graph for this function:

◆ clone() [2/2]

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

Construct and return a clone setting internal field reference.

Definition at line 226 of file prghTotalPressureFvPatchScalarField.H.

References prghTotalPressureFvPatchScalarField::prghTotalPressureFvPatchScalarField().

Here is the call graph for this function:

◆ p0() [1/2]

const scalarField& p0 ( ) const
inline

Return the total pressure.

Definition at line 242 of file prghTotalPressureFvPatchScalarField.H.

References prghTotalPressureFvPatchScalarField::p0_.

◆ p0() [2/2]

scalarField& p0 ( )
inline

Return reference to the total pressure to allow adjustment.

Definition at line 248 of file prghTotalPressureFvPatchScalarField.H.

References prghTotalPressureFvPatchScalarField::p0_.

◆ autoMap()

void autoMap ( const fvPatchFieldMapper &  m)
virtual

Map (and resize as needed) from self given a mapping object.

Definition at line 125 of file prghTotalPressureFvPatchScalarField.C.

◆ rmap()

void rmap ( const fvPatchScalarField &  ptf,
const labelList &  addr 
)
virtual

Reverse map the given fvPatchField onto this fvPatchField.

Definition at line 135 of file prghTotalPressureFvPatchScalarField.C.

References prghTotalPressureFvPatchScalarField::p0_.

◆ updateCoeffs()

void updateCoeffs ( )
virtual

Update the coefficients associated with the patch field.

Definition at line 149 of file prghTotalPressureFvPatchScalarField.C.

References Foam::cmptMag(), Foam::dimLength, g, Foam::mag(), Foam::magSqr(), gravity::New(), prghTotalPressureFvPatchScalarField::p0_, Foam::foamVersion::patch, prghTotalPressureFvPatchScalarField::phiName_, Foam::pos0(), prghTotalPressureFvPatchScalarField::rhoName_, and prghTotalPressureFvPatchScalarField::UName_.

Here is the call graph for this function:

◆ write()

void write ( Ostream &  os) const
virtual

Write.

Definition at line 189 of file prghTotalPressureFvPatchScalarField.C.

References fvPatchField< scalar >::write(), and Ostream::writeEntryIfDifferent().

Here is the call graph for this function:

Member Data Documentation

◆ UName_

word UName_
protected

Name of the velocity field.

Definition at line 157 of file prghTotalPressureFvPatchScalarField.H.

Referenced by prghTotalPressureFvPatchScalarField::updateCoeffs().

◆ phiName_

word phiName_
protected

Name of the flux transporting the field.

Definition at line 160 of file prghTotalPressureFvPatchScalarField.H.

Referenced by prghTotalPressureFvPatchScalarField::updateCoeffs().

◆ rhoName_

word rhoName_
protected

Name of phase-fraction field.

Definition at line 163 of file prghTotalPressureFvPatchScalarField.H.

Referenced by prghTotalPressureFvPatchScalarField::updateCoeffs().

◆ p0_


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