Marine systems simulation
DeepSeaGravityWaves Class Reference
+ Inheritance diagram for DeepSeaGravityWaves:
+ Collaboration diagram for DeepSeaGravityWaves:

Public Member Functions

 DeepSeaGravityWaves (string simObjectName, ISimObjectCreator *creator)
 Reads parameters, registers states, input/output ports and shared resources. More...
 
virtual void FinalSetup (const double T, const double *const X, ISimObjectCreator *const creator)
 
double GetSurfaceElevation (const double dT, const double *const dX, const double adPos[2])
 PC For initiation of shared resource NetCDFField. More...
 
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. More...
 
void GetParticleVelocity (const double dT, const double *const dX, const double adPos[3], double *adVelOut)
 Returns the particle velocity at a specific position. More...
 
void GetParticleAcceleration (const double dT, const double *const dX, const double adPos[3], double *adAccOut)
 Returns the particle acceleration at a specific position. More...
 
double GetPressure (const double dT, const double *const dX, const double adPos[3])
 Returns the dynamic pressure at a specific position. More...
 
double GetTotalPressure (const double dT, const double *const dX, const double adPos[3])
 Returns the total pressure at a specific position. More...
 
double GetSeadepth (const double adPos[2])
 Returns the sea depth at a specific position. More...
 
double GetSeabedSigma (const double adPos[3])
 Returns the sea depth sigma at a specific position. More...
 
double GetSeabedTau (const double adPos[3])
 Returns the sea depth tau at a specific position. More...
 
double GetSeabedRho (const double adPos[3])
 Returns the density of the seabed at a specific position. More...
 
void RegisterCurrentField (ICurrentField *currentField)
 Registers an input current field in the environmental representation. More...
 
void GetWaveFrequencies (std::vector< double > &vec)
 Returns a vector of all wave frequencies. More...
 
void GetWaveAmplitudes (std::vector< double > &vec)
 Returns a vector of all wave amplitudes. More...
 
void GetWavePhaseAngles (std::vector< double > &vec)
 Returns a vector of all wave phase angles. More...
 
void GetWaveDirections (std::vector< double > &vec)
 Returns a vector of all wave directions. More...
 
void GetWaveNumbers (std::vector< double > &vec)
 Returns a vector of all wave numbers. More...
 
void GetCurrentVelocity (const double dT, const double *const dX, const double adPos[3], double *adVelOut)
 Returns the water current velocity at a specific position. More...
 
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. More...
 
double GetDensity (const double T, const double *const X, const double pos[3])
 Returns the water density at a specific position. More...
 
EnvironmentQuery PointEnvironmentQuery (const double T, const double *const X, const double Position[3])
 
void PointEnvironmentQuery2 (const double T, const double *const X, const double Position[3], EnvironmentQuery &q)
 
- Public Member Functions inherited from CEnvironment
 CEnvironment (const string &sSimObjectName, ISimObjectCreator *const pCreator)
 
void OdeFcn (const double dT, const double *const adX, double *const adXDot, const bool bIsMajorTimeStep)
 
virtual double GetSurfaceElevation (const double dT, const double *const dX, const double adPos[2])=0
 
virtual void GetSurfaceUnitNormal (const double dT, const double *const dX, const double adPos[2], double *adUnitNormalOut)=0
 
virtual void GetParticleVelocity (const double dT, const double *const dX, const double adPos[3], double *adVelOut)=0
 
virtual void GetCurrentVelocity (const double dT, const double *const dX, const double adPos[3], double *adVelOut)=0
 
virtual void GetParticleAcceleration (const double dT, const double *const dX, const double adPos[3], double *adAccOut)=0
 
virtual double GetPressure (const double dT, const double *const dX, const double adPos[3])=0
 
virtual double GetTotalPressure (const double dT, const double *const dX, const double adPos[3])=0
 
virtual double GetDensity (const double dT, const double *const dX, const double adPos[3])=0
 
virtual double GetSeadepth (const double adPos[2])=0
 
virtual double GetSeabedSigma (const double adPos[3])=0
 
virtual double GetSeabedTau (const double adPos[3])=0
 
virtual double GetSeabedRho (const double adPos[3])=0
 
virtual void RegisterCurrentField (ICurrentField *currentField)=0
 
virtual void GetWaveFrequencies (std::vector< double > &vec)
 
virtual void GetWaveAmplitudes (std::vector< double > &vec)
 
virtual void GetWavePhaseAngles (std::vector< double > &vec)
 
virtual void GetWaveDirections (std::vector< double > &vec)
 
virtual void GetWaveNumbers (std::vector< double > &vec)
 
virtual EnvironmentQuery PointEnvironmentQuery (const double T, const double *const X, const double Position[3])=0
 
virtual void PointEnvironmentQuery2 (const double T, const double *const X, const double Position[3], EnvironmentQuery &q)=0
 

Protected Member Functions

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 this number.
More...
 

Protected Attributes

LinearWaveTheorym_WaveTheory
 
string m_waveTheoryName
 Enumerator holding the wave theory used.
 
string m_spectrum
 
int m_MaxNumWaves
 
int m_NumWaves
 
