In astrophysics a multitude of systems and configurations are described with concepts from hydrodynamics, often combined with gravitation, radiation and/or magnetism. Mathematically radiation hydrodynamics (RHD) and magnetohydrodynamics (MHD) are described by systems of coupled nonlinear partial differential equations. The Euler equations of hydrodynamics, the Maxwell equations as well as radiative transport equations are hyperbolic PDEs that connect certain densities and fluxes via conservation laws. The numerical solutions of these equations essentially need to comprise this quality. Today there exists a wide range of numerical schemes for conservation laws that ensure the conservation of mass, momentum, energy etc. if applied properly. Multiple fields in physics and astrophysics have adopted these sophisticated numerical methods for studying various applications.

Standard numerical methods for partial differential equations are established under the assumption of classical differentiability. Routine finite difference schemes of first order usually smear or smoothen the solution in the vicinity of discontinuities as they come with intrinsic numerical viscosity. Standard second-order methods often suffer from the Gibbs phenomenon, where oscillations around shocks emerge. In the past decades so-called high-resolution methods have been developed in order to achieve proper accuracy and resolution for nonlinear, discontinuous problems as they appear also in RHD or MHD. High order explicit Gudonov schemes have been dominating numerical applications and literature for the past decades. This trend was amplified by the enormous advancements made in parallel computing over the past decades.

In this work we consider physical configurations and problems that demand implicit advection schemes due to stability requirements. The parallelization of implicit nonlinear advection schemes, however, is still merely partially possible (solvers such as GMRES (Griewank and Walther [2008]) solve the linear sub-problems in parallel but iteratively in a sequential fashion for each time step). Hence it is desired to minimize the number of grid cells particularly for implicit schemes, where usually the inversion of a nonlinear matrix consumes a major part of the computational power needed. We suggest the adoption of problem oriented grids in combination with a modified artificial viscosity (which we will motivate in Section 1.1) for curvilinear coordinates. In higher-dimensional problems this artificial viscosity emerges as a tensorial quantity, which we demonstrate in Section 1.3. The result present in this paper can be seen as a tensor analytical consequence of the artificial viscosity in general curvilinear coordinates when using consistent metric tensors. In Section 2 we propose a correction for the commonly used tensor of artificial viscosity for curvilinear grids.

This correction is motivated by astrophysical applications where we consider time-dependent comoving nonlinear coordinates represented by non-conformal (non-angle preserving) maps from spherical coordinates. The authors are currently investigating the generation of grids that are asymptotically spherical but which allow certain asymmetries that can be found in rotating configurations as well as nonlinear pulsation processes in stars. This new approach to grid-based astrophysical simulation techniques will be addressed extensively with numerical applications in a future paper.

As an example of non-conformal two-dimensional coordinates, Figure 1 shows a grid that corresponds to the map (x,y)\to (\xi ,\eta ),

\begin{array}{rl}x=& \xi cos\eta ,\\ y=& ({a}_{1}\xi +{a}_{2}{\xi}^{2})(1+\frac{{a}_{3}{\pi}^{3}-16{a}_{2}\xi +{a}_{2}{a}_{3}{\pi}^{3}\xi}{4\pi (1+{a}_{2}\xi )}\eta \\ +\frac{4{a}_{2}\xi -{a}_{3}{\pi}^{3}-{a}_{2}{a}_{3}{\pi}^{3}\xi}{{\pi}^{2}(1+{b}_{2}\xi )}{\eta}^{2}+{a}_{3}{\eta}^{3})sin\eta \end{array}

(1)

which yields standard orthogonal polar coordinates for the choice of parameters ({a}_{1},{a}_{2},{a}_{3})=(1,0,0). In such a nonorthogonal grid the metric tensor is no longer diagonal and one has to consider a consistent differential geometric approach to the formulation of the governing equations of RHD and MHD, and also to the mathematical formulation of the artificial viscosity, which will be stressed in Section 2.

The benefit of the consistent formulation is especially evident when considering time-dependent grids, e.g. when using time-dependent parameters ({a}_{1},{a}_{2},{a}_{3}) in (1). We refer to the Appendix for a depiction of the system of equations of RHD for generally comoving curvilinear coordinates with time-dependent metrics.

### 1.1 Brief introduction to conservation laws

For the sake of stringency we recapitulate some important results from the theory and numerics of conservation laws and thereby introduce a few mathematical terms needed to motivate artificial viscosity. We refer to LeVeque ([1991]) and Richtmyer and Morton ([1994]) for the complete picture.

