Base class for noise models. More...
Classes | |
struct | octaveBandInfo |
struct | planInfo |
Public Types | |
enum | weightingType { none, dBA, dBB, dBC, dBD } |
Public Member Functions | |
TypeName ("noiseModel") | |
declareRunTimeSelectionTable (autoPtr, noiseModel, dictionary,(const dictionary &dict),(dict)) | |
noiseModel (const dictionary &dict, const bool readFields=true) | |
virtual | ~noiseModel ()=default |
virtual bool | read (const dictionary &dict) |
virtual void | calculate ()=0 |
tmp< Foam::scalarField > | PSD (const scalarField &PSDf) const |
tmp< scalarField > | SPL (const scalarField &Prms2, const scalar f) const |
tmp< scalarField > | SPL (const scalarField &Prms2, const scalarField &f) const |
void | cleanFFTW () |
void | writeWeightings () const |
Static Public Member Functions | |
static autoPtr< noiseModel > | New (const dictionary &dict) |
Static Public Attributes | |
static const Enum< weightingType > | weightingTypeNames_ |
Protected Member Functions | |
void | readWriteOption (const dictionary &dict, const word &lookup, bool &option) const |
scalar | checkUniformTimeStep (const scalarList ×) const |
bool | validateBounds (const scalarList &p) const |
label | findStartTimeIndex (const instantList &allTimes, const scalar startTime) const |
fileName | baseFileDir (const label dataseti) const |
tmp< scalarField > | uniformFrequencies (const scalar deltaT, const bool check) const |
tmp< scalarField > | octaves (const scalarField &data, const scalarField &f, const labelUList &freqBandIDs) const |
tmp< scalarField > | Pf (const scalarField &p) const |
tmp< scalarField > | meanPf (const scalarField &p) const |
tmp< scalarField > | RMSmeanPf (const scalarField &p) const |
tmp< scalarField > | PSDf (const scalarField &p, const scalar deltaT) const |
scalar | RAf (const scalar f) const |
scalar | gainA (const scalar f) const |
scalar | RBf (const scalar f) const |
scalar | gainB (const scalar f) const |
scalar | RCf (const scalar f) const |
scalar | gainC (const scalar f) const |
scalar | RDf (const scalar f) const |
scalar | gainD (const scalar f) const |
Static Protected Member Functions | |
static void | setOctaveBands (const scalarField &f, const scalar fLower, const scalar fUpper, const scalar octave, labelList &fBandIDs, scalarField &fCentre) |
Protected Attributes | |
const dictionary | dict_ |
scalar | rhoRef_ |
label | nSamples_ |
scalar | fLower_ |
scalar | fUpper_ |
scalar | startTime_ |
autoPtr< windowModel > | windowModelPtr_ |
word | graphFormat_ |
weightingType | SPLweighting_ |
scalar | dBRef_ |
scalar | minPressure_ |
scalar | maxPressure_ |
fileName | outputPrefix_ |
bool | writePrmsf_ |
bool | writeSPL_ |
bool | writePSD_ |
bool | writePSDf_ |
bool | writeOctaves_ |
planInfo | planInfo_ |
Base class for noise models.
Data is read from a dictionary, e.g.
rhoRef 1; N 4096; fl 25; fu 10000; startTime 0; outputPrefix "test1"; SPLweighting dBA; // Optional write options dictionary writeOptions { writePrmsf no; writeSPL yes; writePSD yes; writePSDf no; writeOctaves yes; }
where
Property | Description | Required | Default value |
---|---|---|---|
rhoRef | Reference density | no | 1 |
N | Number of samples in sampling window | no | 65536 (2^16) |
fl | Lower frequency bounds | no | 25 |
fu | Upper frequency bounds | no | 10000 |
startTime | Start time | no | 0 |
outputPrefix | Prefix applied to output files | no | '' |
SPLweighting | Weighting: dBA, dBB, dBC, DBD | no | none |
dBRef | Reference for dB calculation | no | 2e-5 |
graphFormat | Graph format | no | raw |
writePrmsf | Write Prmsf data | no | yes |
writeSPL | Write SPL data | no | yes |
writePSD | Write PSD data | no | yes |
writePSDf | Write PSDf data | no | yes |
writeOctaves | Write octaves data | no | yes |
Definition at line 171 of file noiseModel.H.
|
strong |
Enumerator | |
---|---|
none | |
dBA | |
dBB | |
dBC | |
dBD |
Definition at line 175 of file noiseModel.H.
noiseModel | ( | const dictionary & | dict, |
const bool | readFields = true |
||
) |
Definition at line 579 of file noiseModel.C.
References noiseModel::planInfo::active, Foam::expressions::patchExpr::debug, dict, noiseModel::planInfo_, noiseModel::read(), Foam::readFields(), and noiseModel::writeWeightings().
|
virtualdefault |
|
protected |
Definition at line 156 of file noiseModel.C.
References dict, Foam::endl(), and Foam::Info.
|
protected |
Definition at line 179 of file noiseModel.C.
References Foam::constant::electromagnetic::e, Foam::exit(), Foam::FatalError, FatalErrorInFunction, and Foam::mag().
Referenced by surfaceNoise::initialise().
|
protected |
Definition at line 213 of file noiseModel.C.
References Foam::endl(), forAll, noiseModel::maxPressure_, noiseModel::minPressure_, Foam::nl, p, and WarningInFunction.
|
protected |
Definition at line 236 of file noiseModel.C.
References forAll, startTime, and Instant< T >::value().
Referenced by surfaceNoise::initialise().
|
protected |
Definition at line 255 of file noiseModel.C.
References argList::envGlobalPath(), Foam::name(), functionObject::outputPrefix, and Foam::type().
Referenced by surfaceNoise::calculate().
|
protected |
Definition at line 270 of file noiseModel.C.
References Foam::check(), Foam::endl(), f(), forAll, N(), tmp::New(), WarningInFunction, and Foam::Zero.
Referenced by surfaceNoise::calculate().
|
staticprotected |
Definition at line 48 of file noiseModel.C.
References DynamicList::append(), Foam::endl(), f(), Foam::flatOutput(), forAll, HashSet::insert(), Foam::pow(), DynamicList::remove(), and WarningInFunction.
Referenced by surfaceNoise::calculate().
|
protected |
Definition at line 307 of file noiseModel.C.
References Foam::endl(), f(), bitSet::flip(), tmp::New(), bitSet::set(), UList::size(), PackedList::size(), bitSet::sortedToc(), WarningInFunction, and Foam::Zero.
Referenced by surfaceNoise::calculate().
|
protected |
Definition at line 358 of file noiseModel.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::mag(), n, tmp::New(), p, Foam::constant::atomic::re, fft::realTransform1D(), and Foam::sqrt().
|
protected |
Definition at line 401 of file noiseModel.C.
References N(), tmp::New(), p, and Foam::Zero.
|
protected |
Definition at line 422 of file noiseModel.C.
References N(), p, Foam::sqr(), Foam::sqrt(), and Foam::Zero.
Referenced by surfaceNoise::calculate().
|
protected |
Definition at line 441 of file noiseModel.C.
References Foam::average(), Foam::expressions::patchExpr::debug, Foam::endl(), N(), tmp::New(), p, Foam::Pout, Foam::sqr(), and Foam::Zero.
Referenced by surfaceNoise::calculate().
|
protected |
Definition at line 476 of file noiseModel.C.
References Foam::constant::physicoChemical::c1, Foam::constant::physicoChemical::c2, f(), Foam::sqr(), and Foam::sqrt().
|
protected |
Definition at line 493 of file noiseModel.C.
References f(), and Foam::log10().
|
protected |
Definition at line 504 of file noiseModel.C.
References Foam::constant::physicoChemical::c1, Foam::constant::physicoChemical::c2, f(), Foam::sqr(), and Foam::sqrt().
|
protected |
Definition at line 520 of file noiseModel.C.
References f(), and Foam::log10().
|
protected |
Definition at line 531 of file noiseModel.C.
References Foam::constant::physicoChemical::c1, Foam::constant::physicoChemical::c2, f(), and Foam::sqr().
|
protected |
Definition at line 542 of file noiseModel.C.
References f(), and Foam::log10().
|
protected |
Definition at line 553 of file noiseModel.C.
References f(), Foam::sqr(), and Foam::sqrt().
|
protected |
Definition at line 566 of file noiseModel.C.
References f(), and Foam::log10().
TypeName | ( | "noiseModel" | ) |
declareRunTimeSelectionTable | ( | autoPtr | , |
noiseModel | , | ||
dictionary | , | ||
(const dictionary &dict) | , | ||
(dict) | |||
) |
|
static |
Definition at line 25 of file noiseModelNew.C.
References dict, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, and Foam::Info.
|
virtual |
Reimplemented in surfaceNoise, and pointNoise.
Definition at line 617 of file noiseModel.C.
References dict, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, Foam::Info, windowModel::New(), Foam::nl, dictionary::readIfPresent(), and dictionary::subOrEmptyDict().
Referenced by noiseModel::noiseModel(), pointNoise::read(), and surfaceNoise::read().
|
pure virtual |
Implemented in surfaceNoise, and pointNoise.
Foam::tmp< Foam::scalarField > PSD | ( | const scalarField & | PSDf | ) | const |
Definition at line 706 of file noiseModel.C.
References Foam::safeLog10(), and Foam::sqr().
Referenced by surfaceNoise::calculate().
Foam::tmp< Foam::scalarField > SPL | ( | const scalarField & | Prms2, |
const scalar | f | ||
) | const |
Definition at line 715 of file noiseModel.C.
References Foam::abort(), f(), Foam::FatalError, FatalErrorInFunction, Foam::BitOps::none(), tmp::ref(), Foam::safeLog10(), and Foam::sqr().
Referenced by surfaceNoise::calculate().
Foam::tmp< Foam::scalarField > SPL | ( | const scalarField & | Prms2, |
const scalarField & | f | ||
) | const |
Definition at line 762 of file noiseModel.C.
References Foam::abort(), f(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::BitOps::none(), tmp::ref(), Foam::safeLog10(), and Foam::sqr().
void cleanFFTW | ( | ) |
Definition at line 820 of file noiseModel.C.
void writeWeightings | ( | ) | const |
Definition at line 831 of file noiseModel.C.
Referenced by noiseModel::noiseModel().
|
static |
Definition at line 184 of file noiseModel.H.
|
protected |
Definition at line 226 of file noiseModel.H.
Referenced by pointNoise::calculate().
|
protected |
Definition at line 229 of file noiseModel.H.
|
protected |
Definition at line 232 of file noiseModel.H.
|
protected |
Definition at line 235 of file noiseModel.H.
Referenced by surfaceNoise::calculate().
|
protected |
Definition at line 238 of file noiseModel.H.
Referenced by surfaceNoise::calculate().
|
protected |
Definition at line 241 of file noiseModel.H.
Referenced by surfaceNoise::initialise().
|
protected |
Definition at line 244 of file noiseModel.H.
Referenced by surfaceNoise::calculate(), and surfaceNoise::initialise().
|
protected |
Definition at line 247 of file noiseModel.H.
Referenced by surfaceNoise::calculate().
|
protected |
Definition at line 250 of file noiseModel.H.
|
protected |
Definition at line 253 of file noiseModel.H.
|
protected |
Definition at line 259 of file noiseModel.H.
Referenced by noiseModel::validateBounds().
|
protected |
Definition at line 262 of file noiseModel.H.
Referenced by noiseModel::validateBounds().
|
protected |
Definition at line 268 of file noiseModel.H.
|
protected |
Definition at line 271 of file noiseModel.H.
Referenced by surfaceNoise::calculate().
|
protected |
Definition at line 274 of file noiseModel.H.
Referenced by surfaceNoise::calculate().
|
protected |
Definition at line 277 of file noiseModel.H.
Referenced by surfaceNoise::calculate().
|
protected |
Definition at line 280 of file noiseModel.H.
Referenced by surfaceNoise::calculate().
|
protected |
Definition at line 283 of file noiseModel.H.
Referenced by surfaceNoise::calculate().
|
mutableprotected |
Definition at line 289 of file noiseModel.H.
Referenced by noiseModel::noiseModel().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.