FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
visual::tail::TailCascade Class Reference

#include <SpectralTail.h>

Public Member Functions

 TailCascade (int n, double patchSize, double kMin, double kMax, const TailSpectrum &spectrum, std::uint32_t seed)
 
TailFields Evaluate (double time, double choppiness, bool jacobian=true) const
 
double MeanSquareSlope () const
 
std::array< double, 3 > SlopeCovariance () const
 
double HeightVariance () const
 
int Size () const
 
double PatchSize () const
 

Detailed Description

One cascade: a periodic patch of size L with the wave numbers in [kMin, kMax).

Built once from the spectrum and a seed; Evaluate(t) gives the fields at time t.

Constructor & Destructor Documentation

◆ TailCascade()

visual::tail::TailCascade::TailCascade ( int  n,
double  patchSize,
double  kMin,
double  kMax,
const TailSpectrum &  spectrum,
std::uint32_t  seed 
)

Sample the spectrum.

Parameters
[in]nGrid size N, a power of two.
[in]patchSizeL [m].
[in]kMinLowest wave number kept [rad/m].
[in]kMaxHighest wave number kept [rad/m] (at most pi N / L).
[in]spectrumThe spectrum.
[in]seedSeed of the random amplitudes and phases.

Member Function Documentation

◆ Evaluate()

TailFields visual::tail::TailCascade::Evaluate ( double  time,
double  choppiness,
bool  jacobian = true 
) const

The fields at time t.

Parameters
[in]timeTime [s].
[in]choppinessScale of the horizontal displacement in the Jacobian (0: no folding).
[in]jacobianWhether to compute the Jacobian (two of the five transforms); if not, it is 1 everywhere.
Returns
The fields.

◆ HeightVariance()

double visual::tail::TailCascade::HeightVariance ( ) const
inline
Returns
Variance of the elevation averaged over time [m^2] (see MeanSquareSlope()).

◆ MeanSquareSlope()

double visual::tail::TailCascade::MeanSquareSlope ( ) const
inline
Returns
Mean square slope of the cascade averaged over time: 2 sum |h0|^2 k^2. At a given time the patch value differs by about 1 %, because the two counter-propagating terms of each cell interfere.

◆ PatchSize()

double visual::tail::TailCascade::PatchSize ( ) const
inline
Returns
L [m].

◆ Size()

int visual::tail::TailCascade::Size ( ) const
inline
Returns
N.

◆ SlopeCovariance()

std::array< double, 3 > visual::tail::TailCascade::SlopeCovariance ( ) const
inline
Returns
Slope covariance (xx, yy, xy) averaged over time, in the frame of the patch (see MeanSquareSlope()). The trace is MeanSquareSlope().

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