Marine systems simulation
CEnvironment.h
1#ifndef ENVIRONMENT_H
2#define ENVIRONMENT_H
3
4#include "ICurrentField.h"
5#include "SimObject.h"
6
7#include <vector>
8
9class CEnvironment : public SimObject
10{
11 public:
12 CEnvironment(const string& sSimObjectName, ISimObjectCreator* const pCreator);
13 void OdeFcn(const double dT, const double* const adX, double* const adXDot, const bool bIsMajorTimeStep);
14
15 virtual double GetSurfaceElevation(const double dT, const double* const dX, const double adPos[2]) = 0;
16 virtual void GetSurfaceUnitNormal(const double dT, const double* const dX, const double adPos[2], double* adUnitNormalOut) = 0;
17 virtual void GetParticleVelocity(const double dT, const double* const dX, const double adPos[3], double* adVelOut) = 0;
18 virtual void GetCurrentVelocity(const double dT, const double* const dX, const double adPos[3], double* adVelOut) = 0;
19 virtual void GetParticleAcceleration(const double dT, const double* const dX, const double adPos[3], double* adAccOut) = 0;
20 virtual double GetPressure(const double dT, const double* const dX, const double adPos[3]) = 0;
21 virtual double GetTotalPressure(const double dT, const double* const dX, const double adPos[3]) = 0;
22 virtual double GetDensity(const double dT, const double* const dX, const double adPos[3]) = 0;
23 virtual double GetSeadepth(const double adPos[2]) = 0;
24 virtual double GetSeabedSigma(const double adPos[3]) = 0;
25 virtual double GetSeabedTau(const double adPos[3]) = 0;
26 virtual double GetSeabedRho(const double adPos[3]) = 0;
27 virtual void RegisterCurrentField(ICurrentField* currentField) = 0;
28
29 // Access to DeepSeaGravityWaves ==================================
30 virtual void GetWaveFrequencies(std::vector<double>& vec);
31 virtual void GetWaveAmplitudes(std::vector<double>& vec);
32 virtual void GetWavePhaseAngles(std::vector<double>& vec);
33 virtual void GetWaveDirections(std::vector<double>& vec);
34 virtual void GetWaveNumbers(std::vector<double>& vec);
35 // Access to DeepSeaGravityWaves ==================================
36
38 {
39 double surface_elevation;
40 double surface_unit_normal[3];
41 double particle_velocity[3];
42 double particle_acceleration[3];
43 double current_velocity[3];
44 double pressure;
45 double density;
46
47 void SetZero()
48 {
49 surface_elevation = 0;
50 for (int i = 0; i < 3; ++i) {
51 surface_unit_normal[i] = 0;
52 particle_velocity[i] = 0;
53 particle_acceleration[i] = 0;
54 current_velocity[i] = 0;
55 }
56 pressure = 0;
57 density = 0;
58 }
59 };
60 virtual EnvironmentQuery PointEnvironmentQuery(const double T, const double* const X, const double Position[3]) = 0;
61 virtual void PointEnvironmentQuery2(const double T, const double* const X, const double Position[3], EnvironmentQuery& q) = 0;
62
63#ifdef FH_VISUALIZATION
64 virtual void RenderInit(Ogre::Root* const pOgreRoot, ISimObjectCreator* const pCreator) = 0;
65 virtual void RenderUpdate(const double dT, const double* const adX) = 0;
66#endif
67};
68#endif
Definition: CEnvironment.h:10
Definition: ICurrentField.h:4
Definition: CEnvironment.h:38