project-asgard / DG-SparseGrid

Matlab implementation of ASGarD
1 stars 2 forks source link

Flux Choice at Boundary #26

Open lwonnell opened 4 years ago

lwonnell commented 4 years ago

@MollyRaver For certain problems, we would like to be able to choose different flux settings for different boundaries. Diffusion1, for instance, requires that the left and right boundaries use one flux setting. In principle, we would want the boundary to be upwind in both directions. The current setting mandates one value, (+1, 0, -1), for the partial term. This often leads to oscillations at one boundary depending on the flux choice. Ideally, we would like a global scheme such as Lax-Friedrichs for all boundaries.

MollyRaver commented 4 years ago

@lwonnell This is because we treat the 2nd order PDE as two 1st order PDEs. So for the 1st order PDE, which is the advection equation, and only the inflow boundary condition is enforced. Actually the Dirichlet BCS for diffusion equation are for two sides, however by the LDG setting with alternating flux setting, we only employ one side. In order to use two bc, we can use central flux or change the scheme from LDG to other scheme.