I have the nonlinear PDE $$\frac{\partial U(z,t)}{\partial t} + A(U)\frac{\partial U(z,t)}{\partial z} + B(U)U(z,t) + C(z,t) = 0,$$ where $A(U)$ and $B(U)$ are guaranteed to be real and positive.

I want to use the MacCormack finite difference method to numerically solve it. For (Von Neumann) stability analysis, I use a linearized version of the PDE without $C(z,t)$, as that term will not contribute to instability in the error.

Without $B$, I retrieve the expected C.F.L. condition. That case is also a typical example found in texts on the MacCormack method and its stability, but I have not seen any examples where $B \neq 0$. If I don't neglect $B$, the stability analysis is still doable, just more messy than without it and the resulting condition on $\Delta t$ (and $\Delta z$) is less obvious.

So, is it safe to neglect $B$ for simplicity in the stability analysis?

  • $\begingroup$ Is U in your equation scalar or vector? Also it is not clear how you organize computation with MacCormack method? Did you discretize equation in space and then use predictor-corrector method to solve system of ODEs? $\endgroup$ Aug 21, 2021 at 2:15
  • $\begingroup$ In principle, $U$ is a vector in my physical set of equations. However, for my question here I mentioned a scalar version on purpose, because even in the scalar case I have not seen analysis where $B \neq 0$. For the computation, indeed I discretize space and follow the predictor-corrector method exactly as written in MacCormacks original paper. $\endgroup$
    – mcv100
    Aug 21, 2021 at 8:51

1 Answer 1


Consider the case where $A=C=0$ and, as you stated, $B>0$. Then you simply have an ODE at every point $z$ with a solution that decays to zero (at least if $B$ is bounded away from zero). You can then apply the usual step length criteria developed for ODEs. In other words, you will need $$ \Delta t \le \frac{c}{B(z,t)} $$ if you were to use an explicit method (e.g., the forward Euler method, for which $c=2$; other methods have other stability constants) for the ODE at $z$. Since you want to use the same time step everywhere, you need $$ \Delta t \le c \min_{z\in\Omega} \frac{1}{B(z,t)}. $$

  • $\begingroup$ I agree with the approach @Wolfgang Bangerth suggest, although I believe the forward Euler bound should be $\Delta t \leq \frac{\mathbf{2}}{B(U)}$. The step is of the form $U_{n+1} = (1 - \Delta t B(U_n)) U_n$, and we need $|1 - \Delta t B(U_n)| \leq 1$. $\endgroup$ Aug 20, 2021 at 22:30
  • $\begingroup$ I am not sure I follow the goal of your approach, since in my case $A \neq 0$. Do you mean that I should analyze your suggestion too, and the case with $B = 0$, and then get two upper bounds on $\Delta t$ and make sure I always satisfy both? $\endgroup$
    – mcv100
    Aug 20, 2021 at 23:00
  • $\begingroup$ @StevenRoberts Yes, good point. I modified the text. $\endgroup$ Aug 20, 2021 at 23:24
  • $\begingroup$ @mcv100 Yes. I was just pointing out that you can't neglect the reaction term with $C$ in your stability considerations. You will have to take into account all of the terms. $\endgroup$ Aug 20, 2021 at 23:25
  • $\begingroup$ @Wolfgang Bangerth Are you sure $C$ matters for stability? If you write out the discretized set of equations and take the error, $C$ drops out because it does not multiply $U$. See also: scicomp.stackexchange.com/questions/26838/…. $\endgroup$
    – mcv100
    Aug 21, 2021 at 8:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.