66 |
|
|
67 |
\end{minipage} } |
\end{minipage} } |
68 |
|
|
|
|
|
69 |
The space and time discretizations are treated seperately (method of |
The space and time discretizations are treated seperately (method of |
70 |
lines). The Adams-Bashforth time discretization reads: |
lines). Tendancies are calculated at time levels $n$ and $n-1$ and |
71 |
|
extrapolated to $n+1/2$ using the Adams-Bashforth method: |
72 |
\marginpar{$\epsilon$: {\bf AB\_eps}} |
\marginpar{$\epsilon$: {\bf AB\_eps}} |
|
\marginpar{$\Delta t$: {\bf deltaTtracer}} |
|
73 |
\begin{equation} |
\begin{equation} |
74 |
\tau^{(n+1)} = \tau^{(n)} + \Delta t \left( |
G^{(n+1/2)} = |
75 |
(\frac{3}{2} + \epsilon) G^{(n)} - (\frac{1}{2} + \epsilon) G^{(n-1)} |
(\frac{3}{2} + \epsilon) G^{(n)} - (\frac{1}{2} + \epsilon) G^{(n-1)} |
|
\right) |
|
76 |
\end{equation} |
\end{equation} |
77 |
where $G^{(n)} = G_{adv}^\tau + G_{diff}^\tau + G_{src}^\tau$ at time |
where $G^{(n)} = G_{adv}^\tau + G_{diff}^\tau + G_{src}^\tau$ at time |
78 |
step $n$. |
step $n$. The tendancy at $n-1$ is not re-calculated but rather the |
79 |
|
tendancy at $n$ is stored in a global array for later re-use. |
80 |
|
|
81 |
Strictly speaking the ABII scheme should be applied only to the |
\fbox{ \begin{minipage}{4.75in} |
82 |
advection terms. However, this scheme is only used in conjuction with |
{\em S/R ADAMS\_BASHFORTH2} ({\em model/src/adams\_bashforth2.F}) |
83 |
the standard second, third and fourth order advection |
|
84 |
schemes. Selection of any other advection scheme disables |
$G^{(n+1/2)}$: {\bf gTracer} (argument on exit) |
85 |
Adams-Bashforth for tracers so that explicit diffusion and forcing use |
|
86 |
the forward method. |
$G^{(n)}$: {\bf gTracer} (argument on entry) |
87 |
|
|
88 |
|
$G^{(n-1)}$: {\bf gTrNm1} (argument) |
89 |
|
|
90 |
|
$\epsilon$: {\bf ABeps} (PARAMS.h) |
91 |
|
|
92 |
|
\end{minipage} } |
93 |
|
|
94 |
|
The tracers are stepped forward in time using the extrapolated tendancy: |
95 |
|
\begin{equation} |
96 |
|
\tau^{(n+1)} = \tau^{(n)} + \Delta t G^{(n+1/2)} |
97 |
|
\end{equation} |
98 |
|
\marginpar{$\Delta t$: {\bf deltaTtracer}} |
99 |
|
|
100 |
\fbox{ \begin{minipage}{4.75in} |
\fbox{ \begin{minipage}{4.75in} |
101 |
{\em S/R TIMESTEP\_TRACER} ({\em model/src/timestep\_tracer.F}) |
{\em S/R TIMESTEP\_TRACER} ({\em model/src/timestep\_tracer.F}) |
102 |
|
|
103 |
$\tau$: {\bf tracer} (argument) |
$\tau^{(n+1)}$: {\bf gTracer} (argument on exit) |
104 |
|
|
105 |
$G^{(n)}$: {\bf gTracer} (argument) |
$\tau^{(n)}$: {\bf tracer} (argument on entry) |
106 |
|
|
107 |
$G^{(n-1)}$: {\bf gTrNm1} (argument) |
$G^{(n+1/2)}$: {\bf gTracer} (argument) |
108 |
|
|
109 |
$\Delta t$: {\bf deltaTtracer} (PARAMS.h) |
$\Delta t$: {\bf deltaTtracer} (PARAMS.h) |
110 |
|
|
111 |
\end{minipage} } |
\end{minipage} } |
112 |
|
|
113 |
|
Strictly speaking the ABII scheme should be applied only to the |
114 |
|
advection terms. However, this scheme is only used in conjuction with |
115 |
|
the standard second, third and fourth order advection |
116 |
|
schemes. Selection of any other advection scheme disables |
117 |
|
Adams-Bashforth for tracers so that explicit diffusion and forcing use |
118 |
|
the forward method. |
119 |
|
|
120 |
|
|
121 |
|
|
122 |
|
|
123 |
|
\section{Linear advection schemes} |
124 |
|
|
125 |
\begin{figure} |
\begin{figure} |
126 |
\resizebox{5.5in}{!}{\includegraphics{part2/advect-1d-lo.eps}} |
\resizebox{5.5in}{!}{\includegraphics{part2/advect-1d-lo.eps}} |
127 |
\caption{ |
\caption{ |
159 |
} |
} |
160 |
\end{figure} |
\end{figure} |
161 |
|
|
|
\section{Linear advection schemes} |
|
|
|
|
162 |
The advection schemes known as centered second order, centered fourth |
The advection schemes known as centered second order, centered fourth |
163 |
order, first order upwind and upwind biased third order are known as |
order, first order upwind and upwind biased third order are known as |
164 |
linear advection schemes because the coefficient for interpolation of |
linear advection schemes because the coefficient for interpolation of |
249 |
$\delta_{nn}$ to be evaluated. We are currently examing the accuracy |
$\delta_{nn}$ to be evaluated. We are currently examing the accuracy |
250 |
of this boundary condition and the effect on the solution. |
of this boundary condition and the effect on the solution. |
251 |
|
|
252 |
|
\fbox{ \begin{minipage}{4.75in} |
253 |
|
{\em S/R GAD\_U3\_ADV\_X} ({\em gad\_u3\_adv\_x.F}) |
254 |
|
|
255 |
|
$F_x$: {\bf uT} (argument) |
256 |
|
|
257 |
|
$U$: {\bf uTrans} (argument) |
258 |
|
|
259 |
|
$\tau$: {\bf tracer} (argument) |
260 |
|
|
261 |
|
{\em S/R GAD\_U3\_ADV\_Y} ({\em gad\_u3\_adv\_y.F}) |
262 |
|
|
263 |
|
$F_y$: {\bf vT} (argument) |
264 |
|
|
265 |
|
$V$: {\bf vTrans} (argument) |
266 |
|
|
267 |
|
$\tau$: {\bf tracer} (argument) |
268 |
|
|
269 |
|
{\em S/R GAD\_U3\_ADV\_R} ({\em gad\_u3\_adv\_r.F}) |
270 |
|
|
271 |
|
$F_r$: {\bf wT} (argument) |
272 |
|
|
273 |
|
$W$: {\bf rTrans} (argument) |
274 |
|
|
275 |
|
$\tau$: {\bf tracer} (argument) |
276 |
|
|
277 |
|
\end{minipage} } |
278 |
|
|
279 |
\subsection{Centered fourth order advection} |
\subsection{Centered fourth order advection} |
280 |
|
|
297 |
As for the third order scheme, the best discretization near boundaries |
As for the third order scheme, the best discretization near boundaries |
298 |
is under investigation but currenlty $\delta_i \tau=0$ on a boundary. |
is under investigation but currenlty $\delta_i \tau=0$ on a boundary. |
299 |
|
|
300 |
|
\fbox{ \begin{minipage}{4.75in} |
301 |
|
{\em S/R GAD\_C4\_ADV\_X} ({\em gad\_c4\_adv\_x.F}) |
302 |
|
|
303 |
|
$F_x$: {\bf uT} (argument) |
304 |
|
|
305 |
|
$U$: {\bf uTrans} (argument) |
306 |
|
|
307 |
|
$\tau$: {\bf tracer} (argument) |
308 |
|
|
309 |
|
{\em S/R GAD\_C4\_ADV\_Y} ({\em gad\_c4\_adv\_y.F}) |
310 |
|
|
311 |
|
$F_y$: {\bf vT} (argument) |
312 |
|
|
313 |
|
$V$: {\bf vTrans} (argument) |
314 |
|
|
315 |
|
$\tau$: {\bf tracer} (argument) |
316 |
|
|
317 |
|
{\em S/R GAD\_C4\_ADV\_R} ({\em gad\_c4\_adv\_r.F}) |
318 |
|
|
319 |
|
$F_r$: {\bf wT} (argument) |
320 |
|
|
321 |
|
$W$: {\bf rTrans} (argument) |
322 |
|
|
323 |
|
$\tau$: {\bf tracer} (argument) |
324 |
|
|
325 |
|
\end{minipage} } |
326 |
|
|
327 |
|
|
328 |
\subsection{First order upwind advection} |
\subsection{First order upwind advection} |
329 |
|
|
330 |
Although the upwind scheme is the underlying scheme for the robust or |
Although the upwind scheme is the underlying scheme for the robust or |
390 |
\psi(r) = \max[0,\min[1,2r],\min[2,r]] |
\psi(r) = \max[0,\min[1,2r],\min[2,r]] |
391 |
\end{equation} |
\end{equation} |
392 |
|
|
393 |
|
\fbox{ \begin{minipage}{4.75in} |
394 |
|
{\em S/R GAD\_FLUXLIMIT\_ADV\_X} ({\em gad\_fluxlimit\_adv\_x.F}) |
395 |
|
|
396 |
|
$F_x$: {\bf uT} (argument) |
397 |
|
|
398 |
|
$U$: {\bf uTrans} (argument) |
399 |
|
|
400 |
|
$\tau$: {\bf tracer} (argument) |
401 |
|
|
402 |
|
{\em S/R GAD\_FLUXLIMIT\_ADV\_Y} ({\em gad\_fluxlimit\_adv\_y.F}) |
403 |
|
|
404 |
|
$F_y$: {\bf vT} (argument) |
405 |
|
|
406 |
|
$V$: {\bf vTrans} (argument) |
407 |
|
|
408 |
|
$\tau$: {\bf tracer} (argument) |
409 |
|
|
410 |
|
{\em S/R GAD\_FLUXLIMIT\_ADV\_R} ({\em gad\_fluxlimit\_adv\_r.F}) |
411 |
|
|
412 |
|
$F_r$: {\bf wT} (argument) |
413 |
|
|
414 |
|
$W$: {\bf rTrans} (argument) |
415 |
|
|
416 |
|
$\tau$: {\bf tracer} (argument) |
417 |
|
|
418 |
|
\end{minipage} } |
419 |
|
|
420 |
|
|
421 |
\subsection{Third order direct space time} |
\subsection{Third order direct space time} |
422 |
|
|
455 |
unstable, the scheme is extremely accurate |
unstable, the scheme is extremely accurate |
456 |
(Fig.~\ref{fig:advect-1d-hi}) with only minor overshoots. |
(Fig.~\ref{fig:advect-1d-hi}) with only minor overshoots. |
457 |
|
|
458 |
|
\fbox{ \begin{minipage}{4.75in} |
459 |
|
{\em S/R GAD\_DST3\_ADV\_X} ({\em gad\_dst3\_adv\_x.F}) |
460 |
|
|
461 |
|
$F_x$: {\bf uT} (argument) |
462 |
|
|
463 |
|
$U$: {\bf uTrans} (argument) |
464 |
|
|
465 |
|
$\tau$: {\bf tracer} (argument) |
466 |
|
|
467 |
|
{\em S/R GAD\_DST3\_ADV\_Y} ({\em gad\_dst3\_adv\_y.F}) |
468 |
|
|
469 |
|
$F_y$: {\bf vT} (argument) |
470 |
|
|
471 |
|
$V$: {\bf vTrans} (argument) |
472 |
|
|
473 |
|
$\tau$: {\bf tracer} (argument) |
474 |
|
|
475 |
|
{\em S/R GAD\_DST3\_ADV\_R} ({\em gad\_dst3\_adv\_r.F}) |
476 |
|
|
477 |
|
$F_r$: {\bf wT} (argument) |
478 |
|
|
479 |
|
$W$: {\bf rTrans} (argument) |
480 |
|
|
481 |
|
$\tau$: {\bf tracer} (argument) |
482 |
|
|
483 |
|
\end{minipage} } |
484 |
|
|
485 |
|
|
486 |
\subsection{Third order direct space time with flux limiting} |
\subsection{Third order direct space time with flux limiting} |
487 |
|
|
488 |
The overshoots in the DST3 method can be controlled with a flux limiter. |
The overshoots in the DST3 method can be controlled with a flux limiter. |
503 |
\psi(r) = \max[0, \min[\min(1,d_0+d_1r],\frac{1-c}{c}r ]] |
\psi(r) = \max[0, \min[\min(1,d_0+d_1r],\frac{1-c}{c}r ]] |
504 |
\end{equation} |
\end{equation} |
505 |
|
|
506 |
|
\fbox{ \begin{minipage}{4.75in} |
507 |
|
{\em S/R GAD\_DST3FL\_ADV\_X} ({\em gad\_dst3\_adv\_x.F}) |
508 |
|
|
509 |
|
$F_x$: {\bf uT} (argument) |
510 |
|
|
511 |
|
$U$: {\bf uTrans} (argument) |
512 |
|
|
513 |
|
$\tau$: {\bf tracer} (argument) |
514 |
|
|
515 |
|
{\em S/R GAD\_DST3FL\_ADV\_Y} ({\em gad\_dst3\_adv\_y.F}) |
516 |
|
|
517 |
|
$F_y$: {\bf vT} (argument) |
518 |
|
|
519 |
|
$V$: {\bf vTrans} (argument) |
520 |
|
|
521 |
|
$\tau$: {\bf tracer} (argument) |
522 |
|
|
523 |
|
{\em S/R GAD\_DST3FL\_ADV\_R} ({\em gad\_dst3\_adv\_r.F}) |
524 |
|
|
525 |
|
$F_r$: {\bf wT} (argument) |
526 |
|
|
527 |
|
$W$: {\bf rTrans} (argument) |
528 |
|
|
529 |
|
$\tau$: {\bf tracer} (argument) |
530 |
|
|
531 |
|
\end{minipage} } |
532 |
|
|
533 |
|
|
534 |
\subsection{Multi-dimensional advection} |
\subsection{Multi-dimensional advection} |
535 |
|
|
536 |
|
\begin{figure} |
537 |
|
\resizebox{5.5in}{!}{\includegraphics{part2/advect-2d-lo-diag.eps}} |
538 |
|
\caption{ |
539 |
|
Comparison of advection schemes in two dimensions; diagonal advection |
540 |
|
of a resolved Guassian feature. Courant number is 0.01 with |
541 |
|
30$\times$30 points and solutions are shown for T=1/2. White lines |
542 |
|
indicate zero crossing (ie. the presence of false minima). The left |
543 |
|
column shows the second order schemes; top) centered second order with |
544 |
|
Adams-Bashforth, middle) Lax-Wendroff and bottom) Superbee flux |
545 |
|
limited. The middle column shows the third order schemes; top) upwind |
546 |
|
biased third order with Adams-Bashforth, middle) third order direct |
547 |
|
space-time method and bottom) the same with flux limiting. The top |
548 |
|
right panel shows the centered fourth order scheme with |
549 |
|
Adams-Bashforth and right middle panel shows a fourth order variant on |
550 |
|
the DST method. Bottom right panel shows the Superbee flux limiter |
551 |
|
(second order) applied independantly in each direction (method of |
552 |
|
lines). |
553 |
|
\label{fig:advect-2d-lo-diag} |
554 |
|
} |
555 |
|
\end{figure} |
556 |
|
|
557 |
|
\begin{figure} |
558 |
|
\resizebox{5.5in}{!}{\includegraphics{part2/advect-2d-mid-diag.eps}} |
559 |
|
\caption{ |
560 |
|
Comparison of advection schemes in two dimensions; diagonal advection |
561 |
|
of a resolved Guassian feature. Courant number is 0.27 with |
562 |
|
30$\times$30 points and solutions are shown for T=1/2. White lines |
563 |
|
indicate zero crossing (ie. the presence of false minima). The left |
564 |
|
column shows the second order schemes; top) centered second order with |
565 |
|
Adams-Bashforth, middle) Lax-Wendroff and bottom) Superbee flux |
566 |
|
limited. The middle column shows the third order schemes; top) upwind |
567 |
|
biased third order with Adams-Bashforth, middle) third order direct |
568 |
|
space-time method and bottom) the same with flux limiting. The top |
569 |
|
right panel shows the centered fourth order scheme with |
570 |
|
Adams-Bashforth and right middle panel shows a fourth order variant on |
571 |
|
the DST method. Bottom right panel shows the Superbee flux limiter |
572 |
|
(second order) applied independantly in each direction (method of |
573 |
|
lines). |
574 |
|
\label{fig:advect-2d-mid-diag} |
575 |
|
} |
576 |
|
\end{figure} |
577 |
|
|
578 |
|
\begin{figure} |
579 |
|
\resizebox{5.5in}{!}{\includegraphics{part2/advect-2d-hi-diag.eps}} |
580 |
|
\caption{ |
581 |
|
Comparison of advection schemes in two dimensions; diagonal advection |
582 |
|
of a resolved Guassian feature. Courant number is 0.47 with |
583 |
|
30$\times$30 points and solutions are shown for T=1/2. White lines |
584 |
|
indicate zero crossings and initial maximum values (ie. the presence |
585 |
|
of false extrema). The left column shows the second order schemes; |
586 |
|
top) centered second order with Adams-Bashforth, middle) Lax-Wendroff |
587 |
|
and bottom) Superbee flux limited. The middle column shows the third |
588 |
|
order schemes; top) upwind biased third order with Adams-Bashforth, |
589 |
|
middle) third order direct space-time method and bottom) the same with |
590 |
|
flux limiting. The top right panel shows the centered fourth order |
591 |
|
scheme with Adams-Bashforth and right middle panel shows a fourth |
592 |
|
order variant on the DST method. Bottom right panel shows the Superbee |
593 |
|
flux limiter (second order) applied independantly in each direction |
594 |
|
(method of lines). |
595 |
|
\label{fig:advect-2d-hi-diag} |
596 |
|
} |
597 |
|
\end{figure} |
598 |
|
|
599 |
|
|
600 |
|
|
601 |
In many of the aforementioned advection schemes the behaviour in |
In many of the aforementioned advection schemes the behaviour in |
602 |
multiple dimensions is not necessarily as good as the one dimensional |
multiple dimensions is not necessarily as good as the one dimensional |
603 |
behaviour. For instance, a shape preserving monotonic scheme in one |
behaviour. For instance, a shape preserving monotonic scheme in one |
631 |
\begin{equation} |
\begin{equation} |
632 |
\tau^{n+1} = \tau^{n} + \Delta t \left( G^{n+1/2}_{adv} + G_{diff}(\tau^{n}) + G^{n}_{forcing} \right) |
\tau^{n+1} = \tau^{n} + \Delta t \left( G^{n+1/2}_{adv} + G_{diff}(\tau^{n}) + G^{n}_{forcing} \right) |
633 |
\end{equation} |
\end{equation} |
634 |
|
|
635 |
|
\fbox{ \begin{minipage}{4.75in} |
636 |
|
{\em S/R GAD\_ADVECTION} ({\em gad\_advection.F}) |
637 |
|
|
638 |
|
$\tau$: {\bf Tracer} (argument) |
639 |
|
|
640 |
|
$G^{n+1/2}_{adv}$: {\bf Gtracer} (argument) |
641 |
|
|
642 |
|
$F_x, F_y, F_r$: {\bf af} (local) |
643 |
|
|
644 |
|
$U$: {\bf uTrans} (local) |
645 |
|
|
646 |
|
$V$: {\bf vTrans} (local) |
647 |
|
|
648 |
|
$W$: {\bf rTrans} (local) |
649 |
|
|
650 |
|
\end{minipage} } |
651 |
|
|
652 |
|
|
653 |
|
\section{Comparison of advection schemes} |
654 |
|
|
655 |
|
Figs.~\ref{fig:advect-2d-lo-diag}, \ref{fig:advect-2d-mid-diag} and |
656 |
|
\ref{fig:advect-2d-hi-diag} show solutions to a simple diagonal |
657 |
|
advection problem using a selection of schemes for low, moderate and |
658 |
|
high Courant numbers, respectively. The top row shows the linear |
659 |
|
schemes, integrated with the Adams-Bashforth method. Theses schemes |
660 |
|
are clearly unstable for the high Courant number and weakly unstable |
661 |
|
for the moderate Courant number. The presence of false extrema is very |
662 |
|
apparent for all Courant numbers. The middle row shows solutions |
663 |
|
obtained with the unlimited but multi-dimensional schemes. These |
664 |
|
solutions also exhibit false extrema though the pattern now shows |
665 |
|
symmetry due to the multi-dimensional scheme. Also, the schemes are |
666 |
|
stable at high Courant number where the linear schemes weren't. The |
667 |
|
bottom row (left and middle) shows the limited schemes and most |
668 |
|
obvious is the absence of false extrema. The accuracy and stability of |
669 |
|
the unlimited non-linear schemes is retained at high Courant number |
670 |
|
but at low Courant number the tendancy is to loose amplitude in sharp |
671 |
|
peaks due to diffusion. The one dimensional tests shown in |
672 |
|
Figs.~\ref{fig:advect-1d-lo} and \ref{fig:advect-1d-hi} showed this |
673 |
|
phenomenum. |
674 |
|
|
675 |
|
Finally, the bottom left and right panels use the same advection |
676 |
|
scheme but the right does not use the mutli-dimensional method. At low |
677 |
|
Courant number this appears to not matter but for moderate Courant |
678 |
|
number severe distortion of the feature is apparent. Moreoever, the |
679 |
|
stability of the multi-dimensional scheme is determined by the maximum |
680 |
|
Courant number applied of each dimension while the stability of the |
681 |
|
method of lines is determined by the sum. Hence, in the high Courant |
682 |
|
number plot, the scheme is unstable. |
683 |
|
|
684 |
|
With many advection schemes implemented in the code two questions |
685 |
|
arise: ``Which scheme is best?'' and ``Why don't you just offer the |
686 |
|
best advection scheme?''. Unfortunately, no one advection scheme is |
687 |
|
``the best'' for all particular applications and for new applications |
688 |
|
it is often a matter of trial to determine which is most |
689 |
|
suitable. Here are some guidelines but these are not the rule; |
690 |
|
\begin{itemize} |
691 |
|
\item If you have a coarsely resolved model, using a |
692 |
|
positive or upwind biased scheme will introduce significant diffusion |
693 |
|
to the solution and using a centered higher order scheme will |
694 |
|
introduce more noise. In this case, simplest may be best. |
695 |
|
\item If you have a high resolution model, using a higher order |
696 |
|
scheme will give a more accurate solution but scale-selective |
697 |
|
diffusion might need to be employed. The flux limited methods |
698 |
|
offer similar accuracy in this regime. |
699 |
|
\item If your solution has shocks or propagatin fronts then a |
700 |
|
flux limited scheme is almost essential. |
701 |
|
\item If your time-step is limited by advection, the multi-dimensional |
702 |
|
non-linear schemes have the most stablility (upto Courant number 1). |
703 |
|
\item If you need to know how much diffusion/dissipation has occured you |
704 |
|
will have a lot of trouble figuring it out with a non-linear method. |
705 |
|
\item The presence of false extrema is unphysical and this alone is the |
706 |
|
strongest argument for using a positive scheme. |
707 |
|
\end{itemize} |