Marine systems simulation
LinearWaveTheory.h
1
15
16#ifndef LINEAR_WAVE_THEORY
17#define LINEAR_WAVE_THEORY
18
19#include <vector>
20using std::vector;
21
22
23
25{
26public:
27
28 enum EWaveTheory_t
29 {
30 EWaveTheory_Airy=0,
31 EWaveTheory_Gerstner,
32 };
33
34 LinearWaveTheory(bool bIrregularWaves, vector<double> & mdWaveAmplitude, vector<double> & mdPhaseAngle, vector<double> & adWaveFrequency, vector<double> & adWaveDirection);
35 virtual ~LinearWaveTheory(){}
36
37 virtual double ComputeSurfaceElevation(const double dT, const double adPos[2]) = 0;
38 virtual void ComputeSurfaceUnitNormal(const double dT, const double adPos[2], double *adUnitNormalOut) = 0;
39 virtual void ComputeParticleVelocity(const double dT, const double adPos[3], double *adVelOut) = 0;
40 virtual void ComputeParticleAcceleration(const double dT, const double adPos[3], double *adAccOut) = 0;
41 virtual double ComputeDynamicPressure(const double dT, const double adPos[3]) = 0;
42 virtual double ComputeTotalPressure(const double dT, const double adPos[3]) = 0;
43
44 virtual void ComputePointQuery(double T, const double Position[3], double& surface_elevation, double surface_unit_normal[3], double particle_velocity[3], double particle_acceleration[3], double& pressure) = 0;
45
46 std::vector<double> m_mdZetaA;
47 std::vector<double> m_mdEpsilon;
48 std::vector<double> m_adOmega;
49 std::vector<double> m_adWaveNumber;
50 std::vector<double> m_adTheta;
51
52 void SetWaveHarmonicCuttoffPercentage(double percent);
54
55protected:
56 double m_ln_percent;
57 std::vector<double> m_adCosTheta;
58 std::vector<double> m_adSinTheta;
59 double m_dGravity;
60 double m_dDensity;
62// bool m_bIrregularWaves; /// Irregular wave identifier
63
64};
65
66#endif
Definition: LinearWaveTheory.h:25
int m_NumWaves
Mass density of water.
Definition: LinearWaveTheory.h:61
double GetWaveHarmonicCuttoffPercentage()
update the cutoff percentage number
double m_dDensity
Acceleration of gravity.
Definition: LinearWaveTheory.h:60
std::vector< double > m_mdEpsilon
Pointer to spectral amplitude array.
Definition: LinearWaveTheory.h:47
std::vector< double > m_adTheta
Pointer to wave number array.
Definition: LinearWaveTheory.h:50
double m_dGravity
Sine of the angle Theta.
Definition: LinearWaveTheory.h:59
std::vector< double > m_adOmega
Pointer to random phase angle array.
Definition: LinearWaveTheory.h:48
std::vector< double > m_adSinTheta
Cosine of the angle Theta.
Definition: LinearWaveTheory.h:58
double m_ln_percent
get the cutoff percentage number
Definition: LinearWaveTheory.h:56
void SetWaveHarmonicCuttoffPercentage(double percent)
Pointer to wave propagation direction array.
std::vector< double > m_adWaveNumber
Pointer to wave frequency array.
Definition: LinearWaveTheory.h:49
std::vector< double > m_adCosTheta
ln of cutoff precentage for harmonic wave calculation. based on exp(-kx) = %
Definition: LinearWaveTheory.h:57