67 static const scalar kdGreat =
log(great);
68 const scalar kd =
min(
max(
k()*depth(), - kdGreat), kdGreat);
69 const scalar ka =
k()*amplitude(t);
71 const scalar
T = deep() ? 1 :
tanh(kd);
73 const scalar B22 = (3/
sqr(T) - 1)/T/4;
82 + (1/
k())*
sqr(ka)*B22*
cos(2*angle(t, x));
92 static const scalar kdGreat =
log(great);
93 const scalar kd =
min(
max(
k()*depth(), - kdGreat), kdGreat);
94 const scalar ka =
k()*amplitude(t);
96 const scalar A22ByA11 = deep() ? 0 : 0.375/
pow3(
sinh(kd));
100 const scalar A11 = 1/
sinh(kd);
101 Info<<
"A22 = " << A22ByA11*A11 <<
endl;
106 + celerity()*
sqr(ka)*A22ByA11*vi(2, t, xz);
dimensionedScalar tanh(const dimensionedScalar &ds)
dimensionedScalar log(const dimensionedScalar &ds)
A list of keyword definitions, which are a keyword followed by any number of values (e...
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
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.
Stokes2(const objectRegistry &db, const dictionary &dict)
Construct from a database and a dictionary.
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 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)
addToRunTimeSelectionTable(waveModel, Airy, objectRegistry)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
dimensionedScalar pow3(const dimensionedScalar &ds)
dimensionedScalar sinh(const dimensionedScalar &ds)
A class for managing temporary objects.
Registry of regIOobjects.