54Foam::scalar Foam::waveModels::streamFunction::eta
68 const scalar
k =
sqrt(kx*kx + ky*ky);
69 scalar strfnAux = 0.0;
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_);
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;
211 regularWaveModel(
dict,
mesh, patch, false),
230 overrideDict.
readEntry(
"waveLength", waveLength_);
245 os <<
" uMean : " << uMean_ <<
nl
246 <<
" Stream function wavelength : " << waveLength_ <<
nl
247 <<
" Bj coefficients : " << Bjs_ <<
nl
248 <<
" Ej coefficients : " << Ejs_ <<
nl;
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
InfoProxy< IOobject > info() const noexcept
Return info proxy, for printing information to a stream.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, IOobjectOption::readOption readOpt=IOobjectOption::MUST_READ) const
Find entry and assign to T val. FatalIOError if it is found and the number of tokens is incorrect,...
Mesh data needed to do the Finite Volume discretisation.
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
A patch is a list of labels that address the faces in the global face list.
Base class for waveModels.
vectorField U_
Velocity field.
scalar waterDepthRef_
Reference water depth / [m].
virtual void setPaddlePropeties(const scalarField &level, const label facei, scalar &fraction, scalar &z) const
Set the paddle coverage fraction and reference height.
scalarField yPaddle_
Paddle y coordinates / [m].
scalarField xPaddle_
Paddle x coordinates / [m].
labelList faceToPaddle_
Addressing from patch face index to paddle index.
scalar wavePeriod_
Wave period.
scalar waveAngle_
Wave angle / [rad] (read in degrees).
scalar wavePhase_
Wave phase.
scalar waveLength_
Wavelength.
virtual bool readDict(const dictionary &overrideDict)
Read from dictionary.
streamFunction wave model
virtual void setVelocity(const scalar t, const scalar tCoeff, const scalarField &level)
Calculate the wave model velocity.
scalarList Ejs_
Stream Function Ej coefficients.
virtual void setLevel(const scalar t, const scalar tCoeff, scalarField &level) const
Set the water level.
streamFunction(const dictionary &dict, const fvMesh &mesh, const polyPatch &patch, const bool readFields=true)
Constructor.
scalar uMean_
Mean fluid speed in frame of reference (stream function).
scalarList Bjs_
Stream Function Bj coefficients.
virtual bool readDict(const dictionary &overrideDict)
Read from dictionary.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
autoPtr< surfaceVectorField > Uf
OBJstream os(runTime.globalPath()/outputName)
constexpr scalar twoPi(2 *M_PI)
Different types of constants.
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const NameMatchPredicate &selectedFields, DynamicList< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type and store on the objectRegistry.
dimensionedScalar cosh(const dimensionedScalar &ds)
dimensionedScalar sin(const dimensionedScalar &ds)
dimensionedScalar sinh(const dimensionedScalar &ds)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dimensionedScalar cos(const dimensionedScalar &ds)
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.