Marine systems simulation
Loading...
Searching...
No Matches
marenv::wave::NullWaveField Class Reference

#include <NullWaveField.h>

+ Inheritance diagram for marenv::wave::NullWaveField:
+ Collaboration diagram for marenv::wave::NullWaveField:

Public Member Functions

 NullWaveField ()=default
 Constructor.
 
 ~NullWaveField () override=default
 Destructor.
 
std::string SpectrumName () const override
 
std::string WaveTheoryName () const override
 
Status ComputeSurfaceElevation (double time, const double pos[2], double &elevationOut) override
 
Status ComputeSurfaceUnitNormal (double time, const double pos[2], double unitNormalOut[3]) override
 
Status ComputeParticleVelocity (double time, const double pos[3], double velOut[3]) override
 
Status ComputeParticleAcceleration (double time, const double pos[3], double accOut[3]) override
 
Status ComputeDynamicPressure (double time, const double pos[3], double &pressureOut) override
 
Status ComputeTotalPressure (double time, const double pos[3], double &pressureOut) override
 
Status ComputePointQuery (double time, const double pos[3], double &surface_elevation, double surface_unit_normal[3], double particle_velocity[3], double particle_acceleration[3], double &pressure) override
 
InsecureDatapointers GetWaveComponents () const override
 
WaveComponentData GetWaveComponentsCopy () const override
 
void BlendInPlace (WaveComponentData &other, double alpha) override
 
- Public Member Functions inherited from marenv::wave::WaveField
virtual ~WaveField ()=default
 Virtual destructor.
 
virtual marenv::wave::WaveComponentData GetWaveComponentsCopy (double time, size_t maxComponents=0) const
 

Additional Inherited Members

- Protected Member Functions inherited from marenv::wave::WaveField
 WaveField ()=default
 Constructor.
 

Detailed Description

A null wave field that represents no waves.

Returns zero values for all wave-related queries and hydrostatic-only pressure.

Member Function Documentation

◆ BlendInPlace()

void marenv::wave::NullWaveField::BlendInPlace ( WaveComponentData other,
double  alpha 
)
overridevirtual

Interpolates the wave components towards another set of wave components

Parameters
[in]otherThe other set of wave components
[in]alphaThe blend factor, the relative weight of the other wave components

Implements marenv::wave::WaveField.

◆ ComputeDynamicPressure()

Status marenv::wave::NullWaveField::ComputeDynamicPressure ( double  time,
const double  pos[3],
double &  pressureOut 
)
overridevirtual

Returns the dynamic pressure at a specific position.

Parameters
[in]timeCurrent simulation time.
[in]posPosition (x,y,z) for which the pressure is desired.
[out]pressureOutThe pressure at pos.
Returns
marenv::Status::OK on success. See marenv::Status for other values.

Implements marenv::wave::WaveField.

◆ ComputeParticleAcceleration()

Status marenv::wave::NullWaveField::ComputeParticleAcceleration ( double  time,
const double  pos[3],
double  accOut[3] 
)
overridevirtual

Returns the particle acceleration at a specific position.

Parameters
[in]timeCurrent simulation time.
[in]posPosition (x,y,z) for which the particle acceleration is desired.
[out]accOutThe particle acceleration at pos.
Returns
marenv::Status::OK on success. See marenv::Status for other values.

Includes effects of both current and waves.

Implements marenv::wave::WaveField.

◆ ComputeParticleVelocity()

Status marenv::wave::NullWaveField::ComputeParticleVelocity ( double  time,
const double  pos[3],
double  velOut[3] 
)
overridevirtual

Returns the particle velocity at a specific position.

Parameters
[in]timeCurrent simulation time.
[in]posPosition (x,y,z) for which the particle velocity is desired.
[out]velOutThe particle velocity at pos.
Returns
marenv::Status::OK on success. See marenv::Status for other values.

Includes effects of both current and waves.

Implements marenv::wave::WaveField.

◆ ComputePointQuery()

Status marenv::wave::NullWaveField::ComputePointQuery ( double  time,
const double  pos[3],
double &  surface_elevation,
double  surface_unit_normal[3],
double  particle_velocity[3],
double  particle_acceleration[3],
double &  pressure 
)
overridevirtual

Calculates multiple properties of the environment in one call.

Parameters
[in]timeSimulation time.
[in]posPosition.
[out]surface_elevationThe surface elevation above this point.
[out]surface_unit_normalThe surface unit normal above this point.
[out]particle_velocityThe particle velocity in this point.
[out]particle_accelerationThe particle acceleration in this point.
[out]pressureThe pressure. The pressure in this point.
Returns
marenv::Status::OK on success. See marenv::Status for other values.

Implements marenv::wave::WaveField.

◆ ComputeSurfaceElevation()

Status marenv::wave::NullWaveField::ComputeSurfaceElevation ( double  time,
const double  pos[2],
double &  elevationOut 
)
overridevirtual

Returns the surface elevation at a specific position.

Parameters
[in]timeCurrent simulation time.
[in]posPosition (x,y) for which surface elevation is desired.
[out]elevationOutSurface elevation at pos.
Returns
marenv::Status::OK on success. See marenv::Status for other values.

Implements marenv::wave::WaveField.

◆ ComputeSurfaceUnitNormal()

Status marenv::wave::NullWaveField::ComputeSurfaceUnitNormal ( double  time,
const double  pos[2],
double  unitNormalOut[3] 
)
overridevirtual

Returns the unit normal vector of the surface at a specific position.

Parameters
[in]timeCurrent simulation time.
[in]posPosition (x,y) for which the unit normal surface vector is desired.
[out]unitNormalOutThe unit normal surface vector at pos.
Returns
marenv::Status::OK on success. See marenv::Status for other values.

Implements marenv::wave::WaveField.

◆ ComputeTotalPressure()

Status marenv::wave::NullWaveField::ComputeTotalPressure ( double  time,
const double  pos[3],
double &  pressureOut 
)
overridevirtual

Returns the total pressure at a specific position.

Parameters
[in]timeCurrent simulation time.
[in]posPosition (x,y,z) for which the pressure is desired.
[out]pressureOutThe pressure at pos.
Returns
marenv::Status::OK on success. See marenv::Status for other values.

Implements marenv::wave::WaveField.

◆ GetWaveComponents()

InsecureDatapointers marenv::wave::NullWaveField::GetWaveComponents ( ) const
overridevirtual

Getter for wave component pointers.

Returns
A structure with pointers to wave component data.

Their use focus on efficiency. Care should be taken to only use these pointers while they are valid.

Implements marenv::wave::WaveField.

◆ GetWaveComponentsCopy()

WaveComponentData marenv::wave::NullWaveField::GetWaveComponentsCopy ( ) const
overridevirtual

Getter for a copy of wave component specifications.

Returns
A structure with wave component data.

Implements marenv::wave::WaveField.

◆ SpectrumName()

std::string marenv::wave::NullWaveField::SpectrumName ( ) const
overridevirtual

Getter for the name of the wave spectrum used for the realisation of the waves.

Returns
Ittc or Jonswap.

Implements marenv::wave::WaveField.

◆ WaveTheoryName()

std::string marenv::wave::NullWaveField::WaveTheoryName ( ) const
overridevirtual

Getter for the name of the wave theory used for the realisation of the waves.

Returns
Airy or Gerstner.

Implements marenv::wave::WaveField.


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