= 3^rd^ order Runge-Kutta scheme = For the dicretization in time a 3^rd^ order low-storage Runge-Kutta scheme with 3 stages recommended by Williamson (1979) is used. Generally an N-stage Runge-Kutta scheme discretizes an ordinary differential equation of the form {{{ #!Latex \[ \frac{d \psi}{d t} & = & f(t,\psi) \] }}} as follows ( Baldauf, 2008 ): {{{ #!Latex \[ \psi^{(0)} = \psi^{n}, \] \[ k^{i} = f(t^{n} + \Delta t\,\alpha_{i},\,\psi^{i-1}), \] \[ \psi^{i} = \psi^{n} + \Delta t\,\sum^{i}_{j=1}\,\beta_{i+1,j}\,k^{j}, \quad \textnormal{mit} \quad i \in [1,2,...,N] \] \[ \psi^{n+1} = \psi^{N}. \] }}} The coefficients can written in a Butcher-Tableau in the following way: || α,,1,, || β,,1,1,, || {{{0}}} || ... || || || || α,,2,, || β,,2,1,, || β,,2,2,, || {{{0}}} || ... || || || ... || ... || || || || || || α,,N,, || β,,N,1,, || β,,N,2,, || ... || β,,N,N-1,, || {{{0}}} || || || β,,N+1,1,, || β,,N+1,2,, || ... || β,,N+1,N-1,, || β,,N+1,N,, || The appendant coefficients for the used Runge-Kutta scheme reads: || {{{0}}} || {{{0}}} || {{{0}}} || {{{0}}} || || {{{1/3}}} || {{{1/3}}} || {{{0}}} || {{{0}}} || || {{{3/4}}} || {{{-3/16}}} || {{{15/16}}} || {{{0}}} || || || {{{1/6}}} || {{{3/10}}} || {{{8/15}}} || For the implementation it is advantageous to compute ψ^N^ from the intermediate solutions ψ^1^ and ψ^2^ and combine the local tendencies in one array after the second substep to save storage (therefor low-storage scheme) as follows: {{{ #!Latex \[ \hat\psi_{1} & = & \psi_{n} + \frac{1}{3} \Delta t f\left(\psi_{n}\right) \] \[ \hat\psi_{2} & = & \hat\psi_{1} + \frac{1}{48} \Delta t \left( 45 f\left(\hat\psi_1\right) - 25 f\left(\psi_{n}\right) \right) \] \[ f\left(\hat\psi_{1}\right) & = &-153 f\left(\hat\psi_{1}\right) + 85 f\left(\psi_{n}\right) \] \[ \hat\psi_{3} & = & \left( \psi_{n+1} \right) = \hat\psi_{2} + \frac{1}{240} \Delta t \left( 128 f\left(\hat\psi_2\right) + 15 f \left(\hat\psi_{1}\right) \right) \] }}} For reasons of clarity the [../../app/inipar#timestep_scheme time integration] for several schemes (further schemes are: Leapfrog, Euler and 2^nd^ order Runge-Kutta scheme) is implemented as following (here for example the u-component of velocity): {{{ #!Latex \begin{split} \textnormal{u}\_\textnormal{p}\left(k,j,i\right) = \left(1.0 - \textnormal{tsc}\left(1\right) \right) * \textnormal{u}\_\textnormal{m}\left(k,j,i\right) + \textnormal{tsc}\left(1\right) * \textnormal{u}\left(k,j,i\right) + \textnormal{dt}\_\textnormal{3d}* \left( \\ \textnormal{tsc}\left(2\right) * \textnormal{tend}\left(k,j,i\right) + \textnormal{tsc}\left(3\right) * \textnormal{tu}\_\textnormal{m}\left(k,j,i\right) \\ + \textnormal{tsc}\left(4\right) * \left(\textnormal{p}\left(k,j,i)\right) - \textnormal{p}\left(k,j,i-1\right) \right) * \textnormal{ddx} \ \ ) \\ - \textnormal{tsc}\left(5\right) * \textnormal{rdf}\left(k\right) * \left(\textnormal{u}\left(k,j,i) - \textnormal{ug} \right) \end{split} }}} and steered by the array {{{tsc(1:5)}}} || {{{tsc(1)}}} || {{{tsc(2)}}} || {{{tsc(3)}}} || {{{tsc(4)}}} || {{{tsc(5)}}} || || {{{1}}} || {{{1/3}}} || {{{0}}} || {{{0}}} || {{{0}}} || 1^st^ substep || {{{1}}} || {{{15/16}}} || {{{-25/48}}} || {{{0}}} || {{{0}}} || 2^nd^ substep || {{{1}}} || {{{8/15}}} || {{{1/15}}} || {{{0}}} || {{{1}}} || 3^rd^ substep {{{u_p}}} is the prognosticated and {{{u}}} the current velocity at each substep. {{{u_m}}} denotes the velocity of the last substep (needed for Leapfrog). {{{tend}}} is the current tendency and {{{tu_m}}} the combined tendencies of the prior substeps. {{{tsc(4)}}} steers the preconditioning of the [../../app/inipar#psolver pressure solver] and {{{tsc(5)}}} the [../../app/inipar#rayleigh_damping_factor rayleigh damping]. === References === * '''Baldauf, M., 2008:''' Stability analysis for linear discretisations of the advection equation with Runge-Kutta time integration. ''J. Comput. Phys.'', '''227''', 6638-6659. * '''Durran, D. R., 1999:''' ''Numerical methods for wave equations in geophysical fluid dynamics.'' Springer Verlag, New York, 1. Auf\/l., 465 S. * '''Williamson, J. H., 1980:''' Low-storage Runge-Kutta schemes. ''J. Comput. Phys.'', '''35''', 48-56.