Public Member Functions | Static Public Attributes | Private Attributes
noiseFFT Class Reference

FFT of the pressure field. More...

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

Public Member Functions

 noiseFFT (const scalar deltat, const scalarField &pressure)
 Construct from pressure field. More...
 
 noiseFFT (Istream &)
 Construct from Istream. More...
 
 noiseFFT (const fileName &pFileName, const label skip=0)
 Construct from pressure field file name. More...
 
graph pt () const
 Return the graph of p(t) More...
 
tmp< scalarFieldwindow (const label N, const label n) const
 Return the nth window. More...
 
tmp< scalarFieldHanning (const label N) const
 Return the Hanning window function. More...
 
tmp< scalarFieldPf (const tmp< scalarField > &pn) const
 Return the fft of the given pressure data. More...
 
graph meanPf (const label N, const label nw) const
 Return the multi-window mean fft of the complete pressure data. More...
 
graph RMSmeanPf (const label N, const label nw) const
 Return the multi-window RMS mean fft of the complete pressure data. More...
 
graph Lf (const graph &gPf) const
 Return the narrow-band PFL (pressure-fluctuation level) spectrum. More...
 
graph Ldelta (const graph &gLf, const scalar f1, const scalar fU) const
 Return the one-third-octave-band PFL spectrum. More...
 
graph Pdelta (const graph &gLf, const scalar f1, const scalar fU) const
 Return the one-third-octave-band pressure spectrum. More...
 
scalar Lsum (const graph &gLf) const
 Return the total PFL as the sum of Lf over all frequencies. More...
 
scalar dbToPa (const scalar db) const
 Convert the db into Pa. More...
 
tmp< scalarFielddbToPa (const tmp< scalarField > &db) const
 Convert the db-field into Pa. More...
 
- Public Member Functions inherited from Field
 Field ()
 Construct null. More...
 
 Field (const label)
 Construct given size. More...
 
 Field (const label, const Type &)
 Construct given size and initial value. More...
 
 Field (const UList< Type > &)
 Construct as copy of a UList<Type> More...
 
 Field (const Xfer< List< Type > > &)
 Construct by transferring the List contents. More...
 
 Field (const UList< Type > &mapF, const labelUList &mapAddressing)
 Construct by 1 to 1 mapping from the given field. More...
 
 Field (const tmp< Field< Type > > &tmapF, const labelUList &mapAddressing)
 Construct by 1 to 1 mapping from the given tmp field. More...
 
 Field (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &weights)
 Construct by interpolative mapping from the given field. More...
 
 Field (const tmp< Field< Type > > &tmapF, const labelListList &mapAddressing, const scalarListList &weights)
 Construct by interpolative mapping from the given tmp field. More...
 
 Field (const UList< Type > &mapF, const FieldMapper &map, const bool applyFlip=true)
 Construct by mapping from the given field. More...
 
 Field (const UList< Type > &mapF, const FieldMapper &map, const Type &defaultValue, const bool applyFlip=true)
 Construct by mapping from the given field. More...
 
 Field (const UList< Type > &mapF, const FieldMapper &map, const UList< Type > &defaultValues, const bool applyFlip=true)
 Construct by mapping from the given field. More...
 
 Field (const tmp< Field< Type > > &tmapF, const FieldMapper &map, const bool applyFlip=true)
 Construct by mapping from the given tmp field. More...
 
 Field (const tmp< Field< Type > > &tmapF, const FieldMapper &map, const Type &defaultValue, const bool applyFlip=true)
 Construct by mapping from the given tmp field. Supplied uniform. More...
 
 Field (const tmp< Field< Type > > &tmapF, const FieldMapper &map, const UList< Type > &defaultValues, const bool applyFlip=true)
 Construct by mapping from the given tmp field. Supplied values. More...
 
 Field (const Field< Type > &)
 Construct as copy. More...
 
 Field (Field< Type > &, bool reUse)
 Construct as copy or re-use as specified. More...
 
 Field (const Xfer< Field< Type > > &)
 Construct by transferring the Field contents. More...
 
 Field (const tmp< Field< Type > > &)
 Construct as copy of tmp<Field> More...
 
 Field (Istream &)
 Construct from Istream. More...
 
 Field (const word &keyword, const dictionary &, const label size)
 Construct from a dictionary entry. More...
 
tmp< Field< Type > > clone () const
 Clone. More...
 
void map (const UList< Type > &mapF, const labelUList &mapAddressing)
 1 to 1 map from the given field More...
 
void map (const tmp< Field< Type > > &tmapF, const labelUList &mapAddressing)
 1 to 1 map from the given tmp field More...
 
void map (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &weights)
 Interpolative map from the given field. More...
 
void map (const tmp< Field< Type > > &tmapF, const labelListList &mapAddressing, const scalarListList &weights)
 Interpolative map from the given tmp field. More...
 
void map (const UList< Type > &mapF, const FieldMapper &map, const bool applyFlip=true)
 Map from the given field. More...
 
void map (const tmp< Field< Type > > &tmapF, const FieldMapper &map, const bool applyFlip=true)
 Map from the given tmp field. More...
 
void autoMap (const FieldMapper &map, const bool applyFlip=true)
 Map from self. More...
 
void rmap (const UList< Type > &mapF, const labelUList &mapAddressing)
 1 to 1 reverse-map from the given field More...
 
void rmap (const tmp< Field< Type > > &tmapF, const labelUList &mapAddressing)
 1 to 1 reverse-map from the given tmp field More...
 
void rmap (const UList< Type > &mapF, const labelUList &mapAddressing, const UList< scalar > &weights)
 Interpolative reverse map from the given field. More...
 
