# A Class of Well-Balanced Algorithms for Relativistic Fluids on a Schwarzschild Background

Philippe G. LeFloch¹ · Carlos Parés² · Ernesto Pimentel-García²

Received: 8 December 2020 / Revised: 23 July 2021 / Accepted: 25 July 2021 /

Published online: 16 August 2021

© The Author(s) 2021

## Abstract

For the evolution of a compressible fluid in spherical symmetry on a Schwarzschild curved background, we design a class of well-balanced numerical algorithms up to third-order accuracy. We treat both the relativistic Burgers–Schwarzschild model and the relativistic Euler–Schwarzschild model and take advantage of the explicit or implicit forms available for the stationary solutions of these models. Our schemes follow the finite volume methodology and preserve the stationary solutions. Importantly, they allow us to investigate the global asymptotic behavior of such flows and determine the asymptotic behavior of the mass density and velocity field of the fluid.

**Keywords** Compressible fluid · Relativistic flow · Schwarzschild black hole · Well-balanced algorithm · Asymptotic behavior

## Contents

<table><tr><td>1 Introduction</td><td>2</td></tr><tr><td>2 Well-Balanced Methodology and Strategy Proposed in this Paper</td><td>3</td></tr><tr><td>3 Burgers–Schwarzschild Model: Designing the Numerical Algorithm</td><td>7</td></tr><tr><td>4 Burgers–Schwarzschild Model: A Numerical Study</td><td>12</td></tr><tr><td>5 Euler–Schwarzschild Model: Designing the Numerical Algorithm</td><td>26</td></tr><tr><td>6 Euler–Schwarzschild Model: A Numerical Study</td><td>30</td></tr><tr><td>References</td><td>43</td></tr></table>

<figure><img src="image_1.png" /></figure>

Ernesto Pimentel-García
erpigar@uma.es

Philippe G. LeFloch
contact@philippelefloch.org

Carlos Parés
pares@uma.es

1 Laboratoire Jacques-Louis Lions & Centre National de la Recherche Scientifique, Sorbonne Université, 4 Place Jussieu, 75252 Paris, France

2 Departamento de Análisis Matemático, Estadística e Investigación Operativa, y Matemática aplicada, Universidad de Málaga, Bulevar Louis Pasteur, 31, 29010 Málaga, Spain
# 1 Introduction

We are interested in the numerical approximation and the long time behavior of relativistic compressible fluid flows on a Schwarzschild black hole background. The flow is assumed to enjoy spherical symmetry and therefore we deal with nonlinear hyperbolic systems of partial differential equations (PDEs) in one space variable. This paper is twofold: on the one hand, designing and testing numerically finite volume algorithms that are well-balanced; on the other to perform a thorough investigation of the behavior of the solutions and numerically infer definite conclusions about the long-time behavior of such flows. Our study should provide first and useful insights for, on the one hand, further development concerning the mathematical analysis of the models and, on the other hand, further investigations to the same problem in higher dimensions without symmetry restriction.

Two models are of interest in the present paper. We treat first the *relativistic Burgers–Schwarzschild model* (as it is called in [15,16]):

$$v_t + F(v, r)_r = S(v, r), \quad t \ge 0, \ r > 2M, \qquad (1.1a)$$

where $v = v(t, r) \in [-1, 1]$ is the unknown function and the flux and source terms read

$$F(v, r) = \left(1 - \frac{2M}{r}\right) \frac{v^2 - 1}{2}, \quad S(v, r) = \frac{2M}{r^2} (v^2 - 1), \qquad (1.1b)$$

while the constant $M > 0$ represents the mass of the black hole. Obviously, the speed of propagation for this scalar balance law reads

$$\partial_v F(v, r) = \left(1 - \frac{2M}{r}\right)v, \qquad (1.2)$$

which vanishes at the boundary $r = 2M$, so that no boundary condition is required in order to pose the Cauchy problem.

Next, we consider the *relativistic Euler–Schwarzschild model* (as it is called in [15,16]):

$$V_t + F(V, r)_r = S(V, r), \quad t \ge 0, \ r > 2M, \qquad (1.3a)$$

whose unknowns are the fluid density $\rho = \rho(t, r) \ge 0$ and the normalized velocity $v = v(t, r) \in (-1, 1)$. These functions are defined for all $r > 2M$ and the limiting values $v = \pm 1$ being reached at the boundary $r = 2M$ only, and

$$V = \begin{pmatrix} V^0 \\ V^1 \end{pmatrix} = \begin{pmatrix} \frac{1 + k^2 v^2}{1 - v^2} \rho \\ \frac{1 + k^2}{1 - v^2} \rho v \end{pmatrix}, \quad F(V, r) = \begin{pmatrix} \left(1 - \frac{2M}{r}\right) \frac{1 + k^2}{1 - v^2} \rho v \\ \left(1 - \frac{2M}{r}\right) \frac{v^2 + k^2}{1 - v^2} \rho \end{pmatrix}. \qquad (1.3b)$$

$$S(V, r) = \begin{pmatrix} -\frac{2}{r} \left(1 - \frac{2M}{r}\right) \frac{1 + k^2}{1 - v^2} \rho v \\ \frac{-2r + 5M}{r^2} \frac{v^2 + k^2}{1 - v^2} \rho - \frac{M}{r^2} \frac{1 + k^2 v^2}{1 - v^2} \rho + 2 \frac{r - 2M}{r^2} k^2 \rho \end{pmatrix}, \qquad (1.3c)$$

with

$$v = \frac{1 + k^2 - \sqrt{(1 + k^2)^2 - 4k^2 \left(\frac{V^1}{V^0}\right)^2}}{2k^2 \frac{V^1}{V^0}}, \quad \rho = \frac{V^1(1 - v^2)}{v(1 + k^2)}. \qquad (1.3d)$$
Here, $k \in (-1, 1)$ denotes the (constant) speed of sound, and this second model can be checked to be a strictly hyperbolic system. The eigenvalues of the corresponding Jacobian of the flux function read

$$ \mu_{\pm} = \left(1 - \frac{2M}{r}\right) \frac{v \pm k}{1 \pm k^2 v} \qquad (1.4) $$

As usual, a state $(\rho, v)$, by definition, is said to be *sonic* if one of the eigenvalues vanishes, i.e. if $|v| = k$, *supersonic* if both eigenvalues have the same sign, i.e. if $|v| > k$, or *subsonic* if the eigenvalues have different signs, i.e. if $|v| < k$. We will need to distinguish between these regimes in order to design a robust scheme for this model. Both eigenvalues $\mu_{\pm}$ vanish at the boundary $r = 2M$, so that no boundary condition is required in order to pose the Cauchy problem.

In order to be able of running reliable and accurate numerical simulations for these two models, in this paper we design shock-capturing, high-order, and well-balanced finite volume methods of first- and second-order of accuracy (and even third-order accurate for (1.1)). Specifically, we extend to the present problem the well-balanced methodology proposed recently by Castro and Parés [7] for nonlinear hyperbolic systems of balance laws. For earlier work on well-balanced schemes we also refer to [5,19,20] and, concerning the design of geometry-preserving schemes, we refer for instance to [1–3,6,9–11,18,22] and the references therein.

The properties of the stationary solutions play a fundamental role in the design of well balanced schemes, as well as in the study of the long time behavior of solutions. We thus also built here upon earlier investigations by LeFloch and collaborators [14–16] on the theory and approximation of the relativistic Burgers- and Euler–Schwarzschild model (1.1) and (1.3). Remarkably, the stationary solutions to both models are available in explicit or implicit form.

An outline of the content of this paper is as follows.

In Sect. 2 we describe the methodology for this paper and indicate the challenges met with the two models above. The actual design of the schemes is the content of Sect. 3 (Burgers equation) and Sect. 5 (Euler equations). The proposed well-balanced algorithms, by construction, preserve all of the steady state solutions, which is an essential property since numerical methods without this property may lead to wrong conclusions. Furthermore, for each model we investigate the efficiency, accuracy, and robustness of the proposed algorithms first in Sect. 4 (Burgers equation) and Sect. 6 (Euler equations). Our numerical experiments below make comparisons between well-balanced and standard methods, and we demonstrate that the proposed schemes are numerically well-balanced and we emphasize the importance of this property in order to reach reliable results. Furthermore, we study the late time behavior of solutions to both models and discuss the role of the choice of the value of the initial data at the boundary. Finally, we also describe how steady shocks behave under small (or large) perturbations. In short, we demonstrate that the global dynamics can be accurately determined by the proposed algorithms and we reach some definite conclusions in Sects. 4.6 and 6.5, respectively. Further details concerning our methodology and conclusions are found in the corresponding sections for each model.

## 2 Well-Balanced Methodology and Strategy Proposed in this Paper

**General methodology.** Both problems of interest are of the form

$$ V_t + F(V, r)_r = S(V, r), \quad r > 2M, \qquad (2.1) $$
with unknown $V = V(t, r) \in \mathbb{R}^N$ and $N = 1$ or 2. Systems of this form have non-trivial stationary solutions, which satisfy the ODE

$$F(V, r)_r = S(V, r). \qquad (2.2)$$

Our goal is to introduce a family of numerical methods that are well-balanced, i.e. that preserve the stationary solutions in a sense to be specified. We follow the strategy in [7] to which we refer for further details and arguments of proof.

We consider semi-discrete finite volume numerical methods of the form

$$\frac{dV_i}{dt} = -\frac{1}{\Delta r} \left( F_{i+\frac{1}{2}} - F_{i-\frac{1}{2}} - \int_{r_{i-\frac{1}{2}}}^{r_{i+\frac{1}{2}}} S(\mathbb{P}_i^t(r), r) dr \right), \qquad (2.3)$$

and the following notation is used:

* $I_i = [r_{i-\frac{1}{2}}, r_{i+\frac{1}{2}}]$ denote the computational cells, whose length $\Delta r$ is taken to be a constant for the sake of simplicity in the presentation.

* $V_i(t)$ denotes the approximate average of the exact solution in the $i$th cell at the time $t$, that is,

$$V_i(t) \approx \frac{1}{\Delta r} \int_{r_{i-\frac{1}{2}}}^{r_{i+\frac{1}{2}}} V(r, t) dr. \qquad (2.4)$$

* $\mathbb{P}_i^t(r)$ denotes the approximate solution in the $i$th cell, as given by a high-order reconstruction operator based on the cell averages $\{V_i(t)\}$, that is, $\mathbb{P}_i^t(r) = \mathbb{P}_i^t(r; \{V_j(t)\}_{j \in S_i})$. Here, $S_i$ denotes the set of cell indices associated with the stencil of the $i$th cell.

* The flux terms are denoted by $F_{i+\frac{1}{2}} = \mathbb{F}(V_{i+\frac{1}{2}}^{t,-}, V_{i+\frac{1}{2}}^{t,+}, r_{i+\frac{1}{2}})$, where $V_{i+\frac{1}{2}}^{t, \pm}$ are the reconstructed states at the interfaces, i.e.

$$V_{i+\frac{1}{2}}^{t,-} = \mathbb{P}_i^t(r_{i+\frac{1}{2}}), \quad V_{i+\frac{1}{2}}^{t,+} = \mathbb{P}_{i+1}^t(r_{i+\frac{1}{2}}). \qquad (2.5)$$

Here, $\mathbb{F}$ is a consistent numerical flux, i.e. a continuous function $\mathbb{F}: \mathbb{R}^N \times \mathbb{R}^N \times (2M, +\infty) \to \mathbb{R}^N$ satisfying $\mathbb{F}(V, V, r) = F(V, r)$ for all $V, r$.

Furthermore, given a stationary solution $V^*$ of (2.1), we use the following terminology.

* The numerical method (2.3) is said to be well-balanced for $V^*$ if the vector of cell averages of $V^*$ is an equilibrium of the ODE system (2.3).

* The reconstruction operator is said to be well-balanced for $V^*$ if, for every $i$, we have $\mathbb{P}_i^t(r) = V^*(r)$ for all $r \in [r_{i-\frac{1}{2}}, r_{i+\frac{1}{2}}]$, where $\mathbb{P}_i^t$ is the approximation of $V^*$ obtained by applying the reconstruction operator to the vector of cell averages of $V^*$.

It is easily checked that, if the reconstruction operator is well-balanced for a continuous stationary solution $V^*$ of (2.1) then the numerical method is also well-balanced for $V^*$. The following strategy to design a well-balanced reconstruction operator $\mathbb{P}_i$ on the basis of a standard operator $\mathbb{Q}_i$ was introduced in [5]:

