2d simulation of acoustic wave propagation
Re: 2d simulation of acoustic wave propagation
Another source for sign changes to be necessary in the equations could be that a different exponential ansatz [either exp(iwt) or exp(iwt)] is used in different software. Elmer employs the alternate exp(iwt).
Re: 2d simulation of acoustic wave propagation
I made a mistake, the intention was to write "either exp(iwt) or exp(-iwt)]". So Elmer assumes the representation p(x,t) = P(x)exp(iwt) and this is the sole option.
Re: 2d simulation of acoustic wave propagation
In my matlab code, the source is represented by exp(1j*k*r), where k is the wavenumber and r is the coordinate vector.
Re: 2d simulation of acoustic wave propagation
Also, with lower frequencies (like 1kHz) I see some basic expected output, like if I emit a pressure wave from the bottom middle transducer, which is not the case for 40kHz. So, we come back to the suggestion that either my mesh is not good, or Elmer solver is just not enough for higher frequencies. As for the first, I've also tried the .mphtxt mesh file from Comsol and it didn't work well either, and the mesh I'm using right now is the finer mesh it can be done in Salome. And it still doesn't work.
-
- Site Admin
- Posts: 4812
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: 2d simulation of acoustic wave propagation
Hi
At 40 kHz the wavelength is around 8.5 mm. On the other hand, with standard nodal FEs you need at least ~10 elements per wave. Hence, your mesh size, h, should be smaller than 1 mm in order to capture the phenomena.
Could the insufficient mesh density be a problem?
-Peter
At 40 kHz the wavelength is around 8.5 mm. On the other hand, with standard nodal FEs you need at least ~10 elements per wave. Hence, your mesh size, h, should be smaller than 1 mm in order to capture the phenomena.
Could the insufficient mesh density be a problem?
-Peter
Re: 2d simulation of acoustic wave propagation
I'm meshing in Salome. Salome doesn't use units, so I consider that all my dimensions are in mm, I put everything based on that and I mesh with maximum size = 0.5. Then, I import to Elmer and useraback wrote: ↑28 Jan 2020, 01:07 Hi
At 40 kHz the wavelength is around 8.5 mm. On the other hand, with standard nodal FEs you need at least ~10 elements per wave. Hence, your mesh size, h, should be smaller than 1 mm in order to capture the phenomena.
Could the insufficient mesh density be a problem?
-Peter
Code: Select all
Coordinate Scaling = Real 0.001
Run the test.sif file to see the results.
https://mega.nz/#!iehDGIqB (couldn't upload here because of the file size)
Re: 2d simulation of acoustic wave propagation
Hi,
The description
If each transducer is supposed to create a plane wave (that is, a wave front) over its surface (Question I: is this the case or should we allow the amplitude to change over each transducer face?) which starts to propagate into a direction u (u is a unit vector), the most general real-valued representation of the source can be put into the form
p(r,t) = A cos(k u.r + w t + phi)
where A is the amplitude, the scalar k is the wave number, r is the position vector for the transducer points, w is the angular frequency and phi is the phase. If we assume further that u = ey, with ey being the unit vector along the positive y-axis (Question II: is this the right assumption or should we select u = -ey in the upper array, or use some other choices depending on the array), then u.r = y. Since all transducers are on lines y = constant, then k u.r must be a constant.
As the third question (Question III), in the Elmer implementation, does your phase vector definition include the constant part k u.r + phi or just phi? After we can agree on the real-valued representation p(r,t), we can convert back to complex variables and hopefully make your simulations to agree with other software.
If the resolution of the mesh is sufficient for some problem setup at 40 kHz, it should be so also other setups, with only phases being altered. Therefore I still doubt there is some inconsistency in setting BCs for Elmer.
Best regards,
Mika
The description
is not complete, there has to be an additional time-dependent part. Well, I now try to be quite specific since this appears to be necessary in order to make progress.
If each transducer is supposed to create a plane wave (that is, a wave front) over its surface (Question I: is this the case or should we allow the amplitude to change over each transducer face?) which starts to propagate into a direction u (u is a unit vector), the most general real-valued representation of the source can be put into the form
p(r,t) = A cos(k u.r + w t + phi)
where A is the amplitude, the scalar k is the wave number, r is the position vector for the transducer points, w is the angular frequency and phi is the phase. If we assume further that u = ey, with ey being the unit vector along the positive y-axis (Question II: is this the right assumption or should we select u = -ey in the upper array, or use some other choices depending on the array), then u.r = y. Since all transducers are on lines y = constant, then k u.r must be a constant.
As the third question (Question III), in the Elmer implementation, does your phase vector definition include the constant part k u.r + phi or just phi? After we can agree on the real-valued representation p(r,t), we can convert back to complex variables and hopefully make your simulations to agree with other software.
If the resolution of the mesh is sufficient for some problem setup at 40 kHz, it should be so also other setups, with only phases being altered. Therefore I still doubt there is some inconsistency in setting BCs for Elmer.
Best regards,
Mika
Re: 2d simulation of acoustic wave propagation
Thanks for the response,mika wrote: ↑28 Jan 2020, 17:27 Hi,
The descriptionis not complete, there has to be an additional time-dependent part. Well, I now try to be quite specific since this appears to be necessary in order to make progress.
If each transducer is supposed to create a plane wave (that is, a wave front) over its surface (Question I: is this the case or should we allow the amplitude to change over each transducer face?) which starts to propagate into a direction u (u is a unit vector), the most general real-valued representation of the source can be put into the form
p(r,t) = A cos(k u.r + w t + phi)
where A is the amplitude, the scalar k is the wave number, r is the position vector for the transducer points, w is the angular frequency and phi is the phase. If we assume further that u = ey, with ey being the unit vector along the positive y-axis (Question II: is this the right assumption or should we select u = -ey in the upper array, or use some other choices depending on the array), then u.r = y. Since all transducers are on lines y = constant, then k u.r must be a constant.
As the third question (Question III), in the Elmer implementation, does your phase vector definition include the constant part k u.r + phi or just phi? After we can agree on the real-valued representation p(r,t), we can convert back to complex variables and hopefully make your simulations to agree with other software.
If the resolution of the mesh is sufficient for some problem setup at 40 kHz, it should be so also other setups, with only phases being altered. Therefore I still doubt there is some inconsistency in setting BCs for Elmer.
Best regards,
Mika
I don't quite understand why there has to be a time dependent part, as we are solving Helmholtz in the frequency domain. Now answering your questions:
1) Let's assume that amplitude equals to 1 for all transducers.
2) It depends on how Elmer works. If +- sign represents the direction of the source then yes, in Matlab it doesn't really matter as it is approximated with a piston model and each source can be represented as a dipole. (I think in Elmer as well)
3) It should be k u.r + phi.
Also, do you get normal results for 40kHz by just applying a pressure 1 to only one of the transducers?
I know that my explanations may sound insufficient to you, as I'm not really experienced in acoustics and FEM analysis, however I'm trying to explain it as good as I can. Sorry for that, and thanks again for your time.
Panos
Re: 2d simulation of acoustic wave propagation
To be more specific, in COMSOL every transducer surface is assigned a Normal Acceleration with the equation
and , where is the phase of the ith transducer that is required in order to produce a specific trap in space.
Then, by running the BEM method (we only need to mesh the boundaries, thus it's faster in 3d than FEM) we get something like the picture below, for a focus in the center. I know that Elmer only uses FEM, that's why I'm trying to implement it in 2d (where meshing the area between the two boards of transducers is required, and is easier in 2d).
Code: Select all
1*accel*exp(-1j*(phase[i]))
Code: Select all
accel = 5.6849E5 1/s²
Code: Select all
phase[i]
Then, by running the BEM method (we only need to mesh the boundaries, thus it's faster in 3d than FEM) we get something like the picture below, for a focus in the center. I know that Elmer only uses FEM, that's why I'm trying to implement it in 2d (where meshing the area between the two boards of transducers is required, and is easier in 2d).
- Attachments
-
- normal_mesh_better_resolution.PNG
- (371.62 KiB) Not downloaded yet