void rmap (const tmp< Field< Type > > &tmapF, const labelUList &mapAddressing, const UList< scalar > &weights)
 Interpolative reverse map from the given tmp field. More...
 
void negate ()
 Negate this field. More...
 
tmp< Field< cmptType > > component (const direction) const
 Return a component field of the field. More...
 
void replace (const direction, const UList< cmptType > &)
 Replace a component field of the field. More...
 
void replace (const direction, const tmp< Field< cmptType > > &)
 Replace a component field of the field. More...
 
void replace (const direction, const cmptType &)
 Replace a component field of the field. More...
 
tmp< Field< Type > > T () const
 Return the field transpose (only defined for second rank tensors) More...
 
void writeEntry (const word &keyword, Ostream &os) const
 Write the field as a dictionary entry. More...
 
void operator= (const Field< Type > &)
 
void operator= (const UList< Type > &)
 
void operator= (const SubField< Type > &)
 
void operator= (const tmp< Field< Type > > &)
 
void operator= (const Type &)
 
template<class Form , class Cmpt , int 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 >
void operator= (const Field< Type > &rhs)
 
template<class Type >
void operator= (const SubField< Type > &rhs)
 
template<class Type >
void operator= (const UList< Type > &rhs)
 
template<class Type >
void operator= (const tmp< Field > &rhs)
 
template<class Type >
void operator= (const Type &t)
 

Static Public Attributes

static scalar p0 = 2e-5
 Reference pressure. More...
 
- Static Public Attributes inherited from Field
static const char *const typeName
 

Private Attributes

scalar deltat_
 Time spacing of the raw data. More...
 

Additional Inherited Members

- Public Types inherited from Field
typedef pTraits< Type >::cmptType cmptType
 Component type. More...
 
typedef SubField< Type > subField
 Declare type of subField. More...
 
- Static Public Member Functions inherited from Field
static const Field< Type > & null ()
 Return a null field. More...
 
template<class Type2 >
static tmp< Field< Type > > NewCalculatedType (const Field< Type2 > &f)
 Return a pointer to a new calculatedFvPatchFieldField created on. More...
 

Detailed Description

FFT of the pressure field.

Source files

Definition at line 49 of file noiseFFT.H.

Constructor & Destructor Documentation

◆ noiseFFT() [1/3]

noiseFFT ( const scalar  deltat,
const scalarField pressure 
)

Construct from pressure field.

Definition at line 41 of file noiseFFT.C.

◆ noiseFFT() [2/3]

noiseFFT ( Istream )

Construct from Istream.

◆ noiseFFT() [3/3]

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

Construct from pressure field file name.

Definition at line 51 of file noiseFFT.C.

References noiseFFT::deltat_, IOstream::eof(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, IOstream::good(), and Field::T().

Here is the call graph for this function:

Member Function Documentation

◆ pt()

Foam::graph pt ( ) const

Return the graph of p(t)

Definition at line 105 of file noiseFFT.C.

References forAll.

◆ window()

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

Return the nth window.

Definition at line 125 of file noiseFFT.C.

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

Here is the call graph for this function:

◆ Hanning()

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

Return the Hanning window function.

Definition at line 156 of file noiseFFT.C.

References Foam::cos(), forAll, N, Foam::T(), and Foam::constant::mathematical::twoPi().

Here is the call graph for this function:

◆ Pf()

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

Return the fft of the given pressure data.

Definition at line 171 of file noiseFFT.C.

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

Here is the call graph for this function:

◆ meanPf()

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

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

Definition at line 206 of file noiseFFT.C.

References Foam::exit(), f(), Foam::FatalError, FatalErrorInFunction, forAll, N, Foam::nl, and nw.

Here is the call graph for this function:

◆ RMSmeanPf()

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 252 of file noiseFFT.C.

References Foam::endl(), Foam::exit(), f(), Foam::FatalError, FatalErrorInFunction, forAll, N, nw, Foam::sqr(), and Foam::sqrt().

Here is the call graph for this function:

◆ Lf()

Foam::graph Lf ( const graph gPf) const

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

Definition at line 297 of file noiseFFT.C.

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

Here is the call graph for this function:

◆ Ldelta()

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 311 of file noiseFFT.C.

References Foam::cbrt(), f(), f1, fU, Foam::log10(), Foam::pow(), Foam::sqrt(), graph::x(), and graph::y().

Here is the call graph for this function:

◆ Pdelta()

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 367 of file noiseFFT.C.

References Foam::cbrt(), f(), f1, fU, Foam::sqr(), Foam::sqrt(), graph::x(), and graph::y().

Here is the call graph for this function:

◆ Lsum()

Foam::scalar Lsum ( const graph gLf) const

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

Definition at line 422 of file noiseFFT.C.

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

Here is the call graph for this function:

◆ dbToPa() [1/2]

Foam::scalar dbToPa ( const scalar  db) const

Convert the db into Pa.

Definition at line 439 of file noiseFFT.C.

References Foam::pow().

Here is the call graph for this function:

◆ dbToPa() [2/2]

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

Convert the db-field into Pa.

Definition at line 446 of file noiseFFT.C.

References Foam::pow().

Here is the call graph for this function:

Field Documentation

◆ deltat_

scalar deltat_
private

Time spacing of the raw data.

Definition at line 56 of file noiseFFT.H.

Referenced by noiseFFT::noiseFFT().

◆ p0

Foam::scalar p0 = 2e-5
static

Reference pressure.

Definition at line 62 of file noiseFFT.H.


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