47 int main(
int argc,
char *argv[])
58 "name of the volume fraction field, default is \"alpha\"" 65 "name of the velocity field, default is \"U\"" 71 "the volume fraction field is that that of the gas above the wave" 86 #include "readGravitationalAcceleration.H" 91 const word alphaName = setWavesDict.lookupOrDefault<
word>(
"alpha",
"alpha");
92 const word UName = setWavesDict.lookupOrDefault<
word>(
"U",
"U");
93 const bool liquid = setWavesDict.lookupOrDefault<
bool>(
"liquid",
true);
174 h.primitiveFieldRef() = waves.height(t, ccs);
175 hp.primitiveFieldRef() = waves.height(t, pts);
176 uGas.primitiveFieldRef() = waves.UGas(t, ccs);
177 uGasp.primitiveFieldRef() = waves.UGas(t, pts);
178 uLiq.primitiveFieldRef() = waves.ULiquid(t, ccs);
179 uLiqp.primitiveFieldRef() = waves.ULiquid(t, pts);
185 h.boundaryFieldRef()[patchj] = waves.height(t, fcs);
186 uGas.boundaryFieldRef()[patchj] = waves.UGas(t, fcs);
187 uLiq.boundaryFieldRef()[patchj] = waves.ULiquid(t, fcs);
203 !isA<wallPolyPatch>(patch)
204 || isA<waveAlphaFvPatchScalarField>(alphap)
205 || isA<waveVelocityFvPatchVectorField>(Up)
208 alphap == alphaNoBCs.boundaryField()[
patchi];
209 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.
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.
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.
static const pointMesh & New(const polyMesh &mesh)
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
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.
const word dictName("particleTrackDict")
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,.
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.
IOobject dictIO(dictName, runTime.constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE)
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const dimensionedScalar & h
Planck constant.
static void addBoolOption(const word &opt, const string &usage="")
Add to a bool option to validOptions with usage information.
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
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.
const dimensionSet dimVelocity