Given a family of cell values $\{V_i\}$, in every cell $I_i = [r_{i-\frac{1}{2}}, r_{i+\frac{1}{2}}]$ we proceed as follows.

1. Seek, (whenever possible), a stationary solution $V_i^*(x)$ defined in the stencil of cell $I_i$ $(\cup_{j \in S_i} I_j)$ such that

$$\frac{1}{\Delta r} \int_{r_{i-\frac{1}{2}}}^{r_{i+\frac{1}{2}}} V_i^*(r) dr = V_i. \qquad (2.6)$$

If such a solution does not exist, take $V_i^* \equiv 0$.
2. Apply the reconstruction operator to the cell values {$W_j$}$_{j \in S_i}$ given by

$$W_j = V_j - \frac{1}{\Delta r} \int_{r_{j-\frac{1}{2}}}^{r_{j+\frac{1}{2}}} V_i^*(r) dr, \quad j \in S_i, \qquad (2.7)$$

in order to obtain $Q_i(r) = Q_i(r; \{W_j\}_{j \in S_i})$.

3. Define finally

$$\mathbb{P}_i(r) = V_i^*(r) + Q_i(r). \qquad (2.8)$$

It can be then easily shown that the reconstruction operator $\mathbb{P}_i$ in (2.8) is well-balanced for every stationary solution provided that the reconstruction operator $Q_i$ is exact for the zero function. Moreover, if $Q_i$ is conservative then $\mathbb{P}_i$ is conservative, in the sense that

$$\frac{1}{\Delta r} \int_{r_{i-\frac{1}{2}}}^{r_{i+\frac{1}{2}}} \mathbb{P}_i(r) dr = V_i, \qquad (2.9)$$

and $\mathbb{P}_i$ has the same accuracy as $Q_i$ if the stationary solutions are sufficiently regular.

Observe that, if there does not exists a stationary solution defined in the stencil and satisfying (2.6) then the standard reconstruction is used. Observe that this choice does not spoil the well-balanced character of the numerical method since, in this case, the cell values in the stencil cannot be the averages of a stationary solution (otherwise, there would be at least one solution $V_i^*$) and therefore there exists no local equilibrium which would be required to preserve. On the other hand, if there exist more than one stationary solution defined on the stencil and satisfying (2.6), a criterion is needed in order to select one of them and indeed this sometimes happen for the Euler–Schwarzschild model of interest in the present paper. The relevant criterion in this regime depends on the particular problem and, in the case of the Euler–Schwarzschild model, we propose to distinguish between the (subsonic or supersonic) regimes of the flow, as we will explain later in Sect. 5.

If a quadrature formula (whose order of accuracy must be greater or equal to the one of the reconstruction operator)

$$\int_{r_{i-\frac{1}{2}}}^{r_{i+\frac{1}{2}}} f(x) dx \approx \Delta r \sum_{l=0}^{q} \alpha_l f(r_{i,l})$$

where $\alpha_0, \dots, \alpha_q, r_{i,0}, \dots, r_{i,q}$ represent the weights and the nodes of the formula, is used to compute the averages of the initial condition, namely $V_{i,0} = \sum_{l=0}^{q} \alpha_l V_0(r_{i,l})$, the reconstruction procedure has to be modified to preserve the well-balanced property: Steps 1 and 2 have to be replaced by the following ones.

1. Seek, if possible, the stationary solution $V_i^*(x)$ defined in the stencil of cell $I_i$ ($\cup_{j \in S_i} I_j$) such that

$$\sum_{l=0}^{q} \alpha_l V_i^*(r_{i,l}) = V_i. \qquad (2.10)$$

If this solution does not exist, take $V_i^* \equiv 0$.

2. Apply the reconstruction operator to the cell values {$W_j$}$_{j \in S_i}$ given by

$$W_j = V_j - \sum_{l=0}^{q} \alpha_l V_i^*(r_{j,l}), \quad j \in S_i.$$
For first- or second-order methods, if the midpoint rule is selected to compute the initial averages, i.e. $V_{i,0} = V_0(r_i)$, then at the first step of the reconstruction procedure, the problem (2.10) reduces to finding the stationary solution satisfying

$$V_i^*(r_i) = V_i. \qquad (2.11)$$

The well-balanced property of the method can be lost if the quadrature formula is used to compute the integral appearing at the right-hand side of (2.3). In order to circumvent this difficulty, in [7] it is proposed to rewrite the methods as follows:

$$\begin{aligned} \frac{dV_i}{dt} = & -\frac{1}{\Delta r} \left( F_{i+\frac{1}{2}} - F \left( V_i^{t,*}(r_{i+\frac{1}{2}}), r_{i+\frac{1}{2}} \right) - F_{i-\frac{1}{2}} + F \left( V_i^{t,*}(r_{i-\frac{1}{2}}), r_{i-\frac{1}{2}} \right) \right) \\ & + \frac{1}{\Delta r} \int_{r_{i-\frac{1}{2}}}^{r_{i+\frac{1}{2}}} \left( S(\mathbb{P}_i^t(r), r) - S(V_i^{t,*}(r), r) \right) dr, \end{aligned} \qquad (2.12)$$

where $V_i^{t,*}$ is the function selected in Step 1 for the ith cell at time t. In this equivalent form, a quadrature formula can be applied to the integral without losing the well-balanced property, and this leads to a numerical method of the form:

$$\begin{aligned} \frac{dV_i}{dt} = & -\frac{1}{\Delta r} \left( F_{i+\frac{1}{2}} - F \left( V_i^{t,*}(r_{i+\frac{1}{2}}), r_{i+\frac{1}{2}} \right) - F_{i-\frac{1}{2}} + F \left( V_i^{t,*}(r_{i-\frac{1}{2}}), r_{i-\frac{1}{2}} \right) \right) \\ & + \sum_{l=0}^{q} \alpha_l \left( S(\mathbb{P}_i^l(r_{i,l}), r_{i,l}) - S(V_i^{t,*}(r_{i,l}), r_{i,l}) \right). \end{aligned} \qquad (2.13)$$

First-order well-balanced methods are obtained by selecting the trivial constant piecewise reconstruction operator as the standard one, i.e.

$$\mathbb{Q}_i(r, V_i) = V_i, \quad r \in [r_{i-\frac{1}{2}}, r_{i+\frac{1}{2}}]. \qquad (2.14)$$

It can be easily checked that the numerical method then reduces to

$$\frac{dV_i}{dt} = -\frac{1}{\Delta r} \left( F_{i+\frac{1}{2}} - F \left( V_i^{t,*}(r_{i+\frac{1}{2}}), r_{i+\frac{1}{2}} \right) - F_{i-\frac{1}{2}} + F \left( V_i^{t,*}(r_{i-\frac{1}{2}}), r_{i-\frac{1}{2}} \right) \right), (2.15)$$

where $F_{i+\frac{1}{2}} = \mathbb{F}(V_i^*(r_{i+\frac{1}{2}}), V_{i+1}^*(r_{i+\frac{1}{2}}), r_{i+\frac{1}{2}})$.

**Further strategy for this paper.** When applying the well-balanced reconstruction methodology, a main difficulty comes from the first step, in which we need to find a stationary solution (i.e. a solution of the ODE system (2.2)) satisfying (2.6), (2.10), or (2.11), and this depends upon the way that the relevant integrals are computed. This amounts, in general, to a non-trivial, nonlinear problem whose analysis and solution depend on the system of balance laws under consideration.

For the Burgers–Schwarzschild model, the explicit form of the general solution of the ODE (2.2) is available (as we recall in Sect. 3) and the nonlinear problem to be solved in Step 1 has always a unique solution $v_i^*$. Nevertheless, it may not be possible to extend this solution to the whole stencil and, in such a case, the standard reconstruction operator must then be used.

For the Euler–Schwarzschild model, only first and second-order methods will be considered in the present paper, and the mid-point rule will be used in order to numerically compute the relevant integrals. As a consequence, only solutions of the ODE system (2.2) satisfying (2.11) (i.e. solutions of a standard Cauchy problem) should be found in Step 1. Now, the general solution of the ODE system is available in implicit form (as we will recall in Sect. 5).
and, for this system, the Cauchy problem (2.2), (2.11) may have a single solution or no solutions as well as two or more solutions. If there exists no solution, the standard reconstruction is used. If there are two or more solutions, a criterion based on the (subsonic, supersonic) nature of the fluid flow will be used in order to select one of them, as mentioned above.

This methodology can be extended to systems of balance laws for which the solutions to the ODE system (2.2) are not available neither in explicit or implicit form. For such system, the nonlinear problems arising in Step 1 must be solved numerically. For instance, in [12] a control-based strategy combined with a standard ODE solver is used and solutions of (2.2) are computed that satisfy averaging conditions like (2.6) or (2.10).

Concerning the extension to multidimensional problems, the main challenge is again the problem in Step 1, which now consists in finding a solution to the nonlinear system of PDEs satisfied by the stationary solutions with prescribed average in the cell or from values at a point. Such a problem, clearly, is much more difficult to solve (either exactly or numerically) than an ODE system. Moreover, there may exist infinitely many stationary solutions satisfying the average or point value conditions. Nevertheless, the methodology can be still applied and allows one to design numerical methods that preserve a certain family of stationary solutions. In Step 1, the stationary solution belonging to the prescribed family that satisfies the imposed condition would be selected or the one that is closer in some sense to the cell values in the stencil. For instance, it is possible to apply this methodology and design numerical methods for the Euler–Schwarzschild model in three spatial dimension and impose spherical-symmetric stationary solutions are preserved.

# 3 Burgers–Schwarzschild Model: Designing the Numerical Algorithm

## 3.1 Preliminaries

For the Burgers–Schwarzschild equation (1.1), the steady state solutions are of the form

$$v^*(r) = \pm \sqrt{1 - K^2 \left(1 - \frac{2M}{r}\right)}, \quad K > 0. \qquad (3.1)$$

In Fig. 1 we plot the steady solutions for several values of $K^2$. The domain of definition of these stationary solutions is

$$D_K = \begin{cases} [2M, \infty), & K^2 \le 1, \\ [2M, \frac{2MK^2}{K^2 - 1}], & K^2 > 1. \end{cases} \qquad (3.2)$$

It can be easily checked that, given a pair $(K, r^*)$ such that $r^* \in D_K$, the discontinuous function defined in $D_K$ by

$$w^*(r) = \begin{cases} \sqrt{1 - K^2 \left(1 - \frac{2M}{r}\right)}, & r \le r^*, \\ -\sqrt{1 - K^2 \left(1 - \frac{2M}{r}\right)}, & \text{otherwise,} \end{cases} \qquad (3.3)$$

is an entropy weak stationary solution of the Burgers–Schwarzschild model. (For further properties, see the study in [15,16].)
<figure><img src="image_2.png" /><figcaption>Fig. 1 Steady solutions to the Burgers model</figcaption></figure>

## 3.2 First-order Method

If the midpoint rule is used to compute the initial averages, at the first step of the reconstruction procedure one has to search for $K_i^2$ such that

$$ \sqrt{1 - K_i^2 \left(1 - \frac{2M}{r_i}\right)} = |v_i|. \qquad (3.4) $$

There is always a unique solution $\tilde{K}_i$ given by

$$ \tilde{K}_i^2 = \frac{1 - v_i^2}{1 - \frac{2M}{r_i}}, \qquad (3.5) $$

so that the stationary solution is

$$ v_i^*(r) = \operatorname{sgn}(v_i) \sqrt{1 - \tilde{K}_i^2 \left(1 - \frac{2M}{r}\right)}. \qquad (3.6) $$

In order to apply the numerical method (2.12), this stationary solution has to be computed at $r_{i \pm \frac{1}{2}}$ and this is only possible if $r_{i+\frac{1}{2}} \in D_{\tilde{K}_i}$, that is, provided

$$ \tilde{K}_i^2 \le 1 \text{ or } \left( \tilde{K}_i^2 > 1 \text{ and } r_{i+\frac{1}{2}} \le \frac{2M \tilde{K}_i^2}{\tilde{K}_i^2 - 1} \right). \qquad (3.7) $$

If this condition is satisfied, then the numerical method (2.15) can be used.

If this condition is not satisfied, then the standard trivial reconstruction is considered, i.e. $Q_i(r) = v_i$. The numerical method writes then as follows:

$$ \frac{dv_i}{dt} = -\frac{1}{\Delta r} \left( F_{i+\frac{1}{2}} - F_{i-\frac{1}{2}} - S(v_i, r_i) \right), \qquad (3.8) $$

