Simple Pipe Acoustics - the very basics
Posted: 30 Jun 2017, 12:23
Dear Elmer Community,
First of all thanks to all who have created, published, and support this software. It has got an unbeatable advantage, which is being open source; special thanks for that.
I am a beginner Elmer user and have some newbie questions, first relating to acoustics. I hope that this thread will also help other newbies later to get up to speed, and figure things out.
The presented test case attempts to simulate the sound propagation within a 1 m long pipe of 0.1 m diameter filled with air, having acoustically hard walls. The input and output openings are matched boundaries to avoid reflections. At the input we have an incident plane wave of p0=100 Pa amplitude.
I have tried several combinations of boundary conditions, but don’t seem to be able to get the expected results (which comes forth with no headache in Comsol). The closest solution to the expected is obtained when the input is defined using the effective value of the pressure peff=70.71 as:
pressure Wave 1 (real part): 70.71068
pressure Wave 2 (imag part): 0
and the output impedance to be identical with the speed of sound c as:
real part of impedance: 343
imag part of impedance: 0
With such setup we get the complex pressure amplitude results:
p1_0=70.71
p2_0=70.6308
The instantaneous pressure is calculated according to formula (9.3) in the ElemerModelsManual.pdf:
p=p1_0*cos(om*t)-p2_0*sin(om*t).
When this result is plotted in excel, the p0 amplitude within the pipe is indeed 100 Pa as expected, but its phase is shifted by 45 degrees compared to the input pin=100*cos(om*t).
There is quite a bit of confusion here, because in order to avoid reflections at the output we supposed to create there a matched impedance BC which according to my understanding is rho*c=1.205*343. But if I use that in Elmer, then the results are worse than in this simulation using z=c. Therefore it is not clear whether there are any reflections or not and why. If z=c is the correct setting then why is that? Why not z=rho*c (which is the correct setting in Comsol)?
Let’s assume for now that z=c setting is the one to be used as matched boundary. Then that means there should not be any reflected waves and the p as calculated above must be the unaltered input wave that propagates from left to right on x axis having the original amplitude of 100 Pa. But then I don’t understand why is it shifted 45 degrees to the left relative to the expected pin?
In order to illustrate the input and result wave pattern relationships the attached excel document plots all components:
p1-amplitude of Elmer result complex pressure real part
p2-amplitude of Elmer result complex pressure imaginary part
ps-sum of the two complex pressures which represents the instantaneous pressure p
pR-the original input signal propagating from left to right
pL-the required reflected wave (in order to obtain the Elmer result ps from pR input) that propagates from right to left back from the output
The x axis is in om*t degrees in reverse order, because it represents the spatial propagation when the phase angle decreases in the direction of propagation.
Is it correct that the input pressure should be an effective pressure and not its amplitude?
The project folder has been also attached in a zip file for those willing to take a look at it.
If anyone could clarify what I am doing wrong, and how to obtain the expected result, I would be thankful.
Joe
First of all thanks to all who have created, published, and support this software. It has got an unbeatable advantage, which is being open source; special thanks for that.
I am a beginner Elmer user and have some newbie questions, first relating to acoustics. I hope that this thread will also help other newbies later to get up to speed, and figure things out.
The presented test case attempts to simulate the sound propagation within a 1 m long pipe of 0.1 m diameter filled with air, having acoustically hard walls. The input and output openings are matched boundaries to avoid reflections. At the input we have an incident plane wave of p0=100 Pa amplitude.
I have tried several combinations of boundary conditions, but don’t seem to be able to get the expected results (which comes forth with no headache in Comsol). The closest solution to the expected is obtained when the input is defined using the effective value of the pressure peff=70.71 as:
pressure Wave 1 (real part): 70.71068
pressure Wave 2 (imag part): 0
and the output impedance to be identical with the speed of sound c as:
real part of impedance: 343
imag part of impedance: 0
With such setup we get the complex pressure amplitude results:
p1_0=70.71
p2_0=70.6308
The instantaneous pressure is calculated according to formula (9.3) in the ElemerModelsManual.pdf:
p=p1_0*cos(om*t)-p2_0*sin(om*t).
When this result is plotted in excel, the p0 amplitude within the pipe is indeed 100 Pa as expected, but its phase is shifted by 45 degrees compared to the input pin=100*cos(om*t).
There is quite a bit of confusion here, because in order to avoid reflections at the output we supposed to create there a matched impedance BC which according to my understanding is rho*c=1.205*343. But if I use that in Elmer, then the results are worse than in this simulation using z=c. Therefore it is not clear whether there are any reflections or not and why. If z=c is the correct setting then why is that? Why not z=rho*c (which is the correct setting in Comsol)?
Let’s assume for now that z=c setting is the one to be used as matched boundary. Then that means there should not be any reflected waves and the p as calculated above must be the unaltered input wave that propagates from left to right on x axis having the original amplitude of 100 Pa. But then I don’t understand why is it shifted 45 degrees to the left relative to the expected pin?
In order to illustrate the input and result wave pattern relationships the attached excel document plots all components:
p1-amplitude of Elmer result complex pressure real part
p2-amplitude of Elmer result complex pressure imaginary part
ps-sum of the two complex pressures which represents the instantaneous pressure p
pR-the original input signal propagating from left to right
pL-the required reflected wave (in order to obtain the Elmer result ps from pR input) that propagates from right to left back from the output
The x axis is in om*t degrees in reverse order, because it represents the spatial propagation when the phase angle decreases in the direction of propagation.
Is it correct that the input pressure should be an effective pressure and not its amplitude?
The project folder has been also attached in a zip file for those willing to take a look at it.
If anyone could clarify what I am doing wrong, and how to obtain the expected result, I would be thankful.
Joe