Simulating Convection using Discontinuous GalerkinĀ 

Here’s a couple very basic demos of some preliminary code I developed when working on my master’s thesis for simulating 1D and 2D advection. DG was used for the spatial discretization, but to even get there first I had to learn how it worked! There’s a very good text by Hesthaven and Warburton that has a somewhat gentle introduction, but the best way to understand the theory is to implement the darn thing.

These model “scalar conservation laws”, which have an easy example in advection. You have a parcel of “stuff” and it gets blown around by the flow in the domain. They are good first test cases since it’s easy to recognize incorrect behavior and because the conserved quantity should be conserved!

1D Advection
2D Advection