45 Foam::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_()
71 fixedValueFvPatchScalarField(
p, iF),
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"))
102 fixedValueFvPatchScalarField(ptf,
p, iF, mapper),
103 phiName_(ptf.phiName_),
104 zetaName_(ptf.zetaName_),
105 rhoName_(ptf.rhoName_)
115 fixedValueFvPatchScalarField(wspsf),
116 phiName_(wspsf.phiName_),
117 zetaName_(wspsf.zetaName_),
118 rhoName_(wspsf.rhoName_)
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();
151 vectorField& zetap = zeta.boundaryFieldRef()[patchi];
154 const word ddtSchemeName(zeta.mesh().ddtScheme(zeta.name()));
161 tmp<vectorField> nf(
patch().nf());
180 zetap = zeta0.boundaryField()[patchi] + dZetap;
186 scalar dt0 = db().time().deltaT0Value();
188 scalar
c = 1.0 + dt/(dt + dt0);
189 scalar c00 = dt*dt/(dt0*(dt + dt0));
194 c0*zeta0.boundaryField()[patchi]
195 - c00*zeta0.oldTime().boundaryField()[patchi]
204 << ddtSchemeName <<
nl 205 <<
" on patch " << this->
patch().name()
206 <<
" of field " << this->internalField().name()
207 <<
" in file " << this->internalField().objectPath()
213 Info<<
"min/max zetap = " <<
gMin(zetap & nf()) <<
", " 222 fixedValueFvPatchScalarField::updateCoeffs();
243 waveSurfacePressureFvPatchScalarField
waveSurfacePressureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
const GeometricField< Type, PatchField, GeoMesh > & oldTime() const
Return old time field.
ddtSchemeType
Enumeration defining the available ddt schemes.
UniformDimensionedField< vector > uniformDimensionedVectorField
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Type gMin(const FieldField< Field, Type > &f)
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
virtual void write(Ostream &) const
Write.
GeometricField< vector, fvPatchField, volMesh > volVectorField
Macros for easy insertion into run-time selection tables.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
fvPatchField< scalar > fvPatchScalarField
A class for handling words, derived from Foam::string.
virtual void write(Ostream &) const
Write.
A FieldMapper for finite-volume patch fields.
errorManip< error > abort(error &err)
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Write a keyword/value entry only when the two values differ.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
const uniformDimensionedVectorField & g
This is a pressure boundary condition, whose value is calculated as the hydrostatic pressure based on...
Type gMax(const FieldField< Field, Type > &f)
OBJstream os(runTime.globalPath()/outputName)
static const gravity & New(const word &name, const Time &runTime)
Return named gravity field cached or construct on Time.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
const dimensionedScalar c
Speed of light in a vacuum.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const std::string patch
OpenFOAM patch number as a std::string.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Field< vector > vectorField
Specialisation of Field<T> for vector.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
virtual void updateCoeffs()
Update the coefficients associated with the patch field.