Changes between Version 9 and Version 10 of doc/tec/discret


Ignore:
Timestamp:
May 10, 2016 5:10:43 PM (9 years ago)
Author:
Giersch
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • doc/tec/discret

    v9 v10  
    7777Figure 2: The dispersion and dissipation error as a function of the dimensionless wavenumber ''κ Δx'' for WS3 (3^rd^ order scheme), WS4 (4^th^ order scheme), WS5, WS6 and the 2^nd^ order scheme of [#piacsek Piacsek and Williams (1970)] (PW).
    7878
    79 Fig. 2 shows that the dispersion error of the upwind schemes and the dispersion error of the next higher, even ordered scheme are identical. Generally the dispersion error decreases with increasing order of the discretization. However, no of the depicted schemes is able to adequately resolve structures with wavelengths near 2-''Δx'' (generally no scheme based on finite differences is capable to do this). The centered, even ordered schemes hold no dissipation errors. With increasing order the numerical dissipation is more local. So the maximum wavelength affected by the dissipation term is round about 8-''Δx'' with WS5, whereas wavelength of 16-''Δx'' are still affected with WS3. Accordingly to the maximum of the amplification factor at ''κ Δx'' = 1.69 (these waves become unstable at first) in conjunction with the used [../rk3 Runge-Kutta method] ([#baldauf Baldauf, 2008]), the 5^th^ order dissipation is sufficient to avoid instabilities. The maximum stable Courant-number is C,,r,, = 1.4 ([#baldauf Baldauf, 2008]).
     79Fig. 2 shows that the dispersion error of the upwind schemes and the dispersion error of the next higher, even ordered scheme are identical. Generally the dispersion error decreases with increasing order of the discretization. However, no of the depicted schemes is able to adequately resolve structures with wavelengths near 2-''Δx'' (generally no scheme based on finite differences is capable to do this). The centered, even ordered schemes hold no dissipation errors. With increasing order the numerical dissipation is more local. So the maximum wavelength affected by the dissipation term is round about 8-''Δx'' with WS5, whereas wavelength of 16-''Δx'' are still affected with WS3. Accordingly to the maximum of the amplification factor at ''κ Δx'' = 1.69 (these waves become unstable at first) in conjunction with the used [wiki:doc/tec/discret#3^rd^orderRunge-Kuttascheme Runge-Kutta method] ([#baldauf Baldauf, 2008]), the 5^th^ order dissipation is sufficient to avoid instabilities. The maximum stable Courant-number is C,,r,, = 1.4 ([#baldauf Baldauf, 2008]).
    8080
    8181'''Note: A stable numerical solution can only be guaranteed with the 3 rd order [../rk3 Runge-Kutta method].'''
     
    465465}}}
    466466
    467 where ''u'' denotes the corresponding velocity component. Furthermore, the turbulent fluxes are evaluated on each Runge-Kutta substep and weighted with the respective Runge-Kutta coefficients to remove dependencies of the Runge-Kutta substeps. The interpretation of the turbulent fluxes as variances and covariances is no longer valid when using WS5. For other advection schemes, like the PW-scheme, the interpretation of turbulent fluxes as co/variances is still valid, because the discretization is alike the computation of the co/variances. 
     467where ''u'' denotes the corresponding velocity component. Furthermore, the turbulent fluxes are evaluated on each Runge-Kutta substep and weighted with the respective Runge-Kutta coefficients to remove dependencies of the Runge-Kutta substeps. The interpretation of the turbulent fluxes as variances and covariances is no longer valid when using WS5. For other advection schemes, like the PW-scheme, the interpretation of turbulent fluxes as co/variances is still valid, because the discretization is alike the computation of the co/variances.
     468
     469= 3^rd^ order Runge-Kutta scheme =
     470
     471For the discretization in time a 3^rd^ order low-storage Runge-Kutta scheme with 3 stages is used recommended by [#williamson Williamson (1980)]. Generally an N-stage Runge-Kutta scheme discretizes an ordinary differential equation of the form
     472{{{
     473#!Latex
     474\begin{align*}
     475\dfrac{d \psi}{d t} = f(t,\psi)
     476\end{align*}
     477}}}
     478as follows ([#baldauf Baldauf, 2008]):
     479{{{
     480#!Latex
     481\begin{align*}
     482 \psi^{(0)} &= \psi^{n}, \\
     483 k^{i}      &= f(t^{n} + \Delta t\,\alpha_{i},\,\psi^{i-1}), \\
     484 \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] \\
     485 \psi^{n+1} &= \psi^{N}.
     486\end{align*}
     487}}}
     488The coefficients can be written in a so-called Butcher-Tableau:
     489|| α,,1,, || β,,1,1,, || {{{0}}} || ... || || ||
     490|| α,,2,, || β,,2,1,, || β,,2,2,, || {{{0}}} || ... || ||
     491|| ...    ||  ... || ||  ||  || ||
     492|| α,,N,, || β,,N,1,, || β,,N,2,, || ... || β,,N,N-1,, || {{{0}}} ||
     493||        || β,,N+1,1,, || β,,N+1,2,, || ... || β,,N+1,N-1,, ||  β,,N+1,N,, ||
     494
     495The appendant coefficients for the applied Runge-Kutta scheme reads:
     496||   {{{0}}}  ||   {{{0}}}   ||   {{{0}}}  ||   {{{0}}}  ||
     497||  {{{1/3}}} ||    {{{1/3}}} ||    {{{0}}}  ||  {{{0}}}   ||
     498|| {{{3/4}}}  ||  {{{-3/16}}} || {{{15/16}}} ||  {{{0}}}  ||
     499||      ||  {{{1/6}}}  ||  {{{3/10}}} || {{{8/15}}} ||
     500
     501To save storage 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 (therefore low-storage scheme) as follows:
     502{{{
     503#!Latex
     504\begin{align*}
     505 \hat\psi_{1}               &= \psi_{n} + \frac{1}{3} \Delta t f\left(\psi_{n}\right) \\
     506 \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) \\
     507 f\left(\hat\psi_{1}\right) &= -153 f\left(\hat\psi_{1}\right) + 85 f\left(\psi_{n}\right) \\
     508 \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)
     509\end{align*}
     510}}}
     511
     512For 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 follows (here e.g. the u-component of velocity):
     513
     514
     515{{{
     516u_p(k,j,i) = ( 1.0 - tsc(1) ) * u_m(k,j,i) + tsc(1) * u(k,j,i) + dt_3d * (
     517               tsc(2) * tend(k,j,i) + tsc(3) * tu_m(k,j,i)
     518             + tsc(4) * ( p(k,j,i) - p(k,j,i-1)) * ddx )
     519             - tsc(5) * rdf(k) * ( u(k,j,i) -ug )
     520}}}
     521
     522
     523and steered by the array {{{tsc(1:5)}}}
     524
     525|| {{{tsc(1)}}} || {{{tsc(2)}}} || {{{tsc(3)}}} || {{{tsc(4)}}} || {{{tsc(5)}}} ||
     526|| {{{1}}} || {{{1/3}}} || {{{0}}} || {{{0}}} || {{{0}}} || 1^st^ substep
     527|| {{{1}}} || {{{15/16}}} || {{{-25/48}}} || {{{0}}} || {{{0}}} || 2^nd^ substep
     528|| {{{1}}} || {{{8/15}}} || {{{1/15}}} || {{{0}}} || {{{1}}} || 3^rd^ substep
     529
     530''u_p'' is the prognosticated and ''u'' the current velocity at each substep. ''u_m'' denotes the velocity of the previous 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]. 
    468531
    469532== References ==
     
    479542* [=#piacsek]'''Piacsek SA, Williams GP.''' 1970. Conservation properties of convection difference schemes. J. Comput. Phys. 198: 580–616.
    480543
    481 * [=#baldauf]'''Baldauf, M.''' 2008 Stability analysis for linear discretisations of the advection equation with Runge-Kutta time integration. J. Comput. Phys. 227: 6638-6659.
     544* [=#baldauf]'''Baldauf M.''' 2008. Stability analysis for linear discretisations of the advection equation with Runge-Kutta time integration. J. Comput. Phys. 227: 6638-6659.
     545
     546* [=#durran]'''Durran DR''' 1999. Numerical methods for wave equations in geophysical fluid dynamics. Springer Verlag. New York. 465 S.