prghPressureFvPatchScalarField Class Reference

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

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

Public Member Functions

 TypeName ("prghPressure")
 Runtime type information. More...
 
 prghPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 Construct from patch and internal field. More...
 
 prghPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 prghPressureFvPatchScalarField (const prghPressureFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 Construct by mapping given. More...
 
 prghPressureFvPatchScalarField (const prghPressureFvPatchScalarField &)
 Construct as copy. More...
 
virtual tmp< fvPatchScalarFieldclone () const
 Construct and return a clone. More...
 
 prghPressureFvPatchScalarField (const prghPressureFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
 Construct as copy 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 scalarFieldp () const
 Return the static pressure. More...
 
scalarFieldp ()
 Return reference to the static 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 rhoName_
 Name of phase-fraction field. More...
 
scalarField p_
 Static pressure. More...
 

Detailed Description

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

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

where

\( p_rgh \) = Pseudo hydrostatic pressure [Pa]
\( p \) = Static 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
rho rho field name no rho
p static pressure yes

Example of the boundary condition specification:

    <patchName>
    {
        type            prghPressure;
        rho             rho;
        p               uniform 0;
        value           uniform 0; // optional initial value
    }
See also
Foam::fixedValueFvPatchScalarField
Source files

Definition at line 128 of file prghPressureFvPatchScalarField.H.

Constructor & Destructor Documentation

◆ prghPressureFvPatchScalarField() [1/5]

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

Construct from patch and internal field.

Definition at line 37 of file prghPressureFvPatchScalarField.C.

◆ prghPressureFvPatchScalarField() [2/5]

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

Construct from patch, internal field and dictionary.

Definition at line 50 of file prghPressureFvPatchScalarField.C.

References dict, dictionary::found(), fvPatchField< scalar >::operator, fvPatchField< Type >::operator=(), prghPressureFvPatchScalarField::p(), prghPressureFvPatchScalarField::p_, and UList< T >::size().

Here is the call graph for this function:

◆ prghPressureFvPatchScalarField() [3/5]

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

Construct by mapping given.

prghPressureFvPatchScalarField onto a new patch

Definition at line 76 of file prghPressureFvPatchScalarField.C.

◆ prghPressureFvPatchScalarField() [4/5]

Construct as copy.

Definition at line 91 of file prghPressureFvPatchScalarField.C.

◆ prghPressureFvPatchScalarField() [5/5]

Construct as copy setting internal field reference.

Definition at line 103 of file prghPressureFvPatchScalarField.C.

Member Function Documentation

◆ TypeName()

TypeName ( "prghPressure"  )

Runtime type information.

◆ clone() [1/2]

virtual tmp< fvPatchScalarField > clone ( ) const
inlinevirtual

Construct and return a clone.

Definition at line 184 of file prghPressureFvPatchScalarField.H.

◆ 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 200 of file prghPressureFvPatchScalarField.H.

◆ p() [1/2]

const scalarField & p ( ) const
inline

Return the static pressure.

Definition at line 217 of file prghPressureFvPatchScalarField.H.

References prghPressureFvPatchScalarField::p_.

Referenced by prghPressureFvPatchScalarField::prghPressureFvPatchScalarField().

Here is the caller graph for this function:

◆ p() [2/2]

scalarField & p ( )
inline

Return reference to the static pressure to allow adjustment.

Definition at line 223 of file prghPressureFvPatchScalarField.H.

References prghPressureFvPatchScalarField::p_.

◆ autoMap()

void autoMap ( const fvPatchFieldMapper m)
virtual

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

Definition at line 118 of file prghPressureFvPatchScalarField.C.

◆ rmap()

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

Reverse map the given fvPatchField onto this fvPatchField.

Definition at line 128 of file prghPressureFvPatchScalarField.C.

References prghPressureFvPatchScalarField::p_.

◆ updateCoeffs()

void updateCoeffs ( )
virtual

Update the coefficients associated with the patch field.

Definition at line 143 of file prghPressureFvPatchScalarField.C.

References Foam::cmptMag(), dimensioned< Type >::dimensions(), Foam::dimLength, g, Foam::mag(), Time::New(), Foam::operator==(), and dimensioned< Type >::value().

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Write.

Definition at line 174 of file prghPressureFvPatchScalarField.C.

References os(), ObukhovLength::write(), and Ostream::writeEntryIfDifferent().

Here is the call graph for this function:

Member Data Documentation

◆ rhoName_

word rhoName_
protected

Name of phase-fraction field.

Definition at line 138 of file prghPressureFvPatchScalarField.H.

◆ p_


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