where $F_{i+\frac{1}{2}} = \mathbb{F}(v_i, v_{i+1}, r_{i+\frac{1}{2}})$.
Summing up, the expression of the semi-discrete first-order method reads

$$ \frac{dv_i}{dt} = -\frac{1}{\Delta r} (F_{i+\frac{1}{2}} - F_{i-\frac{1}{2}} - S_i), \qquad (3.9) $$

where

$$ S_i = \begin{cases} F(v_i^*(r_{i+\frac{1}{2}}), r_{i+\frac{1}{2}}) - F(v_i^*(r_{i-\frac{1}{2}}), r_{i-\frac{1}{2}})), & \text{if (3.7) holds,} \\ S(v_i, r_i), & \text{otherwise.} \end{cases} \qquad (3.10) $$

The forward Euler method is used for the time discretization. Furthermore, we emphasize that, if (3.7) is not satisfied, then $v_i$ cannot be the point value of a stationary solution defined in the computational domain, so that the use of the standard reconstruction does not destroy the well-balanced property of the method, since in this case there is no stationary solution to preserve.

### 3.3 Second-order Method

Let us suppose again that the midpoint rule is used to compute the cell averages and that the minmod reconstruction operator is considered: see [21]. The stationary solution $v_i^*$ selected at the first stage of the reconstruction procedure is again (3.6) with $\tilde{K}_i$ given by (3.5). In order to compute the reconstructions, this stationary solution has to be computed at the points $r_{i-1}$, $r_{i-\frac{1}{2}}$, $r_{i+\frac{1}{2}}$, $r_{i+1}$ so that the following condition has to be satisfied $r_{i+1} \in D_{\tilde{K}_i}$, i.e.

$$ \tilde{K}_i^2 \le 1 \text{ or } \left( \tilde{K}_i^2 > 1 \text{ and } r_{i+1} \le \frac{2M \tilde{K}_i^2}{\tilde{K}_i^2 - 1} \right). \qquad (3.11) $$

If this condition is satisfied, the following step of the reconstruction procedure consists in computing the fluctuations:

$$ \begin{aligned} w_{i-1} &= v_{i-1} - \operatorname{sgn}(v_{i-1}) \sqrt{1 - \tilde{K}_i^2 \left(1 - \frac{2M}{r_{i-1}}\right)}, \\ w_i &= v_i - \operatorname{sgn}(v_i) \sqrt{1 - \tilde{K}_i^2 \left(1 - \frac{2M}{r_i}\right)} = 0, \qquad (3.12) \\ w_{i+1} &= v_{i+1} - \operatorname{sgn}(v_{i+1}) \sqrt{1 - \tilde{K}_i^2 \left(1 - \frac{2M}{r_{i+1}}\right)}. \end{aligned} $$

Then the reconstruction is defined as

$$ \mathbb{P}_i(r) = v_i^*(r) + \minmod \left( \frac{w_{i+1} - w_i}{\Delta r}, \frac{w_{i+1} - w_{i-1}}{2\Delta r}, \frac{w_i - w_{i-1}}{\Delta r} \right) (r - r_i), \qquad (3.13) $$

where

$$ \minmod(a, b, c) = \begin{cases} \min\{a, b, c\}, & a, b, c > 0, \\ \max\{a, b, c\}, & a, b, c < 0, \\ 0, & \text{otherwise.} \end{cases} \qquad (3.14) $$

Once the well-balanced reconstruction operator has been computed, the form (2.12) of the numerical method is considered and the midpoint rule is used again to approximate the
integral. Observe however that, in this case:

$$\int_{r_{i-\frac{1}{2}}}^{r_{i+\frac{1}{2}}} (S(\mathbb{P}_i^t(r), r) - S(V_i^{t,*}(r), r)) dr \cong \Delta r (S(\mathbb{P}_i^t(r_i), r_i) - S(V_i^{t,*}(r_i), r_i)) = 0.$$

Therefore, the expression (2.13) reduces again to (2.15) with $F_{i+\frac{1}{2}} = \mathbb{F}(v_{i+\frac{1}{2}}^{t,-}, v_{i+\frac{1}{2}}^{t,+}, r_{i+\frac{1}{2}})$.

If (3.11) is not satisfied, then the standard MUSCL reconstruction is applied, namely

$$\mathbb{Q}_i(r) = v_i + \minmod \left( \frac{v_{i+1} - v_i}{\Delta r}, \frac{v_{i+1} - v_{i-1}}{2\Delta r}, \frac{v_i - v_{i-1}}{\Delta r} \right) (r - r_i). \quad (3.15)$$

The expression of the numerical method is given again by (3.9)–(3.10) with the difference that the second-order reconstructions are used now to compute the numerical fluxes. The TVDRK2 method [13] is used in order to discretize the equations in time.

Observe that, according to the well-balanced reconstruction procedure described in the previous section, the fluctuations to be reconstructed should be in this case

$$w_j = v_j - v_i^*(r_j) = v_j - \operatorname{sgn}(v_i) \sqrt{1 - \tilde{K}_i^2 \left(1 - \frac{2M}{r_j}\right)}, \quad j = i-1, i, i+1,$$

but in (3.12) the sign of $v_i$ has been replaced by that of $v_j$. This modification allows one to preserve not only the continuous stationary solutions but also the discontinuous stationary solutions of the family (3.3).

## 3.4 Third-order Method

In order to design a third-order method the CWENO reconstruction of order 3 (see [8], [17]) will be considered and the two-point Gauss quadrature will be used to compute the initial averages and the integrals coming from the source term, namely $v_i^0 = \frac{1}{2}(v_0(r_{i,0}) + v_0(r_{i,1}))$, where

$$r_{i,0} = r_{i-\frac{1}{2}} + \frac{\Delta r}{2} \left( -\sqrt{\frac{1}{3}} + 1 \right), \quad r_{i,1} = r_{i-\frac{1}{2}} + \frac{\Delta r}{2} \left( \sqrt{\frac{1}{3}} + 1 \right).$$

Therefore, at the first step of the reconstruction procedure one has to look for $K_i^2$ such that:

$$\frac{1}{2} \left( \sqrt{1 - K_i^2 \left( 1 - \frac{2M}{r_{i,0}} \right)} + \sqrt{1 - K_i^2 \left( 1 - \frac{2M}{r_{i,1}} \right)} \right) = |v_i|. \quad (3.16)$$

If we define the function

$$g(x) = \frac{1}{2} \left( \sqrt{1 - x \left( 1 - \frac{2M}{r_{i,0}} \right)} + \sqrt{1 - x \left( 1 - \frac{2M}{r_{i,1}} \right)} \right), \quad x \ge 0,$$

it is easily checked that $g$ is a positive decreasing function defined in the interval $[0, K_{i,c}^2]$ with $K_{i,c}^2 = \left(1 - \frac{2M}{r_{i,1}}\right)^{-1}$. Therefore there are two possibilities:

* If $|v_i| \in [g(K_{i,c}^2), 1]$, there is a unique $\tilde{K}_i^2$ satisfying (3.16).

* In other case, (3.16) has no solution.
If (3.16) is satisfied, the corresponding stationary solution $v_i^*(r) = \operatorname{sgn}(v_i)\sqrt{1 - \tilde{K}_i^2(1 - \frac{2M}{r})}$ has to be computed in the points $\{r_{i-1,0}, r_{i-1,1}, r_{i+1,0}, r_{i+1,1}\}$ in the reconstruction procedure. Therefore, these points have to be in the interval of definition of $v_i^*$, and this happens if $r_{i+1,1} \in D_{\tilde{K}_i}$. Therefore, the well-balanced reconstruction can be computed only if the following condition is satisfied:

$$|v_i| \in [g(K_{i,c}^2), 1] \text{ and } \left( \tilde{K}_i^2 \le 1 \text{ or } \left( \tilde{K}_i^2 > 1 \text{ and } r_{i+1,1} \le \frac{2M \tilde{K}_i^2}{\tilde{K}_i^2 - 1} \right) \right). \quad (3.17)$$

If this condition is satisfied, the fluctuations can be then computed:

$$w_j = v_j - \operatorname{sgn}(v_j) \frac{1}{2} \left( \sqrt{1 - \tilde{K}_i^2 \left( 1 - \frac{2M}{r_{j,0}} \right)} + \sqrt{1 - \tilde{K}_i^2 \left( 1 - \frac{2M}{r_{j,1}} \right)} \right), \quad j = i-1, i, i+1,$$

and the well-balanced reconstruction is given by $\mathbb{P}_i(r) = v_i^*(r) + \mathbb{Q}_i(r; w_{i-1}, w_i, w_{i+1})$, where $\mathbb{Q}$ represents the CWENO approximation. On the other hand, if (3.17) is not satisfied, the standard CWENO reconstruction is applied, namely $\mathbb{Q}_i(r) = \mathbb{Q}_i(r; v_{i-1}, v_i, v_{i+1})$. The expression of the semi-discrete method is finally (3.9) where the numerical fluxes are computed at the reconstructed states and

$$S_i = \begin{cases} \frac{F(v_i^*(r_{i+\frac{1}{2}}), r_{i+\frac{1}{2}}) - F(v_i^*(r_{i-\frac{1}{2}}), r_{i-\frac{1}{2}})}{2} & \text{if (3.17) holds,} \\ \frac{\Delta r}{2} \sum_{j=0,1} (S(\mathbb{P}_i(r_{i,j}), r_{i,j}) - S(v_i^*(r_{i,j}), r_{i,j})) & \text{otherwise.} \end{cases} \quad (3.18)$$

The TVDRK3 method of order 3 [13] will be used for the time discretization.

### 3.5 Preserving the Exact Averages of the Stationary Solutions

The three methods presented above can be modified to preserve the exact averages of the stationary solutions instead of its approximation computed with a quadrature formula. To do this, the problem to be solved at the first stage of the well-balanced reconstruction procedure is the following one: find $K_i^2$ such that:

$$\frac{1}{\Delta r} \int_{r_{i-\frac{1}{2}}}^{r_{i+\frac{1}{2}}} \sqrt{1 - K_i^2 \left(1 - \frac{2M}{r}\right)} dr = |v_i|. \quad (3.19)$$

If we define the function

$$g(x) = \frac{1}{\Delta r} \int_{r_{i-\frac{1}{2}}}^{r_{i+\frac{1}{2}}} \sqrt{1 - x \left(1 - \frac{2M}{r}\right)} dr,$$

it can be easily checked that it is a decreasing function defined in $[0, K_{e,i}^2]$ where $K_{e,i}^2 = (1 - 2M/r_{i+\frac{1}{2}})^{-1}$ and $g(0) = 1$. Therefore, (3.19) has a unique solution $\tilde{K}_i^2$ if

$$|v_i| \le g(K_{e,i}). \quad (3.20)$$

The explicit expression of $g$ can be obtained: $g(x) = \frac{1}{\Delta r} (f(x, r_{i+\frac{1}{2}}) - f(x, r_{i-\frac{1}{2}}))$, where
$$f(x, r) = \begin{cases} r\sqrt{1-x(1-\frac{2M}{r})} + \frac{xM}{\sqrt{1-x}}\log\left(x(M-r)+r+\sqrt{1-xr}\sqrt{1-x(1-\frac{2M}{r})}\right), & 0 \le x < 1, \\ 2r\sqrt{\frac{2M}{r}}, & x = 1, \\ r\sqrt{1-x(1-\frac{2M}{r})} - \frac{2xM}{\sqrt{x-1}}\tan^{-1}\left(\frac{\sqrt{1-x(1-\frac{2M}{r})}}{\sqrt{x-1}}\right), & x > 1. \end{cases}$$

is a primitive function of $\sqrt{1-x(1-\frac{2M}{r})}$. Therefore $g(K_{e,i})$ can be explicitly computed.

The well-balanced reconstruction can thus be computed if (3.20) is satisfied and the cells of the stencil $S_i$ are contained in the domain of definition $D_{\tilde{K}_i}$ of the corresponding stationary solution. Otherwise, the standard reconstruction is applied. The expression of the numerical methods is the same as the ones above.

# 4 Burgers–Schwarzschild Model: A Numerical Study

## 4.1 Preliminaries