The equations of RHD and MHD form a system of hyperbolic conservation laws that describe the interaction of a density function \mathbf{d}(\mathbf{x},t):{\mathbb{R}}^{n}\times [0,\mathrm{\infty})\to {\mathbb{R}}^{m} and its flux \mathbf{f}(\mathbf{d}):{\mathbb{R}}^{m}\to {\mathbb{R}}^{m\times n}. Equation (6) shows how a concrete choice for the density and the flux field can look like in a given coordinate system.

The temporal change of the integrated density in a connected set \mathrm{\Omega}\subset {\mathbb{R}}^{n} then equals the flux over the boundary *∂* Ω, i.e.,

{\partial}_{t}{\int}_{\mathrm{\Omega}}\mathbf{d}\phantom{\rule{0.2em}{0ex}}\mathrm{d}V+{\int}_{\partial \mathrm{\Omega}}\mathbf{f}\cdot \mathbf{n}\phantom{\rule{0.2em}{0ex}}\mathrm{d}S=\mathbf{0}\phantom{\rule{1em}{0ex}}\text{for all}t0,

(2)

where **n** is the outward oriented normal of the surface.

The system is called hyperbolic if the Jacobian matrix {\mathrm{\nabla}}_{\mathbf{d}}\mathbf{f} associated with the fluxes has real eigenvalues and if there exists a complete set of eigenvectors. In case of MHD and RHD this property has a direct physical relevance (Pons et al. [2000]).

Assuming **f** to be a continuously differentiable function, equation (2) can be rewritten via the divergence theorem as

\begin{array}{r}{\int}_{t}{\int}_{\mathrm{\Omega}}({\partial}_{t}\mathbf{d}+{div}_{\mathbf{x}}\mathbf{f}(\mathbf{d}))\phantom{\rule{0.2em}{0ex}}\mathrm{d}V\phantom{\rule{0.2em}{0ex}}\mathrm{d}t\\ \phantom{\rule{1em}{0ex}}=\mathbf{0}\phantom{\rule{1em}{0ex}}\text{for all}t0,\mathrm{\Omega}\subset {\mathbb{R}}^{n},\end{array}

(3)

which gives a system of partial differential equations for the density function **d**:

{\partial}_{t}\mathbf{d}+{div}_{\mathbf{x}}\mathbf{f}(\mathbf{d})=\mathbf{0}\phantom{\rule{1em}{0ex}}\text{for all}t0,\mathbf{x}\in {\mathbb{R}}^{n}.

(4)

With an initial condition \mathbf{d}(\mathbf{x},0)={\mathbf{d}}_{0}(\mathbf{x}), \mathbf{x}\in {\mathbb{R}}^{n}, this is called *the Cauchy problem*.

In order to illustrate the connection of hydrodynamical applications to this formalism, we express the Euler equations in the form (4). The appearing variables are the gaseous density \rho (\mathbf{x},t), the gas velocity \mathbf{u}(\mathbf{x},t), the inner energy \u03f5(\mathbf{x},t) and the gaseous pressure tensor \mathbf{P}(\mathbf{x},t). Considering the differential form (4), we recognize the continuity equation, the equation of motion and the energy equation as the components of the hyperbolic problem. In case of the most relevant problem, that of 3D hydrodynamics, the density and its flux are given as

\mathbf{d}=\left(\begin{array}{c}\rho \\ \rho \mathbf{u}\\ \rho \u03f5\end{array}\right)\in {\mathbb{R}}^{5},\phantom{\rule{1em}{0ex}}\mathbf{f}(\mathbf{d})=\left(\begin{array}{c}\rho {\mathbf{u}}^{\mathrm{T}}\\ \rho \mathbf{u}{\mathbf{u}}^{\mathrm{T}}+\mathbf{P}\\ \rho \u03f5\mathbf{u}+{(\mathbf{P}\mathbf{u})}^{\mathrm{T}}\end{array}\right)\in {\mathbb{R}}^{5\times 3}.

(5)

For a given coordinate system with base vectors {\mathbf{e}}_{i}, the tensorial fields are given explicitly as (using the Einstein notation)

\mathbf{d}=\left(\begin{array}{c}\rho \\ \rho {u}^{i}{\mathbf{e}}_{i}\\ \rho \u03f5\end{array}\right),\phantom{\rule{1em}{0ex}}\mathbf{f}(\mathbf{d})=\left(\begin{array}{c}\rho {u}^{i}{\mathbf{e}}_{i}^{\mathrm{T}}\\ (\rho {u}^{i}{u}^{j}+{P}^{ij}){\mathbf{e}}_{i}{\mathbf{e}}_{j}^{\mathrm{T}}\\ (\rho \u03f5{u}^{i}+{P}_{j}^{i}{u}^{j}){\mathbf{e}}_{i}^{\mathrm{T}}\end{array}\right).

