Perform noise analysis on point-based pressure data. More...
Public Member Functions | |
| TypeName ("pointNoise") | |
| Runtime type information. More... | |
| pointNoise (const dictionary &dict, const bool readFields=true) | |
| Constructor. More... | |
| virtual | ~pointNoise ()=default |
| Destructor. More... | |
| virtual bool | read (const dictionary &dict) |
| Read from dictionary. More... | |
| virtual void | calculate () |
| Calculate. More... | |
Public Member Functions inherited from noiseModel | |
| TypeName ("noiseModel") | |
| Runtime type information. More... | |
| declareRunTimeSelectionTable (autoPtr, noiseModel, dictionary,(const dictionary &dict),(dict)) | |
| Run time selection table. More... | |
| noiseModel (const dictionary &dict, const bool readFields=true) | |
| Constructor. More... | |
| virtual | ~noiseModel ()=default |
| Destructor. More... | |
Protected Member Functions | |
| void | filterTimeData (const scalarField &t0, const scalarField &p0, scalarField &t, scalarField &p) const |
| void | processData (const label dataseti, const Function1Types::CSV< scalar > &data) |
| Process the CSV data. More... | |
Protected Member Functions inherited from noiseModel | |
| void | readWriteOption (const dictionary &dict, const word &lookup, bool &option) const |
| Helper function to read write options and provide info feedback. More... | |
| scalar | checkUniformTimeStep (const scalarList ×) const |
| Check and return uniform time step. More... | |
| bool | validateBounds (const scalarList &p) const |
| Return true if all pressure data is within min/max bounds. More... | |
| label | findStartTimeIndex (const instantList &allTimes, const scalar startTime) const |
| Find and return start time index. More... | |
| fileName | baseFileDir (const label dataseti) const |
| Return the base output directory. More... | |
| noiseModel (const noiseModel &)=delete | |
| No copy construct. More... | |
| void | operator= (const noiseModel &)=delete |
| No copy assignment. More... | |
Protected Attributes | |
| List< fileName > | inputFileNames_ |
| Input file names - optional. More... | |
Protected Attributes inherited from noiseModel | |
| const dictionary | dict_ |
| Copy of dictionary used for construction. More... | |
| scalar | rhoRef_ |
| Reference density (to convert from kinematic to static pressure) More... | |
| label | nSamples_ |
| Number of samples in sampling window, default = 2^16. More... | |
| scalar | fLower_ |
| Lower frequency limit, default = 25Hz. More... | |
| scalar | fUpper_ |
| Upper frequency limit, default = 10kHz. More... | |
| bool | customBounds_ |
| Flag to indicate that custom frequency bounds are being used. More... | |
| scalar | startTime_ |
| Start time, default = 0s. More... | |
| autoPtr< windowModel > | windowModelPtr_ |
| Window model. More... | |
| word | graphFormat_ |
| Graph format. More... | |
| scalar | minPressure_ |
| Min pressure value. More... | |
| scalar | maxPressure_ |
| Min pressure value. More... | |
| fileName | outputPrefix_ |
| Output file prefix, default = ''. More... | |
| bool | writePrmsf_ |
| Write Prmsf; default = yes. More... | |
| bool | writeSPL_ |
| Write SPL; default = yes. More... | |
| bool | writePSD_ |
| Write PSD; default = yes. More... | |
| bool | writePSDf_ |
| Write PSDf; default = yes. More... | |
| bool | writeOctaves_ |
| Write writeOctaves; default = yes. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from noiseModel | |
| static autoPtr< noiseModel > | New (const dictionary &dict) |
| Selector. More... | |
Perform noise analysis on point-based pressure data.
Input data is read from a dictionary, e.g.
// Pressure reference
pRef 0;
// Number of samples in sampling window, default = 2^16 (=65536)
N 4096;
// Lower frequency bounds
fl 25;
// Upper frequency bounds
fu 25;
// Start time
startTime 0;
windowModel <modelType>
<modelType>Coeffs
{
...
}
// Pressure data supplied in CSV file format
file "pressureData";
//files ("pressureData1" "pressureData2");
nHeaderLine 1;
refColumn 0;
componentColumns (1);
separator " ";
mergeSeparators yes;
graphFormat raw;Definition at line 94 of file pointNoise.H.
| pointNoise | ( | const dictionary & | dict, |
| const bool | readFields = true |
||
| ) |
Constructor.
Definition at line 207 of file pointNoise.C.
References dict, pointNoise::read(), and Foam::readFields().
|
virtualdefault |
Destructor.
|
protected |
Definition at line 48 of file pointNoise.C.
|
protected |
Process the CSV data.
Definition at line 73 of file pointNoise.C.
References Foam::endl(), Foam::Info, Foam::nl, windowModel::nSamples(), noiseFFT::octaveBandInfo(), p, noiseFFT::PSD(), noiseFFT::setData(), graph::setXRange(), noiseFFT::SPL(), messageStream::title(), graph::title(), graph::wordify(), Ostream::write(), and graph::write().
Referenced by pointNoise::calculate().
| TypeName | ( | "pointNoise" | ) |
Runtime type information.
|
virtual |
Read from dictionary.
Reimplemented from noiseModel.
Definition at line 244 of file pointNoise.C.
References dict, pointNoise::inputFileNames_, noiseModel::read(), and List< T >::resize().
Referenced by pointNoise::pointNoise().
|
virtual |
Calculate.
Implements noiseModel.
Definition at line 220 of file pointNoise.C.
References noiseModel::dict_, argList::envGlobalPath(), string::expand(), forAll, pointNoise::inputFileNames_, fileName::isAbsolute(), UPstream::master(), and pointNoise::processData().
Input file names - optional.
Definition at line 104 of file pointNoise.H.
Referenced by pointNoise::calculate(), and pointNoise::read().