Marine systems simulation
|
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 | |
LinearWaveTheory * | m_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::Grid * | m_grid |
Array holding wave number for all waves. | |
double * | m_depthMap |
ICurrentField * | m_globalCurrentField |
vector< ICurrentField * > | m_registeredCurrentFields |
double | m_length_x |
double | m_length_y |
bool | m_useNetCDFField |
CNCField * | m_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 |
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.
[in] | simObjectName | -> The name of the simobject |
[in] | creator | -> Retrieve parameters. Register states, ports and shared resources |
void DeepSeaGravityWaves::GetCurrentProducerVelocity | ( | const double | dT, |
const double *const | dX, | ||
const double | adPos[3], | ||
double * | adVelOut | ||
) |
Includes effects of only currents, not waves
[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 |
|
virtual |
Includes effects of only currents, not waves
[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.
|
virtual |
[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.
|
virtual |
Includes effects of both current and waves
[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.
|
virtual |
Includes effects of both current and waves
[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.
|
virtual |
[in] | dT | -> Current simulation time |
[in] | dX | -> Current simulation state |
[in] | adPos | -> Position (x,y,z) for which the pressure is desired |
Implements CEnvironment.
|
virtual |
Returns 0 if adPos is located above the sea depth, and returns the density if adPos is at or beneath the sea depth
[in] | adPos | -> Position (x,y,z) for which seabed density is desired |
Implements CEnvironment.
|
virtual |
[in] | adPos | -> Position (x,y,z) for which sea depth sigma is desired |
Implements CEnvironment.
|
virtual |
[in] | adPos | -> Position (x,y,z) for which sea depth tau is desired |
Implements CEnvironment.
|
virtual |
[in] | adPos | -> Position (x,y) for which sea depth is desired |
Implements CEnvironment.
|
virtual |
Returns the surface elevation at a specific position
[in] | dT | -> Current simulation time |
[in] | dX | -> Current simulation state |
[in] | adPos | -> Position (x,y) for which surface elevation is desired |
Implements CEnvironment.
|
virtual |
[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.
|
virtual |
Includes both dynamic and static pressure
[in] | dT | -> Current simulation time |
[in] | dX | -> Current simulation state |
[in] | adPos | -> Position (x,y,z) for which the pressure is desired |
Implements CEnvironment.
|
protected |
[in] | T | -> Current simulation time |
[in] | X | -> Current simulation state |
[in] | adPos | -> Position (x,y,z) for which the wake effect is desired |
|
virtual |
Includes wave amplitudes of all components manually assigned by the user, or all components produced by chosen spectrum
[out] | vec | -> Vector containing wave amplitudes |
Reimplemented from CEnvironment.
|
virtual |
Includes wave directions in radians of all components manually assigned by the user, or all components produced by chosen spectrum
[out] | vec | -> Vector containing wave directions |
Reimplemented from CEnvironment.
|
virtual |
Includes wave frequencies of all components manually assigned by the user, or all components produced by chosen spectrum
[out] | vec | -> Vector containing wave frequencies |
Reimplemented from CEnvironment.
|
virtual |
Includes wave numbers of all components manually assigned by the user, or all components produced by chosen spectrum
[out] | vec | -> Vector containing wave numbers |
Reimplemented from CEnvironment.
|
virtual |
Includes wave phase angles of all components manually assigned by the user, or all components produced by chosen spectrum
[out] | vec | -> Vector containing wave phase angles |
Reimplemented from CEnvironment.
|
virtual |
Implements CEnvironment.
|
virtual |
Implements CEnvironment.
|
virtual |
The registered current field is added to eventual other current fields already assigned to the environmental model
[in] | currentField | -> ICurrentField object to be added to the environmental model |
Implements CEnvironment.