CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Aeroacoustics with coodles (

klilla January 15, 2010 04:59

Aeroacoustics with coodles
Dear All,

I would like to open a thread dedicated for aeroacoustics, since such kind of problems is a bit different from general cfd. I saw some threads about it, but all were rather old ones, I hope still someone working on this direction.

Yesterday I already posted this, but I think on a wrong thread (it was about pre-processing as I later realized, sorry posting it twice, but I would like to bring my problem front of the right community).

So, I tried to simulate an acoustic pulse placed in the middle of a rectangular domain. The pulse should spread with the speed of sound unidirectionally. This happens well, BUT, in the density field there remains a smaller pulse constantly. This I do not understand, it seams that there and entropy pulse created, due to I do not know what.

My initial problem:

velocity is zero everywhere
gaussian pulse of pressure at the center of the domain (set by funkySet Field)
Op. 1: constant temperature, hoping that the "thermo" package will set the density well
Op. 2: set the density too as a gauss pressure rho = 1/(c*c)*p

Both initializations give back exactly the same results.

I normalized the pressure by pNorm = p/(c*c) +0.327 where the correction is exactly the same as the amplitude of the remaining pulse. In this case the density and normP plots are the same (except that in the density there is the extra bump )

have you any idea where I introduce this additional pulse?



ivan_cozza January 15, 2010 06:35

Hi Lilla,
post some pictures of your calculations, it could be easier to help you with them. Moreover, put attention in normalizing variables in OF, as the solvers work with dimensional variables!

klilla January 15, 2010 10:05

Dear Ivan,

I used dimensional values.

p_0 = 10000Pa
U_0 = (0 0 0) - no background flow
T_0= 300K

and superimposed to them the pulse (maximum amplitude of 1 kg/m^3, ok this could be a bit high...), namely the pressure or the pressure and density.

Well, I would upload image, but when I click to the icon it is asking an url address and from there I'm lost.

So I created an album, it is in

well, here, if I write it:


braennstroem January 18, 2010 01:07

Hi Lilla,

I wonder, how you set the gaussian pulse with funkySetFields... do you have a hint!?


klilla January 18, 2010 05:57

gaussian pulse
Like that:

field p;
expression "100000+0.1*340*340*exp(-log(2.)/9.*(pos().x*pos().x+pos().y*pos().y))";
/* benchR
field rho;
expression "1.163+exp(-log(2.)/9.*(pos().x*pos().x+pos().y*pos().y))";

field U;
expression "U+vector(0.04*(pos().y-67.)*exp(-log(2.)/25.*((pos().x-67.)*(pos().x-67.)+(pos().y-67.)*(pos().y-67))),-0.04*(pos().x-67.)*exp(-log(2.)/25.*((pos().x-67.)*(pos().x-67.)+(pos().y-67.)*(pos().y-67.))), 0.0)";

This is a benchmark problem from the ICASE/LaRC Workshop... from NASA (NASA CP-3300). Here an acoustic and a entropy/shear pulse are defined. I deleted the later one, so just the acoustic pulse remained. The adventage of the testcase, that it has analytical solution.



klilla January 20, 2010 06:44

localising the problem
I found out where the simulation is going wrong, now I just do not know exactly why.

In the initialization we have due to the perfect gas law:

rhomax=pmax/(R*T)=1.2933, which should be equal in isentropic flow rho=c^2*p as c=sqrt(gamma/(R*T))=const as T =const., however in this way with gamma = 1.4 rhomax = 1.2586. So seems gamma do not fit.

The difference between the two remains in the computational domain as an entropy wave.

Unfortunatelly here a 3% of error is introduced which is not that much, I know, but in the present case more than annoying.

I do not know how to overcome this problem. Any suggestion is very wllcomed!


klilla January 20, 2010 07:55

Sorry, I was a bit too fast:


But the numbers are ok.

klilla February 5, 2010 04:26


I realised my mistake, so to complete this tread:

The perturbations do not satisfy by themselves the perfect gas law, the instantaneous quantities do (like p=p0+p', etc.). So where I computed T'=m/R*p'/rho'=const. is not valid. Instead T=m/R*(p0+p')/(rho0+rho'). This is the closure of the initial value problem of an acoustic pulse.

Best regards,


JS-UDE April 29, 2014 08:49

Dear Lilla,

I know this is a quit old thread, but nevertheless thanks for opening it. I had implemented acoustic analogies in Openfoam and I wanted to verify my results by running the NASA Benchmark Test case. I have been successful in running my OF-case but now I stuck in generating/plotting the analytical solution to compare my numerical results with the exact one. Do you (or anybody else) have any helping hint? Do I have to solve the Integral of the analytical solution manually to get values along the x-axis for a specific time-step? Thanks a lot in advance?

klilla April 29, 2014 10:59


yes, you need to integrate numerically (I've used matlab fort he pulse) to get the solution. There is not closed solution for such problems.

JS-UDE April 29, 2014 13:06

Hi Lilla,

thank you very much for your quick reply. And as I understand correctly, I was on the right path ;-). Hope the matlab-coding is not that much work... is the there a kind of usefull "hidden" function in Matlab/Octave for it?
Best regards,

All times are GMT -4. The time now is 20:01.