This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Best method for discretization of wave equation

0 votes

Hello,

After going through the time dependent heat equation tutorials on fenics website, I am trying to model the seismic wave equation on a square mesh in FEniCS.

$$ u_{tt} = {c^2} \Delta u $$

I am an engineering student and my exposure to discretization methods is very limited and superficial. From what I gathered through the literature online, Crank-Nicolson and sympletic Euler method are the best ones for implementing wave equation due to their energy conservation schemes. Even newmark beta method was suggested.

  1. Can someone confirm/ elaborate/ counter this or suggest a better method?

  2. If you are aware of a document that explains such a method for implementing wave equation in Fenics, can you pls. point me towards it. I have come across some documents but most of them are very mathematical in nature which will obviously be an engineer's last resort :)

Thanks! I' ll be very grateful for any help and guidance in this regard.

asked Oct 16, 2015 by Chaitanya_Raj_Goyal FEniCS User (4,150 points)
edited Oct 16, 2015 by Chaitanya_Raj_Goyal

2 Answers

+1 vote

you can have a look at a 1 dimensional example I wrote for dolfin-adjoint:
http://www.dolfin-adjoint.org/en/latest/documentation/time-dependent-wave/time-dependent-wave.html

Focuss on the "forward" routine.

answered Oct 16, 2015 by stevenvdk FEniCS User (1,590 points)
0 votes

I'm currently working in the implementation of the PML method for the numerical simulation of wave propagation in elastic media. Initially, i implemented the temporal discretization using the Newmark scheme, but at this moment, i'm using the Midpoint scheme (by suggestion of my professor). Implement this methods using FEniCS is not complicated and can be implemented in the same way that in the elastodynamics demo (on the documentation folder) or as it was already said in the previous answer.

An example (put attention in the .ufl code):

https://gist.github.com/hernanmella/fcac1342631ed7412dd9

answered Oct 16, 2015 by hernan_mella FEniCS Expert (19,460 points)

Hi hernan_mella,

Thanks a lot for your reply! Do you have a document or can you point me towards a document that has the Newmark discretization of the wave equation that you implemented in your code. It would be easier to understand it with a math document to support it.

Also, are you sure about using the midpoint method? I read that sympletic euler and crank nicolson are the best ones, even though my prof. recommended newmark beta.

Creating the fenics code is first part of my problem with absorbing BC ( Its great that you are also working on PML), thereafter I have lot more to do, but that is the first step.

Thanks again for your reply.

Hi Hernan,

Would you please put the link for the elastodynamic demo.

...