(6)

The gaseous pressure tensor can be assumed to be isotropic in most applications, which means that \mathbf{P}={g}^{ij}p where p(\mathbf{x},t) is the scalar gas pressure and {g}^{ij}={{\mathbf{e}}^{i}}^{\mathrm{T}}{\mathbf{e}}^{j} the contravariant metric tensor. In case of adaptive grids the base vectors are time-dependent as well, i.e., {\mathbf{e}}_{i}={\mathbf{e}}_{i}(\mathbf{x},t).

Since even the simplest one-dimensional scalar conservation laws like the Burgers’ equation have classical solutions only in some special cases, one has to broaden the considered function space of possible solutions. For the so-called weak solutions, we appeal to generalized functions where the discontinuities are defined properly. The generalized concept of differentiation of distributions shifts the operations to test functions \gamma :{\mathbb{R}}^{n}\times {\mathbb{R}}^{+}\supset G\to \mathbb{R} (*G* open) which are infinitely differentiable and have a compact support (meaning that for each *γ* there exists a closed and bounded subset *K* such that \gamma (\mathbf{x},t)=0 for all x\in G\setminus K). We denote this space of test functions by D(G). In this generalized space of solutions the Cauchy problem (3) is written as

{\int}_{t\ge 0}{\int}_{{\mathbb{R}}^{n}}({\partial}_{t}\mathbf{d}+{div}_{\mathbf{x}}\mathbf{f}(\mathbf{u}))\gamma \phantom{\rule{0.2em}{0ex}}\mathrm{d}V\phantom{\rule{0.2em}{0ex}}\mathrm{d}t=0\phantom{\rule{1em}{0ex}}\text{for all}\gamma \in D(G).

The weak formulation of the conservation law (3) is obtained by shifting the derivatives to the test functions by partial integration, and by using the compactness of the support. We get that the following has to hold for each \gamma \in D(G):

\begin{array}{r}{\int}_{t\ge 0}{\int}_{{\mathbb{R}}^{n}}(\mathbf{d}{\partial}_{t}\gamma +\mathbf{f}(\mathbf{d}){\mathrm{\nabla}}_{\mathbf{x}}\gamma )\phantom{\rule{0.2em}{0ex}}\mathrm{d}V\phantom{\rule{0.2em}{0ex}}\mathrm{d}t\\ \phantom{\rule{1em}{0ex}}=-{\int}_{{\mathbb{R}}^{n}}\gamma (\mathbf{x},0){\mathbf{d}}_{0}(\mathbf{x})\phantom{\rule{0.2em}{0ex}}\mathrm{d}V.\end{array}

(7)

The function \mathbf{d}\in {L}^{\mathrm{\infty}} is called a weak solution of the PDE (4), if it satisfies (7) and \mathbf{d}\in U with {\mathbf{d}}_{0}\in {L}^{\mathrm{\infty}}. However, there is a small drawback. This weak solution is not necessarily unique and usually further constraints have to be imposed in order to guarantee its uniqueness. This leads us to the actual topic of this paper.

### 1.2 Introduction to artificial viscosity

For most physical problems it is sufficient to look for weak solutions from the function space of piecewise continuously differentiable functions. Constraining the space of solutions in this way, we call the physical variables **d** weak solutions of the Cauchy problem (4), if they are classical solutions wherever they are continuously differentiable, and if at discontinuities (shocks) they satisfy additional conditions in order to be physically reasonable (we elaborate on these conditions below).

The mathematical theory provides several techniques to distinguish physically valuable solutions out of a manifold of mathematically possible. One method is to add an artificial viscosity term to the right-hand side of (4), to get the equation:

{\partial}_{t}\mathbf{d}+{div}_{\mathbf{x}}\mathbf{f}(\mathbf{d})=\epsilon \nu \mathrm{\Delta}\mathbf{d},\phantom{\rule{1em}{0ex}}\epsilon >0

(8)

and then consider the limiting case \epsilon \to 0. This idea is motivated by physical diffusion which broadens sincere discontinuities to differentiable steep gradients at the (microscopic) length scale of the mean free path of the particles. The physical solution of the weakly formulated problem is thus the zero diffusion limit of the diffusive problem. However, in practice this limit is difficult to calculate analytically and hence simpler conditions have to be found. A common technique to do this is motivated by continuum physics as well. Here an additional conservation law is set to hold for another quantity - the entropy of the fluid flow - as long as the solution remains smooth. Moreover, it is known that along admissible shocks this physical variable never decreases, and the conservation law for the entropy can be formulated as an inequality.

