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