You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This simulation code (in sims) runs the wave equation as a first order system
$$\partial_t \sigma = {c^2} \nabla u$$$$\partial_t u = \nabla \cdot \sigma$$
built from $\partial_{tt} u = \nabla \cdot (c^2\nabla u)$. This was adapted from the 1D case written in Igel (2017). A different analysis has to be used, however, since in 1D, the system can be written as the matrix system
$$\partial_t \mathbf u = \mathbf Q\partial_x \mathbf u$$
Domain
Two continuous $\verb+GSIZEX+\times\verb+GSIZEY+$ grids of $1\times 1$ unit elements are placed next to each other, with the discontinuous Galerkin flux linking them. Aside from these connected boundaries, no other boundary conditions are given, so that waves simply flow out of the domain through the boundaries.
Deriving the Weak Form and Upwind Flux
For the 2d case, the operators are brought into the linear operator as:
$$\int_\Omega \tau \cdot \partial_t \sigma ~dV= \int_{\Omega }{c^2} \tau\cdot \nabla u ~ dV=-\int_{\Omega}{c^2} u\nabla\cdot \tau ~ dV + \int_{\partial\Omega}{c^2} u\tau\cdot n ~ dS$$
$$\int_\Omega v\partial_t u ~ dV = \int_\Omega v\nabla\cdot \sigma ~ dV = -\int_{\Omega}\sigma\cdot \nabla v ~ dV + \int_{\partial\Omega}v\sigma\cdot n ~ dS$$
where $-\gamma n$ tales the place of $A$ ($n$ is the outward facing "surface" normal). A dG upwind scheme would use the value of $u$ on this side if $\gamma n > 0$ (the normal and velocity are in the same direction). Motivated by this, we would use $U$ on this side for directions with negative eigenvalue. More specifically, we would use $U$ corresponding to the upwind values for each covector ($U$ on the same element plugs into $\omega^-$ and the adjacent element's $U$ plugs into $\omega^+$).