Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
noiseFFT Class Reference

Performs FFT of pressure field to generate noise data. More...

Inheritance diagram for noiseFFT:
Inheritance graph
[legend]
Collaboration diagram for noiseFFT:
Collaboration graph
[legend]

Public Member Functions

 noiseFFT (const scalar deltaT, const label windowSize=-1)
 
 ~noiseFFT ()
 
void setData (scalarList &data)
 
void setData (const fileName &pFileName, const label skip=0)
 
graph pt () const
 
tmp< scalarFieldPf (const tmp< scalarField > &pn) const
 
graph meanPf (const windowModel &window) const
 
graph RMSmeanPf (const windowModel &window) const
 
graph PSDf (const windowModel &window) const
 
graph PSD (const graph &gPSDf) const
 
graph octaves (const graph &g, const labelUList &freqBandIDs) const
 
scalar dbToPa (const scalar db) const
 
tmp< scalarFielddbToPa (const tmp< scalarField > &db) const
 
- Public Member Functions inherited from Field
constexpr Field () noexcept
 
 Field (const label len)
 
 Field (const label len, const Type &val)
 
 Field (const label len, const Foam::zero)
 
 Field (const Foam::one, const Type &val)
 
 Field (const Foam::one, Type &&val)
 
 Field (const Foam::one, const Foam::zero)
 
 Field (const Field< Type > &fld)
 
 Field (const UList< Type > &list)
 
template<class Addr >
 Field (const IndirectListBase< Type, Addr > &list)
 
 Field (Field< Type > &&fld)
 
 Field (List< Type > &&list)
 
template<int SizeMin>
 Field (DynamicList< Type, SizeMin > &&list)
 
 Field (const UList< Type > &mapF, const labelUList &mapAddressing)
 
 Field (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing)
 
 Field (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &weights)
 
 Field (const tmp< Field< Type >> &tmapF, const labelListList &mapAddressing, const scalarListList &weights)
 
 Field (const UList< Type > &mapF, const FieldMapper &map, const bool applyFlip=true)
 
 Field (const UList< Type > &mapF, const FieldMapper &map, const Type &defaultValue, const bool applyFlip=true)
 
 Field (const UList< Type > &mapF, const FieldMapper &map, const UList< Type > &defaultValues, const bool applyFlip=true)
 
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &map, const bool applyFlip=true)
 
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &map, const Type &defaultValue, const bool applyFlip=true)
 
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &map, const UList< Type > &defaultValues, const bool applyFlip=true)
 
 Field (Field< Type > &fld, bool reuse)
 
 Field (const tmp< Field< Type >> &tfld)
 
 Field (Istream &is)
 
 Field (const word &keyword, const dictionary &dict, const label len)
 
tmp< Field< Type > > clone () const
 
void map (const UList< Type > &mapF, const labelUList &mapAddressing)
 
void map (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing)
 
void map (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &weights)
 
void map (const tmp< Field< Type >> &tmapF, const labelListList &mapAddressing, const scalarListList &weights)
 
void map (const UList< Type > &mapF, const FieldMapper &map, const bool applyFlip=true)
 
void map (const tmp< Field< Type >> &tmapF, const FieldMapper &map, const bool applyFlip=true)
 
void autoMap (const FieldMapper &map, const bool applyFlip=true)
 
void rmap (const UList< Type > &mapF, const labelUList &mapAddressing)
 
void rmap (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing)
 
void rmap (const UList< Type > &mapF, const labelUList &mapAddressing, const UList< scalar > &weights)
 
void rmap (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing, const UList< scalar > &weights)
 
void negate ()
 
tmp< Field< cmptType > > component (const direction) const
 
void replace (const direction, const UList< cmptType > &)
 
void replace (const direction, const tmp< Field< cmptType >> &)
 
void replace (const direction, const cmptType &)
 
template<class VSForm >
VSForm block (const label start) const
 
tmp< Field< Type > > T () const
 
void writeEntry (const word &keyword, Ostream &os) const
 
SubField< Type > slice (const label pos, label len=-1)
 
const SubField< Type > slice (const label pos, label len=-1) const
 
SubField< Type > slice (const labelRange &range)
 
const SubField< Type > slice (const labelRange &range) const
 
void operator= (const Field< Type > &)
 
void operator= (const tmp< Field< Type >> &)
 
void operator= (const UList< Type > &rhs)
 
void operator= (const SubField< Type > &rhs)
 
