Noise postprocessing utility setup
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
P.S I apologize if this information is elementary. Just trying to help. :D |
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! |
Quote:
Code:
--> FOAM FATAL ERROR: |
Many thanks for this info. Any success on automating the probe postprocessing after the simulation finished? Thanks!
|
Hi!
How did you solve this error? I got the same FOAM FATAL ERROR message :( Thanks [QUOTE=pankajhrajput;633930] Code:
--> FOAM FATAL ERROR: |
pressure File
Quote:
Best wishes |
All times are GMT -4. The time now is 02:21. |