45 static const scalar kdGreat =
log(great);
52 const scalar C2ByC0 = (2 + 7*
sqr(
S))/4/
sqr(1 -
S);
69 const word& modelName,
73 Airy(
dict, g, modelName, celerityPtr)
87 return celerity(coeffs());
99 static const scalar kdGreat =
log(great);
100 const scalar kd =
min(
max(coeffs.
k()*depth(), - kdGreat), kdGreat);
101 const scalar ka = coeffs.
k()*amplitude(t);
103 const scalar
T = coeffs.
deep() ? 1 :
tanh(kd);
105 const scalar B22 = (3/
sqr(
T) - 1)/
T/4;
114 + (1/coeffs.
k())*
sqr(ka)*B22*
cos(2*coeffs.
angle(phase(), t,
x));
126 static const scalar kdGreat =
log(great);
127 const scalar kd =
min(
max(coeffs.
k()*depth(), - kdGreat), kdGreat);
128 const scalar ka = coeffs.
k()*amplitude(t);
130 const scalar A22ByA11 = coeffs.
deep() ? 0 : 0.375/
pow3(
sinh(kd));
134 const scalar A11 = 1/
sinh(kd);
135 Info<<
"A22 = " << A22ByA11*A11 <<
endl;
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 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 scalar celerity() const
The wave celerity [m/s].
virtual ~Stokes2()
Destructor.
Stokes2(const dictionary &dict, const scalar g, const word &modelName=Stokes2::typeName, scalar(*celerityPtr)(const AiryCoeffs &)=&Stokes2::celerity)
Construct from a dictionary and gravity.
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)
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)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dimensionedScalar cos(const dimensionedScalar &ds)