Public Types | Public Member Functions | List of all members
waveSurfacePressureFvPatchScalarField Class Reference

This is a pressure boundary condition, whose value is calculated as the hydrostatic pressure based on a given displacement: More...

Inheritance diagram for waveSurfacePressureFvPatchScalarField:
Inheritance graph
[legend]
Collaboration diagram for waveSurfacePressureFvPatchScalarField:
Collaboration graph
[legend]

Public Types

enum  ddtSchemeType { tsEuler, tsCrankNicolson, tsBackward }
 

Public Member Functions

 TypeName ("waveSurfacePressure")
 
 waveSurfacePressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 
 waveSurfacePressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 
 waveSurfacePressureFvPatchScalarField (const waveSurfacePressureFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 
 waveSurfacePressureFvPatchScalarField (const waveSurfacePressureFvPatchScalarField &)
 
virtual tmp< fvPatchScalarFieldclone () const
 
 waveSurfacePressureFvPatchScalarField (const waveSurfacePressureFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
 
virtual tmp< fvPatchScalarFieldclone (const DimensionedField< scalar, volMesh > &iF) const
 
virtual void updateCoeffs ()
 
virtual void write (Ostream &) const
 

Detailed Description

This is a pressure boundary condition, whose value is calculated as the hydrostatic pressure based on a given displacement:

\[ p = -\rho*g*\zeta \]

$ \rho $ = density [kg/m3]
$ g $ = acceleration due to gravity [m/s2]
$ \zeta $ = wave amplitude [m]

The wave amplitude is updated as part of the calculation, derived from the local volumetric flux.

Usage
Property Description Required Default value
phi flux field name no phi
rho density field name no rho
zeta wave amplitude field name no zeta

Example of the boundary condition specification:

    <patchName>
    {
        type            waveSurfacePressure;
        phi             phi;
        rho             rho;
        zeta            zeta;
        value           uniform 0;  // place holder
    }

The density field is only required if the flux is mass-based as opposed to volumetric-based.

See also
Foam::fixedValueFvPatchField
Source files

Definition at line 122 of file waveSurfacePressureFvPatchScalarField.H.

Member Enumeration Documentation

◆ ddtSchemeType

Enumerator
tsEuler 
tsCrankNicolson 
tsBackward 

Definition at line 131 of file waveSurfacePressureFvPatchScalarField.H.

Constructor & Destructor Documentation

◆ waveSurfacePressureFvPatchScalarField() [1/5]

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

Definition at line 59 of file waveSurfacePressureFvPatchScalarField.C.

Referenced by waveSurfacePressureFvPatchScalarField::clone().

Here is the caller graph for this function:

◆ waveSurfacePressureFvPatchScalarField() [2/5]

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

Definition at line 73 of file waveSurfacePressureFvPatchScalarField.C.

◆ waveSurfacePressureFvPatchScalarField() [3/5]

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

Definition at line 88 of file waveSurfacePressureFvPatchScalarField.C.

◆ waveSurfacePressureFvPatchScalarField() [4/5]

Definition at line 104 of file waveSurfacePressureFvPatchScalarField.C.

◆ waveSurfacePressureFvPatchScalarField() [5/5]

Definition at line 117 of file waveSurfacePressureFvPatchScalarField.C.

Member Function Documentation

◆ TypeName()

TypeName ( "waveSurfacePressure"  )

◆ clone() [1/2]

virtual tmp<fvPatchScalarField> clone ( ) const
inlinevirtual

Definition at line 196 of file waveSurfacePressureFvPatchScalarField.H.

References waveSurfacePressureFvPatchScalarField::waveSurfacePressureFvPatchScalarField().

Here is the call graph for this function:

◆ clone() [2/2]

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

Definition at line 213 of file waveSurfacePressureFvPatchScalarField.H.

References waveSurfacePressureFvPatchScalarField::waveSurfacePressureFvPatchScalarField().

Here is the call graph for this function:

◆ updateCoeffs()

void updateCoeffs ( )
virtual

◆ write()

void write ( Ostream os) const
virtual

Definition at line 221 of file waveSurfacePressureFvPatchScalarField.C.

References os(), fvPatchField::write(), and Ostream::writeEntryIfDifferent().

Here is the call graph for this function:

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