1D upwind DG implementation does not work propertly. #4409
Replies: 1 comment 1 reply
-
This is incorrect:
Remember that Firedrake is a general, unstructured FEM framework in which the orientation of facets (the boundaries between cells) are arbitrary. There is therefore no expectation that '-' refers to either the left or right-hand side of the cell boundary in 1D. If you follow the example more closely, and use:
your example seems to work correctly. Note that I have simplified the expression for |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I am implementing a simple upwind Discontinuous Galerkin method for the one-dimensional transport equation, with periodic boundary conditions in (x).
For time integration, I am using the TVD-RK 3 method, which is a third-order TVD (Total Variation Diminishing) Runge-Kutta scheme. This method is applied to the transport equation in a manner similar to what is described in the Firedrake tutorial: DG Advection Demo.
Just for the sake of completeness, each element has the form (I_i = [x_{i-1/2}, x_{i+1/2}]). Taking into account that we are using an upwind flux and periodic boundary conditions, the weak form has the form:
I wrote the implementation below for this problem up to final time (T = 0.1), and I always get the wrong result and even blow ups. I have checked the math and the code many times and I cannot seem to find what is going on. Also in many cases the boundary conditions are not preserved. We have checked this with other colleagues and we were wondering if you guys can check this for us.
Code:
Beta Was this translation helpful? Give feedback.
All reactions