We denote the (scalar valued) entropy function by \sigma (\mathbf{d}) and the entropy flux function by \varphi (\mathbf{d}), and they satisfy

{\partial}_{t}\sigma (\mathbf{d})+{div}_{\mathbf{x}}\varphi (\mathbf{d})=0.

(9)

Assuming the functions to be differentiable, we may rewrite this conservation law via the chain rule and the equation (4) as

{\mathrm{\nabla}}_{\mathbf{d}}\sigma (\mathbf{d}){div}_{\mathbf{x}}\mathbf{f}(\mathbf{d})={div}_{\mathbf{x}}\varphi (\mathbf{d}),

(10)

where in higher-dimensional case the appearing matrices of gradients have to fulfill further constraints, see e.g. Godlewski and Raviart ([1992]). For scalar equations, it is always possible to find an entropy function of this kind. Furthermore it is assumed that the entropy function is convex, i.e.

{\mathrm{\nabla}}_{\mathbf{d}}^{2}\sigma >0,\phantom{\rule{1em}{0ex}}\text{for all}\mathbf{d}\in U.

(11)

To get our actual entropy condition, we first rewrite our entropical conservation law (9) in the viscous form

{\partial}_{t}\sigma (\mathbf{d})+{div}_{\mathbf{x}}\varphi (\mathbf{d})=\epsilon {\mathrm{\nabla}}_{\mathbf{d}}\sigma (\mathbf{d})\mathrm{\Delta}\mathbf{d}.

(12)

Integrating over an arbitrary time interval [{t}_{0},{t}_{1}] and a connected set \mathrm{\Omega}\subset {\mathbb{R}}^{n}, and using partial integration, we find that

\begin{array}{r}{\int}_{{t}_{0}}^{{t}_{1}}{\int}_{\mathrm{\Omega}}({\partial}_{t}\sigma (\mathbf{d})+{div}_{\mathbf{x}}\varphi (\mathbf{d}))\phantom{\rule{0.2em}{0ex}}\mathrm{d}V\phantom{\rule{0.2em}{0ex}}\mathrm{d}t\\ \phantom{\rule{1em}{0ex}}=\epsilon {\int}_{{t}_{0}}^{{t}_{1}}{\int}_{\partial \mathrm{\Omega}}({\mathrm{\nabla}}_{\mathbf{x}}\mathbf{d}{\mathrm{\nabla}}_{\mathbf{d}}\sigma (\mathbf{d}))\cdot \mathbf{n}\phantom{\rule{0.2em}{0ex}}\mathrm{d}S\phantom{\rule{0.2em}{0ex}}\mathrm{d}t\\ \phantom{\rule{2em}{0ex}}-\epsilon {\int}_{{t}_{0}}^{{t}_{1}}{\int}_{\mathrm{\Omega}}{\mathrm{\nabla}}_{\mathbf{x},i}\mathbf{d}{\mathrm{\nabla}}^{2}\sigma (\mathbf{d}){\mathrm{\nabla}}_{\mathbf{x},i}\mathbf{d}\phantom{\rule{0.2em}{0ex}}\mathrm{d}V\phantom{\rule{0.2em}{0ex}}\mathrm{d}t,\phantom{\rule{1em}{0ex}}{\mathrm{\nabla}}^{2}\sigma (\mathbf{d})>0.\end{array}

(13)

When we now consider the non-diffusive limit \epsilon \to 0, the first term on the right-hand side vanishes without further restriction whereas the second term has to remain non-positive. Then, using partial integration and the divergence theorem we obtain the entropy condition

\begin{array}{rl}{\int}_{\mathrm{\Omega}}\sigma (\mathbf{d}(\mathbf{x},{t}_{1}))\phantom{\rule{0.2em}{0ex}}\mathrm{d}V\le & {\int}_{\mathrm{\Omega}}\sigma (\mathbf{d}(\mathbf{x},{t}_{0}))\phantom{\rule{0.2em}{0ex}}\mathrm{d}V\\ -{\int}_{{t}_{0}}^{{t}_{1}}{\int}_{\partial \mathrm{\Omega}}\varphi (\mathbf{d})\cdot \mathbf{n}\phantom{\rule{0.2em}{0ex}}\mathrm{d}S\phantom{\rule{0.2em}{0ex}}\mathrm{d}t.\end{array}

(14)

For bounded, continuous pointwise solutions {\mathbf{d}}^{\ast} of (12) such that {\mathbf{d}}^{\ast}\to \mathbf{d} for \epsilon \to 0, the vanishing viscosity solution **d** is a weak solution of the initial value problem (3) and fulfills entropy condition (14). Generally spoken, applying the entropy condition to systems with shock solutions unveils those propagation velocities that ensure that no characteristics rise from discontinuities which would be non-physical. For detailed motivation, stringent argumentation and proofs to mathematical techniques presented in this section we refer to Harten et al. ([1976]) and LeVeque ([1991]).

