44 Foam::scalar Foam::waveModels::solitary::k()
const 46 return sqrt(0.75*amplitude()/
pow3(depth()));
50 Foam::scalar Foam::waveModels::solitary::alpha()
const 52 return amplitude()/depth();
56 Foam::scalar Foam::waveModels::solitary::celerity()
const 68 return k()*(x - offset() - celerity()*t);
78 const scalar clip =
log(great);
90 amplitude_(wave.amplitude_),
102 depth_(dict.
lookup<scalar>(
"depth")),
103 amplitude_(dict.
lookup<scalar>(
"amplitude")),
104 offset_(dict.
lookup<scalar>(
"offset"))
132 const scalar A = alpha();
142 (4 + 2*A - 6*A*
sqr(Z))*P
143 + (- 7*A + 9*A*
sqr(Z))*
sqr(P)
148 + (- 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.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
dimensionedScalar log(const dimensionedScalar &ds)
A list of keyword definitions, which are a keyword followed by any number of values (e...
defineTypeNameAndDebug(Airy, 0)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
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.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
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)
dimensionedScalar pow3(const dimensionedScalar &ds)
addToRunTimeSelectionTable(waveModel, Airy, dictionary)
dimensionedScalar cosh(const dimensionedScalar &ds)
A class for managing temporary objects.
const dimensionedVector & g
scalar amplitude() const
Get the amplitude.
label wave(const fvMesh &mesh, const List< labelPair > &changedPatchAndFaces, const label nCorrections, GeometricField< scalar, PatchField, GeoMesh > &distance, TrackingData &td, GeometricField< DataType, PatchField, GeoMesh > &... data)
Wave distance (and maybe additional) data from faces. If nCorrections is.
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.