This is a pressure boundary condition, whose value is calculated as the hydrostatic pressure based on a given displacement: More...
Public Types | |
enum | ddtSchemeType { tsEuler, tsCrankNicolson, tsBackward } |
Enumeration defining the available ddt schemes. More... | |
Public Member Functions | |
TypeName ("waveSurfacePressure") | |
Runtime type information. More... | |
waveSurfacePressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &) | |
Construct from patch and internal field. More... | |
waveSurfacePressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &) | |
Construct from patch, internal field and dictionary. More... | |
waveSurfacePressureFvPatchScalarField (const waveSurfacePressureFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &) | |
Construct by mapping given waveSurfacePressureFvPatchScalarField. More... | |
waveSurfacePressureFvPatchScalarField (const waveSurfacePressureFvPatchScalarField &) | |
Construct as copy. More... | |
virtual tmp< fvPatchScalarField > | clone () const |
Construct and return a clone. More... | |
waveSurfacePressureFvPatchScalarField (const waveSurfacePressureFvPatchScalarField &, const DimensionedField< scalar, volMesh > &) | |
Construct as copy setting internal field reference. More... | |
virtual tmp< fvPatchScalarField > | clone (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... | |
Private Attributes | |
word | phiName_ |
Flux field name. More... | |
word | zetaName_ |
Wave height field name. More... | |
word | rhoName_ |
Density field for mass-based flux evaluations. More... | |
Static Private Attributes | |
static const NamedEnum< ddtSchemeType, 3 > | ddtSchemeTypeNames_ |
Time scheme type names. More... | |
This is a pressure boundary condition, whose value is calculated as the hydrostatic pressure based on a given displacement:
![]() | = | density [kg/m3] |
![]() | = | acceleration due to gravity [m/s2] |
![]() | = | wave amplitude [m] |
The wave amplitude is updated as part of the calculation, derived from the local volumetric flux.
Patch 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:
myPatch { 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.
Definition at line 125 of file waveSurfacePressureFvPatchScalarField.H.
enum ddtSchemeType |
Enumeration defining the available ddt schemes.
Enumerator | |
---|---|
tsEuler | |
tsCrankNicolson | |
tsBackward |
Definition at line 134 of file waveSurfacePressureFvPatchScalarField.H.
waveSurfacePressureFvPatchScalarField | ( | const fvPatch & | p, |
const DimensionedField< scalar, volMesh > & | iF | ||
) |
Construct from patch and internal field.
Definition at line 65 of file waveSurfacePressureFvPatchScalarField.C.
Referenced by waveSurfacePressureFvPatchScalarField::clone().
waveSurfacePressureFvPatchScalarField | ( | const fvPatch & | p, |
const DimensionedField< scalar, volMesh > & | iF, | ||
const dictionary & | dict | ||
) |
Construct from patch, internal field and dictionary.
Definition at line 79 of file waveSurfacePressureFvPatchScalarField.C.
References dict, p, and scalarField().
waveSurfacePressureFvPatchScalarField | ( | const waveSurfacePressureFvPatchScalarField & | ptf, |
const fvPatch & | p, | ||
const DimensionedField< scalar, volMesh > & | iF, | ||
const fvPatchFieldMapper & | mapper | ||
) |
Construct by mapping given waveSurfacePressureFvPatchScalarField.
onto a new patch
Definition at line 99 of file waveSurfacePressureFvPatchScalarField.C.
Construct as copy.
Definition at line 115 of file waveSurfacePressureFvPatchScalarField.C.
waveSurfacePressureFvPatchScalarField | ( | const waveSurfacePressureFvPatchScalarField & | wspsf, |
const DimensionedField< scalar, volMesh > & | iF | ||
) |
Construct as copy setting internal field reference.
Definition at line 128 of file waveSurfacePressureFvPatchScalarField.C.
TypeName | ( | "waveSurfacePressure" | ) |
Runtime type information.
|
inlinevirtual |
Construct and return a clone.
Definition at line 199 of file waveSurfacePressureFvPatchScalarField.H.
References waveSurfacePressureFvPatchScalarField::waveSurfacePressureFvPatchScalarField().
|
inlinevirtual |
Construct and return a clone setting internal field reference.
Definition at line 216 of file waveSurfacePressureFvPatchScalarField.H.
References waveSurfacePressureFvPatchScalarField::waveSurfacePressureFvPatchScalarField().
|
virtual |
Update the coefficients associated with the patch field.
Definition at line 142 of file waveSurfacePressureFvPatchScalarField.C.
References Foam::abort(), GeometricField::boundaryField(), Foam::constant::universal::c, waveSurfacePressureFvPatchScalarField::ddtSchemeTypeNames_, Foam::dimArea, Foam::dimDensity, dimensionedInternalField(), Foam::dimVelocity, Foam::endl(), Foam::FatalError, FatalErrorInFunction, g, Foam::gMax(), Foam::gMin(), Foam::Info, Foam::nl, GeometricField::oldTime(), Foam::operator==(), phi, waveSurfacePressureFvPatchScalarField::phiName_, waveSurfacePressureFvPatchScalarField::rhoName_, waveSurfacePressureFvPatchScalarField::tsBackward, waveSurfacePressureFvPatchScalarField::tsCrankNicolson, waveSurfacePressureFvPatchScalarField::tsEuler, and waveSurfacePressureFvPatchScalarField::zetaName_.
|
virtual |
Write.
Definition at line 234 of file waveSurfacePressureFvPatchScalarField.C.
References fvPatchField::write().
|
private |
Flux field name.
Definition at line 147 of file waveSurfacePressureFvPatchScalarField.H.
Referenced by waveSurfacePressureFvPatchScalarField::updateCoeffs().
|
private |
Wave height field name.
Definition at line 150 of file waveSurfacePressureFvPatchScalarField.H.
Referenced by waveSurfacePressureFvPatchScalarField::updateCoeffs().
|
private |
Density field for mass-based flux evaluations.
Definition at line 153 of file waveSurfacePressureFvPatchScalarField.H.
Referenced by waveSurfacePressureFvPatchScalarField::updateCoeffs().
|
staticprivate |
Time scheme type names.
Definition at line 156 of file waveSurfacePressureFvPatchScalarField.H.
Referenced by waveSurfacePressureFvPatchScalarField::updateCoeffs().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.