entrainmentPressureFvPatchScalarField Class Reference

This is a boundary condition for pressure suitable for boundaries at which the flow direction is uncertain but both inflow and/or outflow can occur. The condition switches based on the direction of flow. For outflow, the patch pressure is simply set to the reference pressure. For inflow, the patch pressure is reduced by the dynamic pressure calculated using the inflow velocity normal to the patch. More...

Inheritance diagram for entrainmentPressureFvPatchScalarField:
Collaboration diagram for entrainmentPressureFvPatchScalarField:

Public Member Functions

 TypeName ("entrainmentPressure")
 Runtime type information. More...
 
 entrainmentPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 entrainmentPressureFvPatchScalarField (const entrainmentPressureFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fieldMapper &)
 Construct by mapping given entrainmentPressureFvPatchScalarField. More...
 
 entrainmentPressureFvPatchScalarField (const entrainmentPressureFvPatchScalarField &)=delete
 Disallow copy without setting internal field reference. More...
 
 entrainmentPressureFvPatchScalarField (const entrainmentPressureFvPatchScalarField &, 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 > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 dynamicPressureFvPatchScalarField (const dynamicPressureFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fieldMapper &)
 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 map (const fvPatchScalarField &, const fieldMapper &)
 Map the given fvPatchField onto this fvPatchField. More...
 
virtual void reset (const fvPatchScalarField &)
 Reset the fvPatchField to the given fvPatchField. 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...
 
- 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 is a boundary condition for pressure suitable for boundaries at which the flow direction is uncertain but both inflow and/or outflow can occur. The condition switches based on the direction of flow. For outflow, the patch pressure is simply set to the reference pressure. For inflow, the patch pressure is reduced by the dynamic pressure calculated using the inflow velocity normal to the patch.

For incompressible flow, with pressure expressed in kinematic units, the pressure with inflow is calculated as:

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

where

$ p_p $ = pressure at patch [m^2/s^2]
$ p_0 $ = reference pressure [m^2/s^2]
$ Un $ = patch normal velocity [m/s]

The condition is similar to the totalPressure condition and includes further calculations of pressure for compressible flow under subsonic, transonic and supersonic regimes.

Like totalPressure, entrainmentPressure is usually applied in conjunction with the pressureInletOutletVelocity condition for velocity. The entrainmentPressure condition calculates the pressure using a normal velocity, based on the fluxes at the boundary. The totalPressure condition calculates the pressure using the inflow velocity itself.

With the pressureInletOutletVelocity condition, using the default tangentialVelocity of zero, any inflow velocity is constrained to be normal to the boundary, making the two pressure boundary conditions very similar. The entrainmentPressure condition is, however, more robust because it couples with the flux rather than velocity. The condition performs particularly well at boundaries where the flow direction tends to switch frequently between in and out of the domain.

Usage
Property Description Required Default value
phi Flux field name no phi
rho Density field name no rho
psi Compressibility field name no none
gamma (Cp/Cv) no 1
p0 Reference pressure yes

Example of the boundary condition specification:

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

Definition at line 150 of file entrainmentPressureFvPatchScalarField.H.

Constructor & Destructor Documentation

◆ entrainmentPressureFvPatchScalarField() [1/4]

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

Construct from patch, internal field and dictionary.

Definition at line 33 of file entrainmentPressureFvPatchScalarField.C.

Referenced by entrainmentPressureFvPatchScalarField::clone().

Here is the caller graph for this function:

◆ entrainmentPressureFvPatchScalarField() [2/4]

entrainmentPressureFvPatchScalarField ( const entrainmentPressureFvPatchScalarField ptf,
const fvPatch p,
const DimensionedField< scalar, volMesh > &  iF,
const fieldMapper mapper 
)

Construct by mapping given entrainmentPressureFvPatchScalarField.

onto a new patch

Definition at line 46 of file entrainmentPressureFvPatchScalarField.C.

◆ entrainmentPressureFvPatchScalarField() [3/4]

Disallow copy without setting internal field reference.

◆ entrainmentPressureFvPatchScalarField() [4/4]

Copy constructor setting internal field reference.

Definition at line 60 of file entrainmentPressureFvPatchScalarField.C.

Member Function Documentation

◆ TypeName()

TypeName ( "entrainmentPressure"  )

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

References entrainmentPressureFvPatchScalarField::entrainmentPressureFvPatchScalarField().

Here is the call graph for this function:

◆ updateCoeffs()

void updateCoeffs ( )
virtual

Update the coefficients associated with the patch field.

Definition at line 74 of file entrainmentPressureFvPatchScalarField.C.

References DimensionedField< Type, GeoMesh >::dimensions(), Foam::dimMassFlux, Foam::mag(), Foam::negPart(), and dynamicPressureFvPatchScalarField::updateCoeffs().

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Write.

Reimplemented from dynamicPressureFvPatchScalarField.

Definition at line 100 of file entrainmentPressureFvPatchScalarField.C.

References dynamicPressureFvPatchScalarField::write().

Here is the call graph for this function:

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