### 1.3 Numerical artificial viscosity

As mentioned we are looking for high-resolution methods for nonlinear PDEs derived from hyperbolic conservation laws. In the past decades major efforts have been made in developing numerical methods for these problems that are at least of second order. One patent attempt to finding such a high-resolution method is to adapt a well-known high-order method for linear problems for nonlinear problems (such as the Lax-Wendroff scheme (Lax and Wendroff [1960])).

As illustrated above we can add an artificial viscosity term to the conservation law in a way that the entropy condition is satisfied and non-physical solutions are excluded. The viscosity term has to be designed in such a manner that it affects sincere discontinuities but vanishes sufficiently elsewhere so that the order of accuracy can be maintained in those regimes where the solution is smooth. The idea of numerical artificial viscosity was inspired by physical dissipation mechanisms and dates back more than half a century to von Neumann and Richtmyer ([1950]).

We denote as customary the approximate solution of the exact density \mathbf{d}(x,t) at discrete grid points \mathbf{d}({x}_{j},{t}_{n}) by {\mathbf{D}}_{j}^{n}, and set \mathbf{D}={[{\mathbf{D}}_{1}\phantom{\rule{0.25em}{0ex}}\cdots \phantom{\rule{0.25em}{0ex}}{\mathbf{D}}_{k}]}^{\mathrm{T}}, where *k* is the total number of grid points. The numerical representation of the flux function \mathbf{f}(\mathbf{d}) is denoted respectively by \mathbf{F}(\mathbf{D}), where {[\mathbf{F}(\mathbf{D})]}_{j}=\mathbf{f}({\mathbf{D}}_{j}). The numerical flux function gets modified by a an artificial viscosity \mathbf{Q}{[\mathbf{D}]}_{j} for instance in the following way:

{[{\mathbf{F}}_{\mathrm{visc}}(\mathbf{D})]}_{j}={[\mathbf{F}(\mathbf{D})]}_{j}-h{[\mathbf{Q}(\mathbf{D})]}_{j}({\mathbf{D}}_{j+1}-{\mathbf{D}}_{j}),

(15)

where *h* denotes the resolution of the spatial discretization, h={x}_{j+1}-{x}_{j}. Since the original design of the additional viscous pressure in the scalar form, Q=c\rho {(\mathrm{\Delta}\mathbf{u})}^{2}, c\in \mathbb{R}, as suggested in von Neumann and Richtmyer ([1950]) for one-dimensional advection {\partial}_{t}\mathbf{d}+a{\partial}_{x}\mathbf{d}=Q{\partial}_{xx}\mathbf{d}, it has undergone a number of modifications and generalizations. It has turned out to be numerically preferable to add a linear term (see Landshoff ([1955])) in order to control oscillations. Generalizations to multi-dimensional flows mostly retain the original analogy to physical dissipation and reformulate the velocity term accordingly, see e.g. Wilkins ([1980]).

The artificial viscosity broadens shocks to steep gradients at some characteristic length scale, but should not cause too large smearing. The concrete composition and implementation of this artificial viscosity coefficient **Q** depends on the application. As an example we discuss the following form of the tensor of the artificial viscosity in higher-dimensional RHD numerics. Similar forms of artificial viscosity can be found also in pure hydrodynamics and MHD calculations in 2D and 3D.

Tscharnuter and Winkler ([1979]) pointed out that the viscous pressure in 3D radiation hydrodynamics has to unravel the normal stress, quantified by the divergence of the velocity field and the shear stress, which is expressed by the symmetrized gradient of the velocity field according to the general theory of viscosity. It is designed to switch on only in case of compression ({div}_{\mathbf{x}}\mathbf{u}<0), and this is all ensured by the form

\mathbf{Q}=-{q}_{2}^{2}{l}_{\mathrm{visc}}^{2}\rho max(-{div}_{\mathbf{x}}\mathbf{u},0)({[\mathrm{\nabla}\mathbf{u}]}_{s}-\frac{1}{3}\mathbf{e}{div}_{\mathbf{x}}\mathbf{u}),

(16)

where the symmetrization rule is defined componentwise for the lower indices as

{\left({[\mathrm{\nabla}\mathbf{u}]}_{s}\right)}_{ij}=\frac{1}{2}({\mathrm{\nabla}}_{i}{u}_{j}+{\mathrm{\nabla}}_{j}{u}_{i}).