totalPressureFvPatchScalarField Class Reference

This boundary condition provides a total pressure condition. Four variants are possible: More...

Inheritance diagram for totalPressureFvPatchScalarField:
Collaboration diagram for totalPressureFvPatchScalarField:

Public Member Functions

 TypeName ("totalPressure")
 Runtime type information. More...
 
 totalPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 Construct from patch and internal field. More...
 
 totalPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 totalPressureFvPatchScalarField (const totalPressureFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 Construct by mapping given totalPressureFvPatchScalarField. More...
 
 totalPressureFvPatchScalarField (const totalPressureFvPatchScalarField &)
 Copy constructor. More...
 
virtual tmp< fvPatchScalarFieldclone () const
 Construct and return a clone. More...
 
 totalPressureFvPatchScalarField (const totalPressureFvPatchScalarField &, 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...
 
void updateCoeffs (const scalarField &p0p, 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...
 
- Public Member Functions inherited from dynamicPressureFvPatchScalarField
 TypeName ("dynamicPressure")
 Runtime type information. More...
 
 dynamicPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 Construct from patch and internal field. More...
 
 dynamicPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 dynamicPressureFvPatchScalarField (const dynamicPressureFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 Construct by mapping given dynamicPressureFvPatchScalarField. More...
 
 dynamicPressureFvPatchScalarField (const dynamicPressureFvPatchScalarField &)
 Copy constructor. More...
 
 dynamicPressureFvPatchScalarField (const dynamicPressureFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
 Copy constructor setting internal field reference. 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...
 
void updateCoeffs (const scalarField &p0p, const scalarField &Kp)
 Update the coefficients associated with the patch field. More...
 

Protected Attributes

const word UName_
 Name of the velocity field. More...
 
const word phiName_
 Name of the flux field. More...
 
- Protected Attributes inherited from dynamicPressureFvPatchScalarField
const word rhoName_
 Name of the density field used to normalise the mass flux. More...
 
const word psiName_
 Name of the compressibility field used to calculate the wave speed. More...
 
const scalar gamma_
 Heat capacity ratio. More...
 
scalarField p0_
 Reference pressure. More...
 

Detailed Description

This boundary condition provides a total pressure condition. Four variants are possible:

1. incompressible subsonic:

\[ p_p = p_0 - 0.5 |U|^2 \]

where

$ p_p $ = incompressible pressure at patch [m^2/s^2]
$ p_0 $ = incompressible total pressure [m^2/s^2]
$ U $ = velocity [m/s]

2. compressible subsonic:

\[ p_p = p_0 - 0.5 \rho |U|^2 \]

where

$ p_p $ = pressure at patch [Pa]
$ p_0 $ = total pressure [Pa]
$ \rho $ = density [kg/m^3]
$ U $ = velocity [m/s]

3. compressible transonic ( $\gamma = 1$):

\[ p_p = \frac{p_0}{1 + 0.5 \psi |U|^2} \]

where

$ p_p $ = pressure at patch [Pa]
$ p_0 $ = total pressure [Pa]
$ \psi $ = compressibility [m^2/s^2]
$ U $ = velocity [m/s]

4. compressible supersonic ( $\gamma > 1$):

\[ p_p = \frac{p_0}{(1 + 0.5 \psi G |U|^2)^{\frac{1}{G}}} \]

where

$ p_p $ = pressure at patch [Pa]
$ p_0 $ = total pressure [Pa]
$ \psi $ = compressibility [m^2/s^2]
$ G $ = coefficient given by $\frac{\gamma}{1-\gamma}$ []
$ \gamma $ = ratio of specific heats (Cp/Cv) []
$ U $ = velocity [m/s]

The modes of operation are set by the dimensions of the pressure field to which this boundary condition is applied, the psi entry and the value of gamma:

Mode dimensions psi gamma
incompressible subsonic p/rho
compressible subsonic p none
compressible transonic p psi 1
compressible supersonic p psi > 1
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 yes

Example of the boundary condition specification:

    <patchName>
    {
        type            totalPressure;
        p0              uniform 1e5;
    }
See also
Foam::dynamicPressureFvPatchScalarField Foam::fixedValueFvPatchField
Source files

Definition at line 261 of file totalPressureFvPatchScalarField.H.

Constructor & Destructor Documentation

◆ totalPressureFvPatchScalarField() [1/5]

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

Construct from patch and internal field.

Definition at line 35 of file totalPressureFvPatchScalarField.C.

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

Here is the caller graph for this function:

◆ totalPressureFvPatchScalarField() [2/5]

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

Construct from patch, internal field and dictionary.

Definition at line 47 of file totalPressureFvPatchScalarField.C.

References totalPressureFvPatchScalarField::totalPressureFvPatchScalarField().

Here is the call graph for this function:

◆ totalPressureFvPatchScalarField() [3/5]

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

Construct by mapping given totalPressureFvPatchScalarField.

onto a new patch

Definition at line 60 of file totalPressureFvPatchScalarField.C.

References totalPressureFvPatchScalarField::totalPressureFvPatchScalarField().

Here is the call graph for this function:

◆ totalPressureFvPatchScalarField() [4/5]

Copy constructor.

Definition at line 74 of file totalPressureFvPatchScalarField.C.

References totalPressureFvPatchScalarField::totalPressureFvPatchScalarField().

Here is the call graph for this function:

◆ totalPressureFvPatchScalarField() [5/5]

Copy constructor setting internal field reference.

Definition at line 85 of file totalPressureFvPatchScalarField.C.

References totalPressureFvPatchScalarField::updateCoeffs().

Here is the call graph for this function:

Member Function Documentation

◆ TypeName()

TypeName ( "totalPressure"  )

Runtime type information.

◆ clone() [1/2]

virtual tmp<fvPatchScalarField> clone ( ) const
inlinevirtual

Construct and return a clone.

Reimplemented in fanPressureFvPatchScalarField, and rotatingTotalPressureFvPatchScalarField.

Definition at line 316 of file totalPressureFvPatchScalarField.H.

References totalPressureFvPatchScalarField::totalPressureFvPatchScalarField().

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.

Reimplemented in fanPressureFvPatchScalarField, and rotatingTotalPressureFvPatchScalarField.

Definition at line 333 of file totalPressureFvPatchScalarField.H.

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

Here is the call graph for this function:

◆ updateCoeffs() [1/2]

void updateCoeffs ( const scalarField p0p,
const vectorField Up 
)

Update the coefficients associated with the patch field.

using the given patch total pressure and velocity fields

Definition at line 99 of file totalPressureFvPatchScalarField.C.

References Foam::magSqr(), and Foam::pos0().

Here is the call graph for this function:

◆ updateCoeffs() [2/2]

◆ write()

Member Data Documentation

◆ UName_

◆ phiName_

const word phiName_
protected

Name of the flux field.

Definition at line 273 of file totalPressureFvPatchScalarField.H.

Referenced by totalPressureFvPatchScalarField::write().


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