template<class Addr >
void operator= (const IndirectListBase< Type, Addr > &rhs)
 
void operator= (Field< Type > &&rhs)
 
void operator= (List< Type > &&rhs)
 
template<int SizeMin>
void operator= (DynamicList< Type, SizeMin > &&rhs)
 
void operator= (const Type &val)
 
void operator= (const Foam::zero)
 
template<class Form , class Cmpt , direction nCmpt>
void operator= (const VectorSpace< Form, Cmpt, nCmpt > &)
 
void operator+= (const UList< Type > &)
 
void operator+= (const tmp< Field< Type >> &)
 
void operator-= (const UList< Type > &)
 
void operator-= (const tmp< Field< Type >> &)
 
void operator*= (const UList< scalar > &)
 
void operator*= (const tmp< Field< scalar >> &)
 
void operator/= (const UList< scalar > &)
 
void operator/= (const tmp< Field< scalar >> &)
 
void operator+= (const Type &)
 
void operator-= (const Type &)
 
void operator*= (const scalar &)
 
void operator/= (const scalar &)
 
template<class Type >
 Field (const UList< Type > &mapF, const labelUList &mapAddressing)
 
template<class Type >
 Field (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing)
 
template<class Type >
 Field (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &mapWeights)
 
template<class Type >
 Field (const tmp< Field< Type >> &tmapF, const labelListList &mapAddressing, const scalarListList &mapWeights)
 
template<class Type >
 Field (const UList< Type > &mapF, const FieldMapper &mapper, const bool applyFlip)
 
template<class Type >
 Field (const UList< Type > &mapF, const FieldMapper &mapper, const Type &defaultValue, const bool applyFlip)
 
template<class Type >
 Field (const UList< Type > &mapF, const FieldMapper &mapper, const UList< Type > &defaultValues, const bool applyFlip)
 
template<class Type >
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &mapper, const bool applyFlip)
 
template<class Type >
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &mapper, const Type &defaultValue, const bool applyFlip)
 
template<class Type >
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &mapper, const UList< Type > &defaultValues, const bool applyFlip)
 
template<class Type >
 Field (const word &keyword, const dictionary &dict, const label len)
 
template<class Type >
void operator= (const Field< Type > &rhs)
 
template<class Type >
void operator= (const tmp< Field > &rhs)
 
template<class Type >
constexpr Field () noexcept
 
template<class Type >
 Field (const label len)
 
template<class Type >
 Field (const label len, const Type &val)
 
template<class Type >
 Field (const label len, const Foam::zero)
 
template<class Type >
 Field (const Foam::one, const Type &val)
 
template<class Type >
 Field (const Foam::one, Type &&val)
 
template<class Type >
 Field (const Foam::one, const Foam::zero)
 
template<class Type >
 Field (const Field< Type > &fld)
 
template<class Type >
 Field (const UList< Type > &list)
 
template<class Type >
 Field (Field< Type > &&fld)
 
template<class Type >
 Field (List< Type > &&list)
 
template<class Type >
 Field (Field< Type > &fld, bool reuse)
 
template<class Type >
 Field (const tmp< Field< Type >> &tfld)
 
template<class Type >
 Field (Istream &is)
 
template<class Type >
void operator= (const UList< Type > &rhs)
 
template<class Type >
void operator= (const SubField< Type > &rhs)
 
template<class Type >
void operator= (Field< Type > &&rhs)
 
template<class Type >
void operator= (List< Type > &&rhs)
 
template<class Type >
void operator= (const Type &val)
 
template<class Type >
void operator= (const Foam::zero)
 

Static Public Member Functions

static tmp< scalarFieldfrequencies (const label N, const scalar deltaT)
 
static tmp< scalarFieldPSD (const scalarField &PSDf)
 
static tmp< scalarFieldSPL (const scalarField &Prms2)
 
static void octaveBandInfo (const scalarField &f, const scalar fLower, const scalar fUpper, const scalar octave, labelList &fBandIDs, scalarField &fCentre)
 
- Static Public Member Functions inherited from Field
static const Field< Type > & null ()
 
static autoPtr< Field< Type > > New (Istream &is)
 
template<class Type2 >
static tmp< Field< Type > > NewCalculatedType (const Field< Type2 > &f)
 

Static Public Attributes

static scalar p0 = 2e-5
 

Additional Inherited Members

- Public Types inherited from Field
typedef pTraits< Type >::cmptType cmptType
 
typedef SubField< Type > subField
 

Detailed Description

