46 const scalar amplitude,
51 static const scalar kdGreat =
log(great);
52 const scalar kd =
min(
max(
k(length)*depth, - kdGreat), kdGreat);
53 const scalar ka =
k(length)*amplitude;
55 const scalar
S = deep(depth, length) ? 0 : 1/
cosh(2*kd);
58 const scalar C2ByC0 = (2 + 7*
sqr(S))/4/
sqr(1 - S);
75 const word& modelName,
76 scalar (*modelCelerity)(scalar, scalar, scalar, scalar)
79 Airy(dict, g, modelName, modelCelerity)
97 static const scalar kdGreat =
log(great);
98 const scalar kd =
min(
max(
k()*depth(), - kdGreat), kdGreat);
99 const scalar ka =
k()*amplitude(t);
101 const scalar
T = deep() ? 1 :
tanh(kd);
103 const scalar B22 = (3/
sqr(T) - 1)/T/4;
112 + (1/
k())*
sqr(ka)*B22*
cos(2*angle(t, x));
122 static const scalar kdGreat =
log(great);
123 const scalar kd =
min(
max(
k()*depth(), - kdGreat), kdGreat);
124 const scalar ka =
k()*amplitude(t);
126 const scalar A22ByA11 = deep() ? 0 : 0.375/
pow3(
sinh(kd));
130 const scalar A11 = 1/
sinh(kd);
131 Info<<
"A22 = " << A22ByA11*A11 <<
endl;
dimensionedScalar tanh(const dimensionedScalar &ds)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
dimensionedScalar log(const dimensionedScalar &ds)
A list of keyword definitions, which are a keyword followed by any number of values (e...
defineTypeNameAndDebug(Airy, 0)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
virtual tmp< scalarField > elevation(const scalar t, const scalarField &x) const
Get the wave elevation at a given time and local coordinates. Local.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual tmp< vector2DField > velocity(const scalar t, const vector2DField &xz) const
Get the wave velocity at a given time and local coordinates. Local.
label k
Boltzmann constant.
Macros for easy insertion into run-time selection tables.
virtual scalar celerity() const
The wave celerity [m/s].
virtual tmp< scalarField > elevation(const scalar t, const scalarField &x) const
Get the wave elevation at a given time and local coordinates. Local.
virtual ~Stokes2()
Destructor.
virtual tmp< vector2DField > velocity(const scalar t, const vector2DField &xz) const
Get the wave velocity at a given time and local coordinates. Local.
dimensionedScalar cos(const dimensionedScalar &ds)
A class for handling words, derived from string.
tmp< fvMatrix< Type > > S(const Pair< tmp< volScalarField::Internal >> &, const GeometricField< Type, fvPatchField, volMesh > &)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dimensionedScalar pow3(const dimensionedScalar &ds)
addToRunTimeSelectionTable(waveModel, Airy, dictionary)
dimensionedScalar sinh(const dimensionedScalar &ds)
virtual scalar celerity() const
The wave celerity [m/s].
dimensionedScalar cosh(const dimensionedScalar &ds)
A class for managing temporary objects.
Stokes2(const dictionary &dict, const scalar g, const word &modelName=Stokes2::typeName, scalar(*modelCelerity)(scalar, scalar, scalar, scalar)=&Stokes2::celerity)
Construct from a dictionary and gravity.