59 return sqrt(0.75*eps)*(1.0 - 0.625*eps + (71.0/128.0)*eps*eps);
74 const scalar eps =
H/
h;
75 const scalar eps2 = eps*eps;
76 const scalar eps3 = eps*eps2;
79 sqrt(
mag(g_)*
h)*
sqrt(1.0 + eps - 0.05*eps2 - (3.0/70.0)*eps3);
81 const scalar ts = 3.5*
h/
sqrt(
H/
h);
82 const scalar xa = -
C*t + ts -
X0 +
x*
cos(theta) +
y*
sin(theta);
83 const scalar alfa = this->alfa(
H,
h);
85 const scalar
s = (1.0)/(
cosh(alfa*(xa/
h)));
86 const scalar s2 =
s*
s;
87 const scalar q =
tanh(alfa*(xa/
h));
88 const scalar q2 = q*q;
95 + eps3*(0.625*s2*q2 - 1.2625*s2*s2*q2)
112 const scalar eps =
H/
h;
113 const scalar eps2 = eps*eps;
114 const scalar eps3 = eps*eps2;
117 sqrt(
mag(g_)*
h)*
sqrt(1.0 + eps - 0.05*eps2 - (3.0/70.0)*eps3);
119 const scalar ts = 3.5*
h/
sqrt(eps);
120 const scalar xa = -
C*t + ts -
X0 +
x*
cos(theta) +
y*
sin(theta);
121 const scalar alfa = this->alfa(
H,
h);
123 const scalar
s = (1.0)/(
cosh(alfa*(xa/
h)));
124 const scalar s2 =
s*
s;
125 const scalar s4 = s2*s2;
126 const scalar s6 = s2*s4;
128 const scalar zbyh = z/
h;
129 const scalar zbyh2 = zbyh*zbyh;
130 const scalar zbyh4 = zbyh2*zbyh2;
132 scalar outa = eps*s2 - eps2*(-0.25*s2 + s4 + zbyh2*(1.5*s2 - 2.25*s4));
133 scalar outb = 0.475*s2 + 0.2*s4 - 1.2*s6;
134 scalar outc = zbyh2*(-1.5*s2 - 3.75*s4 + 7.5*s6);
135 scalar outd = zbyh4*(-0.375*s2 + (45.0/16.0)*s4 - (45.0/16.0)*s6);
137 scalar u =
sqrt(
mag(g_)*
h)*(outa - eps3*(outb + outc + outd));
139 outa = eps*s2 - eps2*(0.375*s2 + 2*s4 + zbyh2*(0.5*s2 - 1.5*s4));
140 outb = (49.0/640.0)*s2 - 0.85*s4 - 3.6*s6;
141 outc = zbyh2*((-13.0/16.0)*s2 -(25.0/16.0)*s4 + 7.5*s6);
142 outd = zbyh4*(-0.075*s2 -1.125*s4 - (27.0/16.0)*s6);
144 const scalar w =
sqrt(
mag(g_)*
h)*(outa - eps3*(outb + outc + outd));
146 const scalar v = u*
sin(waveAngle_);
174 level[paddlei] = waterDepthRef_ + tCoeff*eta;
226 setPaddlePropeties(level, facei, fraction, z);
230 const label paddlei = faceToPaddle_[facei];
244 U_[facei] = fraction*
Uf*tCoeff;
dimensionedScalar tanh(const dimensionedScalar &ds)
Graphite solid properties.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
dimensionedScalar sqrt(const dimensionedScalar &ds)
virtual void setVelocity(const scalar t, const scalar tCoeff, const scalarField &level)
Calculate the wave model velocity.
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
defineTypeNameAndDebug(waveAbsorptionModel, 0)
dimensionedScalar cos(const dimensionedScalar &ds)
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.
virtual vector Uf(const scalar H, const scalar h, const scalar x, const scalar y, const scalar theta, const scalar t, const scalar X0, const scalar z) const
Wave velocity.
autoPtr< surfaceVectorField > Uf
InfoProxy< IOobject > info() const noexcept
Return info proxy, for printing information to a stream.
dimensionedScalar sin(const dimensionedScalar &ds)
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
OBJstream os(runTime.globalPath()/outputName)
virtual bool readDict(const dictionary &overrideDict)
Read from dictionary.
const dimensionedScalar h
Planck constant.
virtual bool readDict(const dictionary &overrideDict)
Read from dictionary.
scalarList X0(nSpecie, Zero)
Grimshaw(const dictionary &dict, const fvMesh &mesh, const polyPatch &patch, const bool readFields=true)
Constructor.
virtual scalar eta(const scalar H, const scalar h, const scalar x, const scalar y, const scalar theta, const scalar t, const scalar X0) const
Wave height.
Mesh data needed to do the Finite Volume discretisation.
const std::string patch
OpenFOAM patch number as a std::string.
addToRunTimeSelectionTable(waveModel, shallowWaterAbsorption, patch)
dimensionedScalar cosh(const dimensionedScalar &ds)
virtual scalar alfa(const scalar H, const scalar h) const
A patch is a list of labels that address the faces in the global face list.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
volScalarField H(IOobject("H", runTime.timeName(), mesh.thisDb(), IOobject::NO_READ, IOobject::AUTO_WRITE), mesh, dimensionedScalar(dimLength, Zero))
virtual void setLevel(const scalar t, const scalar tCoeff, scalarField &level) const
Set the water level.