CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Noise postprocessing utility setup

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes
  • 7 Post By RFlamm

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 14, 2016, 05:45
Default Noise postprocessing utility setup
  #1
New Member
 
Ryan Flamm
Join Date: Dec 2016
Posts: 1
Rep Power: 0
RFlamm is on a distinguished road
Just sharing how to set up the noise utility

I recently took a CFD class and wanted to try OpenFoam for the purpose of studying acoustics. After digging around I found the Noise utility, which uses the FFT library, and thought it might be useful. That being said, it was very difficult to find much documentation on how to set up and use it. So after messing with it for a while, I thought I would post what I was able to do so others have a little more direction on how to use it.

You will need a noiseDict file in the system directory with the format:

XXXXXXXXXXXXXXXXXX

pRef 16.32e-06;
N 128;
nw 100;
f1 25;
fU 10000;
graphFormat raw;

pressureData
{
fileName /* "$FOAM_CASE*/ "pressureData";
nHeaderLine 0; // number of header lines
refColumn 80; // reference column index
componentColumns (1); // component column indices
separator " "; // optional (defaults to ",")
mergeSeparators yes; // merge multiple separators
outOfBounds clamp; // optional out-of-bounds handling
interpolationScheme linear; // optional interpolation scheme
}
XXXXXXXXXXXXXXXXXXX


more info on the format can be found in the noice.C file.


To get the pressure data I used a probe at a desired point in the case grid. To run the utility you will also need to add the following to the Functions section of your controlDict. (though I think it can also be added in the noiseDict as well.)


XXXXXXXXXXX

noise
{
type noise;
functionObjectLibs ("libutilityFunctionObjects.so");
outputControl timeStep;
ouputInterval 1;
}

XXXXXXXXXXX


Now you will need to run your solver. Unfortunately the noise utility does not seem to create the pressureData file. So instead I manually pulled the pressure data file from my probe directory and copied it to the case directory, though I'm sure it wouldn't be difficult to automate this. Once your pressureData file is in place and correctly named, you can run the noise postprocessing utility. The terminal command is noise. If everything is set up correctly, 4 data files will be added to your case file directory containing the following data
- FFT of the pressure data
- narrow-band PFL (pressure-fluctuation level) spectrum
- one-third-octave-band PFL spectrum
- one-third-octave-band pressure spectrum
These data files can then be graphed with your preferred method. I used gnuplot as well as mathematica.


Possible errors
  • Cannot open CSV file for reading
    • file is either named incorrectly or not present
  • Invalid first character found
    • the probe data comes with some headers, so either delete them from the data file or add more header place holders in your noiseDict
  • Block size N=65536 is larger than number of data
    • N needs to be a value of 2^n, and can't be larger then the number of rows in your data file.
  • unable to process data with variable time step
    • self explanatory, make sure the time step is consistent


P.S I apologize if this information is elementary. Just trying to help.

Last edited by RFlamm; December 14, 2016 at 05:56. Reason: typo
RFlamm is offline   Reply With Quote

Old   December 14, 2016, 06:14
Default
  #2
New Member
 
Join Date: Oct 2016
Posts: 22
Rep Power: 10
Mahe88 is on a distinguished road
Hey,

I've just read your post, interesting informations!!

I want to do something similar. My goal is to investigate the noise of a wind turbine wing. Therefore I would be interested in more information. For example, do you have any recommendation in which solver or turbulence model should be used. If you tried out multiple combinations you could share your experience using them?

Thanks a lot!
Mahe88 is offline   Reply With Quote

Old   January 19, 2017, 11:40
Default
  #3
New Member
 
Pankaj Rajput
Join Date: Jan 2016
Location: New York
Posts: 6
Rep Power: 10
pankajhrajput is on a distinguished road
Quote:
Originally Posted by RFlamm View Post
Possible errors
  • Cannot open CSV file for reading
    • file is either named incorrectly or not present
  • Invalid first character found
    • the probe data comes with some headers, so either delete them from the data file or add more header place holders in your noiseDict
  • Block size N=65536 is larger than number of data
    • N needs to be a value of 2^n, and can't be larger then the number of rows in your data file.
  • unable to process data with variable time step
    • self explanatory, make sure the time step is consistent


