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. |
| 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. |
| 468 | |
| 469 | = 3^rd^ order Runge-Kutta scheme = |
| 470 | |
| 471 | For 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 | }}} |
| 478 | as 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 | }}} |
| 488 | The 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 | |
| 495 | The 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 | |
| 501 | To 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 | |
| 512 | 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 follows (here e.g. the u-component of velocity): |
| 513 | |
| 514 | |
| 515 | {{{ |
| 516 | u_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 | |
| 523 | and 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]. |