waveSpectrum Class Referenceabstract

Base class for wave spectra. More...

Inheritance diagram for waveSpectrum:

Public Member Functions

 TypeName ("waveSpectrum")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, waveSpectrum, dictionary,(const dictionary &dict, const scalar g),(dict, g))
 
 waveSpectrum (const waveSpectrum &spectrum)
 Construct a copy. More...
 
 waveSpectrum (const dictionary &dict, const scalar g)
 Construct from a dictionary and gravity. More...
 
virtual autoPtr< waveSpectrumclone () const =0
 Construct a clone. More...
 
virtual ~waveSpectrum ()
 Destructor. More...
 
scalar g () const
 Access the gravitation acceleration [m/s^2]. More...
 
virtual tmp< scalarFieldS (const scalarField &f) const =0
 Evaluate the wave spectral density at the given frequencies [m^2/Hz]. More...
 
virtual tmp< scalarFieldintegralS (const scalarField &f) const
 Evaluate the integral of the wave spectral density at the given. More...
 
virtual tmp< scalarFieldintegralFS (const scalarField &f) const
 Evaluate the integral of the wave spectral density multiplied by. More...
 
virtual scalar fFraction (const scalar fraction) const =0
 Return the frequency below which a given fraction of the spectrum's. More...
 
virtual void write (Ostream &os) const
 Write. More...
 
void operator= (const waveSpectrum &)=delete
 Disallow default bitwise assignment. More...
 

Static Public Member Functions

static autoPtr< waveSpectrumNew (const dictionary &dict, const scalar g)
 Select given a dictionary and gravity. More...
 

Protected Member Functions

scalar fFraction (const scalar fraction, const scalar f1) const
 Return the frequency below which a given fraction of the spectrum's. More...
 

Detailed Description

Base class for wave spectra.

Source files

Definition at line 49 of file waveSpectrum.H.

Constructor & Destructor Documentation

◆ waveSpectrum() [1/2]

waveSpectrum ( const waveSpectrum spectrum)

Construct a copy.

Definition at line 127 of file waveSpectrum.C.

◆ waveSpectrum() [2/2]

waveSpectrum ( const dictionary dict,
const scalar  g 
)

Construct from a dictionary and gravity.

Definition at line 134 of file waveSpectrum.C.

◆ ~waveSpectrum()

~waveSpectrum ( )
virtual

Destructor.

Definition at line 171 of file waveSpectrum.C.

Member Function Documentation

◆ fFraction() [1/2]

Foam::scalar fFraction ( const scalar  fraction,
const scalar  f1 
) const
protected

Return the frequency below which a given fraction of the spectrum's.

total energy falls, given also the maximum frequency with appreciable energy

Definition at line 104 of file waveSpectrum.C.

References Foam::fv::ff(), UList< T >::last(), and unintegrable::sample().

Referenced by GodaJONSWAP::fFraction(), and JONSWAP::fFraction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TypeName()

TypeName ( "waveSpectrum"  )

Runtime type information.

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr  ,
waveSpectrum  ,
dictionary  ,
(const dictionary &dict, const scalar g ,
(dict, g  
)

◆ clone()

virtual autoPtr<waveSpectrum> clone ( ) const
pure virtual

Construct a clone.

Implemented in PiersonMoskowitz, JONSWAP, and GodaJONSWAP.

◆ New()

Foam::autoPtr< Foam::waveSpectrum > New ( const dictionary dict,
const scalar  g 
)
static

Select given a dictionary and gravity.

Definition at line 144 of file waveSpectrum.C.

References dict, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::Info, dictionary::lookup(), Foam::nl, dictionary::optionalSubDict(), and Foam::type().

Here is the call graph for this function:

◆ g()

scalar g ( ) const
inline

Access the gravitation acceleration [m/s^2].

Definition at line 132 of file waveSpectrum.H.

◆ S()

virtual tmp<scalarField> S ( const scalarField f) const
pure virtual

Evaluate the wave spectral density at the given frequencies [m^2/Hz].

Implemented in PiersonMoskowitz, JONSWAP, and GodaJONSWAP.

◆ integralS()

Foam::tmp< Foam::scalarField > integralS ( const scalarField f) const
virtual

Evaluate the integral of the wave spectral density at the given.

frequencies [m^2]

Reimplemented in PiersonMoskowitz.

Definition at line 177 of file waveSpectrum.C.

References f(), Foam::fv::ff(), unintegrable::integrate(), Foam::fvm::S(), and List< T >::size().

Here is the call graph for this function:

◆ integralFS()

Foam::tmp< Foam::scalarField > integralFS ( const scalarField f) const
virtual

Evaluate the integral of the wave spectral density multiplied by.

the frequency at the given frequencies [Hz m^2]

Definition at line 192 of file waveSpectrum.C.

References f(), Foam::fv::ff(), unintegrable::integrateX(), Foam::fvm::S(), and List< T >::size().

Here is the call graph for this function:

◆ fFraction() [2/2]

virtual scalar fFraction ( const scalar  fraction) const
pure virtual

Return the frequency below which a given fraction of the spectrum's.

total energy falls

Implemented in PiersonMoskowitz, JONSWAP, and GodaJONSWAP.

◆ write()

void write ( Ostream os) const
virtual

Write.

Reimplemented in PiersonMoskowitz, JONSWAP, and GodaJONSWAP.

Definition at line 207 of file waveSpectrum.C.

Referenced by GodaJONSWAP::write(), JONSWAP::write(), and PiersonMoskowitz::write().

Here is the caller graph for this function:

◆ operator=()

void operator= ( const waveSpectrum )
delete

Disallow default bitwise assignment.


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