Go to the documentation of this file.
54 Foam::scalar Foam::waveModels::streamFunction::eta
68 const scalar
k =
sqrt(kx*kx + ky*ky);
69 scalar strfnAux = 0.0;
73 Ejs_[iterSF]*
cos((iterSF + 1) *(kx*
x + ky*
y - omega*t + phase));
76 return (1/
k)*strfnAux;
93 const scalar
k =
sqrt(kx*kx + ky*ky);
94 const scalar phaseTot = kx*
x + ky*
y - omega*t + phase;
102 (iterSF2 + 1)*Bjs_[iterSF2]*
cosh((iterSF2 + 1)*
k*z)
103 /
cosh((iterSF2 + 1)*
k*
h)*
cos((iterSF2 + 1)*phaseTot);
106 (iterSF2 + 1)*Bjs_[iterSF2]*
sinh((iterSF2 + 1)*
k*z)
107 /
cosh((iterSF2 + 1)*
k*
h)*
sin((iterSF2 + 1)*phaseTot);
110 u = waveLength_/
T - uMean_ +
sqrt(
mag(g_)/
k)*u;
113 scalar v = u*
sin(waveAngle_);
114 u *=
cos(waveAngle_);
131 const scalar waveKx = waveK*
cos(waveAngle_);
132 const scalar waveKy = waveK*
sin(waveAngle_);
150 level[paddlei] = waterDepthRef_ + tCoeff*eta;
164 const scalar waveKx = waveK*
cos(waveAngle_);
165 const scalar waveKy = waveK*
sin(waveAngle_);
175 setPaddlePropeties(level, facei, fraction, z);
179 const label paddlei = faceToPaddle_[facei];
195 U_[facei] = fraction*
Uf*tCoeff;
227 if (regularWaveModel::readDict(overrideDict))
230 overrideDict.
readEntry(
"waveLength", waveLength_);
243 regularWaveModel::info(
os);
245 os <<
" uMean : " << uMean_ <<
nl
246 <<
" Stream function wavelength : " << waveLength_ <<
nl
247 <<
" Bj coefficients : " << Bjs_ <<
nl
248 <<
" Ej coefficients : " << Ejs_ <<
nl;
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
dimensionedScalar cosh(const dimensionedScalar &ds)
Different types of constants.
virtual bool readDict(const dictionary &overrideDict)
Read from dictionary.
dimensionedScalar sin(const dimensionedScalar &ds)
autoPtr< surfaceVectorField > Uf
InfoProxy< IOobject > info() const
Return info proxy.
virtual void setLevel(const scalar t, const scalar tCoeff, scalarField &level) const
Set the water level.
#define forAll(list, i)
Loop across all elements in list.
const dimensionedScalar h
Planck constant.
A patch is a list of labels that address the faces in the global face list.
virtual void setVelocity(const scalar t, const scalar tCoeff, const scalarField &level)
Calculate the wave model velocity.
streamFunction(const dictionary &dict, const fvMesh &mesh, const polyPatch &patch, const bool readFields=true)
Constructor.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
constexpr scalar twoPi(2 *M_PI)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
OBJstream os(runTime.globalPath()/outputName)
Macros for easy insertion into run-time selection tables.
Mesh data needed to do the Finite Volume discretisation.
Vector< scalar > vector
A scalar version of the templated Vector.
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const wordHashSet &selectedFields, LIFOStack< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type.
const std::string patch
OpenFOAM patch number as a std::string.
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
label k
Boltzmann constant.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
defineTypeNameAndDebug(combustionModel, 0)
dimensionedScalar cos(const dimensionedScalar &ds)
dimensionedScalar sinh(const dimensionedScalar &ds)