Performs FFT of pressure field to generate noise data.

General functionality:

Octave-based data:

Source files
See also
windowModel.H

Definition at line 65 of file noiseFFT.H.

Constructor & Destructor Documentation

◆ noiseFFT()

noiseFFT ( const scalar  deltaT,
const label  windowSize = -1 
)

Definition at line 137 of file noiseFFT.C.

◆ ~noiseFFT()

~noiseFFT ( )

Definition at line 169 of file noiseFFT.C.

Member Function Documentation

◆ frequencies()

Foam::tmp< Foam::scalarField > frequencies ( const label  N,
const scalar  deltaT 
)
static

Definition at line 37 of file noiseFFT.C.

References f(), forAll, N(), tmp::New(), and Foam::Zero.

Here is the call graph for this function:

◆ PSD() [1/2]

Foam::tmp< Foam::scalarField > PSD ( const scalarField PSDf)
static

Definition at line 55 of file noiseFFT.C.

References Foam::log10(), p0, and Foam::sqr().

Here is the call graph for this function:

◆ SPL()

Foam::tmp< Foam::scalarField > SPL ( const scalarField Prms2)
static

Definition at line 61 of file noiseFFT.C.

References Foam::log10(), p0, and Foam::sqr().

Here is the call graph for this function:

◆ octaveBandInfo()

void octaveBandInfo ( const scalarField f,
const scalar  fLower,
const scalar  fUpper,
const scalar  octave,
labelList fBandIDs,
scalarField fCentre 
)
static

Definition at line 68 of file noiseFFT.C.

References DynamicList::append(), f(), forAll, HashSet::insert(), Foam::pow(), and DynamicList::remove().

Here is the call graph for this function:

◆ setData() [1/2]

void setData ( scalarList data)

Definition at line 182 of file noiseFFT.C.

References Foam::average(), and p.

Here is the call graph for this function:

◆ setData() [2/2]

void setData ( const fileName pFileName,
const label  skip = 0 
)

Definition at line 191 of file noiseFFT.C.

References Foam::average(), IOstream::eof(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, IOstream::good(), p, and T0.

Here is the call graph for this function:

◆ pt()

Foam::graph pt ( ) const

Definition at line 249 of file noiseFFT.C.

References forAll.

◆ Pf()

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

Definition at line 269 of file noiseFFT.C.

References Foam::abort(), tmp::clear(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::mag(), n, tmp::New(), Foam::constant::atomic::re, fft::realTransform1D(), and Foam::sqrt().

Here is the call graph for this function:

◆ meanPf()

Foam::graph meanPf ( const windowModel window) const

Definition at line 316 of file noiseFFT.C.

References windowModel::apply(), f(), forAll, N(), windowModel::nSamples(), windowModel::nWindow(), and Foam::Zero.

Here is the call graph for this function:

◆ RMSmeanPf()

Foam::graph RMSmeanPf ( const windowModel window) const

Definition at line 348 of file noiseFFT.C.

References windowModel::apply(), f(), forAll, N(), windowModel::nSamples(), windowModel::nWindow(), Foam::sqr(), Foam::sqrt(), and Foam::Zero.

Here is the call graph for this function:

◆ PSDf()

Foam::graph PSDf ( const windowModel window) const

Definition at line 379 of file noiseFFT.C.

References windowModel::apply(), Foam::average(), Foam::endl(), f(), forAll, N(), windowModel::nSamples(), windowModel::nWindow(), Foam::Pout, Foam::sqr(), and Foam::Zero.

Here is the call graph for this function:

◆ PSD() [2/2]

Foam::graph PSD ( const graph gPSDf) const

Definition at line 424 of file noiseFFT.C.

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

Here is the call graph for this function:

◆ octaves()

Foam::graph octaves ( const graph g,
const labelUList freqBandIDs 
) const

Definition at line 438 of file noiseFFT.C.

References Foam::endl(), f(), g, UList::size(), WarningInFunction, and Foam::Zero.

Here is the call graph for this function:

◆ dbToPa() [1/2]

Foam::scalar dbToPa ( const scalar  db) const

Definition at line 494 of file noiseFFT.C.

References p0, and Foam::pow().

Here is the call graph for this function:

◆ dbToPa() [2/2]

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

Definition at line 501 of file noiseFFT.C.

References p0, and Foam::pow().

Here is the call graph for this function:

Member Data Documentation

◆ p0

Foam::scalar p0 = 2e-5
static

Definition at line 105 of file noiseFFT.H.


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