In this section several numerical tests are applied to check the performance of the well-balanced numerical methods introduced in the previous section. We consider the spatial interval $[2M, L]$ with $M = 1$ and $L = 4$, a 256-point uniform mesh and the CFL number is set to 0.5. At $r = 2M$ we impose $F_{-\frac{1}{2}} = 0$ as boundary condition since $(1 - \frac{2M}{r}) = 0$. At $r = L$ we will use a transmissive boundary condition using ghost-cells if the initial condition is not a stationary solution; otherwise, the stationary solution is imposed in the ghost-cells. The following numerical flux will be used:

$$F_{i+\frac{1}{2}} = \mathbb{F}(v_i, v_{i+1}, r_{i+\frac{1}{2}}) = \left(1 - \frac{2M}{r_{i+\frac{1}{2}}}\right) \frac{q^2(0; v_i, v_{i+1}) - 1}{2},$$

where $q(\cdot; v_L, v_R)$ is the self-similar solution of the Riemann problem for the standard Burgers equation with the initial condition

$$v_0(r) = \begin{cases} v_L, & r < 0, \\ v_R, & r > 0. \end{cases}$$

In order to check the relevance of the well-balanced property, these methods will be compared with those based on the same numerical fluxes and the standard first-, second-, or third-order reconstructions.

## 4.2 Stationary Solutions

**Positive stationary solution.** We consider the initial condition

$$v_0(r) = \sqrt{\frac{3}{4} + \frac{1}{2r}} \qquad (4.1)$$
<table><caption>**Table 1** Well-balanced versus non-well-balanced schemes: $L^1$ errors at $t = 50$ for the Burgers model with the initial condition (4.1)</caption><thead><tr><th>Scheme (256 cells)</th><th>Error (1st)</th><th>Error (2nd)</th><th>Error (3rd)</th></tr></thead><tbody><tr><td>Well-balanced</td><td>1.13E-14</td><td>8.72E-17</td><td>7.22E-14</td></tr><tr><td>Non well-balanced</td><td>1.89</td><td>1.61</td><td>8.78E-02</td></tr></tbody></table>

<figure><img src="image_3.png" /><figcaption>**Fig. 2** Burgers–Schwarzschild model with the initial condition (4.1): first-, second- and third-order well-balanced and non-well-balanced methods at various times for variable $v$</figcaption></figure>

corresponding to the positive stationary solution with $K = \frac{1}{2}$. Table 1 shows the error in $L^1$ norm between the initial condition and the numerical solution at time $t = 50$. Figure 2 compares the numerical solutions obtained with the well-balanced and the non-well-balanced methods: it can be seen how the latter are unable to capture the stationary solution. After a time that decreases with the order, the numerical solutions depart from the steady state.

**Negative stationary solution.** Let us consider now as initial condition the negative stationary condition corresponding to $K = \frac{1}{2}$:

$$v_0(r) = -\sqrt{\frac{3}{4} + \frac{1}{2r}}. \qquad (4.2)$$

Figure 3 shows the numerical solutions obtained with the different numerical methods. Observe that the scale of the vertical axis is not the same as the one in Fig. 2: it has been changed so that the difference between the numerical solutions can be better seen. Table 2 shows the error in $L^1$ norm between the initial condition and the numerical solution at time $t = 50$. According to Fig. 3 and Table 2 we need more time to see the differences between the well-balanced and non-well-balanced schemes of order 1, 2 and 3 but the errors are again much smaller with the well-balanced schemes for this test. In this case we need more time to see these differences since this negative stationary solution is close to the constant state $v(r) = -1$ where it seems that the non-well-balanced schemes converge.
<figure><img src="image_4.png" /></figure>

<figure><img src="image_5.png" /></figure>

<figure><img src="image_6.png" /><figcaption>**Fig. 3** Burgers–Schwarzschild model with the initial condition (4.2): first-, second- and third-order well-balanced and non-well-balanced methods at selected times for variable v</figcaption></figure>

<table><caption>**Table 2** Well-balanced versus non-well-balanced schemes: $L^1$ errors at $t = 50$ for the Burgers model with the initial condition (4.2)</caption><thead><tr><th>Scheme (256 cells)</th><th>Error (1st)</th><th>Error (2nd)</th><th>Error (3rd)</th></tr></thead><tbody><tr><td>Well-balanced</td><td>6.98E-16</td><td>1.24E-16</td><td>4.03E-16</td></tr><tr><td>Non well-balanced</td><td>3.92E-02</td><td>3.20E-07</td><td>1.63E-10</td></tr></tbody></table>

<table><caption>**Table 3** Well-balanced versus non-well-balanced schemes: $L^1$ errors at $t = 50$ for the Burgers model with the initial condition (4.3)</caption><thead><tr><th>Scheme (256 cells)</th><th>Error (1st)</th><th>Error (2nd)</th><th>Error (3rd)</th></tr></thead><tbody><tr><td>Well-balanced</td><td>8.68E-15</td><td>8.54E-17</td><td>7.90E-14</td></tr><tr><td>Non well-balanced</td><td>1.02</td><td>1.09</td><td>1.09</td></tr></tbody></table>

**Discontinuous stationary entropy weak solution.** Let us consider finally the discontinuous initial condition

$$v_0(r) = \begin{cases} \sqrt{\frac{3}{4} + \frac{1}{2r}}, & 2 < r < 3, \\ -\sqrt{\frac{3}{4} + \frac{1}{2r}}, & \text{otherwise,} \end{cases} \quad (4.3)$$

that is a stationary entropy weak solution of the family (3.3). Table 3 shows the error in $L^1$ norm between the initial condition and the numerical solution at time $t = 50$. Figure 4 shows the differences between the numerical solutions obtained with well-balanced and non-well-balanced methods: again the latter depart from the stationary solution at times that decrease with the order. The numerical results obtained for the equation with initial conditions (4.1), (4.2), and (4.3) clearly show the need of using well-balanced methods for this equation.

## 4.3 Moving Shocks Connecting two Steady Profiles

**Right-moving shock.** We consider now the initial condition

$$v_0(r) = \begin{cases} \sqrt{\frac{1}{2} + \frac{1}{r}}, & 2 < r < 2.5, \\ \sqrt{\frac{2}{r}}, & \text{otherwise.} \end{cases} \quad (4.4)$$

The corresponding solution consists of a right-moving shock connecting two branches of stationary solutions. Figure 5 shows the numerical solutions obtained with the first-, second-, and third-order well-balanced methods and a reference solution computed with the first-order standard method using a mesh of 10000 cells. As it can be seen, the well-balanced methods capture correctly the shock with a resolution that increases with the order as expected.
<figure><img src="image_7.png" /><figcaption>Fig. 4 Burgers–Schwarzschild model with the initial condition (4.3): first-, second- and third-order well-balanced and non-well-balanced methods at selected times for variable v</figcaption></figure>

<figure><img src="image_8.png" /><figcaption>Fig. 5 Burgers–Schwarzschild model with the initial condition (4.4): first-, second- and third-order well-balanced methods at selected times for variable v</figcaption></figure>
<figure><img src="image_9.png" /><figcaption>Fig. 6 Burgers–Schwarzschild model with the initial condition (4.5): first-, second- and third-order well-balanced methods at selected times for variable v</figcaption></figure>

**Left-moving shock.** Similar conclusions can be drawn for the left-moving shock linking two branches of stationary solutions that generates from the initial condition:

$$v_0(r) = \begin{cases} -\sqrt{\frac{2}{r}}, & 2 < r < 2.5, \\ -\sqrt{\frac{3}{4} + \frac{1}{2r}}, & \text{otherwise,} \end{cases} \quad (4.5)$$

see Fig. 6. A reference solution computed with the first-order standard method has been computed again using a mesh of 10000 cells.

## 4.4 Perturbation of a Steady Shock Solution

**Left-hand perturbation.** In this test case we consider the initial condition:

$$\tilde{v}_0(r) = v_0(r) + p_L(r), \quad (4.6)$$

where $v_0$ is the steady shock solution given by (4.3) and

$$p_L(r) = \begin{cases} -\frac{1}{5}e^{-200(r-2.5)^2}, & 2.2 < r < 2.8, \\ 0, & \text{otherwise.} \end{cases} \quad (4.7)$$

The first-, second-, and third-order well-balanced methods have been applied to this problem. In Fig. 7 it can be observed that, after the wave generated by the initial perturbation leaves the
<figure><img src="image_10.png" /><figcaption>Fig. 7 Burgers–Schwarzschild model with the initial condition (4.6)–(4.3)–(4.7): first-, second- and third-order well-balanced methods at selected times for variable v</figcaption></figure>

computational domain, the stationary solution (4.3) is not recovered: a different stationary solution of the family (3.3) is obtained whose shock is placed at a different location. Observe that all the three methods capture the same stationary solution.

**Right side perturbation.** Similar conclusions can be drawn if a perturbation at the right side of the shock is superposed to the stationary solution $v_0$ given by (4.3):

$$ \tilde{v}_0(r) = v_0(r) + p_R(r), \qquad (4.8) $$

with

$$ p_R(r) = \begin{cases} \frac{1}{5}e^{-200(r-3.5)^2}, & 3.2 < r < 3.8, \\ 0, & \text{otherwise,} \end{cases} \qquad (4.9) $$

as displayed in Fig. 8. In this case we have used a 2000-point uniform mesh since the displacement of the shock is smaller in this case and more points in the mesh are needed in order to see that the steady shock is not recovered.

**Left-hand perturbation with zero average.** Now we consider an initial condition of the form (4.6) with a perturbation $p_L$ such that $\int p_L(r)dr = 0$, in particular:

$$ p_L(r) = \begin{cases} 0.1\cos(-25.5\pi + 10\pi x)e^{-200(x-2.8)^2}, & 2.7 < r < 2.9, \\ 0, & \text{otherwise.} \end{cases} \qquad (4.10) $$
<figure><img src="image_11.png" /><figcaption>Fig. 8 Burgers–Schwarzschild model with the initial condition (4.8)–(4.3)–(4.9): first-, second- and third-order well-balanced methods at selected times for variable v</figcaption></figure>

In Fig. 9 it can be observed that now, after the wave generated by the initial perturbation leaves the computational domain, the stationary solution (4.3) is recovered. Here we have used again a 2000-point uniform mesh to verify that the steady state does not move.

**Right side perturbation with zero average.** Similar conclusions can be drawn if we consider an initial condition of the form (4.8) with $\int p_R(r)dr = 0$. In particular we take

$$p_R(r) = \begin{cases} 0.1\cos(-29.5\pi + 10\pi x)e^{-200(x-3.2)^2}, & 3.1 < r < 3.3, \\ 0, & \text{otherwise,} \end{cases} \quad (4.11)$$

see Fig. 10. Here we have used again a 2000-point uniform mesh to verify that the steady state does not move.

**Left-hand and right-hand perturbations with zero average.** In order to study the relation between the amplitude of the perturbation and the distance between the initial and the final stationary shocks, we consider the initial condition:

$$\tilde{v}_0(r) = v_0(r) + p_L(r) + p_R(r), \quad (4.12)$$

where $v_0$ is the steady shock solution given by (4.3) and $\int (p_L(r) + p_R(r))dr = 0$. In particular we take $p_L(r)$ as in (4.7) and $p_R(r)$ as in (4.9). In Fig. 11 it can be observed that, after the wave generated by the initial perturbation leaves the computational domain, the stationary solution (4.3) is not recovered: a different stationary solution of the family (3.3) with the shock placed at a different location is reached. This is a natural result since, as we saw
<figure><img src="image_12.png" /><figcaption>Fig. 9 Burgers–Schwarzschild model with the initial condition (4.6)–(4.3)–(4.10): first-, second- and third-order well-balanced methods at selected times and zoom of the initial and final stationary shocks (right-down) for variable v</figcaption></figure>

before, the right perturbation creates a lower displacement than the left-hand perturbation. Here we have used again a 2000-point uniform mesh.

**Relation between the perturbation and the displacement of the shock.** In order to study the relationship between the amplitude of the perturbation and the distance between the initial and the final shock locations, we consider the family of initial conditions:

$$ \tilde{v}_0(r) = v_0(r) + \delta_v(\alpha, r), \quad (4.13) $$

where $v_0$ is given again by (4.3) and

$$ \delta_v(\alpha, r) = \begin{cases} \alpha \cos(5\pi r - 12\pi)e^{-200(r-2.8)^2}, & 2.7 < r < 2.9, \\ 0, & \text{otherwise,} \end{cases} \quad (4.14) $$

with $\alpha > 0$. The amplitude of the perturbation is measured by $\int \delta_v(\alpha, r) dr$ and the distance between the shocks is measured by $\lim_{t \to \infty} \int |v(r, t) - v_0(r)| dr$. See Fig. 12. Table 4 and Fig. 13 show the relationship between those magnitudes that is clearly linear.

