Open navidcy opened 3 years ago
Advection_x
requiring two h values is just to try to keep these equations in conservative form, but I see there are problems because I'm not, in a strict way, solving the conservative form. In your previous issue, the equations you've laid out are actually the conservative equations, so it's best that the next test be to try them out.
- So, there are several equations like the crank nicholson, leap frog, alternate direction implicit, etc. The naming convention is just for the ease of readability. Probably I should also mention that we are using the explicit Euler scheme. I haven't written about forward, central or backward difference, because I'm still playing with them, figuring out which is best (like adding artificial diffusion in central difference schemes).
Are you saying that there are several advection functions based on the scheme choosen?
Advection_x
requiring two h values is just to try to keep these equations in conservative form, but I see there are problems because I'm not, in a strict way, solving the conservative form. In your previous issue, the equations you've laid out are actually the conservative equations, so it's best that the next test be to try them out.
OK, let's clear this out then! :)
In this notebook, I've got a fully conservative form with periodic boundary conditions and convergence plots for backward and central difference.
In the 1D Notebook I see a few function definitions with names that imply connection to a particular scheme. For example,
This suggest that this advection scheme is related to Euler. Some issues with this:
φ
with constant velocitya
is simply- a * ∂φ/∂x
. If the functionpartial_x(φ, dx)
indeed returns∂φ/∂x
(as it name intuitively suggests), then the functionadv_x_Euler
just returns the advection term inx
.advection_x
requires input of twoh
fields.cc @AndyHoggANU