51Foam::scalar Foam::waveModels::Boussinesq::eta
64 scalar aux =
sqrt(3.0*
H/(4.0*
h))/
h;
65 scalar Xa = -
C*t + ts -
X0 +
x*
cos(theta) +
y*
sin(theta);
87 scalar Xa = -
C*t + ts -
X0 +
x*
cos(theta) +
y*
sin(theta);
88 scalar expTerm =
exp(2*a*Xa);
89 scalar
b = 8*a*
h*expTerm;
96 2*a*
b*(
exp(4*a*Xa) - 4*expTerm + 1)
100 -4*
sqr(a)*
b*(
exp(6*a*Xa) - 11*
exp(4*a*Xa) + 11*expTerm - 1)
120 scalar eta = this->eta(
H,
h,
x,
y, theta, t,
X0);
128 +
sqr(
h)/(3.0*eta)*(1.0 - 3.0/2.0*
sqr(z/
h))*Deta[1]
134 (1.0 - eta/(2.0*
h))*Deta[0]
135 +
sqr(
h)/3.0*(1.0 - 1.0/2.0*
sqr(z/
h))*Deta[2]
138 scalar v = u*
sin(waveAngle_);
139 u *=
cos(waveAngle_);
188 setPaddlePropeties(level, facei, fraction, z);
192 const label paddlei = faceToPaddle_[facei];
206 U_[facei] = fraction*
Uf*tCoeff;
218 const polyPatch& patch,
222 solitaryWaveModel(
dict,
mesh, patch, false)
static const Foam::dimensionedScalar C("", Foam::dimTemperature, 234.5)
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Graphite solid properties.
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,...
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.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
Base class for waveModels.
const vector & g_
Gravity.
vectorField U_
Velocity field.
scalar waterDepthRef_
Reference water depth / [m].
virtual void setPaddlePropeties(const scalarField &level, const label facei, scalar &fraction, scalar &z) const
Set the paddle coverage fraction and reference height.
scalarField yPaddle_
Paddle y coordinates / [m].
scalarField xPaddle_
Paddle x coordinates / [m].
labelList faceToPaddle_
Addressing from patch face index to paddle index.
virtual void setVelocity(const scalar t, const scalar tCoeff, const scalarField &level)
Calculate the wave model velocity.
virtual void setLevel(const scalar t, const scalar tCoeff, scalarField &level) const
Set the water level.
Boussinesq(const dictionary &dict, const fvMesh &mesh, const polyPatch &patch, const bool readFields=true)
Constructor.
virtual bool readDict(const dictionary &overrideDict)
Read from dictionary.
solitaryWaveModel(const dictionary &dict, const fvMesh &mesh, const polyPatch &patch, const bool readFields=true)
Constructor.
scalar waveHeight_
Wave height / [m].
scalar waveAngle_
Wave angle / [rad] (read in degrees).
virtual bool readDict(const dictionary &overrideDict)
Read from dictionary.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
volScalarField H(IOobject("H", runTime.timeName(), mesh.thisDb(), IOobject::NO_READ, IOobject::AUTO_WRITE), mesh, dimensionedScalar(dimLength, Zero))
autoPtr< surfaceVectorField > Uf
OBJstream os(runTime.globalPath()/outputName)
dimensionedScalar pow5(const dimensionedScalar &ds)
dimensionedScalar exp(const dimensionedScalar &ds)
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.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar pow3(const dimensionedScalar &ds)
dimensionedScalar cosh(const dimensionedScalar &ds)
dimensionedScalar sin(const dimensionedScalar &ds)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
dimensionedScalar pow4(const dimensionedScalar &ds)
static constexpr const zero Zero
Global zero (0).
dimensionedScalar cos(const dimensionedScalar &ds)
scalarList X0(nSpecie, Zero)
#define forAll(list, i)
Loop across all elements in list.