Help simulating a standing wave. (Segmentation fault)

Numerical methods and mathematical models of Elmer
Post Reply
NickO
Posts: 3
Joined: 30 Aug 2017, 22:48
Antispam: Yes

Help simulating a standing wave. (Segmentation fault)

Post by NickO »

Dear all,

For a school project, I am studying acoustic levitation and I am trying to use elmer to simulate an ultrasonic standing wave and then determine the maximum and minimum sound pressure. I am using this simulation as a model (https://www.youtube.com/watch?v=dfLHVUcvnDo), but I added a reflector with a wave flux of 0 at a distance such that a standing wave will be formed at 20Khz. When I run the solver I get the following error and I can't figure out what's wrong:

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0 0x7FF6189DEE08
#1 0x7FF6189DDF90
#2 0x7FF61862F4AF
#3 0x7FF618D3A368
#4 0x7FF618D3CDD0
#5 0x7FF618FFCB6B
#6 0x7FF618FFCBD6
#7 0x7FF619008231
#8 0x7FF60D698711
#9 0x7FF618ED7460
#10 0x7FF618EE9D14
#11 0x7FF618EEB2B0
#12 0x7FF618EECBD9
#13 0x7FF6190A3FEC
#14 0x4010B5 in MAIN__ at Solver.F90:69

I'm using the LinuxMint based virtual machine and I've attached the sif file. I tried uploading the mesh but it's too big. It's basically just 3 bodies, one for the emitter, one for the reflector, and one for the air.

So I guess my first question is what is this error and what can I do about, and my second is if I'm at least headed in the right direction to achieving the simulation I described. I'm a total newbie at this and only figured out what a PDE was last week...

Thanks,

Nick
Attachments
case.sif
(2.4 KiB) Downloaded 245 times
raback
Site Admin
Posts: 4823
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Help simulating a standing wave. (Segmentation fault)

Post by raback »

Hi

I would guess you're running out of memory. You have the cheapest preconditioner (diagonal) so there is not much you can do about it. Try with a sparser mesh and see if you can compute it.

-Peter
NickO
Posts: 3
Joined: 30 Aug 2017, 22:48
Antispam: Yes

Re: Help simulating a standing wave. (Segmentation fault)

Post by NickO »

Hi Peter,

Thanks for the help. I removed the Linux Mint based virtual machine, added an Ubuntu machine with 3 times the memory and then did the standard linux install. I also made the mesh a bit sparser and the problem is persisting. Here's a google drive link for the mesh file: https://drive.google.com/file/d/0B3Od7O ... sp=sharing

Nick
annier
Posts: 1168
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: Help simulating a standing wave. (Segmentation fault)

Post by annier »

Hi Nick,
In Solver section of your simulation,
did you try replacing

Code: Select all

 Linear System Preconditioning = Diagonal
by

Code: Select all

Linear System Preconditioning = "ILU2"
or any other ILUx (x=1,2,3,4,...n) or other preconditioners described in chapter 4 of Elmer Solver Manual (http://www.nic.funet.fi/pub/sci/physics ... Manual.pdf).


Yours Sincerely,
Anil Kunwar
Anil Kunwar
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
raback
Site Admin
Posts: 4823
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Help simulating a standing wave. (Segmentation fault)

Post by raback »

Hi

This was a nasty one...

For background the Helmholtz equation was initially written assuming constant density. Then density can be eliminated from the set of equations.

However, if density is given the code tries also to use it. This will allow, for example, proper treatment of material interfaces. This also means that for the impedance conditions on the boundary the density must be known. There is a function GetParentMatProp that fetches the density from the parents of a boundary element. Unfortunately in this case, there were some a handful of (interface?) elements that really didn't have proper material definitions which ended to looking at materials entry zero, and thus a core dump.

As remedy:
1) Define all bodies properly or remove the unnecessary bodies
or
2) Comment out the density so that it will not be used

I just committed a more intelligent version of the GetParentMatProp function that avoids the core dump.

-Peter
NickO
Posts: 3
Joined: 30 Aug 2017, 22:48
Antispam: Yes

Re: Help simulating a standing wave. (Segmentation fault)

Post by NickO »

Thank you very much, I just defined materials for the other bodies and it worked.

Nick
Post Reply