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 68 return k(t)*(x - offset_ - celerity(t)*t);
78 const scalar clip =
log(great);
89 offset_(wave.offset_),
130 const scalar A = alpha(t);
140 (4 + 2*A - 6*A*
sqr(Z))*P
141 + (- 7*A + 9*A*
sqr(Z))*
sqr(P)
146 + (- 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)
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)
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.
virtual tmp< vector2DField > velocity(const scalar t, const vector2DField &xz) const
Get the wave velocity at a given time and local coordinates. Local.
virtual tmp< scalarField > pressure(const scalar t, const vector2DField &xz) const
Get the wave pressure at a given time and local coordinates. Local.
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...
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
dimensionedScalar pow3(const dimensionedScalar &ds)
scalar amplitude(const scalar t) const
Get the amplitude.
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
dimensionedScalar cosh(const dimensionedScalar &ds)
A class for managing temporary objects.
Registry of regIOobjects.
const dimensionedVector & g
#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.
virtual tmp< scalarField > elevation(const scalar t, const scalarField &x) const
Get the wave elevation at a given time and local coordinates. Local.