prghCyclicPressureFvPatchScalarField Class Reference

This boundary condition provides a cyclic condition for p_rgh. It applies corrections to the value and gradient on both sides of the cyclic to account for the non-cylicity of the gravitational force. More...

Inheritance diagram for prghCyclicPressureFvPatchScalarField:
Collaboration diagram for prghCyclicPressureFvPatchScalarField:

Public Member Functions

 TypeName ("prghCyclicPressure")
 Runtime type information. More...
 
 prghCyclicPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 prghCyclicPressureFvPatchScalarField (const prghCyclicPressureFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fieldMapper &)
 Construct by mapping given fixedValueTypeFvPatchField. More...
 
 prghCyclicPressureFvPatchScalarField (const prghCyclicPressureFvPatchScalarField &)=delete
 Disallow copy without setting internal field reference. More...
 
 prghCyclicPressureFvPatchScalarField (const prghCyclicPressureFvPatchScalarField &, 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 tmp< scalarFieldjump () const
 Return the "jump". 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...
 
virtual void updateCoeffs ()
 Update the patch pressure gradient field. More...
 
virtual void write (Ostream &) const
 Write. More...
 

Detailed Description

This boundary condition provides a cyclic condition for p_rgh. It applies corrections to the value and gradient on both sides of the cyclic to account for the non-cylicity of the gravitational force.

This condition is only needed when the cyclic patches have a transformation and a normal component in the direction of gravity. If the cyclic patches are orthogonal to the direction gravity, then a normal cyclic boundary condition can be used instead.

Care must be taken when using this boundary condition that the simulation is actually cyclic. The following constraints apply:

  • Both cyclic patches must be oriented in the same way with respect to gravity. In practice this means that applicability is limited to cyclics with translational transformations.
  • The model cannot have any dependence on the absolute value of the pressure field. The absolute value of the pressure, in reality, varies between each repetition of the geometry; it is not actually formally cyclic. Only the gradient of the pressure field can be truly cyclic. This model is therefore only valid if the absolute value of the pressure is arbitrary, and only the gradient has an effect on the solution. This is the case for incompressible multiphase solutions or incompressible Boussinesq-like models of density variation. It is not true if (for example) a compressible thermodynamic model is being used.
Usage
Property Description Required Default value
patchType underlying patch type (should be cyclic) yes
rhoInf far-field density yes

Example of the boundary condition specification:

    <patchName>
    {
        type            prghCyclicPressure;
        patchType       cyclic;
        rhoInf          1;
    }
Source files

Definition at line 104 of file prghCyclicPressureFvPatchScalarField.H.

Constructor & Destructor Documentation

◆ prghCyclicPressureFvPatchScalarField() [1/4]

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

Construct from patch, internal field and dictionary.

Definition at line 35 of file prghCyclicPressureFvPatchScalarField.C.

References dict, DimensionedField< Type, GeoMesh >::dimensions(), and p.

Here is the call graph for this function:

◆ prghCyclicPressureFvPatchScalarField() [2/4]

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

Construct by mapping given fixedValueTypeFvPatchField.

onto a new patch

Definition at line 66 of file prghCyclicPressureFvPatchScalarField.C.

◆ prghCyclicPressureFvPatchScalarField() [3/4]

Disallow copy without setting internal field reference.

◆ prghCyclicPressureFvPatchScalarField() [4/4]

Copy constructor setting internal field reference.

Definition at line 81 of file prghCyclicPressureFvPatchScalarField.C.

Member Function Documentation

◆ TypeName()

TypeName ( "prghCyclicPressure"  )

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 177 of file prghCyclicPressureFvPatchScalarField.H.

◆ jump()

Foam::tmp< Foam::scalarField > jump ( ) const
virtual

Return the "jump".

Definition at line 97 of file prghCyclicPressureFvPatchScalarField.C.

◆ map()

void map ( const fvPatchScalarField ptf,
const fieldMapper mapper 
)
virtual

Map the given fvPatchField onto this fvPatchField.

Definition at line 103 of file prghCyclicPressureFvPatchScalarField.C.

◆ reset()

void reset ( const fvPatchScalarField ptf)
virtual

Reset the fvPatchField to the given fvPatchField.

Used for mesh to mesh mapping

Definition at line 118 of file prghCyclicPressureFvPatchScalarField.C.

◆ updateCoeffs()

void updateCoeffs ( )
virtual

Update the patch pressure gradient field.

Definition at line 132 of file prghCyclicPressureFvPatchScalarField.C.

References GeometricField< Type, PatchField, GeoMesh >::boundaryField(), DimensionedField< Type, GeoMesh >::mesh(), Foam::name(), snGradScheme< Type >::New(), and patchi.

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Write.

Definition at line 184 of file prghCyclicPressureFvPatchScalarField.C.

References fvPatchField< Type >::write(), and Foam::writeEntry().

Here is the call graph for this function:

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