This study formulates general guidelines to extend an explicit code with a
great variety of implicit and semi-implicit time integration schemes. The d
iscussion is based on their specific implementation in the Versatile Advect
ion Code, which is a general purpose software package for solving systems o
f non-linear hyperbolic (and/or parabolic) partial differential equations,
using standard high resolution shock capturing schemes. For all combination
s of explicit high resolution schemes with implicit and semi-implicit treat
ments, it is shown how second-order spatial and temporal accuracy for the s
mooth part of the solutions can be maintained. Strategies to obtain steady
state and time accurate solutions implicitly are discussed. The implicit an
d semi-implicit schemes require the solution of large linear systems contai
ning the Jacobian matrix. The Jacobian matrix itself is calculated numerica
lly to ensure the generality of this implementation. Three options are disc
ussed in terms of applicability, storage requirements and computational eff
iciency. One option is the easily implemented matrix-free approach, but the
Jacobian matrix can also be calculated by using a general grid masking alg
orithm, or by an efficient implementation for a specific Lax-Friedrich-type
total variation diminishing (TVD) spatial discretization. The choice of th
e linear solver depends on the dimensionality of the problem. In one dimens
ion, a direct block tridiagonal solver can be applied, while in more than o
ne spatial dimension, a conjugate gradient (CG)-type iterative solver is us
ed. For advection-dominated problems, preconditioning is needed to accelera
te the convergence of the iterative schemes. The modified block incomplete
LU-preconditioner is implemented, which performs very well. Examples from t
wo-dimensional hydrodynamic and magnetohydrodynamic computations are given.
They model transonic stellar outflow and recover the complex magnetohydrod
ynamic bow shock flow in the switch-on regime found in De Sterck et al. Cop
yright (C) 1999 John Wiley & Sons, Ltd.