int m_NumWaves4Multiplier
 
vector< double > m_adWaveFrequency
 For simulation without visualization. Is multiplied with 4 to get the total number of waves in a sea state.
 
vector< double > m_adWaveAmplitude
 Array holding wave frequencies for all waves.
 
vector< double > m_adWaveDirection
 Array holding wave amplitudes for all waves.
 
vector< double > m_adPhaseAngle
 Array holding wave propagation directions for all waves.
 
vector< double > m_adWaveNumber
 Array holding phase angles for all waves.
 
NetCDFsinmod::Gridm_grid
 Array holding wave number for all waves.
 
double * m_depthMap
 
ICurrentFieldm_globalCurrentField
 
vector< ICurrentField * > m_registeredCurrentFields
 
double m_length_x
 
double m_length_y
 
bool m_useNetCDFField
 
CNCFieldm_ncField
 Parameter that decides whether NetCDFField (true) should be used.
 
bool m_useArtificialTankVelField
 Pointer to CNCField.
 
double m_UxyArtField
 Boolean variable. True means that an artificial field is set.
 
double m_UzArtField
 Maximum velocity at tank walls (assuming circular tank)
 
double m_tankRadius
 Vertical (constant) velocity in tank. Assuming constant vertical velocity with drain in the entire width of the circular tank.
 
bool m_wakeEffect
 Tank radius for artificial velocity field.
 
int m_wakeObjNum
 
ISignalPort ** m_wakeObjPort
 
ISignalPort * m_wakeDirPort
 
ISignalPort * m_wakeRatioPort
 
double m_wakeObjRadius [3]
 
double m_wakeObjDepth [3]
 
double m_wakeObjPower
 
double m_RampT
 

Constructor & Destructor Documentation

◆ DeepSeaGravityWaves()

DeepSeaGravityWaves::DeepSeaGravityWaves ( string  simObjectName,
ISimObjectCreator *  creator 
)

The constructor performs all initial setup for DeepSeaGravityWaves. Reading in parameters, setting up communication interface i.e. output ports, input ports, and states, plus additional 'one time only' resource setup.

Parameters
[in]simObjectName-> The name of the simobject
[in]creator-> Retrieve parameters. Register states, ports and shared resources

Member Function Documentation

◆ GetCurrentProducerVelocity()

void DeepSeaGravityWaves::GetCurrentProducerVelocity ( const double  dT,
const double *const  dX,
const double  adPos[3],
double *  adVelOut 
)

Includes effects of only currents, not waves

Parameters
[in]dT-> Current simulation time
[in]dX-> Current simulation state
[in]adPos-> Position (x,y,z) for which the water current velocity producer is desired
[out]adVelOut-> The current velocity producer at adPos

◆ GetCurrentVelocity()

void DeepSeaGravityWaves::GetCurrentVelocity ( const double  dT,
const double *const  dX,
const double  adPos[3],
double *  adVelOut 
)
virtual

Includes effects of only currents, not waves

Parameters
[in]dT-> Current simulation time
[in]dX-> Current simulation state
[in]adPos-> Position (x,y,z) for which the current velocity is desired
[out]adVelOut-> The current velocity at adPos

Implements CEnvironment.

◆ GetDensity()

double DeepSeaGravityWaves::GetDensity ( const double  T,
const double *const  X,
const double  pos[3] 
)
virtual
Parameters
[in]T-> Current simulation time
[in]X-> Current simulation state
[in]pos-> Position (x,y,z) for which the water current velocity producer is desired

Implements CEnvironment.

◆ GetParticleAcceleration()

void DeepSeaGravityWaves::GetParticleAcceleration ( const double  dT,
const double *const  dX,
const double  adPos[3],
double *  adAccOut 
)
virtual

Includes effects of both current and waves

Parameters
[in]dT-> Current simulation time
[in]dX-> Current simulation state
[in]adPos-> Position (x,y,z) for which the particle acceleration is desired
[out]adAccOut-> The particle acceleration at adPos

Implements CEnvironment.

◆ GetParticleVelocity()

void DeepSeaGravityWaves::GetParticleVelocity ( const double  dT,
const double *const  dX,
const double  adPos[3],
double *  adVelOut 
)
virtual

Includes effects of both current and waves

Parameters
[in]dT-> Current simulation time
[in]dX-> Current simulation state
[in]adPos-> Position (x,y,z) for which the particle velocity is desired
[out]adVelOut-> The particle velocity at adPos

Implements CEnvironment.

◆ GetPressure()

double DeepSeaGravityWaves::GetPressure ( const double  dT,
const double *const  dX,
const double  adPos[3] 
)
virtual
Parameters
[in]dT-> Current simulation time
[in]dX-> Current simulation state
[in]adPos-> Position (x,y,z) for which the pressure is desired
Returns
-> The pressure at adPos

Implements CEnvironment.

◆ GetSeabedRho()

double DeepSeaGravityWaves::GetSeabedRho ( const double  adPos[3])
virtual

Returns 0 if adPos is located above the sea depth, and returns the density if adPos is at or beneath the sea depth

Parameters
[in]adPos-> Position (x,y,z) for which seabed density is desired
Returns
-> The seabed density at adPos

