FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

FFT of the pressure field. More...

#include <randomProcesses/noiseFFT.H>


Detailed Description

FFT of the pressure field.

Source files

Definition at line 50 of file noiseFFT.H.

Inheritance diagram for noiseFFT:
Collaboration diagram for noiseFFT:

List of all members.

Public Member Functions

 noiseFFT (const scalar deltat, const scalarField &pressure)
 Construct from pressure field.
 noiseFFT (Istream &)
 Construct from Istream.
 noiseFFT (const fileName &pFileName, const label skip=0)
 Construct from pressure field file name.
graph  pt () const
 Return the graph of p(t)
tmp< scalarField >  window (const label N, const label n) const
 Return the nth window.
tmp< scalarField >  Hanning (const label N) const
 Return the Hanning window function.
tmp< scalarField >  Pf (const tmp< scalarField > &pn) const
 Return the fft of the given pressure data.
graph  meanPf (const label N, const label nw) const
 Return the multi-window mean fft of the complete pressure data.
graph  RMSmeanPf (const label N, const label nw) const
 Return the multi-window RMS mean fft of the complete pressure data.
graph  Lf (const graph &gPf) const
 Return the narrow-band PFL (pressure-fluctuation level) spectrum.
graph  Ldelta (const graph &gLf, const scalar f1, const scalar fU) const
 Return the one-third-octave-band PFL spectrum.
graph  Pdelta (const graph &gLf, const scalar f1, const scalar fU) const
 Return the one-third-octave-band pressure spectrum.
scalar  Lsum (const graph &gLf) const
 Return the total PFL as the sum of Lf over all frequencies.
scalar  dbToPa (const scalar db) const
 Convert the db into Pa.
tmp< scalarField >  dbToPa (const tmp< scalarField > &db) const
 Convert the db-field into Pa.

Static Public Attributes

static scalar  p0 = 2e-5
 Reference pressure.

Constructor & Destructor Documentation

noiseFFT ( const scalar   deltat,
const scalarField &   pressure  
)

Construct from pressure field.

Definition at line 41 of file noiseFFT.C.

noiseFFT ( Istream &    )

Construct from Istream.

noiseFFT ( const fileName &   pFileName,
const label   skip = 0  
)

Member Function Documentation

Foam::graph pt (  ) const

Return the graph of p(t)

Definition at line 111 of file noiseFFT.C.

References forAll.

Foam::tmp< Foam::scalarField > window ( const label   N,
const label   n  
) const

Return the nth window.

Definition at line 131 of file noiseFFT.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, and forAll.

Foam::tmp< Foam::scalarField > Hanning ( const label   N  ) const

Return the Hanning window function.

Definition at line 162 of file noiseFFT.C.

References Foam::cos(), forAll, Foam::mathematicalConstant::pi(), and Foam::T().

Foam::tmp< Foam::scalarField > Pf ( const tmp< scalarField > &   pn  ) const

Return the fft of the given pressure data.

Definition at line 177 of file noiseFFT.C.

References tmp< T >::clear(), Foam::mag(), Foam::ReComplexField(), fft::reverseTransform(), and Foam::sqrt().

Foam::graph meanPf ( const label   N,
const label   nw  
) const

Return the multi-window mean fft of the complete pressure data.

Definition at line 212 of file noiseFFT.C.

References Foam::endl(), Foam::exit(), f(), Foam::FatalError, FatalErrorIn, forAll, and List< T >::size().

Foam::graph RMSmeanPf ( const label   N,
const label   nw  
) const

Return the multi-window RMS mean fft of the complete pressure data.

Definition at line 258 of file noiseFFT.C.

References Foam::endl(), Foam::exit(), f(), Foam::FatalError, FatalErrorIn, forAll, List< T >::size(), Foam::sqr(), and Foam::sqrt().

Foam::graph Lf ( const graph &   gPf  ) const

Return the narrow-band PFL (pressure-fluctuation level) spectrum.

Definition at line 303 of file noiseFFT.C.

References Foam::log10(), graph::x(), and graph::y().

Foam::graph Ldelta ( const graph &   gLf,
const scalar   f1,
const scalar   fU  
) const

Return the one-third-octave-band PFL spectrum.

starting at octave with mean frequency f1

Definition at line 317 of file noiseFFT.C.

References Foam::cbrt(), f(), fu, Foam::log10(), Foam::pow(), List< T >::setSize(), List< T >::size(), Foam::sqrt(), graph::x(), and graph::y().

Foam::graph Pdelta ( const graph &   gLf,
const scalar   f1,
const scalar   fU  
) const

Return the one-third-octave-band pressure spectrum.

starting at octave with mean frequency f1

Definition at line 373 of file noiseFFT.C.

References Foam::cbrt(), f(), fu, List< T >::setSize(), List< T >::size(), Foam::sqr(), Foam::sqrt(), graph::x(), and graph::y().

Foam::scalar Lsum ( const graph &   gLf  ) const

Return the total PFL as the sum of Lf over all frequencies.

Definition at line 428 of file noiseFFT.C.

References forAll, Foam::log10(), Foam::pow(), and graph::y().

Foam::scalar dbToPa ( const scalar   db  ) const

Convert the db into Pa.

Definition at line 445 of file noiseFFT.C.

References Foam::pow().

Foam::tmp< Foam::scalarField > dbToPa ( const tmp< scalarField > &   db  ) const

Convert the db-field into Pa.

Definition at line 452 of file noiseFFT.C.

References Foam::pow().


Member Data Documentation

Foam::scalar p0 = 2e-5 [static]

Reference pressure.

Definition at line 63 of file noiseFFT.H.


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