|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
A Z
Join Date: Dec 2015
Posts: 16
Rep Power: 10 ![]() |
Hey,
I have a problem and some questions about the libAcoustics library. I simulate a pipe-flow. My problem is: -the the pressure fluctuation calculate but not the fft. I just copy the testcases and modify them for my problem. My questions: 1. what is the effect of pRef in the observers options? 2. my results CurleAnalogy_1-time.dat are not really different? Is this realistic? 3. What is the meaning of the force which is calculated in the Curle.C? need this more settings? Here are the files from my case: Code:
application pisoFoam; startFrom latestTime; startTime 0; stopAt endTime; endTime 0.0011; deltaT 1e-6; writeControl timeStep; writeInterval 100; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable true; functions { CurleAnalogy_1 { functionObjectLibs ("libAcoustics.so"); type Curle; log true; probeFrequency 1; patchNames (Wall); timeStart 1e-3; timeEnd 1.1e-3; c0 510; dRef -1; pName p; rhoName none; rhoRef 0.4097; observers { microphone-A { position (3.8 0.1 0); pRef 2.0e-5; fftFreq 1024; } } } } Thank you. Best, Adrian |
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
A Z
Join Date: Dec 2015
Posts: 16
Rep Power: 10 ![]() |
||
![]() |
![]() |
![]() |
![]() |
#4 |
Member
|
Yes, it's included but libfftw.so also should present in proper location
__________________
practice makes perfect |
|
![]() |
![]() |
![]() |
![]() |
#5 | |
New Member
A Z
Join Date: Dec 2015
Posts: 16
Rep Power: 10 ![]() |
Quote:
Now its working, I have nothing change only the number of iteration / time steps. Need the Fourier transform a minimum number of values? |
||
![]() |
![]() |
![]() |
![]() |
#6 | |
Member
|
Quote:
__________________
practice makes perfect |
||
![]() |
![]() |
![]() |
![]() |
#8 | |
Member
Guanjiang Chen
Join Date: Apr 2020
Location: Bristol, United Kingdom
Posts: 54
Rep Power: 6 ![]() |
Quote:
Reference pressure pRef is always set 2E-5. It doesn't need too much change I think. Do you know what fftFreq means? sample frequency or nfft. For curle method, I find the number of frequency in the result is the same with fftFreq. But for farassat method, fftFreq seems to have no effects on the result frequency. Regards, Guanjiang |
||
![]() |
![]() |
![]() |
![]() |
#9 | |
New Member
Ammad
Join Date: Aug 2021
Posts: 8
Rep Power: 5 ![]() |
Quote:
i am having the same problem. my case is working fine and i am getting pressure fluc w.r.t. time but fft is not calculated. it does nothing. Did you solve this problem? do you know what we have to do to overcome this problem? regards, Ammad |
||
![]() |
![]() |
![]() |
![]() |
#10 |
Member
Guanjiang Chen
Join Date: Apr 2020
Location: Bristol, United Kingdom
Posts: 54
Rep Power: 6 ![]() |
Hi,
Which version do you use? I think the latest version has solved this problem. By the way, there is a question panel about libAcoustics https://github.com/unicfdlab/libAcoustics/issues Regards, Guanjiang |
|
![]() |
![]() |
![]() |
![]() |
#11 |
New Member
Ammad
Join Date: Aug 2021
Posts: 8
Rep Power: 5 ![]() |
Hello,
i found the solution, actually it was due to fftfreq. i set it to the correct value and now its working perfectly. Thank you ![]() |
|
![]() |
![]() |
![]() |
![]() |
#12 |
Member
Guanjiang Chen
Join Date: Apr 2020
Location: Bristol, United Kingdom
Posts: 54
Rep Power: 6 ![]() |
Hi,
What value do you set for fftfreq? Could you share your fwh set file with me. Regards, Guanjiang |
|
![]() |
![]() |
![]() |
![]() |
#13 |
New Member
Ammad
Join Date: Aug 2021
Posts: 8
Rep Power: 5 ![]() |
Actually i had a look into the source code that what is triggering fft calculations. There i found that the fftfreq should be the value after which you want to calculate fft spectrum. for eg. if you want to calculate every 100 timesteps then set fftfreq to 100.
i hope this helps ![]() |
|
![]() |
![]() |
![]() |
![]() |
#14 |
Member
Guanjiang Chen
Join Date: Apr 2020
Location: Bristol, United Kingdom
Posts: 54
Rep Power: 6 ![]() |
Thank you for your reply.
I calculate the SPL using the fluctuation pressure in the "xxx-time.dat" file. I don't understand the FFT process of libacoustic very well. Is the fftfreq related to the frequency range of your SPL result? what decides the SPL frequency range, the time steps? |
|
![]() |
![]() |
![]() |
![]() |
#15 | |
New Member
Ammad
Join Date: Aug 2021
Posts: 8
Rep Power: 5 ![]() |
Quote:
|
||
![]() |
![]() |
![]() |
Tags |
acoustic, fft, libacoustics |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
calculate velocity difference | helly | OpenFOAM Post-Processing | 0 | June 21, 2016 08:49 |
calculate values for eps and k from Re or u????? | sbar | OpenFOAM Pre-Processing | 5 | August 16, 2010 04:10 |
FFT solver for Poisson equation | mranji1 | Main CFD Forum | 1 | November 16, 2009 01:12 |
How to calculate Torque for francis turbine | manish | CFX | 4 | March 15, 2007 02:57 |
fft of unsteady solution | K S Chang | Main CFD Forum | 6 | January 15, 2004 06:42 |