## 4.5 Long-time Behavior of the Solutions

In this section we consider different initial conditions and investigate the long-time behavior of the corresponding solutions using the first-order well-balanced scheme. A large number of tests have been performed with the first-order methods (that is the less costly one) consid-
<figure><img src="image_13.png" /><figcaption>Fig. 10 Burgers–Schwarzschild model with the initial condition (4.8)–(4.3)–(4.11): first-, second- and third-order well-balanced methods at selected times and zoom of the initial and final stationary shocks (right-down) for variable v</figcaption></figure>

ering different initial conditions, different meshes, and different lengths of the computational domain: the observed behavior of the numerical solutions have been always one of the four ones shown here depending on the value at $2M$ (1 or lower) and at the right boundary (positive or negative).

1. Initial condition satisfying $v_0(2M) = 1$ and $v_0(L) \ge 0$: let us consider the initial condition

$$v_0(r) = \begin{cases} 1, & 2 < r < 2.1, \\ \cos(30r)e^{\frac{-1}{(x-2.5)^2}}, & \text{otherwise,} \end{cases} \quad (4.15)$$

that takes value 1 in a neighborhood of $2M = 2$ and a positive value at the right boundary of the computational domain $x = 4$. As it can be observed in Fig. 14 after a transient regime, the numerical solution takes the form of a right-moving shock linking the stationary solution $v \equiv 1$ with the negative stationary solution that takes value $-1$ at $x = 2M$ and value 0 at $x = 4$. Once this shock leaves the domain, the stationary solution $v \equiv 1$ is reached in the whole computational domain.

2. Initial condition satisfying $v_0(2M) = 1$ and $v_0(L) < 0$: we consider now the initial condition

$$v_0(r) = \begin{cases} 1, & 2 < r < 2.1, \\ \cos(20r)e^{\frac{-1}{(x-2.5)^2}}, & \text{otherwise,} \end{cases} \quad (4.16)$$
<figure><img src="image_14.png" /><figcaption>Fig. 11 Burgers–Schwarzschild model with the initial condition (4.8)–(4.3)–(4.11): comparison between the first-, second- and third-order well-balanced methods at selected times for variable v</figcaption></figure>

<figure><img src="image_15.png" /><figcaption>Fig. 12 Burgers–Schwarzschild model with the initial condition (4.13)–(4.3)–(4.14): measures of the perturbation and the shock displacement for $\alpha = 1$</figcaption></figure>

that takes value 1 in a neighborhood of $2M = 2$ and negative value at the right boundary of the computational domain $x = 4$. As it can be observed in Fig. 15 after a transient period, the numerical solution takes the form of a right-moving shock linking the stationary solution $v = 1$ with the negative stationary solution that takes value $-1$ at $x = 2M$ and value $v_0(4)$ at $x = 4$. Once this shock leaves the domain, the stationary solution $v = 1$ is reached in the whole computational domain.
<table><caption>**Table 4** Burgers–Schwarzschild model with the initial condition (4.13)–(4.3)–(4.14): measures of the perturbation and the shock displacement for different values of $\alpha$</caption><thead><tr><th>α</th><th>∫ δ<sub>v</sub></th><th>lim<sub>t→∞</sub> ∫ |v - v<sub>s</sub>|</th></tr></thead><tbody><tr><td>0.0</td><td>0.00000</td><td>0.00000</td></tr><tr><td>0.1</td><td>0.00936</td><td>0.01245</td></tr><tr><td>0.2</td><td>0.01873</td><td>0.02586</td></tr><tr><td>0.3</td><td>0.02809</td><td>0.03735</td></tr><tr><td>0.4</td><td>0.03745</td><td>0.05076</td></tr><tr><td>0.5</td><td>0.04682</td><td>0.06225</td></tr><tr><td>0.6</td><td>0.05618</td><td>0.07566</td></tr><tr><td>0.7</td><td>0.06554</td><td>0.08715</td></tr><tr><td>0.8</td><td>0.07491</td><td>0.09864</td></tr><tr><td>0.9</td><td>0.08427</td><td>0.11013</td></tr><tr><td>1.0</td><td>0.09364</td><td>0.12163</td></tr><tr><td>1.1</td><td>0.10300</td><td>0.13503</td></tr><tr><td>1.2</td><td>0.11236</td><td>0.14653</td></tr><tr><td>1.3</td><td>0.12172</td><td>0.15802</td></tr><tr><td>1.4</td><td>0.13109</td><td>0.16760</td></tr><tr><td>1.5</td><td>0.14045</td><td>0.17909</td></tr></tbody></table>

3. Initial condition satisfying $v_0(2M) < 1$ and $v_0(L) \ge 0$: we consider now the initial condition

$$v_0(r) = \begin{cases} 0.8, & 2 < r < 2.1, \\ \cos(30r)e^{\frac{-1}{(x-2.5)^2}}, & \text{otherwise.} \end{cases} \quad (4.17)$$

In this case the numerical solution reaches in finite time the negative stationary solution $v^*$ such that $v^*(2) = -1$ and $v^*(4) = 0$: see Fig. 16.

4. Initial condition satisfying $v_0(2M) < 1$ and $v_0(L) < 0$: we finally consider the initial condition

$$v_0(r) = \begin{cases} 0.8, & 2 < r < 2.1, \\ \cos(20r)e^{\frac{-1}{(x-2.5)^2}}, & \text{otherwise.} \end{cases} \quad (4.18)$$

The numerical solution reaches in finite time the negative stationary solution $v^*$ such that $v^*(2) = -1$ and $v^*(4) = v_0(4)$: see Fig. 17.

## 4.6 Main Conclusions for the Burgers–Schwarzschild Model

From Figs. 7, 8, 9, 10, 11, 12 and 13 and Table 4 we can conclude the following:

**Conclusion 1** If a perturbation $\delta_v$ is added to a steady shock solution of the form

$$v_0(r) = \begin{cases} \sqrt{1 - K_0^2(1 - \frac{2M}{r})}, & 2M < r < r_0, \\ -\sqrt{1 - K_0^2(1 - \frac{2M}{r})}, & \text{otherwise,} \end{cases}$$
<figure><img src="image_16.png" /><figcaption>Fig. 13 Burgers–Schwarzschild model with the initial condition (4.13)–(4.3)–(4.14): values of $\lim_{t \to \infty} \int |v - v_s|$ as a function of $\int \delta_v$</figcaption></figure>

then the solution reaches at finite time another steady shock solution of the form:

$$v(r) = \begin{cases} \sqrt{1 - K_0^2(1 - \frac{2M}{r})}, & 2M < r < r_1, \\ -\sqrt{1 - K_0^2(1 - \frac{2M}{r})}, & \text{otherwise.} \end{cases}$$

1. If $\int_{2M}^{r_0} \delta_v = 0$ and $\int_{r_0}^{\infty} \delta_v = 0$, then $r_1 = r_0$, i.e. the initial stationary solution is recovered.

2. If $\int_{2M}^{\infty} \delta_v = 0$ and $\int_{2M}^{r_0} \delta_v = -\int_{r_0}^{\infty} \delta_v$, then $r_1 \neq r_0$ and a different stationary solution is obtained.

3. If $\int \delta_v \neq 0$, then $r_1 \neq r_0$ and a different stationary solution is obtained. In this case the distance between $r_0$ and $r_1$ depends linearly on the amplitude of the perturbation: see Table 4 and Fig. 13.

In view of Figs. 14, 15, 16 and 17 we have reached the following.

**Conclusion 2** 1. For a bounded domain $[2M, L]$:

(a) If $v_0(r) = 1$ for $r \in [2M, 2M + \epsilon)$, with $\epsilon > 0$, $v_0(L) \ge 0$ and $v_0 \neq 1$, in finite time the solution has the form of a right-moving shock that links the stationary solution $v \equiv 1$ and the negative steady solution $v^*$ such that $v^*(2M) = -1$ and $v^*(L) = 0$, that is, $v_0^*(r) = -\sqrt{1 - \frac{1}{1 - \frac{2M}{L}}(1 - \frac{2M}{r})}$.

(b) If $v_0(r) = 1$ for $r \in [2M, 2M + \epsilon)$, with $\epsilon > 0$ and $v_0(L) = a$, with $a < 0$, then in finite time the solution has the form of a right-moving shock that links the stationary solution $v \equiv 1$ and the negative steady solution $v^*$ such that $v^*(2M) = -1$ and $v_0^*(L) = a$, that is, $v_0^*(r) = -\sqrt{1 - \frac{1-a^2}{1-\frac{2M}{L}}(1-\frac{2M}{r})}$.

(c) If $v_0(2M) < 1$ and $v_0(L) \ge 0$, then in finite time the solution coincides with the negative steady solution such that $v^*(2M) = -1$ and $v_0^*(L) = 0$, that is, $v_0^*(r) = -\sqrt{1 - \frac{1}{1 - \frac{2M}{L}}(1 - \frac{2M}{r})}$.

(d) If $v_0(2M) < 1$ and $v_0(L) = a$, with $a < 0$, then in finite time the solution coincides with the negative stationary solution $v^*$ such that $v^*(L) = a$, that is, $v_0^*(r) = -\sqrt{1 - \frac{1-a^2}{1 - \frac{2M}{L}}(1 - \frac{2M}{r})}$.
<figure><img src="image_17.png" /><figcaption>Fig. 14 Burgers–Schwarzschild model with the initial condition (4.15): first-order well-balanced scheme at selected times for variable v</figcaption></figure>

2. For the unbounded domain $[2M, \infty)$ the following conclusions can be drawn by passing to the limit when $L \to \infty$:

(a) If $v_0(r) = 1$ for $r \in [2M, 2M + \epsilon)$, with $\epsilon > 0$, $\lim_{r \to \infty} v_0(r) \ge 0$ and $v_0 \ne 1$, in finite time the solution has the form of a right-moving shock that links the stationary solution $v \equiv 1$ and the negative stationary solution $v_0^*(r) = -\sqrt{\frac{2M}{r}}$, corresponding to $K^2 = 1$.
<figure><img src="image_18.png" /><figcaption>Fig. 15 Burgers–Schwarzschild model with the initial condition (4.16): first-order well-balanced scheme at selected times for variable v</figcaption></figure>

(b) If $v_0(r) = 1$ for $r \in [2M, 2M + \epsilon)$, with $\epsilon > 0$ and $\lim_{r \to \infty} v_0(r) = a$, with $a < 0$, then in finite time $t_0$ the solution has the form of a right-moving shock that links the stationary solution $v = 1$ and the negative stationary solution $v^*$ such that
$$v^*(2M) = -1 \text{ and } \lim_{r \to \infty} v_0^*(r) = a, \text{ that is, } v_0^*(r) = -\sqrt{1 - (1-a^2)(1 - \frac{2M}{r})}.$$

(c) If $v_0(2M) < 1$ and $\lim_{r \to \infty} v_0(r) \ge 0$, then the solution converges as $t \to \infty$ to the negative stationary solution $v^*$ such that $v^*(2M) = -1$ and $\lim_{r \to \infty} v_0^*(r) = 0$, that is, $v_0^*(r) = -\sqrt{\frac{2M}{r}}$.
<figure><img src="image_19.png" /><figcaption>Fig. 16 Burgers–Schwarzschild model with the initial condition (4.17): first-order well-balanced scheme at selected times for variable v</figcaption></figure>

(d) If $v_0(2M) < 1$ and $\lim_{r \to \infty} v_0(r) = a$, with $a < 0$, then the solution converges as $t \to \infty$ to the negative stationary solution $v^*$ such that $v^*(2M) = -1$ and $\lim_{r \to \infty} v_0^*(r) = a$, that is, $v_0^*(r) = -\sqrt{1 - (1 - a^2)(1 - \frac{2M}{r})}$.

# 5 Euler–Schwarzschild Model: Designing the Numerical Algorithm

## 5.1 Preliminaries

In the case of the Euler–Schwarzschild equations (1.3), the stationary solutions are implicitly given by the equations:

