Files
openfoam/integration/genAbs/common/calculateWaterLevel/calculatedLevelRegular.H
Andrew Heather 95e9467e84 INT: Integration of functionality produced by The Environmental Hydraulics Institute "IHCantabria" (http://www.ihcantabria.com/en/)
Capabilities include:
- Wave generation
  - Solitary wave using Boussinesq theory
  - Cnoidal wave theory
  - StokesI, StokesII, StokesV wave theory

- Active wave absorption at the inflow/outflow boundaries based on
  shallow water theory

Authors:
- Javier Lopez Lara (jav.lopez@unican.es)
- Gabriel Barajas (barajasg@unican.es)
- Inigo Losada (losadai@unican.es)
2016-11-16 14:02:14 +00:00

89 lines
2.4 KiB
C

/*---------------------------------------------------------------------------*\
IH-Cantabria 2015 (http://www.ihcantabria.com/en/)
IHFOAM 2015 (http://ihfoam.ihcantabria.com/)
Author(s): Javier Lopez Lara (jav.lopez@unican.es)
Gabriel Barajas (barajasg@unican.es)
\*---------------------------------------------------------------------------*/
if ( waveTheory_ == "StokesI" )
{
forAll(calculatedLevel, itS1)
{
calculatedLevel[itS1] = RealwaterDepth_
+ timeMult * StokesIFun :: eta
(
waveHeight_,
waveKx,
xGroup[itS1],
waveKy,
yGroup[itS1],
waveOmega,
currTime,
wavePhase_
);
}
}
else if ( waveTheory_ == "StokesII" )
{
forAll(calculatedLevel, itS2)
{
calculatedLevel[itS2] = RealwaterDepth_
+ timeMult * StokesIIFun :: eta
(
waveHeight_,
RealwaterDepth_,
waveKx,
xGroup[itS2],
waveKy,
yGroup[itS2],
waveOmega,
currTime,
wavePhase_
);
}
}
else if ( waveTheory_ == "StokesV" )
{
forAll(calculatedLevel, it1)
{
calculatedLevel[it1] = RealwaterDepth_
+ timeMult * stokesVFun :: eta
(
RealwaterDepth_,
waveKx,
waveKy,
lambdaStokesV_,
wavePeriod_,
xGroup[it1],
yGroup[it1],
currTime,
wavePhase_
);
}
}
else if ( waveTheory_ == "Cnoidal" )
{
forAll(calculatedLevel, it3)
{
calculatedLevel[it3] = RealwaterDepth_
+ timeMult * cnoidalFun :: eta
(
waveHeight_,
mCnoidal_,
waveKx,
waveKy,
wavePeriod_,
xGroup[it3],
yGroup[it3],
currTime
);
}
}
else
{
FatalError << "Wave theory not supported, use:\n"
<< "StokesI, StokesII, StokesV, Cnoidal, SolitaryBoussinesq"
<< exit(FatalError);
}