48 int main(
int argc,
char *argv[])
59 "name of the volume fraction field, default is \"alpha\"" 66 "name of the velocity field, default is \"U\"" 72 "the volume fraction field is that of the gas above the wave" 84 #include "readGravitationalAcceleration.H" 89 const word alphaName = setWavesDict.lookupOrDefault<
word>(
"alpha",
"alpha");
90 const word UName = setWavesDict.lookupOrDefault<
word>(
"U",
"U");
91 const bool liquid = setWavesDict.lookupOrDefault<
bool>(
"liquid",
true);
172 h.primitiveFieldRef() = waves.height(t, ccs);
173 hp.primitiveFieldRef() = waves.height(t, pts);
174 uGas.primitiveFieldRef() = waves.UGas(t, ccs);
175 uGasp.primitiveFieldRef() = waves.UGas(t, pts);
176 uLiq.primitiveFieldRef() = waves.ULiquid(t, ccs);
177 uLiqp.primitiveFieldRef() = waves.ULiquid(t, pts);
183 h.boundaryFieldRef()[patchj] = waves.height(t, fcs);
184 uGas.boundaryFieldRef()[patchj] = waves.UGas(t, fcs);
185 uLiq.boundaryFieldRef()[patchj] = waves.ULiquid(t, fcs);
201 !isA<wallPolyPatch>(patch)
202 || isA<waveAlphaFvPatchScalarField>(alphap)
203 || isA<waveVelocityFvPatchVectorField>(Up)
206 alphap == alphaNoBCs.boundaryField()[
patchi];
207 Up == UNoBCs.boundaryField()[
patchi];
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
A wrapper around a list of wave models. Superimposes the modelled values of elevation and velocity...
#define forAll(list, i)
Loop across all elements in list.
const word & name() const
Return name.
A list of keyword definitions, which are a keyword followed by any number of values (e...
tmp< scalarField > levelSetFraction(const fvMesh &mesh, const scalarField &levelC, const scalarField &levelP, const bool above)
Calculate the volume-fraction that a level set occupies. This gives the.
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
IOdictionary systemDict(const word &dictName, const argList &args, const objectRegistry &ob, const word ®ionName=polyMesh::defaultRegion)
const dimensionedScalar h
Planck constant.
const dimensionSet dimLength
virtual const pointField & points() const
Return raw points.
Mesh representing a set of points created from polyMesh.
virtual readUpdateState readUpdate()
Update the mesh based on the mesh files saved in time.
A class for handling words, derived from string.
static void addOption(const word &opt, const string ¶m="", const string &usage="")
Add to an option to validOptions with usage information.
const Type & value() const
Return const reference to value.
static instantList selectIfPresent(Time &runTime, const argList &args)
If any time option provided return the set of times (as select0)
virtual void setTime(const Time &)
Reset the time and time-index to those of the given time.
const vectorField & cellCentres() const
static const waveSuperposition & New(const objectRegistry &db)
Return a reference to the wave model on the given database,.
const dimensionSet dimVelocity
tmp< Field< Type > > levelSetAverage(const fvMesh &mesh, const scalarField &levelC, const scalarField &levelP, const Field< Type > &positiveC, const Field< Type > &positiveP, const Field< Type > &negativeC, const Field< Type > &negativeP)
Calculate the average value of two fields, one on each side of a level set.
static pointMesh & New(polyMesh &mesh)
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
static void addBoolOption(const word &opt, const string &usage="")
Add to a bool option to validOptions with usage information.
virtual bool write(const bool write=true) const
Write using setting from DB.
A patch is a list of labels that address the faces in the global face list.
Foam::argList args(argc, argv)
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
static const Vector< scalar > zero
static void addOptions(const bool constant=true, const bool withZero=false)
Add the options handled by timeSelector to argList::validOptions.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.