Implements CEnvironment.

◆ GetSeabedSigma()

double DeepSeaGravityWaves::GetSeabedSigma ( const double  adPos[3])
virtual
Parameters
[in]adPos-> Position (x,y,z) for which sea depth sigma is desired
Returns
-> The sea depth sigma at adPos

Implements CEnvironment.

◆ GetSeabedTau()

double DeepSeaGravityWaves::GetSeabedTau ( const double  adPos[3])
virtual
Parameters
[in]adPos-> Position (x,y,z) for which sea depth tau is desired
Returns
-> The sea depth tau at adPos

Implements CEnvironment.

◆ GetSeadepth()

double DeepSeaGravityWaves::GetSeadepth ( const double  adPos[2])
virtual
Parameters
[in]adPos-> Position (x,y) for which sea depth is desired
Returns
-> The sea depth at adPos

Implements CEnvironment.

◆ GetSurfaceElevation()

double DeepSeaGravityWaves::GetSurfaceElevation ( const double  dT,
const double *const  dX,
const double  adPos[2] 
)
virtual

Returns the surface elevation at a specific position

Parameters
[in]dT-> Current simulation time
[in]dX-> Current simulation state
[in]adPos-> Position (x,y) for which surface elevation is desired
Returns
-> Surface elevation at adPos

Implements CEnvironment.

◆ GetSurfaceUnitNormal()

void DeepSeaGravityWaves::GetSurfaceUnitNormal ( const double  dT,
const double *const  dX,
const double  adPos[2],
double *  adUnitNormalOut 
)
virtual
Parameters
[in]dT-> Current simulation time
[in]dX-> Current simulation state
[in]adPos-> Position (x,y) for which the unit normal surface vector is desired
[out]adUnitNormalOut-> The unit normal surface vector at adPos

Implements CEnvironment.

◆ GetTotalPressure()

double DeepSeaGravityWaves::GetTotalPressure ( const double  dT,
const double *const  dX,
const double  adPos[3] 
)
virtual

Includes both dynamic and static pressure

Parameters
[in]dT-> Current simulation time
[in]dX-> Current simulation state
[in]adPos-> Position (x,y,z) for which the pressure is desired
Returns
-> The pressure at adPos

Implements CEnvironment.

◆ GetWakeRatio()

double DeepSeaGravityWaves::GetWakeRatio ( const double  T,
const double *const  X,
const double  adPos[3] 
)
protected
Parameters
[in]T-> Current simulation time
[in]X-> Current simulation state
[in]adPos-> Position (x,y,z) for which the wake effect is desired
Returns
-> The wake effect ratio at adPos

◆ GetWaveAmplitudes()

void DeepSeaGravityWaves::GetWaveAmplitudes ( std::vector< double > &  vec)
virtual

Includes wave amplitudes of all components manually assigned by the user, or all components produced by chosen spectrum

Parameters
[out]vec-> Vector containing wave amplitudes

Reimplemented from CEnvironment.

◆ GetWaveDirections()

void DeepSeaGravityWaves::GetWaveDirections ( std::vector< double > &  vec)
virtual

Includes wave directions in radians of all components manually assigned by the user, or all components produced by chosen spectrum

Parameters
[out]vec-> Vector containing wave directions

Reimplemented from CEnvironment.

◆ GetWaveFrequencies()

void DeepSeaGravityWaves::GetWaveFrequencies ( std::vector< double > &  vec)
virtual

Includes wave frequencies of all components manually assigned by the user, or all components produced by chosen spectrum

Parameters
[out]vec-> Vector containing wave frequencies

Reimplemented from CEnvironment.

◆ GetWaveNumbers()

void DeepSeaGravityWaves::GetWaveNumbers ( std::vector< double > &  vec)
virtual

Includes wave numbers of all components manually assigned by the user, or all components produced by chosen spectrum

Parameters
[out]vec-> Vector containing wave numbers

Reimplemented from CEnvironment.

◆ GetWavePhaseAngles()

void DeepSeaGravityWaves::GetWavePhaseAngles ( std::vector< double > &  vec)
virtual

Includes wave phase angles of all components manually assigned by the user, or all components produced by chosen spectrum

Parameters
[out]vec-> Vector containing wave phase angles

Reimplemented from CEnvironment.

◆ PointEnvironmentQuery()

EnvironmentQuery DeepSeaGravityWaves::PointEnvironmentQuery ( const double  T,
const double *const  X,
const double  Position[3] 
)
virtual

Implements CEnvironment.

◆ PointEnvironmentQuery2()

void DeepSeaGravityWaves::PointEnvironmentQuery2 ( const double  T,
const double *const  X,
const double  Position[3],
EnvironmentQuery q 
)
virtual

Implements CEnvironment.

◆ RegisterCurrentField()

void DeepSeaGravityWaves::RegisterCurrentField ( ICurrentField currentField)
virtual

The registered current field is added to eventual other current fields already assigned to the environmental model

Parameters
[in]currentField-> ICurrentField object to be added to the environmental model

Implements CEnvironment.


The documentation for this class was generated from the following file: