uv_diff_2dh - lateral diffusion of velocity


    subroutine uv_diff_2dh(An_method,UEx,VEx,U,V,D,DU,DV,hsd_u,hsd_v)
    Note (KK): keep in sync with interface in m2d.F90

Here, the diffusion terms for the vertically integrated transports are calculated by means of central differences, following the finite volume approach. They are added to the advection terms into the terms UEx and VEx for the $ U$- and the $ V$-equation, respectively. The physical diffusion with the given eddy viscosity coefficient $ A_h^M$ is based on velocity gradients, whereas an additional numerical damping of the barotropic mode is based on gradients of the transports with the damping coefficient $ A_h^N$, see the example given as equations (90) and (91).

First diffusion term in (61):

$\displaystyle \left(mn \partial_{\cal X}\left(2A_h^MD\partial_{\cal X}\left(\f...
...{\cal F}^{Dxx}_{i+1,j}-{\cal F}^{Dxx}_{i,j} }{\Delta x^u_{i,j}\Delta y^u_{i,j}}$ (82)

with diffusive fluxes

$\displaystyle {\cal F}^{Dxx}_{i,j}=\left(2 A_h^MD_{i,j}\left(\frac{U_{i,j}}{D^u...
...eft(U_{i,j} -U_{i-1,j}\right)\right) \frac{\Delta y^c_{i,j}}{\Delta x^c_{i,j}}.$ (83)

Second diffusion term in (61):

$\displaystyle \left(mn \partial_{\cal Y}\left(A_h^MD\left(\partial_{\cal Y}\le...
...{\cal F}^{Dxy}_{i,j}-{\cal F}^{Dxy}_{i,j-1} }{\Delta x^x_{i,j}\Delta y^x_{i,j}}$ (84)

with diffusive fluxes

\begin{displaymath}\begin{array}{rcl} \displaystyle {\cal F}^{Dxy}_{i,j}&=& \dis...
...}\right)\frac{\Delta x^x_{i,j}} {\Delta y^x_{i,j}}. \end{array}\end{displaymath} (85)

First diffusion term in (62):

$\displaystyle \left(mn \partial_{\cal X}\left(A_h^MD\left(\partial_{\cal Y}\le...
...{\cal F}^{Dyx}_{i,j}-{\cal F}^{Dyx}_{i-1,j} }{\Delta x^x_{i,j}\Delta y^x_{i,j}}$ (86)

with diffusive fluxes

\begin{displaymath}\begin{array}{rcl} \displaystyle {\cal F}^{Dyx}_{i,j}&=& \dis...
...}\right)\frac{\Delta y^x_{i,j}} {\Delta x^x_{i,j}}. \end{array}\end{displaymath} (87)

Second diffusion term in (62):

$\displaystyle \left(mn \partial_{\cal Y}\left(2A_h^MD\partial_{\cal Y}\left(\f...
...{\cal F}^{Dyy}_{i,j+1}-{\cal F}^{Dyy}_{i,j} }{\Delta x^v_{i,j}\Delta y^v_{i,j}}$ (88)

with diffusive fluxes

$\displaystyle {\cal F}^{Dyy}_{i,j}=\left(2 A_h^MD_{i,j}\left(\frac{V_{i,j}}{D^v...
...eft(V_{i,j} -V_{i,j-1}\right)\right) \frac{\Delta x^c_{i,j}}{\Delta y^c_{i,j}}.$ (89)

The role of the additional diffusion of $ U$ and $ V$ with the diffusion coefficient $ A_h^N$ is best demonstrated by means of a simplified set of vertically integrated equations:

\begin{displaymath}\begin{array}{l} \displaystyle \partial_t \eta = - \partial_x...
...eft(\partial_{xx} V + \partial_{yy} V\right), \ \ \end{array}\end{displaymath} (90)

which can be transformed into an equation for $ \partial_t\eta$ by derivation of the $ \eta$-equation with respect to $ t$, of the $ U$-equation with respect to $ x$ and the $ V$-equation with respect to $ y$ and subsequent elimination of $ U$ and $ V$:

$\displaystyle \partial_t \left(\partial_t\eta\right) = gD \left(\partial_{xx}\e...
...x}\left(\partial_t\eta\right) +\partial_{yy}\left(\partial_t\eta\right)\right),$ (91)

which can be interpreted as a wave equation with a damping on $ \partial_t\eta$. This introduces an explicit damping of free surface elevation oscillations in a momentum-conservative manner. Hydrodynamic models with implicit treatment of the barotropic mode do not need to apply this method due to the implicit damping of those models, see e.g. Backhaus (1985). The implementation of this explicit damping described here has been suggested by Jean-Marie Beckers, Liége (Belgium).

When working with the option SLICE_MODEL, the calculation of all gradients in $ y$-direction is suppressed. USES:

    use domain, only: imin,imax,jmin,jmax,az,au,av,ax
 #if defined(SPHERICAL) || defined(CURVILINEAR)
    use domain, only: dyc,arud1,dxx,dyx,arvd1,dxc
    use domain, only: dx,dy,ard1
    use m2d, only: Am
    use variables_2d, only: An,AnX
  $ use omp_lib
    integer,intent(in)                                :: An_method
    REALTYPE,dimension(E2DFIELD),intent(in),optional  :: U,V,D,DU,DV
    REALTYPE,dimension(E2DFIELD),intent(inout)        :: UEx,VEx
    REALTYPE,dimension(E2DFIELD),intent(out),optional :: hsd_u,hsd_v
    Original author(s): Hans Burchard
    Modified by       : Knut Klingbeil
    REALTYPE,dimension(E2DFIELD) :: work2d
    logical :: use_Am
    integer :: i,j

kklingbe 2017-10-02