FFT of the pressure field. More...
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< scalarField > | window (const label N, const label n) const |
Return the nth window. More... | |
tmp< scalarField > | Hanning (const label N) const |
Return the Hanning window function. More... | |
tmp< scalarField > | Pf (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< scalarField > | dbToPa (const tmp< scalarField > &db) const |
Convert the db-field into Pa. More... | |
![]() | |
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 const char *const | typeName |
Private Attributes | |
scalar | deltat_ |
Time spacing of the raw data. More... | |
Additional Inherited Members | |
![]() | |
typedef pTraits< Type >::cmptType | cmptType |
Component type. More... | |
typedef SubField< Type > | subField |
Declare type of subField. More... | |
![]() | |
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... | |
noiseFFT | ( | const scalar | deltat, |
const scalarField & | pressure | ||
) |
Construct from pressure field.
Definition at line 41 of file noiseFFT.C.
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().
Foam::graph pt | ( | ) | const |
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.
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().
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().
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.
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().
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().
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().
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().
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().
Foam::scalar dbToPa | ( | const scalar | db | ) | const |
Convert the db into Pa.
Definition at line 439 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 446 of file noiseFFT.C.
References Foam::pow().
|
private |
Time spacing of the raw data.
Definition at line 56 of file noiseFFT.H.
Referenced by noiseFFT::noiseFFT().
|
static |
Reference pressure.
Definition at line 62 of file noiseFFT.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.