mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: noise functionality robustness improvements
This commit is contained in:
@ -127,11 +127,14 @@ void Foam::noiseFFT::octaveBandInfo
|
|||||||
|
|
||||||
fBandIDs = bandIDs.toc();
|
fBandIDs = bandIDs.toc();
|
||||||
|
|
||||||
|
if (fc.size())
|
||||||
|
{
|
||||||
// Remove the last centre frequency (beyond upper frequency limit)
|
// Remove the last centre frequency (beyond upper frequency limit)
|
||||||
fc.remove();
|
fc.remove();
|
||||||
|
|
||||||
fCentre.transfer(fc);
|
fCentre.transfer(fc);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -494,8 +494,21 @@ void surfaceNoise::calculate()
|
|||||||
octave13FreqCentre
|
octave13FreqCentre
|
||||||
);
|
);
|
||||||
|
|
||||||
List<scalarField> surfPSD13f(octave13BandIDs.size() - 1);
|
label bandSize = 0;
|
||||||
List<scalarField> surfPrms13f2(octave13BandIDs.size() - 1);
|
if (octave13BandIDs.empty())
|
||||||
|
{
|
||||||
|
WarningInFunction
|
||||||
|
<< "Ocatve band calculation failed (zero sized). "
|
||||||
|
<< "please check your input data"
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bandSize = octave13BandIDs.size() - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<scalarField> surfPSD13f(bandSize);
|
||||||
|
List<scalarField> surfPrms13f2(bandSize);
|
||||||
forAll(surfPSD13f, freqI)
|
forAll(surfPSD13f, freqI)
|
||||||
{
|
{
|
||||||
surfPSD13f[freqI].setSize(nLocalFace);
|
surfPSD13f[freqI].setSize(nLocalFace);
|
||||||
|
|||||||
Reference in New Issue
Block a user