31 Foam::scalar Foam::waveModels::AiryCoeffs::calcLength
34 const scalar amplitude,
37 scalar (*celerityPtr)(
const AiryCoeffs&)
46 const scalar
length = (length0 + length1)/2;
51 (t < period ? length0 : length1) =
length;
54 return (length0 + length1)/2;
63 const scalar amplitude,
78 const scalar amplitude,
86 length(calcLength(depth, amplitude, period, g, celerityPtr)),
101 return depth*
k() >
log(great);
113 return celerity(*
this);
124 return phase +
k()*(
x - celerity()*t);
135 return amplitude*
cos(angle(phase, t,
x));
152 const scalar kzGreat =
log(i*great);
161 const scalar kd =
k()*depth;
176 const scalar ka =
k()*amplitude;
178 return celerity()*ka*vi(1, phase, t, xz);
tmp< Field< cmptType > > component(const direction) const
Return a component field of the field.
A class for managing temporary objects.
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.
scalar celerity() const
The wave celerity [m/s].
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 > elevation(const scalar phase, const scalar t, const scalarField &x) const
Get the wave elevation at a given time and local coordinates. Local.
tmp< scalarField > angle(const scalar phase, const scalar t, const scalarField &x) const
Angle of the oscillation [rad].
tmp< vector2DField > velocity(const scalar phase, const scalar t, const vector2DField &xz) const
Get the wave velocity at a given time and local coordinates. Local.
AiryCoeffs(const scalar depth, const scalar amplitude, const scalar length, const scalar g)
Construct from components.
const scalar g
Gravitational acceleration [m/s^2].
scalar k() const
The angular wavenumber [rad/m].
const scalar length
Wavelength [m].
dimensionedScalar exp(const dimensionedScalar &ds)
label log2(label i)
Return the log base 2 by successive bit-shifting of the given label.
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)
dimensionedScalar cosh(const dimensionedScalar &ds)
dimensionedScalar sin(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 sqrt(const dimensionedScalar &ds)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
tmp< vector2DField > zip(const tmp< scalarField > &x, const tmp< scalarField > &y)
dimensionedScalar cos(const dimensionedScalar &ds)