151#include <CEnvironment.h>
157namespace NetCDFsinmod
166#ifdef FH_VISUALIZATION
167 #include <CFhCamera.h>
168 #include "sfh/ogre/C3DLine.h"
189 virtual void FinalSetup(
const double T,
const double *
const X, ISimObjectCreator *
const creator);
208 void GetSurfaceUnitNormal (
const double dT,
const double*
const dX,
const double adPos[2],
double *adUnitNormalOut);
219 void GetParticleVelocity (
const double dT,
const double*
const dX,
const double adPos[3],
double *adVelOut);
240 double GetPressure (
const double dT,
const double*
const dX,
const double adPos[3]);
346 void GetCurrentVelocity (
const double dT,
const double*
const dX,
const double adPos[3],
double *adVelOut);
366 double GetDensity(
const double T,
const double *
const X,
const double pos[3]);
369 EnvironmentQuery PointEnvironmentQuery(
const double T,
const double*
const X,
const double Position[3]);
370 void PointEnvironmentQuery2(
const double T,
const double*
const X,
const double Position[3],
EnvironmentQuery &q);
372 #ifdef FH_VISUALIZATION
381 void RenderInit(Ogre::Root*
const ogreRoot, ISimObjectCreator*
const creator);
390 void RenderUpdate(
const double T,
const double*
const X);
399 int m_NumWaves4Multiplier;
410 vector<ICurrentField*> m_registeredCurrentFields;
415 bool m_useNetCDFField;
427 ISignalPort** m_wakeObjPort;
428 ISignalPort* m_wakeDirPort;
429 ISignalPort* m_wakeRatioPort;
430 double m_wakeObjRadius[3];
431 double m_wakeObjDepth[3];
432 double m_wakeObjPower;
442 double GetWakeRatio(
const double T,
const double *
const X,
const double adPos[3]);
449 #ifdef FH_VISUALIZATION
451 Ogre::SceneNode* m_pWorldSceneNode;
452 Ogre::SceneNode* m_RenderOceanNode;
453 Ogre::ManualObject* m_pOceanRenderObj;
454 Ogre::Light* m_pLight;
456 Ogre::ManualObject** m_depthPolygons;
457 Ogre::SceneNode** m_depthPolygonsNodes;
458 CFhCamera* m_FhCamera;
459 Ogre::Camera* m_OgreCamera;
461 bool m_BoolVisualization;
Definition: CEnvironment.h:10
Definition: DeepSeaGravityWaves.h:172
DeepSeaGravityWaves(string simObjectName, ISimObjectCreator *creator)
Reads parameters, registers states, input/output ports and shared resources.
vector< double > m_adWaveFrequency
For simulation without visualization. Is multiplied with 4 to get the total number of waves in a sea ...
Definition: DeepSeaGravityWaves.h:401
vector< double > m_adWaveAmplitude
Array holding wave frequencies for all waves.
Definition: DeepSeaGravityWaves.h:402
double GetWakeRatio(const double T, const double *const X, const double adPos[3])
Returns the wake effect ratio at a specific position. The horizontal velocity will be multiplied with...
double GetSurfaceElevation(const double dT, const double *const dX, const double adPos[2])
PC For initiation of shared resource NetCDFField.
double GetTotalPressure(const double dT, const double *const dX, const double adPos[3])
Returns the total pressure at a specific position.
void GetCurrentVelocity(const double dT, const double *const dX, const double adPos[3], double *adVelOut)
Returns the water current velocity at a specific position.
double m_UzArtField
Maximum velocity at tank walls (assuming circular tank)
Definition: DeepSeaGravityWaves.h:420
double m_tankRadius
Vertical (constant) velocity in tank. Assuming constant vertical velocity with drain in the entire wi...
Definition: DeepSeaGravityWaves.h:421
vector< double > m_adWaveDirection
Array holding wave amplitudes for all waves.
Definition: DeepSeaGravityWaves.h:403
NetCDFsinmod::Grid * m_grid
Array holding wave number for all waves.
Definition: DeepSeaGravityWaves.h:407
bool m_wakeEffect
Tank radius for artificial velocity field.
Definition: DeepSeaGravityWaves.h:425
double GetSeabedSigma(const double adPos[3])
Returns the sea depth sigma at a specific position.
void GetCurrentProducerVelocity(const double dT, const double *const dX, const double adPos[3], double *adVelOut)
Returns the water current velocity producer at a specific position.
void GetWavePhaseAngles(std::vector< double > &vec)
Returns a vector of all wave phase angles.
string m_waveTheoryName
Enumerator holding the wave theory used.
Definition: DeepSeaGravityWaves.h:395
double GetPressure(const double dT, const double *const dX, const double adPos[3])
Returns the dynamic pressure at a specific position.
void GetWaveAmplitudes(std::vector< double > &vec)
Returns a vector of all wave amplitudes.
void GetWaveFrequencies(std::vector< double > &vec)
Returns a vector of all wave frequencies.
double GetSeabedTau(const double adPos[3])
Returns the sea depth tau at a specific position.
void GetSurfaceUnitNormal(const double dT, const double *const dX, const double adPos[2], double *adUnitNormalOut)
Returns the unit normal vector of the surface at a specific position.
void GetParticleAcceleration(const double dT, const double *const dX, const double adPos[3], double *adAccOut)
Returns the particle acceleration at a specific position.
double GetDensity(const double T, const double *const X, const double pos[3])
Returns the water density at a specific position.
vector< double > m_adWaveNumber
Array holding phase angles for all waves.
Definition: DeepSeaGravityWaves.h:405
CNCField * m_ncField
Parameter that decides whether NetCDFField (true) should be used.
Definition: DeepSeaGravityWaves.h:416
void GetWaveDirections(std::vector< double > &vec)
Returns a vector of all wave directions.
void GetParticleVelocity(const double dT, const double *const dX, const double adPos[3], double *adVelOut)
Returns the particle velocity at a specific position.
void GetWaveNumbers(std::vector< double > &vec)
Returns a vector of all wave numbers.
double GetSeabedRho(const double adPos[3])
Returns the density of the seabed at a specific position.
double m_UxyArtField
Boolean variable. True means that an artificial field is set.
Definition: DeepSeaGravityWaves.h:419
vector< double > m_adPhaseAngle
Array holding wave propagation directions for all waves.
Definition: DeepSeaGravityWaves.h:404
void RegisterCurrentField(ICurrentField *currentField)
Registers an input current field in the environmental representation.
double GetSeadepth(const double adPos[2])
Returns the sea depth at a specific position.
bool m_useArtificialTankVelField
Pointer to CNCField.
Definition: DeepSeaGravityWaves.h:418
Definition: ICurrentField.h:4
Definition: LinearWaveTheory.h:25
Definition: CEnvironment.h:38
Definition: NetCDFParser.h:7