/[MITgcm]/manual/s_algorithm/text/time_stepping.tex
ViewVC logotype

Diff of /manual/s_algorithm/text/time_stepping.tex

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.8 by adcroft, Fri Oct 5 19:41:08 2001 UTC revision 1.14 by adcroft, Wed Nov 14 21:07:13 2001 UTC
# Line 13  and diagnostic equations requires a mode Line 13  and diagnostic equations requires a mode
13  forward prognostic variables while satisfying constraints imposed by  forward prognostic variables while satisfying constraints imposed by
14  diagnostic equations.  diagnostic equations.
15    
16  Since the model comes in several flavours and formulation, it would be  Since the model comes in several flavors and formulation, it would be
17  confusing to present the model algorithm exactly as written into code  confusing to present the model algorithm exactly as written into code
18  along with all the switches and optional terms. Instead, we present  along with all the switches and optional terms. Instead, we present
19  the algorithm for each of the basic formulations which are:  the algorithm for each of the basic formulations which are:
# Line 37  method, with a rigid-lid model in sectio Line 37  method, with a rigid-lid model in sectio
37  \ref{sect:pressure-method-rigid-lid}. This algorithm is essentially  \ref{sect:pressure-method-rigid-lid}. This algorithm is essentially
38  unchanged, apart for some coefficients, when the rigid lid assumption  unchanged, apart for some coefficients, when the rigid lid assumption
39  is replaced with a linearized implicit free-surface, described in  is replaced with a linearized implicit free-surface, described in
40  section \ref{sect:pressure-method-linear-backward}. These two flavours  section \ref{sect:pressure-method-linear-backward}. These two flavors
41  of the pressure-method encompass all formulations of the model as it  of the pressure-method encompass all formulations of the model as it
42  exists today. The integration of explicit in time terms is out-lined  exists today. The integration of explicit in time terms is out-lined
43  in section \ref{sect:adams-bashforth} and put into the context of the  in section \ref{sect:adams-bashforth} and put into the context of the
# Line 61  A schematic of the evolution in time of Line 61  A schematic of the evolution in time of
61  algorithm. A prediction for the flow variables at time level $n+1$ is  algorithm. A prediction for the flow variables at time level $n+1$ is
62  made based only on the explicit terms, $G^{(n+^1/_2)}$, and denoted  made based only on the explicit terms, $G^{(n+^1/_2)}$, and denoted
63  $u^*$, $v^*$. Next, a pressure field is found such that $u^{n+1}$,  $u^*$, $v^*$. Next, a pressure field is found such that $u^{n+1}$,
64  $v^{n+1}$ will be non-divergent. Conceptually, the $*$ quantitites  $v^{n+1}$ will be non-divergent. Conceptually, the $*$ quantities
65  exist at time level $n+1$ but they are intermediate and only  exist at time level $n+1$ but they are intermediate and only
66  temporary.}  temporary.}
67  \label{fig:pressure-method-rigid-lid}  \label{fig:pressure-method-rigid-lid}
# Line 80  FORWARD\_STEP \\ Line 80  FORWARD\_STEP \\
80  \>\> CALC\_GRAD\_PHI\_SURF \` $\nabla \eta^{n+1}$ \\  \>\> CALC\_GRAD\_PHI\_SURF \` $\nabla \eta^{n+1}$ \\
81  \>\> CORRECTION\_STEP \` $u^{n+1}$,$v^{n+1}$ (\ref{eq:un+1-rigid-lid},\ref{eq:vn+1-rigid-lid})  \>\> CORRECTION\_STEP \` $u^{n+1}$,$v^{n+1}$ (\ref{eq:un+1-rigid-lid},\ref{eq:vn+1-rigid-lid})
82  \end{tabbing} \end{minipage} } \end{center}  \end{tabbing} \end{minipage} } \end{center}
83  \caption{Calling tree for the pressure method alogtihm}  \caption{Calling tree for the pressure method algorihtm}
84  \label{fig:call-tree-pressure-method}  \label{fig:call-tree-pressure-method}
85  \end{figure}  \end{figure}
86    
# Line 102  flow boundary conditions applied, become Line 102  flow boundary conditions applied, become
102  \label{eq:rigid-lid-continuity}  \label{eq:rigid-lid-continuity}
103  \end{equation}  \end{equation}
104  Here, $H\widehat{u} = \int_H u dz$ is the depth integral of $u$,  Here, $H\widehat{u} = \int_H u dz$ is the depth integral of $u$,
105  similarly for $H\widehat{v}$. The rigid-lid approzimation sets $w=0$  similarly for $H\widehat{v}$. The rigid-lid approximation sets $w=0$
106  at the lid so that it does not move but allows a pressure to be  at the lid so that it does not move but allows a pressure to be
107  exerted on the fluid by the lid. The horizontal momentum equations and  exerted on the fluid by the lid. The horizontal momentum equations and
108  vertically integrated continuity equation are be discretized in time  vertically integrated continuity equation are be discretized in time
# Line 130  pressure gradient is explicit and so can Line 130  pressure gradient is explicit and so can
130  $G$.  $G$.
131    
132  Substituting the two momentum equations into the depth integrated  Substituting the two momentum equations into the depth integrated
133  continuity equation eliminates $u^{n+1}$ and $v^{n+1}$ yeilding an  continuity equation eliminates $u^{n+1}$ and $v^{n+1}$ yielding an
134  elliptic equation for $\eta^{n+1}$. Equations  elliptic equation for $\eta^{n+1}$. Equations
135  \ref{eq:discrete-time-u}, \ref{eq:discrete-time-v} and  \ref{eq:discrete-time-u}, \ref{eq:discrete-time-v} and
136  \ref{eq:discrete-time-cont-rigid-lid} can then be re-arranged as follows:  \ref{eq:discrete-time-cont-rigid-lid} can then be re-arranged as follows:
# Line 157  Fig.~\ref{fig:pressure-method-rigid-lid} Line 157  Fig.~\ref{fig:pressure-method-rigid-lid}
157  with the future flow field (time level $n+1$) but it could equally  with the future flow field (time level $n+1$) but it could equally
158  have been drawn as staggered in time with the flow.  have been drawn as staggered in time with the flow.
159    
160  The correspondance to the code is as follows:  The correspondence to the code is as follows:
161  \begin{itemize}  \begin{itemize}
162  \item  \item
163  the prognostic phase, equations \ref{eq:ustar-rigid-lid} and \ref{eq:vstar-rigid-lid},  the prognostic phase, equations \ref{eq:ustar-rigid-lid} and \ref{eq:vstar-rigid-lid},
# Line 165  stepping forward $u^n$ and $v^n$ to $u^{ Line 165  stepping forward $u^n$ and $v^n$ to $u^{
165  {\em TIMESTEP.F}  {\em TIMESTEP.F}
166  \item  \item
167  the vertical integration, $H \widehat{u^*}$ and $H  the vertical integration, $H \widehat{u^*}$ and $H
168  \widehat{v^*}$, divergence and invertion of the elliptic operator in  \widehat{v^*}$, divergence and inversion of the elliptic operator in
169  equation \ref{eq:elliptic} is coded in {\em  equation \ref{eq:elliptic} is coded in {\em
170  SOLVE\_FOR\_PRESSURE.F}  SOLVE\_FOR\_PRESSURE.F}
171  \item  \item
# Line 250  to~\ref{eq:vn+1-backward-free-surface}, Line 250  to~\ref{eq:vn+1-backward-free-surface},
250  the pressure method algorithm with a backward implicit, linearized  the pressure method algorithm with a backward implicit, linearized
251  free surface. The method is still formerly a pressure method because  free surface. The method is still formerly a pressure method because
252  in the limit of large $\Delta t$ the rigid-lid method is  in the limit of large $\Delta t$ the rigid-lid method is
253  reovered. However, the implicit treatment of the free-surface allows  recovered. However, the implicit treatment of the free-surface allows
254  the flow to be divergent and for the surface pressure/elevation to  the flow to be divergent and for the surface pressure/elevation to
255  respond on a finite time-scale (as opposed to instantly). To recovere  respond on a finite time-scale (as opposed to instantly). To recover
256  the rigid-lid formulation, we introduced a switch-like parameter,  the rigid-lid formulation, we introduced a switch-like parameter,
257  $\epsilon_{fs}$, which selects between the free-surface and rigid-lid;  $\epsilon_{fs}$, which selects between the free-surface and rigid-lid;
258  $\epsilon_{fs}=1$ allows the free-surface to evolve; $\epsilon_{fs}=0$  $\epsilon_{fs}=1$ allows the free-surface to evolve; $\epsilon_{fs}=0$
# Line 331  A stability analysis for a relaxation eq Line 331  A stability analysis for a relaxation eq
331    
332  Vertical diffusion and viscosity can be treated implicitly in time  Vertical diffusion and viscosity can be treated implicitly in time
333  using the backward method which is an intrinsic scheme. For tracers,  using the backward method which is an intrinsic scheme. For tracers,
334  the time discrretized equation is:  the time discretized equation is:
335  \begin{equation}  \begin{equation}
336  \tau^{n+1} - \Delta t \partial_r \kappa_v \partial_r \tau^{n+1} =  \tau^{n+1} - \Delta t \partial_r \kappa_v \partial_r \tau^{n+1} =
337  \tau^{n} + \Delta t G_\tau^{(n+1/2)}  \tau^{n} + \Delta t G_\tau^{(n+1/2)}
# Line 377  implicit and are thus cast as a an expli Line 377  implicit and are thus cast as a an expli
377  \caption{  \caption{
378  A schematic of the explicit Adams-Bashforth and implicit time-stepping  A schematic of the explicit Adams-Bashforth and implicit time-stepping
379  phases of the algorithm. All prognostic variables are co-located in  phases of the algorithm. All prognostic variables are co-located in
380  time. Explicit tendancies are evaluated at time level $n$ as a  time. Explicit tendencies are evaluated at time level $n$ as a
381  function of the state at that time level (dotted arrow). The explicit  function of the state at that time level (dotted arrow). The explicit
382  tendancy from the previous time level, $n-1$, is used to extrapolate  tendency from the previous time level, $n-1$, is used to extrapolate
383  tendancies to $n+1/2$ (dashed arrow). This extrapolated tendancy  tendencies to $n+1/2$ (dashed arrow). This extrapolated tendency
384  allows variables to be stably integrated forward-in-time to render an  allows variables to be stably integrated forward-in-time to render an
385  estimate ($*$-variables) at the $n+1$ time level (solid  estimate ($*$-variables) at the $n+1$ time level (solid
386  arc-arrow). The operator ${\cal L}$ formed from implicit-in-time terms  arc-arrow). The operator ${\cal L}$ formed from implicit-in-time terms
# Line 417  Adams-Bashforth time-stepping.} Line 417  Adams-Bashforth time-stepping.}
417  \label{fig:call-tree-adams-bashforth-sync}  \label{fig:call-tree-adams-bashforth-sync}
418  \end{figure}  \end{figure}
419    
420  The Adams-Bashforth extrapolation of explicit tendancies fits neatly  The Adams-Bashforth extrapolation of explicit tendencies fits neatly
421  into the pressure method algorithm when all state variables are  into the pressure method algorithm when all state variables are
422  co-locacted in time. Fig.~\ref{fig:adams-bashforth-sync} illustrates  co-located in time. Fig.~\ref{fig:adams-bashforth-sync} illustrates
423  the location of variables in time and the evolution of the algorithm  the location of variables in time and the evolution of the algorithm
424  with time. The algorithm can be represented by the sequential solution  with time. The algorithm can be represented by the sequential solution
425  of the follow equations:  of the follow equations:
# Line 453  G_{\theta,S}^{(n+1/2)} & = & (3/2+\epsil Line 453  G_{\theta,S}^{(n+1/2)} & = & (3/2+\epsil
453  \end{eqnarray}  \end{eqnarray}
454  Fig.~\ref{fig:adams-bashforth-sync} illustrates the location of  Fig.~\ref{fig:adams-bashforth-sync} illustrates the location of
455  variables in time and evolution of the algorithm with time. The  variables in time and evolution of the algorithm with time. The
456  Adams-Bashforth extrapolation of the tracer tendancies is illustrated  Adams-Bashforth extrapolation of the tracer tendencies is illustrated
457  byt the dashed arrow, the prediction at $n+1$ is indicated by the  by the dashed arrow, the prediction at $n+1$ is indicated by the
458  solid arc. Inversion of the implicit terms, ${\cal  solid arc. Inversion of the implicit terms, ${\cal
459  L}^{-1}_{\theta,S}$, then yields the new tracer fields at $n+1$. All  L}^{-1}_{\theta,S}$, then yields the new tracer fields at $n+1$. All
460  these operations are carried out in subroutine {\em THERMODYNAMICS} an  these operations are carried out in subroutine {\em THERMODYNAMICS} an
# Line 480  time-step. The corresponding calling tre Line 480  time-step. The corresponding calling tre
480  \caption{  \caption{
481  A schematic of the explicit Adams-Bashforth and implicit time-stepping  A schematic of the explicit Adams-Bashforth and implicit time-stepping
482  phases of the algorithm but with staggering in time of thermodynamic  phases of the algorithm but with staggering in time of thermodynamic
483  variables with the flow. Explicit thermodynamics tendancies are  variables with the flow. Explicit thermodynamics tendencies are
484  evaluated at time level $n-1/2$ as a function of the thermodynamics  evaluated at time level $n-1/2$ as a function of the thermodynamics
485  state at that time level $n$ and flow at time $n$ (dotted arrow). The  state at that time level $n$ and flow at time $n$ (dotted arrow). The
486  explicit tendancy from the previous time level, $n-3/2$, is used to  explicit tendency from the previous time level, $n-3/2$, is used to
487  extrapolate tendancies to $n$ (dashed arrow). This extrapolated  extrapolate tendencies to $n$ (dashed arrow). This extrapolated
488  tendancy allows thermo-dynamics variables to be stably integrated  tendency allows thermo-dynamics variables to be stably integrated
489  forward-in-time to render an estimate ($*$-variables) at the $n+1/2$  forward-in-time to render an estimate ($*$-variables) at the $n+1/2$
490  time level (solid arc-arrow). The implicit-in-time operator ${\cal  time level (solid arc-arrow). The implicit-in-time operator ${\cal
491  L_{\theta,S}}$ is solved to yield the thermodynamic variables at time  L_{\theta,S}}$ is solved to yield the thermodynamic variables at time
# Line 502  limiting process for determining a stabl Line 502  limiting process for determining a stabl
502  circumstance, it is more efficient to stagger in time the  circumstance, it is more efficient to stagger in time the
503  thermodynamic variables with the flow  thermodynamic variables with the flow
504  variables. Fig.~\ref{fig:adams-bashforth-staggered} illustrates the  variables. Fig.~\ref{fig:adams-bashforth-staggered} illustrates the
505  staggering and algorith. The key difference between this and  staggering and algorithm. The key difference between this and
506  Fig.~\ref{fig:adams-bashforth-sync} is that the new thermodynamics  Fig.~\ref{fig:adams-bashforth-sync} is that the new thermodynamics
507  fields are used to compute the hydrostatic pressure at time level  fields are used to compute the hydrostatic pressure at time level
508  $n+1/2$. The essentially allows the gravity wave terms to leap-frog in  $n+1/2$. The essentially allows the gravity wave terms to leap-frog in
# Line 515  algorithm involves replacing equation \r Line 515  algorithm involves replacing equation \r
515  \phi_{hyd}^n = \int b(\theta^{n+1},S^{n+1}) dr  \phi_{hyd}^n = \int b(\theta^{n+1},S^{n+1}) dr
516  \end{displaymath}  \end{displaymath}
517  but the pressure gradient must also be taken out of the  but the pressure gradient must also be taken out of the
518  Adams-Bashforth extrapoltion. Also, retaining the integer time-levels,  Adams-Bashforth extrapolation. Also, retaining the integer time-levels,
519  $n$ and $n+1$, does not give a user the sense of where variables are  $n$ and $n+1$, does not give a user the sense of where variables are
520  located in time.  Instead, we re-write the entire algorithm,  located in time.  Instead, we re-write the entire algorithm,
521  \ref{eq:Gt-n-sync} to \ref{eq:v-n+1-sync}, annotating the  \ref{eq:Gt-n-sync} to \ref{eq:v-n+1-sync}, annotating the
# Line 554  is activated with the run-time flag {\bf Line 554  is activated with the run-time flag {\bf
554  {\em PARM01} of {\em data}.  {\em PARM01} of {\em data}.
555    
556  The only difficulty with this approach is apparent in equation  The only difficulty with this approach is apparent in equation
557  $\ref{eq:Gt-n-staggered}$ and illustrated by the dotted arrow  \ref{eq:Gt-n-staggered} and illustrated by the dotted arrow
558  connecting $u,v^n$ with $G_\theta^{n-1/2}$. The flow used to advect  connecting $u,v^n$ with $G_\theta^{n-1/2}$. The flow used to advect
559  tracers around is not naturally located in time. This could be avoided  tracers around is not naturally located in time. This could be avoided
560  by applying the Adams-Bashforth extrapolation to the tracer field  by applying the Adams-Bashforth extrapolation to the tracer field
561  itself and advection that around but this is not yet available. We're  itself and advecting that around but this approach is not yet
562  not aware of any detrimental effect of this feature. The difficulty  available. We're not aware of any detrimental effect of this
563  lies mainly in interpretation of what time-level variables and terms  feature. The difficulty lies mainly in interpretation of what
564  correspond to.  time-level variables and terms correspond to.
565    
566    
567  \section{Non-hydrostatic formulation}  \section{Non-hydrostatic formulation}
568  \label{sect:non-hydrostatic}  \label{sect:non-hydrostatic}
569    
570  [to be written...]  The non-hydrostatic formulation re-introduces the full vertical
571    momentum equation and requires the solution of a 3-D elliptic
572    equations for non-hydrostatic pressure perturbation. We still
573    intergrate vertically for the hydrostatic pressure and solve a 2-D
574    elliptic equation for the surface pressure/elevation for this reduces
575    the amount of work needed to solve for the non-hydrostatic pressure.
576    
577    The momentum equations are discretized in time as follows:
578    \begin{eqnarray}
579    \frac{1}{\Delta t} u^{n+1} + g \partial_x \eta^{n+1} + \partial_x \phi_{nh}^{n+1}
580    & = & \frac{1}{\Delta t} u^{n} + G_u^{(n+1/2)} \label{eq:discrete-time-u-nh} \\
581    \frac{1}{\Delta t} v^{n+1} + g \partial_y \eta^{n+1} + \partial_y \phi_{nh}^{n+1}
582    & = & \frac{1}{\Delta t} v^{n} + G_v^{(n+1/2)} \label{eq:discrete-time-v-nh} \\
583    \frac{1}{\Delta t} w^{n+1} + \partial_r \phi_{nh}^{n+1}
584    & = & \frac{1}{\Delta t} w^{n} + G_w^{(n+1/2)} \label{eq:discrete-time-w-nh} \\
585    \end{eqnarray}
586    which must satisfy the discrete-in-time depth integrated continuity,
587    equation~\ref{eq:discrete-time-backward-free-surface} and the local continuity equation
588    \begin{equation}
589    \partial_x u^{n+1} + \partial_y v^{n+1} + \partial_r w^{n+1} = 0
590    \label{eq:non-divergence-nh}
591    \end{equation}
592    As before, the explicit predictions for momentum are consolidated as:
593    \begin{eqnarray*}
594    u^* & = & u^n + \Delta t G_u^{(n+1/2)} \\
595    v^* & = & v^n + \Delta t G_v^{(n+1/2)} \\
596    w^* & = & w^n + \Delta t G_w^{(n+1/2)}
597    \end{eqnarray*}
598    but this time we introduce an intermediate step by splitting the
599    tendancy of the flow as follows:
600    \begin{eqnarray}
601    u^{n+1} = u^{**} - \Delta t \partial_x \phi_{nh}^{n+1}
602    & &
603    u^{**} = u^{*} - \Delta t g \partial_x \eta^{n+1} \\
604    v^{n+1} = v^{**} - \Delta t \partial_y \phi_{nh}^{n+1}
605    & &
606    v^{**} = v^{*} - \Delta t g \partial_y \eta^{n+1}
607    \end{eqnarray}
608    Substituting into the depth integrated continuity
609    (equation~\ref{eq:discrete-time-backward-free-surface}) gives
610    \begin{equation}
611    \partial_x H \partial_x \left( g \eta^{n+1} + \widehat{\phi}_{nh}^{n+1} \right)
612    +
613    \partial_y H \partial_y \left( g \eta^{n+1} + \widehat{\phi}_{nh}^{n+1} \right)
614     - \frac{\epsilon_{fs}\eta^*}{\Delta t^2}
615    = - \frac{\eta^*}{\Delta t^2}
616    \end{equation}
617    which is approximated by equation
618    \ref{eq:elliptic-backward-free-surface} on the basis that i)
619    $\phi_{nh}^{n+1}$ is not yet known and ii) $\nabla \widehat{\phi}_{nh}
620    << g \nabla \eta$. If \ref{eq:elliptic-backward-free-surface} is
621    solved accurately then the implication is that $\widehat{\phi}_{nh}
622    \approx 0$ so that thet non-hydrostatic pressure field does not drive
623    barotropic motion.
624    
625    The flow must satisfy non-divergence
626    (equation~\ref{eq:non-divergence-nh}) locally, as well as depth
627    integrated, and this constraint is used to form a 3-D elliptic
628    equations for $\phi_{nh}^{n+1}$:
629    \begin{equation}
630    \partial_{xx} \phi_{nh}^{n+1} + \partial_{yy} \phi_{nh}^{n+1} +
631    \partial_{rr} \phi_{nh}^{n+1} =
632    \partial_x u^{**} + \partial_y v^{**} + \partial_r w^{*}
633    \end{equation}
634    
635    The entire algorithm can be summarized as the sequential solution of
636    the following equations:
637    \begin{eqnarray}
638    u^{*} & = & u^{n} + \Delta t G_u^{(n+1/2)} \label{eq:ustar-nh} \\
639    v^{*} & = & v^{n} + \Delta t G_v^{(n+1/2)} \label{eq:vstar-nh} \\
640    w^{*} & = & w^{n} + \Delta t G_w^{(n+1/2)} \label{eq:wstar-nh} \\
641    \eta^* & = & \epsilon_{fs} \left( \eta^{n} +P-E+R \right)- \Delta t
642      \partial_x H \widehat{u^{*}}
643    + \partial_y H \widehat{v^{*}}
644    \\
645      \partial_x g H \partial_x \eta^{n+1}
646    + \partial_y g H \partial_y \eta^{n+1}
647    - \frac{\epsilon_{fs} \eta^{n+1}}{\Delta t^2}
648    & = &
649    - \frac{\eta^*}{\Delta t^2}
650    \label{eq:elliptic-nh}
651    \\
652    u^{**} & = & u^{*} - \Delta t g \partial_x \eta^{n+1} \label{eq:unx-nh}\\
653    v^{**} & = & v^{*} - \Delta t g \partial_y \eta^{n+1} \label{eq:vnx-nh}\\
654    \partial_{xx} \phi_{nh}^{n+1} + \partial_{yy} \phi_{nh}^{n+1} +
655    \partial_{rr} \phi_{nh}^{n+1} & = &
656    \partial_x u^{**} + \partial_y v^{**} + \partial_r w^{*} \\
657    u^{n+1} & = & u^{**} - \Delta t \partial_x \phi_{nh}^{n+1} \label{eq:un+1-nh}\\
658    v^{n+1} & = & v^{**} - \Delta t \partial_y \phi_{nh}^{n+1} \label{eq:vn+1-nh}\\
659    \partial_r w^{n+1} & = & - \partial_x u^{n+1} - \partial_y v^{n+1}
660    \end{eqnarray}
661    where the last equation is solved by vertically integrating for
662    $w^{n+1}$.
663    
664    
665    
666  \section{Variants on the Free Surface}  \section{Variants on the Free Surface}
667    
668  We now descibe the various formulations of the free-surface that  We now describe the various formulations of the free-surface that
669  include non-linear forms, implicit in time using Crank-Nicholson,  include non-linear forms, implicit in time using Crank-Nicholson,
670  explicit and [one day] split-explicit. First, we'll reiterate the  explicit and [one day] split-explicit. First, we'll reiterate the
671  underlying algorithm but this time using the notation consistent with  underlying algorithm but this time using the notation consistent with
672  the more general vertical coordinate $r$. The elliptic equation for  the more general vertical coordinate $r$. The elliptic equation for
673  free-surface coordinate (units of $r$), correpsonding to  free-surface coordinate (units of $r$), corresponding to
674  \ref{eq:discrete-time-backward-free-surface}, and  \ref{eq:discrete-time-backward-free-surface}, and
675  assuming no non-hydrostatic effects ($\epsilon_{nh} = 0$) is:  assuming no non-hydrostatic effects ($\epsilon_{nh} = 0$) is:
676  \begin{eqnarray}  \begin{eqnarray}
# Line 611  $\eta^{n+1}$: {\bf etaN} (\em DYNVARS.h) Line 702  $\eta^{n+1}$: {\bf etaN} (\em DYNVARS.h)
702    
703    
704  Once ${\eta}^{n+1}$ has been found, substituting into  Once ${\eta}^{n+1}$ has been found, substituting into
705  \ref{eq-tDsC-Hmom} yields $\vec{\bf v}^{n+1}$ if the model is  \ref{eq:discrete-time-u,eq:discrete-time-v} yields $\vec{\bf v}^{n+1}$ if the model is
706  hydrostatic ($\epsilon_{nh}=0$):  hydrostatic ($\epsilon_{nh}=0$):
707  $$  $$
708  \vec{\bf v}^{n+1} = \vec{\bf v}^{*}  \vec{\bf v}^{n+1} = \vec{\bf v}^{*}
# Line 621  $$ Line 712  $$
712  This is known as the correction step. However, when the model is  This is known as the correction step. However, when the model is
713  non-hydrostatic ($\epsilon_{nh}=1$) we need an additional step and an  non-hydrostatic ($\epsilon_{nh}=1$) we need an additional step and an
714  additional equation for $\phi'_{nh}$. This is obtained by substituting  additional equation for $\phi'_{nh}$. This is obtained by substituting
715  \ref{eq-tDsC-Hmom} and \ref{eq-tDsC-Vmom} into  \ref{eq:discrete-time-u-nh}, \ref{eq:discrete-time-v-nh} and \ref{eq:discrete-time-w-nh}
716  \ref{eq-tDsC-cont}:  into continuity:
717  \begin{equation}  \begin{equation}
718  \left[ {\bf \nabla}_h^2 + \partial_{rr} \right] {\phi'_{nh}}^{n+1}  \left[ {\bf \nabla}_h^2 + \partial_{rr} \right] {\phi'_{nh}}^{n+1}
719  = \frac{1}{\Delta t} \left(  = \frac{1}{\Delta t} \left(
# Line 702  In the code, $\beta,\gamma$ are defined Line 793  In the code, $\beta,\gamma$ are defined
793  {\it implicSurfPress}, {\it implicDiv2DFlow}. They are read from  {\it implicSurfPress}, {\it implicDiv2DFlow}. They are read from
794  the main data file "{\it data}" and are set by default to 1,1.  the main data file "{\it data}" and are set by default to 1,1.
795    
796  Equations \ref{eq-tDsC-Hmom} and \ref{eq-tDsC-eta} are modified as follows:  Equations \ref{eq:ustar-backward-free-surface} --
797    \ref{eq:vn+1-backward-free-surface} are modified as follows:
798  $$  $$
799  \frac{ \vec{\bf v}^{n+1} }{ \Delta t }  \frac{ \vec{\bf v}^{n+1} }{ \Delta t }
800  + {\bf \nabla}_h b_s [ \beta {\eta}^{n+1} + (1-\beta) {\eta}^{n} ]  + {\bf \nabla}_h b_s [ \beta {\eta}^{n+1} + (1-\beta) {\eta}^{n} ]

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.14

  ViewVC Help
Powered by ViewVC 1.1.22