P.S I apologize if this information is elementary. Just trying to help.
Thanks for sharing that piece of information. I followed the steps outlined by you (as there's no documentation whatsoever for noise utility), However, I am getting a weird error mentioned below:
Code:
--> FOAM FATAL ERROR: 
out-of-order value: 102355 at index 10

    From function void Foam::Function1Types::TableBase<Type>::check() const [with Type = double]
    in file /home/pankaj/OpenFOAM+/OpenFOAM-v1612+/src/OpenFOAM/lnInclude/TableBase.C at line 208.

FOAM exiting
Any ideas what could be going wrong? Why does the pressure data need to be in ascending order??
pankajhrajput is offline   Reply With Quote

Old   March 29, 2017, 05:58
Default
  #4
Senior Member
 
Attesz's Avatar
 
Attesz
Join Date: Mar 2009
Location: Munich
Posts: 368
Rep Power: 17
Attesz is an unknown quantity at this point
Many thanks for this info. Any success on automating the probe postprocessing after the simulation finished? Thanks!
__________________
I am doing CFD Consulting Services.
Ich biete CFD Strömungssimulationen an.
Attesz is offline   Reply With Quote

Old   June 25, 2018, 05:00
Default
  #5
Member
 
Rosario Arnau
Join Date: Feb 2017
Location: Spain
Posts: 57
Rep Power: 9
rarnaunot is on a distinguished road
Hi!

How did you solve this error?
I got the same FOAM FATAL ERROR message

Thanks

[QUOTE=pankajhrajput;633930]
Code:
--> FOAM FATAL ERROR: 
out-of-order value: 102355 at index 10

    From function void Foam::Function1Types::TableBase<Type>::check() const [with Type = double]
    in file /home/pankaj/OpenFOAM+/OpenFOAM-v1612+/src/OpenFOAM/lnInclude/TableBase.C at line 208.

FOAM exiting
rarnaunot is offline   Reply With Quote

Old   July 30, 2018, 11:06
Default pressure File
  #6
New Member
 
Jonathan Quiroz
Join Date: Jul 2017
Posts: 1
Rep Power: 0
kirby031 is on a distinguished road
Quote:
Originally Posted by RFlamm View Post
Just sharing how to set up the noise utility

I recently took a CFD class and wanted to try OpenFoam for the purpose of studying acoustics. After digging around I found the Noise utility, which uses the FFT library, and thought it might be useful. That being said, it was very difficult to find much documentation on how to set up and use it. So after messing with it for a while, I thought I would post what I was able to do so others have a little more direction on how to use it.

You will need a noiseDict file in the system directory with the format:

XXXXXXXXXXXXXXXXXX

pRef 16.32e-06;
N 128;
nw 100;
f1 25;
fU 10000;
graphFormat raw;

pressureData
{
fileName /* "$FOAM_CASE*/ "pressureData";
nHeaderLine 0; // number of header lines
refColumn 80; // reference column index
componentColumns (1); // component column indices
separator " "; // optional (defaults to ",")
mergeSeparators yes; // merge multiple separators
outOfBounds clamp; // optional out-of-bounds handling
interpolationScheme linear; // optional interpolation scheme
}
XXXXXXXXXXXXXXXXXXX


more info on the format can be found in the noice.C file.


To get the pressure data I used a probe at a desired point in the case grid. To run the utility you will also need to add the following to the Functions section of your controlDict. (though I think it can also be added in the noiseDict as well.)


XXXXXXXXXXX

noise
{
type noise;
functionObjectLibs ("libutilityFunctionObjects.so");
outputControl timeStep;
ouputInterval 1;
}

XXXXXXXXXXX


Now you will need to run your solver. Unfortunately the noise utility does not seem to create the pressureData file. So instead I manually pulled the pressure data file from my probe directory and copied it to the case directory, though I'm sure it wouldn't be difficult to automate this. Once your pressureData file is in place and correctly named, you can run the noise postprocessing utility. The terminal command is noise. If everything is set up correctly, 4 data files will be added to your case file directory containing the following data
- FFT of the pressure data
- narrow-band PFL (pressure-fluctuation level) spectrum
- one-third-octave-band PFL spectrum
- one-third-octave-band pressure spectrum
These data files can then be graphed with your preferred method. I used gnuplot as well as mathematica.


Possible errors
  • Cannot open CSV file for reading
    • file is either named incorrectly or not present
  • Invalid first character found
    • the probe data comes with some headers, so either delete them from the data file or add more header place holders in your noiseDict
  • Block size N=65536 is larger than number of data
    • N needs to be a value of 2^n, and can't be larger then the number of rows in your data file.
  • unable to process data with variable time step
    • self explanatory, make sure the time step is consistent


P.S I apologize if this information is elementary. Just trying to help.
Hi, could you provide the format of the pressure file? I have time and pressure data but it does not function.
Best wishes
kirby031 is offline   Reply With Quote

Reply

Tags
acoustics, fft, noise, postprocessing, utility


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Postprocessing utility R not working bhattach OpenFOAM Post-Processing 0 March 18, 2016 16:09
looking for information to create openfoam postprocessing utility with "-parallel" yellppa.nayak OpenFOAM Programming & Development 0 April 27, 2015 01:33
Something doens't work with wallHeatFlux utility or externalWallHeatFluxTemperat BC!! zfaraday OpenFOAM Post-Processing 0 February 5, 2015 17:47
[ICEM] Hexa mesh, curve mesh setup, bunching law Anorky ANSYS Meshing & Geometry 4 November 12, 2014 01:27
FoamX utility postprocessing error ztdep OpenFOAM Post-Processing 0 March 26, 2008 02:25


All times are GMT -4. The time now is 13:43.