next up previous
Next: Boundary conditions Up: Making a hydrodynamics code Previous: Choosing the time step

Source term integration

The source terms fall outside the Roe solver formalism. It is in fact possible to integrate them into the Roe solver but we will not do that here. Instead we will use an approach called operator splitting. It is possible to show that an equation
\begin{displaymath}
{\partial {\bf W}\over\partial t}+{\partial {\bf F}\over\partial
\xi}-{\bf S}=0\;,
\end{displaymath} (17)

can be numerically solved (to second order accuracy) by solving for each time step the two separate equations
$\displaystyle {\partial {\bf W}\over\partial t}+{\partial {\bf F}\over\partial
\xi}=0$     (18)
$\displaystyle {\partial {\bf W}\over\partial t} -{\bf S}=0\;,$     (19)

after each other. The first equation is dealt with by the Roe solver routine, the second one you will have to write an integration routine for. Since it is an ordinary differential equation, standard methods can be used. Do not use a very fancy method however, realise that both the Roe solver and the splitting are only second order accurate, so it is not necessary to be more accurate than that when solving Eq. (19).

One can show that a more accurate (but perhaps unnecessary) approach to the splitting is to integrate Eq. 19 over ${1\over 2}\Delta t$, then Eq. 18 over $\Delta t$, then Eq. 19 over ${1\over 2}\Delta t$ again. This is known as Strang splitting.


next up previous
Next: Boundary conditions Up: Making a hydrodynamics code Previous: Choosing the time step
Garrelt Mellema 2003-01-20