How to generate plane waves and complex pressure map in ultrasonic acoustic wave simulation?

General discussion about Elmer
Post Reply
francisco_b
Posts: 3
Joined: 04 Mar 2022, 16:58
Antispam: Yes

How to generate plane waves and complex pressure map in ultrasonic acoustic wave simulation?

Post by francisco_b »

Hello,

I'm trying to generate a steady-state Helmholtz simulation in a domain that contains a 3D plastic grid with 2x2 cells. I would like to understand how ultrasound wave at 40 kHz scatters through the object which has the wavelenght (0.0086 m) for height.

In the picture below we can observe 4 planes of the simulation in Paraview (-X,-Y,+X,+Y) and 2 perspective planes with the surface and wireframe. The domain is centred in (0,0) with boundaries [-0.0043, 0.0043] both in x and y.

output-onlinepngtools.png
(474.75 KiB) Not downloaded yet

I have been trying to set the ultrasound wave source with different configurations in Boundary Condition 1 (BC1) below (i.e. plane waves, constant pressure, variable coordinate dependence, etc). However, I cannot seem to get any different results by changing BC1.

Code: Select all

Boundary Condition 1
  Target Boundaries(1) = $ inlet
  Name = "In"
  ! Plane Wave BC = True ! Automatically sets the boundary conditions assuming outgoing plane waves
$p0=100.0
$k1=0.0
$k2=0.0
$k3=1.0
  ! Pressure Wave 1 = 100
  Pressure Wave 2 = 0
  Pressure Wave 1 = Variable Coordinate                ! Coordinate variable dependence holds tx(0) = x, tx(1) = y and tx(2) = z
    Real MATC "p0*cos(k1*tx(0)+k2*tx(1)+k3*tx(2))"
  ! Wave Impedance 1 = $ c0 !
  ! Pressure Wave 1 = 1
  ! Wave Flux 1 = Variable time; Real MATC "2 * pi * f * p * U"
  ! Wave Flux 2 = 0
  ! We want to save data at the inlet 
  ! TODO how do we save data at the outlet

  Save Scalars = Logical True
End
Moreover, I cannot explain is why the absolute pressure amplitude is much higher in x=0.0043 y=0.0043 than in x=-0.0043,y=-0.0043, both at the inlet and after the outlet of the object. I thought that, assuming outgoing plane waves, the pressure distribution would be simmetric along the Z axis.

The project folder is here https://filebin.net/qosc3izc2qg2l9qr

Could anyone explain why the pressure distribution is not symmetric and how to make it simmetric in the Z axis? Is this a matter of setting plane waves correctly? How can I do it?

Also, I would like to try to input a complex pressure map to the simulation. How to do this?

Many thanks,
Francisco
Rich_B
Posts: 421
Joined: 24 Aug 2009, 20:18

Re: How to generate plane waves and complex pressure map in ultrasonic acoustic wave simulation?

Post by Rich_B »

Hello,

I don't have any good answers for you, just a few comments.

I tried loading the included elmergui project, and elmergui immediately crashed, with these last statements in the console output:
Loading elmer mesh files
Summary:
Nodes: 217396
Point elements: 0
Edge elements: 1536
Surface elements: 20879
Volume elements: 154921
Found 31175 edges on boundary
For a 3D model, Elmergui expects 3D bodies and 2D surfaces. It crashes in this case due to the existence of 1D edge elements. If you run this:
elmergrid 2 2 waves -autoclean
, then elmergrid will remove all entities less than 2D, and renumber the bodies and boundaries. The newly renumbered boundaries will be properly listed in mesh.names.

Elmergui will be able to load the project with the cleaned mesh.

Would you be able to load the original geometry file, such as a gmsh .geo file?

Also, there are two periodic boundaries on the left and back sides, and two open air boundaries on the right and front sides. Would this possibly have something to do with the lack of Z-axis symmetry?

Thanks, Rich.
francisco_b
Posts: 3
Joined: 04 Mar 2022, 16:58
Antispam: Yes

Re: How to generate plane waves and complex pressure map in ultrasonic acoustic wave simulation?

Post by francisco_b »

Hi Rich,

thank you for your reply and sorry for my late response. I've been away on annual leave.

I haven't used ElmerGui for this project. Only the ElmerGrid and ElmerSolver through the command line. I do use ElmerGrid with -autoclean to convert the model to elmer mesh format, I'm not sure why there would be 1D edge elements.

Here's is the model https://github.com/frantic0/stl-model/ ... ucture.stl

Thank you for pointing out about the periodic boundary conditions it did sort out out the issue with z-axis simmetry

Francisco
Post Reply