wavePressureFvPatchScalarField Class Reference

This boundary condition provides a wavePressure condition. This sets the pressure to a value specified by a superposition of wave models. All the wave modelling parameters are obtained from a centrally registered waveSuperposition class. More...

Inheritance diagram for wavePressureFvPatchScalarField:
Collaboration diagram for wavePressureFvPatchScalarField:

Public Member Functions

 TypeName ("wavePressure")
 Runtime type information. More...
 
 wavePressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 Construct from patch and internal field. More...
 
 wavePressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 wavePressureFvPatchScalarField (const wavePressureFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 Construct by mapping given mixedTypeFvPatchField. More...
 
 wavePressureFvPatchScalarField (const wavePressureFvPatchScalarField &)=delete
 Disallow copy without setting internal field reference. More...
 
 wavePressureFvPatchScalarField (const wavePressureFvPatchScalarField &, 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...
 
tmp< scalarFieldp () const
 Return the current modelled pressure field on the patch faces. More...
 
tmp< scalarFieldpn () const
 Return the current modelled pressure field in the neighbour cell. More...
 
virtual void updateCoeffs ()
 Update the coefficients associated with the patch field. More...
 
virtual void write (Ostream &) const
 Write. More...
 

Detailed Description

This boundary condition provides a wavePressure condition. This sets the pressure to a value specified by a superposition of wave models. All the wave modelling parameters are obtained from a centrally registered waveSuperposition class.

This functions like an outletInlet condition. Faces on which the flow is leaving the domain have a value set by the wave model. Faces on which the flow is entering the domain have the gradient set. This gradient is calculated numerically by evaluating the wave model on both the patch face and the adjacent cell.

Use of this boundary condition triggers a consistent behaviour in the corresponding velocity and phase-fraction conditions.

Usage
Property Description Req'd? Default
U name of the velocity field no U
rho name of the density field no rho

Example of the boundary condition specification:

    <patchName>
    {
        type        wavePressure;
        U           U;
        rho         rho;
    }
See also
Foam::waveSuperposition
Source files

Definition at line 95 of file wavePressureFvPatchScalarField.H.

Constructor & Destructor Documentation

◆ wavePressureFvPatchScalarField() [1/5]

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

Construct from patch and internal field.

Definition at line 36 of file wavePressureFvPatchScalarField.C.

References Foam::Zero.

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

Here is the caller graph for this function:

◆ wavePressureFvPatchScalarField() [2/5]

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

Construct from patch, internal field and dictionary.

Definition at line 52 of file wavePressureFvPatchScalarField.C.

References dictionary::found(), scalarField(), fvPatch::size(), wavePressureFvPatchScalarField::wavePressureFvPatchScalarField(), and Foam::Zero.

Here is the call graph for this function:

◆ wavePressureFvPatchScalarField() [3/5]

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

Construct by mapping given mixedTypeFvPatchField.

onto a new patch

Definition at line 78 of file wavePressureFvPatchScalarField.C.

References wavePressureFvPatchScalarField::wavePressureFvPatchScalarField().

Here is the call graph for this function:

◆ wavePressureFvPatchScalarField() [4/5]

Disallow copy without setting internal field reference.

◆ wavePressureFvPatchScalarField() [5/5]

Copy constructor setting internal field reference.

Definition at line 92 of file wavePressureFvPatchScalarField.C.

Member Function Documentation

◆ TypeName()

TypeName ( "wavePressure"  )

Runtime type information.

◆ clone()

virtual tmp<fvPatchScalarField> clone ( const DimensionedField< scalar, volMesh > &  iF) const
inlinevirtual

◆ p()

Foam::tmp< Foam::scalarField > p ( ) const

Return the current modelled pressure field on the patch faces.

Definition at line 105 of file wavePressureFvPatchScalarField.C.

References waveSuperposition::height(), Foam::levelSetAverage(), waveSuperposition::New(), waveSuperposition::pGas(), and waveSuperposition::pLiquid().

Referenced by wavePressureFvPatchScalarField::clone(), and wavePressureFvPatchScalarField::updateCoeffs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pn()

◆ updateCoeffs()

void updateCoeffs ( )
virtual

Update the coefficients associated with the patch field.

Definition at line 171 of file wavePressureFvPatchScalarField.C.

References Foam::dimPressure, Foam::exit(), Foam::FatalError, FatalErrorInFunction, wavePressureFvPatchScalarField::p(), wavePressureFvPatchScalarField::pn(), waveVelocityFvPatchVectorField::pName(), Foam::pos0(), and waveVelocityFvPatchVectorField::U().

Referenced by wavePressureFvPatchScalarField::clone().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Write.

Definition at line 221 of file wavePressureFvPatchScalarField.C.

References Foam::makePatchTypeField(), and Foam::vtkWriteOps::write().

Referenced by wavePressureFvPatchScalarField::clone().

Here is the call graph for this function:
Here is the caller graph for this function:

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