FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
marenv::wind::GustField Class Reference

#include <GustField.h>

+ Inheritance diagram for marenv::wind::GustField:
+ Collaboration diagram for marenv::wind::GustField:

Classes

struct  Parameters
 The gusts' parameters. More...
 

Public Member Functions

 GustField (const Parameters &parameters)
 
Status GetWind (double time, const double position[3], double windVelocity[3]) const override
 
double StandardDeviationAt (double height) const
 
const Parameters & GetParameters () const
 The parameters given to the constructor.
 
- Public Member Functions inherited from marenv::wind::WindField
virtual ~WindField ()=default
 Virtual destructor.
 

Static Public Member Functions

static double FroyaSpectrum (double frequency, double height, double meanSpeed)
 

Additional Inherited Members

- Protected Member Functions inherited from marenv::wind::WindField
 WindField ()=default
 The constructor is protected: WindField is an interface.
 

Detailed Description

Gusts: the wind's turbulent variation about its mean, to be added to a mean wind field (the facade sums them).

A realisation of the Frøya wind spectrum (DNV-RP-C205, Environmental conditions and environmental loads, section 2.3.4, the spectrum recommended for offshore conditions) as a sum of harmonics with random phases:

S(f, z) = 320 (U0/10)^2 (z/10)^0.45 / (1 + fn^n)^(5/(3n)), fn = 172 f (z/10)^(2/3) (U0/10)^(-0.75), n = 0.468,

with U0 the 1-hour mean wind speed at 10 m [m/s], z the height [m] and f the frequency [Hz]. Only the longitudinal component (along the mean wind) is modelled. The phases are the same at every height and position: the gust is fully coherent in space (it does not travel with the wind), a simplification for visualisation and for loads on bodies much smaller than the gusts.

Constructor & Destructor Documentation

◆ GustField()

marenv::wind::GustField::GustField ( const Parameters &  parameters)
explicit

Constructor: draws the phases.

Parameters
[in]parametersThe gusts' parameters.
Exceptions
std::invalid_argumentfor a parameter out of its range.

Member Function Documentation

◆ FroyaSpectrum()

static double marenv::wind::GustField::FroyaSpectrum ( double  frequency,
double  height,
double  meanSpeed 
)
static

The Frøya spectral density S(f, z) [m^2/s^2/Hz] for the mean speed meanSpeed (U0) at height height.

Parameters
[in]frequencyFrequency [Hz].
[in]heightHeight above the mean sea level [m], > 0.
[in]meanSpeedU0, the 1-hour mean wind speed at 10 m [m/s].

◆ GetWind()

Status marenv::wind::GustField::GetWind ( double  time,
const double  position[3],
double  windVelocity[3] 
) const
overridevirtual

Return the wind velocity in a given position and time.

Parameters
[in]timeTime stamp in simulation time [s].
[in]positionThe position to query for, NED [m].
[out]windVelocityThe velocity of the air in the given time and position, NED [m/s].
Returns
marenv::Status::OK on success. See marenv::Status for other values.

Threading contract, as for current::CurrentField::GetCurrent(): GetWind() may be called from several threads at once and must not change the field's state; registration happens during setup.

Implements marenv::wind::WindField.

◆ StandardDeviationAt()

double marenv::wind::GustField::StandardDeviationAt ( double  height) const

The standard deviation of the realised gust speed at the height height [m/s]: the square root of the sum of the harmonics' variances (amplitude^2 / 2).

Parameters
[in]heightHeight above the mean sea level [m].

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