44 Foam::scalar Foam::waveModels::solitary::k(
const scalar t)
const 46 return sqrt(0.75*amplitude(t)/
pow3(depth()));
50 Foam::scalar Foam::waveModels::solitary::alpha(
const scalar t)
const 52 return amplitude(t)/depth();
56 Foam::scalar Foam::waveModels::solitary::celerity(
const scalar t)
const 69 return k(t)*(x - offset_ - (u + celerity(t))*t);
80 const scalar clip =
log(great);
82 return 1/
sqr(
cosh(
max(- clip,
min(clip, parameter(t, u, x)))));
91 offset_(wave.offset_),
134 const scalar A = alpha(t);
144 (4 + 2*A - 6*A*
sqr(Z))*P
145 + (- 7*A + 9*A*
sqr(Z))*
sqr(P)
150 + (- 7*A + 3*A*
sqr(Z))*
sqr(P)
solitary(const solitary &wave)
Construct a copy.
tmp< vector2DField > zip(const tmp< scalarField > &x, const tmp< scalarField > &y)
virtual tmp< scalarField > elevation(const scalar t, const scalar u, const scalarField &x) const
Get the wave elevation at a given time, mean velocity and local.
dimensionedScalar tanh(const dimensionedScalar &ds)
scalar depth() const
Get the depth.
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)
dimensionedScalar sqrt(const dimensionedScalar &ds)
virtual tmp< vector2DField > velocity(const scalar t, const scalar u, const vector2DField &xz) const
Get the wave velocity at a given time, mean velocity and local.
label k
Boltzmann constant.
Macros for easy insertion into run-time selection tables.
virtual void write(Ostream &os) const
Write.
Generic base class for waves. Derived classes must implement field functions which return the elevati...
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
addToRunTimeSelectionTable(waveModel, Airy, objectRegistry)
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if successful.
tmp< Field< cmptType > > component(const direction) const
Return a component field of the field.
waveModel(const waveModel &wave)
Construct a copy.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
dimensionedScalar pow3(const dimensionedScalar &ds)
virtual tmp< scalarField > pressure(const scalar t, const scalar u, const vector2DField &xz) const
Get the wave pressure at a given time, mean velocity and local.
scalar amplitude(const scalar t) const
Get the amplitude.
dimensioned< scalar > mag(const dimensioned< Type > &)
dimensionedScalar cosh(const dimensionedScalar &ds)
A class for managing temporary objects.
Registry of regIOobjects.
const dimensionedVector & g
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
virtual ~solitary()
Destructor.
virtual void write(Ostream &os) const
Write.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.