tcew / nodal-dg

MIT License
141 stars 90 forks source link

Question about "edge noise" #6

Open emprice opened 4 years ago

emprice commented 4 years ago

Hi Prof. Warburton!

I am a graduate student at Harvard University working towards my PhD in astrophysics. I have really enjoyed your nodal DG book, and I've been trying to implement the codes in it, using both the book and this repo. I've run into a bit of a snag, however, and I'm not sure what might cause this issue. I thought you might have some insight to share.

I've already checked for obvious bugs in my code, printing out matrices and such and comparing them to the output from yours (using Octave instead of MATLAB for now). So far, everything seems consistent. When I run my code on a simplified version of my target problem, I get a lot of noise at the cell edges, such as the plots I've chosen below. I'm showing both the 2-dimensional view and a slice at y = 0; the variable in both cases is the x-velocity in the Euler equations. You can see that the amplitude of the noise is quite small, but that is a bit misleading -- this particular frame is captured after an absurdly small timestep. In reality, I expect to take timesteps on the order of 5-6 orders of magnitude greater than this, and the noise only grows over time.

bokeh_plot_2 bokeh_plot

This simulation used just 2 cells, and the noise clearly follows the edge of the cell. There should be no shocks in this system, and the solution is expected to be quite smooth. I've pushed filtering to the maximum I can, and it helps a bit, but the noise always comes back through after just a couple of timesteps. I've been debugging for about a week and am really at a loss. Is this a feature inherent to DG-FEM? Is there a workaround? Or a debugging step I could try?

Thanks in advance for your time, Ellen Price

tcew commented 3 years ago

Hi - unfortunately I only just saw your issue post. I am missing some information:

  1. what is your PDE ?
  2. what are you boundary conditions ?
  3. what form of DG are you using ?
  4. what is your time integrator ?

TW