45 static const scalar kdGreat =
log(great);
71 const word& modelName,
89 return celerity(coeffs());
101 static const scalar kdGreat =
log(great);
102 const scalar kd =
min(
max(coeffs.
k()*depth(), - kdGreat), kdGreat);
103 const scalar ka = coeffs.
k()*amplitude(t);
105 const scalar
S = coeffs.
deep() ? 0 : 1/
cosh(2*kd);
106 const scalar
T = coeffs.
deep() ? 1 :
tanh(kd);
127 9.0/128/(3 + 2*
S)/(4 +
S)/
pow6(1 -
S)
134 5.0/384/(3 + 2*
S)/(4 +
S)/
pow6(1 -
S)
143 <<
"B42 = " << B42 <<
endl
144 <<
"B44 = " << B44 <<
endl
145 <<
"B53 = " << B53 <<
endl
146 <<
"B55 = " << B55 <<
endl;
157 +
pow5(ka)*(- (B53 + B55)*
cos(phi) + B53*
cos(3*phi) + B55*
cos(5*phi))
170 static const scalar kdGreat =
log(great);
171 const scalar kd =
min(
max(coeffs.
k()*depth(), - kdGreat), kdGreat);
172 const scalar ka = coeffs.
k()*amplitude(t);
174 const scalar
S = coeffs.
deep() ? 0 : 1/
cosh(2*kd);
175 const scalar SByA11 = coeffs.
deep() ? 0 :
S*
sinh(kd);
177 const scalar A31ByA11 =
183 const scalar A33ByA11 =
189 const scalar A42ByA11 =
190 SByA11/24/
pow5(1 -
S)
195 const scalar A44ByA11 =
196 SByA11/48/(3 + 2*
S)/
pow5(1 -
S)
201 const scalar A51ByA11 =
202 1.0/64/(3 + 2*
S)/(4 +
S)/
pow6(1 -
S)
208 const scalar A53ByA11 =
209 1.0/32/(3 + 2*
S)/
pow6(1 -
S)
215 const scalar A55ByA11 =
216 1.0/64/(3 + 2*
S)/(4 +
S)/
pow6(1 -
S)
224 const scalar A11 = 1/
sinh(kd);
225 Info<<
"A31 = " << A31ByA11*A11 <<
endl
226 <<
"A33 = " << A33ByA11*A11 <<
endl
227 <<
"A42 = " << A42ByA11*A11 <<
endl
228 <<
"A44 = " << A44ByA11*A11 <<
endl
229 <<
"A51 = " << A51ByA11*A11 <<
endl
230 <<
"A53 = " << A53ByA11*A11 <<
endl
231 <<
"A55 = " << A55ByA11*A11 <<
endl;
234 auto v = [&](
const label i) {
return coeffs.
vi(i, phase(), t, xz); };
242 pow3(ka)*(A31ByA11*v1 + A33ByA11*v3)
243 +
pow4(ka)*(A42ByA11*v(2) + A44ByA11*v(4))
244 +
pow5(ka)*(A51ByA11*v1 + A53ByA11*v3 + A55ByA11*v(5))
Macros for easy insertion into run-time selection tables.
A list of keyword definitions, which are a keyword followed by any number of values (e....
A class for managing temporary objects.
Generic base class for waves. Derived classes must implement field functions which return the elevati...
Calculation engine for the Airy wave model and other models that are a correction on top of the Airy ...
const scalar depth
Depth [m].
bool deep() const
Return whether shallow and intermediate effects are to be omitted.
tmp< vector2DField > vi(const label i, const scalar phase, const scalar t, const vector2DField &xz) const
Return the non-dimensionalised i-th harmonic of the velocity.
const scalar amplitude
Amplitude [m].
tmp< scalarField > angle(const scalar phase, const scalar t, const scalarField &x) const
Angle of the oscillation [rad].
static scalar celerity(const AiryCoeffs &coeffs)
The wave celerity [m/s].
scalar k() const
The angular wavenumber [rad/m].
virtual scalar celerity() const
The wave celerity [m/s].
AiryCoeffs coeffs() const
Return the wave coefficients at steady state.
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 tmp< vector2DField > velocity(const scalar t, const vector2DField &xz) const
Get the wave velocity at a given time and local coordinates. Local.
virtual ~Stokes5()
Destructor.
Stokes5(const dictionary &dict, const scalar g, const word &modelName=Stokes5::typeName, scalar(*celerityPtr)(const AiryCoeffs &)=&Stokes5::celerity)
Construct from a dictionary and gravity.
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 tmp< vector2DField > velocity(const scalar t, const vector2DField &xz) const
Get the wave velocity at a given time and local coordinates. Local.
A class for handling words, derived from string.
tmp< fvMatrix< Type > > S(const Pair< tmp< volScalarField::Internal >> &, const VolField< Type > &)
defineTypeNameAndDebug(Airy, 0)
addToRunTimeSelectionTable(waveModel, Airy, dictionary)
dimensionedScalar pow6(const dimensionedScalar &ds)
dimensionedScalar pow5(const dimensionedScalar &ds)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedScalar pow3(const dimensionedScalar &ds)
dimensionedScalar cosh(const dimensionedScalar &ds)
dimensionedScalar tanh(const dimensionedScalar &ds)
dimensionedScalar sinh(const dimensionedScalar &ds)
dimensionedScalar log(const dimensionedScalar &ds)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
dimensionedScalar pow4(const dimensionedScalar &ds)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dimensionedScalar cos(const dimensionedScalar &ds)