$$ \frac{\operatorname{sgn}(v)(1 - v^2)|v|^{\frac{2k^2}{1-k^2}r^{\frac{4k^2}{1-k^2}}}{(1 - \frac{2M}{r})} = C_1, \quad r(r - 2M)\rho \frac{v}{1 - v^2} = C_2, \qquad (5.1) $$

where $C_1, C_2$ are constants. The pair $(v, \rho)$ of a stationary solution satisfies the following ODE system analyzed first in [15,16]:
<figure><img src="image_20.png" /><figcaption>Fig. 17 Burgers–Schwarzschild model with the initial condition (4.18): numerical solution obtained with the first-order well-balanced scheme at selected times for variable v</figcaption></figure>

$$ \frac{dv}{dr} = v \frac{(1-v^2)(1-k^2)}{r(r-2M)} \left( \frac{2k^2}{1-k^2}(r-2M) - M \right) / (v^2-k^2), \quad (5.2) $$

$$ \frac{d\rho}{dr} = -\frac{2(r-M)}{r(r-2M)}\rho - \rho\frac{(1+v^2)(1-k^2)}{r(r-2M)}\left(\frac{2k^2}{1-k^2}(r-2M)-M\right)/(v^2-k^2), \quad (5.3) $$

Figure 18 shows the graph of v for some of them. When these functions are defined in $(2M, \infty)$, they have a maximum or a minimum in

$$ r_c = \frac{M(1-k^2)}{2k^2} + 2M, \quad (5.4) $$

that comes from solving $\frac{dv}{dr} = 0$. In Fig. 18 the stationary solutions marked in red are those that take the value $v = \pm k$ at $r = r_c$.

Given two constants $C_1$ and $C_2$, in order to compute the stationary solution given by (5.1) in a point $r = a$, the following nonlinear system has to be solved:

$$ \operatorname{sgn}(v)(1-v^2)|v|^{\frac{2k^2}{1-k^2}} = \frac{(1-\frac{2M}{a})}{a^{\frac{4k^2}{1-k^2}}} C_1, \quad \rho = \frac{1-v^2}{va(a-2M)} C_2. \quad (5.5) $$

It is enough thus to solve, if it is possible, the nonlinear equation

$$ g(v) = K_a, \quad (5.6) $$
<figure><img src="image_21.png" /><figcaption>Fig. 18 Euler–Schwarzschild model with $k = 0.3$: graph of the variable $v$ for some stationary solutions</figcaption></figure>

with

$$g(v) = \operatorname{sgn}(v)(1 - v^2)|v|^{\frac{2k^2}{1-k^2}}, \quad v \in [-1, 1], \quad K_a = \frac{(1 - \frac{2M}{a})}{a^{\frac{4k^2}{1-k^2}}} C_1, \quad (5.7)$$

to compute $v$. Once this equation is solved, $\rho$ is computed using the second equation of (5.5). It can be easily checked that $g$ satisfies:

$$-(1 - k^2)k^{\frac{2k^2}{1-k^2}} = g(-k) \le g(v) \le g(k) = (1 - k^2)k^{\frac{2k^2}{1-k^2}}, \quad v \in [-1, 1].$$

Moreover, $g$ is strictly monotone in $[-1, -k)$, $(-k, k)$, and $(k, 1]$. As a consequence we have the following conclusion. (For further properties, see the study in [15,16].)

* If $|K_a| > g(k)$, the equation (5.6) has no solution, i.e. a stationary solution given by $C_1$ and $C_2$ cannot be defined at $r = a$.

* If $|K_a| = g(k)$ then the equation (5.6) has only one solution ($k$ if $K_a > 0, -k$ if $K_a < 0$). Therefore, (5.5) has only one solution that is a sonic state.

* Otherwise, (5.6) has two possible solutions. Therefore there are two states $(\rho, v)$ that solve (5.5), one supersonic and one subsonic.

For the sake of clarity, together with the representation

$$V = [\rho(1 + k^2 v^2)/(1 - v^2), \rho v(1 + k^2)/(1 - v^2)]^T,$$

for the states, we will use $\tilde{V} = [\rho, v]^T$. Here, $V$ can be easily computed from $\tilde{V}$ and, given $V, \tilde{V}$ is also easily computed by (1.3d) that comes from solving a second-degree equation.

## 5.2 First-order Method

If the midpoint rule is used to compute the initial averages, given a family of cell values $\tilde{V}_i$, in the first step of the well-balanced reconstruction procedure one has to find, if it is possible, a stationary solution $\tilde{V}_i^*$ defined in the interval $[r_{i-1/2}, r_{i+1/2}]$ such that $\tilde{V}_i^*(r_i) = \tilde{V}_i = [\rho_i, v_i]^T$.
Obviously such a stationary solution would correspond to the choice of constants:

$$C_{i,1} = \frac{\operatorname{sgn}(v_i)(1 - v_i^2)|v_i|^{\frac{2k^2}{1-k^2}} r_i^{\frac{4k^2}{1-k^2}}}{\left(1 - \frac{2M}{r_i}\right)}, \quad C_{i,2} = r_i(r_i - 2M)\rho_i \frac{v_i}{1 - v_i^2}. \quad (5.8)$$

According to the discussion above, the corresponding stationary solution is defined in $r_{i \pm \frac{1}{2}}$ provided that:

$$|K_{i \pm \frac{1}{2}}| \le g(k), \quad K_{i \pm \frac{1}{2}} = \left(1 - \frac{2M}{r_{i \pm \frac{1}{2}}}\right) r_{i \pm \frac{1}{2}}^{\frac{4k^2}{1-k^2}} C_{i,1}. \quad (5.9)$$

When $|K_{i \pm \frac{1}{2}}| < g(k)$ there are two possible values for $\tilde{V}_i^*(r_{i \pm \frac{1}{2}})$, one subsonic and one supersonic. Therefore, a criterion is needed to select one or the other. The following criterion will be used here:

* if $\tilde{V}_i$ is not sonic, then the state whose regime (sub or supersonic) is the same as $\tilde{V}_i$ is selected for $\tilde{V}_i^*(r_{i \pm \frac{1}{2}})$.

* if $\tilde{V}_i$ is sonic, then the state whose regime is the same as $\tilde{V}_{i+1}$ is selected for $\tilde{V}_i^*(r_{i+\frac{1}{2}})$ and the state whose regime is the same as $\tilde{V}_{i-1}$ is selected for $\tilde{V}_i^*(r_{i-\frac{1}{2}})$.

Observe that this criterion aims to preserve the regime of the given cell values.

If condition (5.9) is satisfied, then the numerical method (2.15) is used. Otherwise the standard trivial reconstruction is considered.

The expression of the semi-discrete first-order method is then as follows:

$$\frac{dV_i}{dt} = -\frac{1}{\Delta r} (F_{i+\frac{1}{2}} - F_{i-\frac{1}{2}} - S_i), \quad (5.10)$$

where

$$S_i = \begin{cases} F(V_i^*(r_{i+\frac{1}{2}}), r_{i+\frac{1}{2}}) - F(V_i^*(r_{i-\frac{1}{2}}), r_{i-\frac{1}{2}}), & \text{if (5.9) holds,} \\ S(V_i, r_i), & \text{otherwise.} \end{cases} \quad (5.11)$$

The forward Euler method is used again for the time discretization.

## 5.3 Second-order Method

Let us use again the midpoint rule to compute cell averages and the minmod reconstruction operator. The stationary solution sought at the first stage of the well-balanced reconstruction procedure is again characterized by the constants (5.8). This time, this stationary solution has to be computed at the points $r_{i-1}$, $r_{i-\frac{1}{2}}$, $r_{i+\frac{1}{2}}$, $r_{i+1}$ so that the following condition has to be satisfied:

$$|K_{i+j}| \le g(k), \quad j = -1, -\frac{1}{2}, \frac{1}{2}, 1, \quad (5.12)$$

where $K_{i \pm \frac{1}{2}}$ are given by (5.9) and

$$K_{i \pm 1} = \left(1 - \frac{2M}{r_{i \pm 1}}\right) r_{i \pm 1}^{\frac{4k^2}{1-k^2}} C_{i,1}. \quad (5.13)$$
If this condition is satisfied, the reconstruction is defined as follows:

$$ \mathbb{P}_i(r) = V_i^*(r) + \minmod \left( \frac{W_{i+1} - W_i}{\Delta r}, \frac{W_{i+1} - W_{i-1}}{2\Delta r}, \frac{W_i - W_{i-1}}{\Delta r} \right) (r - r_i), $$

where the minmod function is applied component by component and $W_j = V_j - V_i^*(r_j)$ for $j = i-1, i, i+1$. Observe that the *conserved* variables V are used in the reconstruction procedure. On the other hand, if (5.12) is not satisfied, then the standard MUSCL reconstruction is applied:

$$ \mathbb{Q}_i(r) = V_i + \minmod \left( \frac{V_{i+1} - V_i}{\Delta r}, \frac{V_{i+1} - V_{i-1}}{2\Delta r}, \frac{V_i - V_{i-1}}{\Delta r} \right) (r - r_i). $$

The expression of the numerical method is given again by (5.10)–(5.11) with the difference that the second-order reconstructions are used now to compute the numerical fluxes. The TVDRK2 method is used now to discretize the equations in time.

# 6 Euler-Schwarzschild Model: A Numerical Study

## 6.1 Preliminaries

In this section several tests are considered to check the performance of the first- and second-order well-balanced numerical methods for Euler-Schwarzschild model introduced in the previous section. We consider the spatial interval $[2M, L]$ with $M = 1$ and $L = 10$, a 500-point uniform mesh, $k = 0.3$ and the CFL number is set to 0.5 again. At $r = 2M$ we impose $F_{-\frac{1}{2}} = 0$ as boundary condition since $(1 - \frac{2M}{r}) = 0$. At $r = L$ we will use a transmissive boundary condition in the case we are not in a stationary solution or we will expand the stationary solution if we are in one.

In order to test the dependency of the results on the numerical method, two different first-order numerical fluxes are considered: the Lax-Friedrichs numerical flux

$$ F_{i+\frac{1}{2}} = \frac{1}{2}(F(V_i) + F(V_{i+1})) - \frac{1}{2}\frac{\Delta t}{\Delta x}(V_{i+1} - V_i), \quad (6.1) $$

and a HLL-like numerical flux in PVM form (see [4]):

$$ F_{i+\frac{1}{2}} = \frac{1}{2}(F(V_i) + F(V_{i+1})) - \frac{1}{2}(\alpha_0(V_{i+1} - V_i) + \alpha_1(F(V_{i+1}) - F(V_i))), \quad (6.2) $$

with

$$ \alpha_0 = \frac{\overline{\lambda_2}|\overline{\lambda_1}| - \overline{\lambda_1}|\overline{\lambda_2}|}{\overline{\lambda_2} - \overline{\lambda_1}}, \quad \alpha_1 = \frac{|\overline{\lambda_2}| - |\overline{\lambda_1}|}{\overline{\lambda_2} - \overline{\lambda_1}}, \quad (6.3) $$

where $\overline{\lambda}_1$ and $\overline{\lambda}_2$ are the eigenvalues of some intermediate matrix $J_{i+\frac{1}{2}}$ of the form

$$ J_{i+\frac{1}{2}} = \left(1 - \frac{2M}{r_{i+\frac{1}{2}}}\right) \left[ \frac{0}{1 - k^2 v_m^2} \quad \frac{1}{1 - k^2 v_m^2} \right], \quad (6.4) $$

where $v_m$ is some intermediate value between $v_i^n$ and $v_{i+1}^n$.
Given two states $V_L$ and $V_R$, in order to choose an adequate intermediate value $v_m$, we look for $v$ such that the following Roe-type property is satisfied:

$$ \begin{bmatrix} 0 & 1 \\ \frac{k^2 - v^2}{1 - k^2 v^2} & \frac{2(1 - k^2)v}{1 - k^2 v^2} \end{bmatrix} \cdot (V_R - V_L) = \hat{F}_R - \hat{F}_L, \\ \hat{F}_\alpha = \begin{pmatrix} 1 + k^2 & \rho_\alpha v_\alpha \\ \frac{1 - v_\alpha^2}{v_\alpha^2 + k^2} & \rho_\alpha \end{pmatrix}, \quad \alpha = L, R, \tag{6.5} $$

i.e. the factor $(1 - 2M/r)$ is neglected for simplicity. Due to the form of the matrix, it is enough to find $v$ such that

$$ \frac{k^2 - v^2}{1 - k^2 v^2} (V_{1,R} - V_{1,L}) + \frac{2(1 - k^2)v}{1 - k^2 v^2} (V_{2,R} - V_{2,L}) = F_{2,R} - F_{2,L}. $$

This equality is equivalent to a second-order degree equation for $v$, namely $\alpha v^2 + \beta v + \gamma = 0$, where

$$ \begin{aligned} \alpha &= \rho_R(1 - v_L^2) - \rho_L(1 - v_R^2), \\ \beta &= -2(\rho_R v_R(1 - v_L^2) - \rho_L v_L(1 - v_R^2)), \\ \gamma &= \rho_R v_R^2(1 - v_L^2) - \rho_L v_L^2(1 - v_R^2). \end{aligned} $$

Since the discriminant $D = \rho_L \rho_R (1 - v_L^2)(1 - v_R^2)(v_R - v_L)^2$ is always positive, there are always two real solutions:

$$ v_{\pm} = \frac{\rho_R v_R (1 - v_L^2) - \rho_L v_L (1 - v_R^2) \pm |v_R - v_L| \sqrt{\rho_L \rho_R (1 - v_L^2)(1 - v_R^2)}}{\rho_R (1 - v_L^2) - \rho_L (1 - v_R^2)} $$

and it can be proven that:

* if $v_L < v_R$, then $v_- \in (v_L, v_R)$ and $v_+ \notin (v_L, v_R)$, so that we will take $v_m = v_-$;

* if $v_L > v_R$, then $v_- \notin (v_R, v_L)$ and $v_+ \notin (v_R, v_L)$, so that we will take $v_m = v_+$.

Finally, in the case $\alpha = 0$ and $V_R \neq V_L$, we take $v_m = -\frac{\gamma}{\beta}$ and in the case $||V_R - V_L||_\infty < \epsilon$ we take $v_m = \frac{v_L + v_R}{2}$.

Once $v_m$ has been chosen, the expression of $\bar{\lambda}_j$, $j = 1, 2$ in (6.3) is as follows:

$$ \bar{\lambda}_1 = \lambda_1(v_m) = \left(1 - \frac{2M}{r_{i+\frac{1}{2}}}\right) \frac{v_m - k}{1 - k^2 v_m}, \quad \bar{\lambda}_2 = \lambda_2(v_m) = \left(1 - \frac{2M}{r_{i+\frac{1}{2}}}\right) \frac{v_m + k}{1 + k^2 v_m}. $$

Since for a 2-systems HLL and Roe methods are equivalent and the intermediate value chosen to compute the wave speeds satisfies a Roe-type property, this numerical flux will be called Roe-type numerical flux in what follows. The proposed numerical method will be compared with those based on the same numerical flux and the standard first- and second-order reconstructions.
<table><caption>**Table 5** Well-balanced versus non-well-balanced schemes: $L^1$ errors at time $t = 50$ for the Euler–Schwarzschild model with the initial condition (6.6)</caption><thead><tr><th>Scheme (500 cells)</th><th>Error v (1st)</th><th>Error ρ (1st)</th><th>Error v (2nd)</th><th>Error ρ (2nd)</th></tr></thead><tbody><tr><td>Well-balanced</td><td>3.34E-13</td><td>5.61E-12</td><td>3.43E-13</td><td>7.12E-12</td></tr><tr><td>Non well-balanced</td><td>0.94</td><td>5.79</td><td>0.93</td><td>5.75</td></tr></tbody></table>

<figure><img src="image_22.png" /><figcaption>**Fig. 19** Euler–Schwarzschild model with the initial condition (6.6): first- and second-order well-balanced and non-well-balanced methods at selected times for the variable v</figcaption></figure>

## 6.2 Stationary Solutions

**Positive stationary solution.** We take as initial condition the positive supersonic stationary solution satisfying

$$ \rho^*(10) = 1, \quad v^*(10) = 0.6. \tag{6.6} $$

Table 5 shows the error in $L^1$ norm between the numerical solution at time $t = 50$ for the well-balanced and non-well-balanced methods using the Roe-type numerical flux. Figs. 19 and 20 compare the numerical solutions obtained with the well-balanced and the non-well-balanced methods: as it happened for the Burgers–Schwarzschild model, the numerical solutions obtained with non-well-balanced methods depart from the initial steady state.

**Negative stationary solution.** Let us consider now as initial condition the negative supersonic stationary solution $V^*$ that satisfies

$$ \rho^*(10) = 1, \quad v^*(10) = -0.8. \tag{6.7} $$
<figure><img src="image_23.png" /></figure>

<figure><img src="image_24.png" /></figure>

<figure><img src="image_25.png" /></figure>

<figure><img src="image_26.png" /><figcaption>**Fig. 20** Euler–Schwarzschild model with the initial condition (6.6): first- and second-order well-balanced and non-well-balanced methods at selected times for the variable $\rho$</figcaption></figure>

<table><caption>**Table 6** Well-balanced versus non-well-balanced schemes: $L^1$ errors at time $t = 50$ for the Burgers–Schwarzschild model with the initial condition (6.7)</caption><thead><tr><th>Scheme (500 cells)</th><th>Error v (1st)</th><th>Error ρ (1st)</th><th>Error v (2nd)</th><th>Error ρ (2nd)</th></tr></thead><tbody><tr><td>Well-balanced</td><td>1.54E-15</td><td>7.02E-13</td><td>1.35E-15</td><td>5.01E-13</td></tr><tr><td>Non well-balanced</td><td>0.01</td><td>2240.72</td><td>0.01</td><td>2250.77</td></tr></tbody></table>

Table 6 shows the error in $L^1$ norm between the numerical solution at time $t = 50$. Figs. 21, 22 show the difference between the numerical results given by well-balanced and non-well-balanced methods using the Roe-type numerical flux. Again the numerical solutions obtained with non-well-balanced methods depart from the initial steady state.

**Discontinuous stationary entropy weak solution.** We consider finally the initial condition

$$V_0(r) = \begin{cases} V_{-}^*(r), & r \le 6, \\ V_{+}^*(r), & \text{otherwise,} \end{cases} \qquad (6.8)$$

where $V_{-}^*(r)$ is the supersonic stationary solution such that

$$\rho_{-}^{*}(6) = 4, \quad v_{-}^{*}(6) = 0.6 \qquad (6.9)$$
<figure><img src="image_27.png" /><figcaption>Fig. 21 Euler–Schwarzschild model with the initial condition the stationary solution satisfying (6.7): first- and second-order well-balanced and non-well-balanced methods at selected times for the variable v</figcaption></figure>

<figure><img src="image_28.png" /><figcaption>Fig. 22 Euler–Schwarzschild model with the initial condition (6.7): first- and second-order well-balanced and non-well-balanced methods at selected times for the variable ρ</figcaption></figure>

and $V_+(r)$ is the subsonic one such that

$$ \rho_+^*(6) = \frac{\rho_-^*(6)(v_-^*(6))^2 - k^4}{k^2(1 - v_-^*(6))^2}, \quad v_+^*(6) = \frac{k^2}{v_-^*(6)}. \qquad (6.10) $$

$V_0$ is an entropy weak stationary solution of the system: see [15,16]. Table 7 shows the error in $L^1$ norm between the numerical solution at time $t = 50$ and Figs. 23, 24 show the comparison of the numerical results obtained with well-balanced and non-well-balanced methods at selected times. On the other hand, the numerical results of this section put on evidence, as for the Burgers–Schwarzschild system, the relevance of using well-balanced methods for the Euler–Schwarzschild model.
<table><caption>**Table 7** Well-balanced versus non-well-balanced schemes: $L^1$ errors at time $t = 50$ for the Burgers–Schwarzschild model with the initial condition (6.8)</caption><thead><tr><th>Scheme (500 cells)</th><th>Error v (1st)</th><th>Error ρ (1st)</th><th>Error v (2nd)</th><th>Error ρ (2nd)</th></tr></thead><tbody><tr><td>Well-balanced</td><td>2.20E-13</td><td>1.25E-11</td><td>1.92E-13</td><td>1.03E-11</td></tr><tr><td>Non well-balanced</td><td>0.89</td><td>3.94</td><td>0.89</td><td>3.92</td></tr></tbody></table>

<figure><img src="image_29.png" /><figcaption>**Fig. 23** Euler–Schwarzschild model with the initial condition (6.8): first- and second-order well-balanced and non-well-balanced methods at selected times for the variable v</figcaption></figure>

<figure><img src="image_30.png" /><figcaption>**Fig. 24** Euler–Schwarzschild model with the initial condition (6.8): first- and second-order well-balanced and non-well-balanced methods at selected times for the variable ρ</figcaption></figure>
<figure><img src="image_31.png" /><figcaption>Fig. 25 Euler–Schwarzschild model with the initial condition (6.11): first- and second-order well-balanced at selected times for the variable v</figcaption></figure>

## 6.3 Perturbation of a Regular Stationary Solution

In this test we consider the initial condition

$$ \tilde{V}_0(r) = \tilde{V}^*(r) + \delta(r), \qquad (6.11) $$

where $\tilde{V}^*$ is the supersonic stationary solution

$$ \rho^*(10) = 1, \quad v^*(10) = 0.9 \qquad (6.12) $$

and

$$ \delta(r) = [\delta_v(r), \delta_\rho(r)]^T = \begin{cases} [-0.01e^{-200(r-6)^2}, 0]^T, & 5 < r < 7, \\ [0, 0]^T, & \text{otherwise.} \end{cases} \qquad (6.13) $$

It can be observed in Fig. 25 that the stationary solution $V^*$ is recovered once the perturbation has left the domain. In this Figure, the numerical results obtained with the first- and second-order well-balanced methods are compared with a reference solution computed using the first-order well-balanced method with a 5000-point mesh (the Roe-type numerical flux is used again). As expected, the second-order method is less diffusive.

## 6.4 Perturbation of a Steady Shock Solution

**Left-hand perturbation.** We consider the initial condition

$$ \tilde{V}_0(r) = \tilde{V}^*(r) + \delta_L(r), \qquad (6.14) $$

where

$$ \delta_L(r) = [\delta_{v,L}(r), \delta_{\rho,L}(r)]^T = \begin{cases} [0.2e^{-200(r-4)^2}, 0]^T, & 3 < r < 5, \\ [0, 0]^T, & \text{otherwise,} \end{cases} \qquad (6.15) $$
<figure><img src="image_32.png" /><figcaption>Fig. 26 Euler–Schwarzschild model with the initial condition (6.14): comparison between the first-order well-balanced method with different meshes using the Roe-type and the Lax numerical fluxes at selected times for the variable v</figcaption></figure>

and $V^*(r)$ is the stationary solution given by (6.8)–(6.10). In Figs. 26 and 27 the numerical results obtained with the first- and second-order well-balanced methods using the Lax-Friedrichs and the Roe-type numerical methods with different meshes are compared. As it happened for the Burgers–Schwarzschild model, the location of the stationary shock changes after the passage of the wave generated by the perturbation. Nevertheless in this case the displacement of the shock is slower. Different numerical methods have been applied to check the dependency of the motion on the scheme: although the evolution of the shock slightly depends on the number of points of the mesh, all the numerical solutions capture the same final location of the shock. In Fig. 28 the evolution of the shock given by the first-order WB method with different number of cells are compared. The location of the shock at every time step has been detected by using the condition $\frac{v_i - v_{i-1}}{v_{i+1} - v_i} \ge 0.8$.

**Right-hand perturbation.** Let us consider now two different initial conditions: on the one hand

$$ \tilde{V}_{0,1}(r) = \tilde{V}^*(r) + \delta_R(r), \qquad (6.16) $$

where $\tilde{V}^*(r)$ is again the discontinuous stationary solution given by (6.8)–(6.10) and

$$ \delta_R(r) = [\delta_{v,R}(r), \delta_{\rho,R}(r)]^T = \begin{cases} [-0.05e^{-200(r-8)^2}, 0]^T, & 7 < r < 9, \\ [0, 0]^T, & \text{otherwise.} \end{cases} \qquad (6.17) $$

On the other hand,

$$ \tilde{V}_{0,2}(r) = \tilde{V}_2^*(r) + \delta_R(r), \qquad (6.18) $$

where $\delta_R$ is given again by (6.16) and $\tilde{V}_2^*(r)$ is the steady shock of the form (6.8) satisfying

$$ \rho_{-}^{*}(6) = 5, \quad v_{-}^{*}(6) = 0.6. \qquad (6.19) $$
<figure><img src="image_33.png" /><figcaption>Fig. 27 Euler–Schwarzschild model with the initial condition (6.14): first-order well-balanced method with different meshes using the Roe-type and the Lax numerical fluxes at selected times for the variable $\rho$</figcaption></figure>

<figure><img src="image_34.png" /><figcaption>Fig. 28 Euler–Schwarzschild model taking as initial condition (6.14): evolution of the shock position with time obtained with the first-order well-balanced method using the Roe-type numerical flux with different meshes</figcaption></figure>

Observe that the definition of $v$ is identical for both stationary solutions but $\rho$ is different.

After the passage of the perturbation, the shock starts moving leftward and, in both cases, the numerical solution converges to a smooth transonic stationary solution of the form:

$$V^*(r) = \begin{cases} V_{-}^*(r), & r \le r_c, \\ V_{+}^*(r), & \text{otherwise,} \end{cases} \qquad (6.20)$$

where $r_c$ is given by (5.4); $V_{-}^*(r)$ and $V_{+}^*(r)$ are respectively a subsonic and a supersonic stationary solution satisfying $v_{\pm}^*(r_c) = -k$: see Fig. 29. Nevertheless, the limits in time of
<figure><img src="image_35.png" /><figcaption>Fig. 29 Euler–Schwarzschild model with the initial conditions (6.16) and (6.18): first-order well-balanced method with a 2000-point mesh using the Roe-type numerical flux at selected times for the variable v: the numerical solutions coincide</figcaption></figure>

<figure><img src="image_36.png" /><figcaption>Fig. 30 Euler–Schwarzschild model with the initial conditions (6.16) and (6.18): first-order well-balanced method with a 2000-point mesh using the Roe-type numerical flux at selected times for the variable ρ</figcaption></figure>

the approximations of ρ are different: see Fig. 30. Observe that, in the Euler–Schwarzschild model (5.1), there are infinitely many stationary solutions with the same function v and different ρ.

**Relation between the perturbation and the displacement of the shock.** In order to study the relationship between the amplitude of the perturbation and the distance between the initial and the final shock locations, we consider the family of initial conditions:

$$ \tilde{V}_0(r) = \tilde{V}^*(r) + \delta(\alpha, r), \qquad (6.21) $$
<figure><img src="image_37.png" /><figcaption>**Fig. 31** Euler–Schwarzschild model with the initial condition (6.21): first-order well-balanced method taking different values of $\alpha$ for variable $v$</figcaption></figure>

<figure><img src="image_38.png" /><figcaption>**Fig. 32** Euler–Schwarzschild model with the initial condition (6.21): first-order well-balanced method taking different values of $\alpha$ for variable $\rho$</figcaption></figure>

<table><caption>**Table 8** Euler–Schwarzschild model with the initial condition (6.21): measures of the perturbation and the shock displacement for different values of $\alpha$</caption><thead><tr><th>α</th><th>∫ δ<sub>v</sub></th><th>lim<sub>t→∞</sub> ∫ |v - v*|</th></tr></thead><tbody><tr><td>0.05</td><td>0.0063</td><td>1.0952</td></tr><tr><td>0.1</td><td>0.0125</td><td>1.0969</td></tr><tr><td>0.15</td><td>0.0188</td><td>1.0987</td></tr><tr><td>0.2</td><td>0.0251</td><td>1.1023</td></tr><tr><td>0.25</td><td>0.0313</td><td>1.1077</td></tr><tr><td>0.3</td><td>0.0376</td><td>1.1327</td></tr></tbody></table>

where $\tilde{V}^*$ is the steady shock solution given by (6.8)–(6.10) and

$$ \delta(\alpha, r) = [\delta_v(\alpha, r), \delta_\rho(\alpha, r)]^T = \begin{cases} [\alpha e^{-200(r-4)^2}, 0]^T, & 3 < r < 5, \\ [0, 0]^T, & \text{otherwise,} \end{cases} \quad (6.22) $$

with $\alpha > 0$. In this case we will also use the Roe-type numerical flux and a 2000-point uniform mesh. Figures 31 and 32 show the numerical solution for different values of $\alpha$ and we observe that depending on the amplitude of the perturbation the numerical solutions converge in time to different steady shock solutions.

The amplitude of the perturbation is measured with $\int \delta_v(\alpha, r) dr$ and the distance between the shocks is measured by $\lim_{t \to \infty} \int |v(r, t) - v^*(r)| dr$, as we did for the Burgers–Schwarzschild model. Table 8 and Fig. 33 show the relationship between those magnitudes: the displacement of the shock seems to grow exponentially with the amplitude.
<figure><img src="image_39.png" /><figcaption>Fig. 33 Euler–Schwarzschild model with the initial condition (6.21): values of $\lim_{t \to \infty} \int |v - v^*|$ as a function of $\int \delta_v$</figcaption></figure>

<figure><img src="image_40.png" /><figcaption>Fig. 34 Euler–Schwarzschild model with the initial condition (6.23): first-order well-balanced method taking different values of $\beta$ for variable $v$</figcaption></figure>

Let us finally consider a family of initial conditions that generate leftward displacement of the initial steady shock:

$$ \tilde{V}_0(r) = \tilde{V}^*(r) + \delta(\beta, r), \qquad (6.23) $$

where $\tilde{V}^*$ is again the steady shock solution given by (6.8)–(6.10) and

$$ \delta(\beta, r) = [\beta v(\beta, r), \delta_{\rho}(\beta, r)]^T = \begin{cases} [\beta e^{-200(r-8)^2}, 0]^T, & 7 < r < 8, \\ [0, 0]^T, & \text{otherwise,} \end{cases} \qquad (6.24) $$

with $\beta < 0$. In this case we will use the Roe-type numerical flux and a 2000-point uniform mesh. Figures 34 and 35 show the numerical solution for different values of $\beta$ and we observe that it converges to the same stationary solution regardless of the perturbation.

## 6.5 Main Conclusions for the Euler–Schwarzschild Model

In view of Fig. 25 we arrive at the following observation.

**Conclusion 3** If a smooth stationary solution of the Euler system (1.3) is perturbed, the solution is restored once the wave generated by the perturbation goes away.
<figure><img src="image_41.png" /><figcaption>Fig. 35 Euler–Schwarzschild model with the initial condition (6.23): first-order well-balanced method taking different values of $\beta$ for variable $\rho$</figcaption></figure>

In view of Figures 26, 27, 28, 29, 30, 31, 32, 33, 34, 35 and Table 8 we arrive at the following observation.

**Conclusion 4** Consider a perturbation $\delta = (\delta_v, \delta_\rho)$ added to a steady shock solution of the form

$$V_0(r) = \begin{cases} V_{-}^*(r), & r \le r_0, \\ V_{+}^*(r), & \text{otherwise.} \end{cases}$$

1. If the perturbation moves the steady shock to the right, then a different stationary solution of the form

$$V(r) = \begin{cases} V_{-}^*(r), & r \le r_1, \\ V_{+}^*(r), & \text{otherwise,} \end{cases}$$

with $r_0 \neq r_1$, is obtained, and the distance between $r_0$ and $r_1$ seems to depend exponentially on the amplitude of the perturbation: see Table 8 and Fig. 33.

2. If the perturbation moves the steady shock to the left, then a steady shock solution of the form (6.20) is obtained.

**Acknowledgements** Part of this paper was written during the Academic year 2018–2019 when PLF was a visiting fellow at the Courant Institute for Mathematical Sciences, New York University. The authors were supported by an Innovative Training Network (ITN) under the grant 642768 “ModCompShock”. The research of CP and EPG was also partially supported by the Spanish Government (SG), the European Regional Development Fund (ERDF), the Regional Government of Andalusia (RGA), and the University of Málaga (UMA) through the projects RTI2018-096064-B-C21 (SG-ERDF), UMA18-Federja-161 (RGA-ERDF-UMA), and P18-RT-3163 (RGA-ERDF). Funding for open access charge: Universidad de Málaga/CBUA.

**Funding** Open Access funding provided thanks to the CRUE-CSIC agreement with Springer Nature. The authors were supported by an Innovative Training Network (ITN) under the Grant 642768 “ModCompShock”. In addition, the research of the second (CP) and third (EPG) authors was partially supported by the Spanish Government (SG), the European Regional Development Fund (ERDF), the Regional Government of Andalusia (RGA), and the University of Málaga (UMA) through the projects RTI2018-096064-B-C21 (SG-ERDF), UMA18-Federja-161 (RGA-ERDF-UMA), and P18-RT-3163 (RGA-ERDF).

## Declarations

**Conflict of interest** All authors declare that they have no conflict of interest.
**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

## References

1. Beljadid, A., LeFloch, P.G., Mohamadian, M.: Late-time asymptotic behavior of solutions to hyperbolic conservation laws on the sphere. Comput. Methods Appl. Mech. Eng. 349, 285–311 (2019)

2. Bouchut, F.: Nonlinear Stability of Finite Volume Methods for Hyperbolic Conservation Laws: And Well-Balanced Schemes for Sources. Springer (2004)

3. Beljadid, A., LeFloch, P.G.: A central-upwind geometry-preserving method for hyperbolic conservation laws on the sphere. Commun. Appl. Math. Comput. Sci. 12, 81–107 (2017)

4. Castro, M.J., Fernández-Nieto, E.: A class of computationally fast first order finite volume solvers: PVM methods. SIAM J. Sci. Comput. 34(4), A2173–A2196 (2012)

5. Castro, M.J., Gallardo, J.M., López-García, J.A., Parés, C.: Well-balanced high order extensions of Godunov method for semilinear balance laws. SIAM J. Numer. Anal. 46(2), 1012–1039 (2008)

6. Castro, M.J., Morales de Luna, T., Parés, C.: Well-balanced schemes and path-conservative numerical methods. Handbook of Numerical Analysis 18, 131–175 (2017)

7. Castro, M.J., Parés, C.: Well-balanced high-order finite volume methods for systems of balance laws. J. Sci. Comput. 82(2), 1–48 (2020)

8. Cravero, I., Semplice, M.: On the accuracy of WENO and CWENO reconstructions of third-order on nonuniform meshes. J. Sci. Comput. 67(3), 1219–1246 (2016)

9. Dong, S., LeFloch, P.G.: Convergence of the finite volume method on a Schwarzschild background. ESAIM: Math. Modell. Numer. Anal. 53(5), 1459–1476 (2019)

10. Dziuk, D., Kröner, D., Müller, T.: Scalar conservation laws on moving hypersurfaces. Interfaces Free Bound. 15(2), 203–236 (2013)

11. Giesselman, J., LeFloch, P.G.: Formulation and convergence of the finite volume method for conservation laws on spacetimes with boundary. Numer. Math. 144, 751–785 (2020)

12. Gómez-Bueno, I., Castro, M.J., Parés, C.: High-order well-balanced methods for systems of balance laws: a control-based approach. Appl. Math. Comput. 394, 12580–2021

13. Gottlieb, S., Shu, C.-W.: Total variation diminishing Runge–Kutta schemes. Math. Comput. 67(221), 73–85 (1998)

14. LeFloch, P.G., Makhlof, H.: A geometry-preserving finite volume method for compressible fluids on Schwarzschild spacetime. Commun. Comput. Phys. 15(3), 827–852 (2014)

15. LeFloch, P.G., Xiang, S.: A numerical study of the relativistic Burgers and Euler equations on a Schwarzschild black hole exterior. Appl. Math. Comput. Sci. 13(2), 271–301 (2018)

16. LeFloch, P.G., Xiang, S.: Weakly regular fluid flows with bounded variation on the domain of outer communication of a Schwarzschild black hole spacetime. II. J. Math. Pure Appl. 122, 272–317 (2019)

17. Levy, D., Puppo, G., Russo, G.: Compact central WENO schemes for multidimensional conservation laws. SIAM J. Sci. Comput. 22(2), 656–672 (2000)

18. Rossmanith, A., Bale, D.S., LeVeque, R.J.: A wave propagation algorithm for hyperbolic systems on curved manifolds. J. Comput. Phys. 199(2), 631–662 (2004)

19. Russo, G.: Central schemes for conservation laws with application to shallow water equations. In: Trends and Applications of Mathematics to Mechanics, pp. 225–246. Springer (2005)

20. Russo, G.: High-order shock-capturing schemes for balance laws. In: Numerical Solutions of Partial Differential Equations. Advanced Courses in Mathematics—CRM Barcelona Centre de Recerca Matemàtica, pp. 59–147. Birkhäuser, Basel (2009)

21. Van Leer, B.: Towards the ultimate conservative difference scheme. ii. Monotonicity and conservation combined in a second-order scheme. J. Comput. Phys. 14(4), 361–370 (1974)

22. Vázquez-Cendón, M.-E.: Improved treatment of source terms in upwind schemes for the shallow water equations in channels with irregular geometry. J. Comput. Phys. 148(2), 497–526 (1999)

**Publisher's Note** Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.