146 virtual scalar
timeCoeff(
const scalar t)
const = 0;
223 const word& waveDictName
249 virtual void correct(
const scalar t);
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
InfoProxy< IOobject > info() const
Return info proxy, for printing information to a stream.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Mesh data needed to do the Finite Volume discretisation.
A patch is a list of labels that address the faces in the global face list.
Reference counter for various OpenFOAM components.
A class for managing temporary objects.
Base class for waveModels.
virtual void initialiseGeometry()
Initialise.
scalarField zMin_
Minimum z (point) height per patch face / [m].
scalarField z_
Patch face centre z coordinates / [m].
virtual scalar timeCoeff(const scalar t) const =0
Return the time scaling coefficient.
const polyPatch & patch_
Reference to the polyPatch.
tensor Rlg_
Rotation tensor from local to global system.
const fvMesh & mesh_
Reference to the mesh database.
scalar zSpan_
Overall (point) span in z-direction / [m].
word UName_
Name of velocity field, default = "U".
const vector & g_
Gravity.
virtual const scalarField & alpha() const
Return the latest wave indicator field prediction.
scalar zMin0_
Minimum z reference level / [m].
scalarField alpha_
Wave indicator field.
bool activeAbsorption_
Active wave absorption switch.
virtual const vectorField & U() const
Return the latest wave velocity prediction.
tensor Rgl_
Rotation tensor from global to local system.
vectorField U_
Velocity field.
scalar waterDepthRef_
Reference water depth / [m].
declareRunTimeSelectionTable(autoPtr, waveModel, patch,(const dictionary &dict, const fvMesh &mesh, const polyPatch &patch),(dict, mesh, patch))
virtual void setPaddlePropeties(const scalarField &level, const label facei, scalar &fraction, scalar &z) const
Set the paddle coverage fraction and reference height.
TypeName("waveModel")
Runtime type information.
scalarField yPaddle_
Paddle y coordinates / [m].
static const word dictName
Dictionary name.
scalarField xPaddle_
Paddle x coordinates / [m].
virtual void setVelocity(const scalar t, const scalar tCoeff, const scalarField &level)=0
Calculate the wave model velocity.
static autoPtr< waveModel > New(const word &dictName, const fvMesh &mesh, const polyPatch &patch)
Return a reference to the selected wave model.
virtual ~waveModel()=default
Destructor.
scalar initialDepth_
Initial depth / [m].
scalarField zMax_
Maximum z (point) height per patch face / [m].
virtual void setLevel(const scalar t, const scalar tCoeff, scalarField &level) const =0
Set the water level.
static word modelName(const word &patchName)
Utility function to construct the model name.
label currTimeIndex_
Time index used for updating.
labelList faceToPaddle_
Addressing from patch face index to paddle index.
virtual tmp< scalarField > waterLevel() const
Water level.
word alphaName_
Name of phase fraction field, default = "alpha".
static tmp< waveModel > lookupOrCreate(const polyPatch &patch, const fvMesh &mesh, const word &waveDictName)
Lookup waveModel from database, or create new.
virtual void setAlpha(const scalarField &level)
Set the alpha field based on the water level.
label nPaddle_
Number of paddles.
virtual bool readDict(const dictionary &overrideDict)
Read from dictionary.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const wordHashSet &selectedFields, LIFOStack< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type.
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.