totalPressureFvPatchScalarField Class Reference

Inflow, outflow and entrainment pressure boundary condition based on a constant total pressure assumption. 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 &)=delete
 Disallow copy without setting internal field reference. 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...
 
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 &)=delete
 Disallow copy without setting internal field reference. 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...
 
virtual void reset (const fvPatchScalarField &)
 Reset the fvPatchField to the given fvPatchField. 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...
 

Additional Inherited Members

- Protected Member Functions inherited from dynamicPressureFvPatchScalarField
void updateCoeffs (const scalarField &p0p, const scalarField &K0mKp)
 Update the coefficients associated with the patch field. More...
 

Detailed Description

Inflow, outflow and entrainment pressure boundary condition based on a constant total pressure assumption.

For outflow the patch pressure is set to the external static pressure.

For inflow the patch pressure is evaluated from the patch velocity and the external total pressure obtained from the external static pressure p_0 and external velocity U_0 which is looked-up from the the optional tangentialVelocity entry in the pressureInletOutletVelocity velocity boundary condition for the patch if that boundary condition is used, otherwise U_0 is assumed zero and the external total pressure is equal to the external static pressure.

The patch pressure is evaluated from the external conditions using one of the following expressions depending on the flow conditions and specification of compressibility:

1. incompressible subsonic:

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

where

$ p_p $ = pressure at patch [m^2/s^2]
$ p_0 $ = external static pressure [m^2/s^2]
$ U $ = velocity [m/s]
$ U_0 $ = external velocity [m/s]

2. compressible subsonic:

\[ p_p = p_0 + \rho (0.5 |U_0|^2 - 0.5 |U|^2) \]

where

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

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

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

where

$ p_p $ = pressure at patch [Pa]
$ p_0 $ = external static pressure [Pa]
$ \psi $ = compressibility [m^2/s^2]
$ \rho $ = density [kg/m^3]
$ U $ = velocity [m/s]
$ U_0 $ = external velocity [m/s]

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

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

where

$ p_p $ = pressure at patch [Pa]
$ p_0 $ = external static pressure [Pa]
$ \psi $ = compressibility [m^2/s^2]
$ \rho $ = density [kg/m^3]
$ G $ = coefficient given by $\frac{\gamma}{1-\gamma}$ []
$ \gamma $ = ratio of specific heats (Cp/Cv) []
$ U $ = velocity [m/s]
$ U_0 $ = external 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 External pressure yes

Example of the boundary condition specification:

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

Definition at line 307 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 36 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 48 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 61 of file totalPressureFvPatchScalarField.C.

References totalPressureFvPatchScalarField::totalPressureFvPatchScalarField().

Here is the call graph for this function:

◆ totalPressureFvPatchScalarField() [4/5]

Disallow copy without setting internal field reference.

◆ totalPressureFvPatchScalarField() [5/5]

Copy constructor setting internal field reference.

Definition at line 75 of file totalPressureFvPatchScalarField.C.

Member Function Documentation

◆ TypeName()

TypeName ( "totalPressure"  )

Runtime type information.

◆ clone()

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 370 of file totalPressureFvPatchScalarField.H.

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

Here is the call graph for this function:

◆ updateCoeffs()

void updateCoeffs ( )
virtual

◆ write()

Member Data Documentation

◆ UName_

◆ phiName_


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