45Foam::waveSurfacePressureFvPatchScalarField::ddtSchemeTypeNames_
48 ddtSchemeType::tsEuler,
49 fv::EulerDdtScheme<scalar>::typeName_()
52 ddtSchemeType::tsCrankNicolson,
53 fv::CrankNicolsonDdtScheme<scalar>::typeName_()
56 ddtSchemeType::tsBackward,
57 fv::backwardDdtScheme<scalar>::typeName_()
64Foam::waveSurfacePressureFvPatchScalarField::
65waveSurfacePressureFvPatchScalarField
71 fixedValueFvPatchScalarField(
p, iF),
78Foam::waveSurfacePressureFvPatchScalarField::
79waveSurfacePressureFvPatchScalarField
86 fixedValueFvPatchScalarField(
p, iF,
dict),
87 phiName_(
dict.getOrDefault<
word>(
"phi",
"phi")),
88 zetaName_(
dict.getOrDefault<
word>(
"zeta",
"zeta")),
89 rhoName_(
dict.getOrDefault<
word>(
"rho",
"rho"))
93Foam::waveSurfacePressureFvPatchScalarField::
94waveSurfacePressureFvPatchScalarField
102 fixedValueFvPatchScalarField(ptf,
p, iF, mapper),
103 phiName_(ptf.phiName_),
104 zetaName_(ptf.zetaName_),
105 rhoName_(ptf.rhoName_)
109Foam::waveSurfacePressureFvPatchScalarField::
110waveSurfacePressureFvPatchScalarField
115 fixedValueFvPatchScalarField(wspsf),
116 phiName_(wspsf.phiName_),
117 zetaName_(wspsf.zetaName_),
118 rhoName_(wspsf.rhoName_)
122Foam::waveSurfacePressureFvPatchScalarField::
123waveSurfacePressureFvPatchScalarField
129 fixedValueFvPatchScalarField(wspsf, iF),
130 phiName_(wspsf.phiName_),
131 zetaName_(wspsf.zetaName_),
132 rhoName_(wspsf.rhoName_)
145 const label patchi = patch().index();
147 const scalar dt = db().time().deltaTValue();
154 const word ddtSchemeName(zeta.
mesh().ddtScheme(zeta.
name()));
180 case tsCrankNicolson:
188 scalar dt0 = db().time().deltaT0Value();
190 scalar c = 1.0 + dt/(dt + dt0);
191 scalar c00 = dt*dt/(dt0*(dt + dt0));
206 << ddtSchemeName <<
nl
207 <<
" on patch " << this->patch().name()
208 <<
" of field " << this->internalField().name()
209 <<
" in file " << this->internalField().objectPath()
215 Info<<
"min/max zetap = " <<
gMin(zetap & nf()) <<
", "
224 fixedValueFvPatchScalarField::updateCoeffs();
234 writeEntry(
"value",
os);
Macros for easy insertion into run-time selection tables.
const uniformDimensionedVectorField & g
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const dimensionSet & dimensions() const
Return dimensions.
const Mesh & mesh() const
Return mesh.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
const GeometricField< Type, PatchField, GeoMesh > & oldTime() const
Return old time field.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
const word & name() const noexcept
Return the object name.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Write a keyword/value entry only when the two values differ.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const Type & value() const
Return const reference to value.
virtual bool write()
Write the output fields.
A FieldMapper for finite-volume patch fields.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
A class for managing temporary objects.
This is a pressure boundary condition, whose value is calculated as the hydrostatic pressure based on...
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
ddtSchemeType
Enumeration defining the available ddt schemes.
A class for handling words, derived from Foam::string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionSet dimArea(sqr(dimLength))
const dimensionSet dimVelocity
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
errorManip< error > abort(error &err)
Type gMin(const FieldField< Field, Type > &f)
const dimensionSet dimDensity
Type gMax(const FieldField< Field, Type > &f)
constexpr char nl
The newline '\n' character (0x0a)