## 4 Numerical Results
### Density Waves
The linear transformation leads to stability issues as spurious oscillations at the contact discontinuities trigger negative density values. Figure 4: Square density wave advection—mass conservation analysis for each choice of the change of density variable at density ratio \(r_{\rho}=2\) (**left**) and \(r_{\rho}=800\) (**right**) using the implicit ESDIRK5(8) scheme. DG polynomial approximation of degree \(k=6\) on a uniform mesh of \(10\times 1\) square elements. Figure 3: Sine density wave advection—mass conservation analysis for each choice of the change of density variable at density ratio \(r_{\rho}=2\) using the implicit ESDIRK5(8) scheme. DG polynomial approximation of degree \(k=1\) (**left**) and \(k=6\) (**right**) on a uniform mesh of \(10\times 1\) square elements. The non-convergent behavior of the mass error observed in the case of the square density wave is ascribable to the spatial integration error. Indeed, since the solution is less regular than in the sine wave case, nonlinearities introduced by the change of density variable are more difficult to integrate with satisfactory accuracy. In Figure 5, we replicate the error analysis of Figure 4, increasing the degree of exactness of Gaussian quadrature rules. In particular, the number of quadrature points is increased by factor 2 in each direction. Notice that in the case of the small density ratio (\(r_{\rho}=2\)) the convergent behavior is regained with small step sizes for both exponential and hyperbolic tangent transformations. For a high-density ratio (\(r_{\rho}=800\)), the error is improved since the mass mismatch converges when large \(\overline{\Delta t}\) is considered. However, for smaller time steps, the error still settles around 3 \(\times 10^{-8}\) and 2 \(\times 10^{-6}\) for \(f_{2}(\widetilde{\rho})\) and \(f_{3}(\widetilde{\rho})\) transformations, respectively, thus suggesting more Gauss points are needed to reach lower error levels. This behavior was expected since stronger nonlinearities are associated with higher density ratios. Notice that in Figure 5, the result for the linear transformation is not shown since it is not influenced by spatial integration accuracy. In Figure 6, the square density wave solution (\(r_{\rho}=800\) and \(k=6\)) obtained after one period with the exponential and the hyperbolic tangent changes of density variable is compared with the reference solution. The effect of the variable transformation is clearly noticeable. Indeed, both transformations result in a smooth density field when the density approaches the minimum value \(\rho_{-}=r_{\rho}^{-1}\). Near the maximum value \(\rho_{+}=1\), instead, only the hyperbolic tangent-based change of variable limits numerical solution over/under-shoots, while the exponential one shows typical oscillations arising from the high-order discretization of discontinuities. Figure 5: Square density wave advection—mass conservation analysis for each choice of the change of density variable at density ratio \(r_{\rho}=2\) (**left**) and \(r_{\rho}=800\) (**right**) using the implicit ESDIRK5(8) scheme and an increased number of Gauss quadrature rule points. DG polynomial approximation of degree \(k=6\) on a uniform mesh of \(10\times 1\) square elements. Figure 6: Square density wave advection—density field after one period (\(t=10\)) obtained using the exponential and the hyperbolic tangent-based change of density variable at density ratio \(r_{\rho}=800\). DG polynomial approximation of degree \(k=6\) on a uniform mesh of \(10\times 1\) square elements.