Abstract
An energy-conserving and an energy-and-enstrophy conserving numerical schemes are derived by approximating the Hamiltonian formulation of the inviscid shallow water flows based on the vorticity-divergence variables. These schemes also conserve the first-order moments such as mass and vorticity, as usual. The Conservative properties of the schemes stem from the skew-symmetry and singularities of the Poisson brackets, which are carefully retained in the discrete approximations. The schemes operate on unstructured orthogonal dual meshes, over bounded or unbounded domains, and they are also shown to possess the same optimal dispersive wave relations as those of the Z-grid scheme, which is a consequence of the use of the vorticity and divergence variables.
Similar content being viewed by others
References
Arakawa, A., Lamb, V.R.: Computational design of the basic dynamical processes of the UCLA general circulation model. Methods Comput. Phys. 17, 173–265 (1977)
Arakawa, A., Lamb, V.R.: A potential enstrophy and energy conserving scheme for the shallow water equations. Mon. Weather Rev. 109(1), 18–36 (1981)
Bauer, W., Cotter, C.J.: Energy-enstrophy conserving compatible finite element schemes for the rotating shallow water equations with slip boundary conditions. J. Comput. Phys. 373, 171–187 (2018). https://doi.org/10.1016/j.jcp.2018.06.071
Bryan, K., Cox, M.D.: A nonlinear model of an ocean driven by wind and differential heating: Part I. Description of the three-dimensional velocity and density fields. J. Atmos. Sci. 25(6), 945–967 (1968). https://doi.org/10.1175/1520-0469(1968)025!0945:ANMOAO?2.0.CO;2
Chen, Q.: Stable and convergent approximation of two-dimensional vector fields on unstructured meshes. J. Comput. Appl. Math. 307, 284–306 (2016). https://doi.org/10.1016/j.cam.2016.01.049
Chen, Q., Ringler, T., Gunzburger, M.: A co-volume scheme for the rotating shallow water equations on conforming non-orthogonal grids. J. Comput. Phys. 240, 174–197 (2013). https://doi.org/10.1016/j.jcp.2013.01.003
Du, Q., Faber, V., Gunzburger, M.: Centroidal Voronoi tessellations: applications and algorithms. SIAM Rev. 41(4), 637–676 (1999). https://doi.org/10.1137/S0036144599352836. ((electronic))
Du, Q., Gunzburger, M.: Grid generation and optimization based on centroidal Voronoi tessellations. Appl. Math. Comput. 133(2–3), 591–607 (2002). https://doi.org/10.1016/S0096-3003(01)00260-0
Du, Q., Gunzburger, M.D., Ju, L.: Constrained centroidal Voronoi tessellations for surfaces. SIAM J. Sci. Comput. 24(5), 1488–1506 (2003). https://doi.org/10.1137/S1064827501391576. ((electronic))
E, W., Liu, J.G.: Vorticity boundary condition and related issues for finite difference schemes. J. Comput. Phys. 124(2), 368–382 (1996). https://doi.org/10.1006/jcph.1996.0066
Eldred, C., Randall, D.: Total energy and potential enstrophy conserving schemes for the shallow water equations using Hamiltonian methods - Part 1: Derivation and properties. Geoscientif. Model Dev. 10(2), 791–810 (2017). https://doi.org/10.5194/gmd-10-791-2017
Feng, K.: Difference schemes for hamiltonian formalism and symplectic geometry. J. Comput. Math. 4(3), 279–289 (1986)
Gassmann, A., Herzog, H.J.: Towards a consistent numerical compressible non-hydrostatic model using generalized Hamiltonian tools. Quart. J. R. Meteor. Soc. 134(635), 1597–1613 (2008)
Girault, V., Raviart, P.A.: Finite Element Methods for Navier–Stokes Equations: Theory and Algorithms. Springer-Verlag, Berlin (1986)
Griffies, S.M., Böning, C., Bryan, F.O., Chassignet, E.P., Gerdes, R., Hasumi, H., Hirst, A., Treguier, A.M., Webb, D.: Developments in Ocean climate modelling. Ocean Model. 2(3), 123–192 (2000)
Holm, D.D.: Geometric Mechanics: Dynamics and Symmetry. Imperial College Press, London (2008)
McRae, A., Cotter, C.J.: Energy- and enstrophy- conserving schemes for the shallow- water equations, based on mimetic finite elements. Q. J. R. (2014)
Nambu, Y.: Generalized Hamiltonian dynamics. Phys. Rev. D 7(8), 2405–2412 (1973). https://doi.org/10.1103/PhysRevD.7.2405
Orszag, S.A., Israeli, M., Deville, M.O.: Boundary conditions for incompressible flows. J. Sci. Comput. 1(1), 75–111 (1986). https://doi.org/10.1007/BF01061454
Pain, C.C., Piggott, M.D., Goddard, A.J.H., Fang, F., Gorman, G.J., Marshall, D.P., Eaton, M.D., Power, P.W., de Oliveira, C.R.E.: Three-dimensional unstructured mesh ocean modelling. Ocean Model. 10(1–2), 5–33 (2005). https://doi.org/10.1016/j.ocemod.2004.07.005
Pedlosky, J.: Geophysical Fluid Dynamics, 2nd edn. Springer, Berlin (1987)
Randall, D.A.: Geostrophic adjustment and the finite-difference shallow-water equations. Mon. Weather Rev. 122(6), 1371–1377 (1994)
Ringler, T., Petersen, M., Higdon, R.L., Jacobsen, D., Jones, P.W., Maltrud, M.: A multi-resolution approach to global ocean modeling. Ocean Model. 69, 211–232 (2013)
Ringler, T.D., Thuburn, J., Klemp, J.B., Skamarock, W.C.: A unified approach to energy conservation and potential vorticity dynamics for arbitrarily-structured C-grids. J. Comput. Phys. 229(9), 3065–3090 (2010). https://doi.org/10.1016/j.jcp.2009.12.007
Salmon, R.: Lectures on Geophysical Fluid Dynamics. Oxford University Press, New York (1998)
Salmon, R.: Poisson-bracket approach to the construction of energy- and potential-enstrophy-conserving algorithms for the shallow-water equations. J. Atmos. Sci. 61(16), 2016–2036 (2004). https://doi.org/10.1175/1520-0469(2004)061!2016:PATTCO?2.0.CO;2
Salmon, R.: A general method for conserving quantities related to potential vorticity in numerical models. Nonlinearity 18(5), R1 (2005). https://doi.org/10.1088/0951-7715/18/5/R01
Salmon, R.: A general method for conserving energy and potential enstrophy in shallow-water models. J. Atmos. Sci. 64(2), 515–531 (2007). https://doi.org/10.1175/JAS3837.1
Salmon, R.: A shallow water model conserving energy and potential enstrophy in the presence of boundaries. J. Mar. Res. 67(6), 779–814 (2009)
Skamarock, W.C., Klemp, J.B., Duda, M.G., Fowler, L.D., Park, S.H., Ringler, T.D.: A multiscale nonhydrostatic atmospheric model using centroidal voronoi tesselations and C-grid staggering. Mon. Weather Rev. 140(9), 3090–3105 (2012). https://doi.org/10.1175/MWR-D-11-00215.1
Smith, R.D., Jones, P.W., Briegleb, B., Bryan, F.O., Danabasoglu, G., Dennis, J., Dukiwicz, J., Eden, C., Fox-Kemper, B., Gent, P., Hecht, M., Jayne, S., Jochum, M., Large, W., Lindsay, K., Maltrud, M.E., Norton, N., Peacock, S., Vertenstein, M., Yeager, S.: The parallel ocean program (POP) reference manual (2010)
Takano, K., Wurtele, M.G.: A Fourth Order Energy and Potential Enstrophy Conserving Difference Scheme. California Univ Los Angeles Dept of Atmospheric Sciences, Tech. rep (1982)
Temam, R.: Sur l’approximation des solutions des équations de Navier-Stokes. C. R. Acad. Sc. Paris, Série A 262, 219–221 (1966)
Temam, R.: Navier–Stokes Equations. AMS Chelsea Publishing, Providence (2001)
Thom, A.: The flow past circular cylinders at low speeds. Proc. R. Soc. Lond. A: Math. Phys. Eng. Sci. 141(845), 651–669 (1933). https://doi.org/10.1098/rspa.1933.0146
Wang, B., Ji, Z.Z., Xiao, Q.N.: Hamiltonian algorithm for solving the dynamic equations of atmosphere. Chin. J. Comput. Phys. 18(4), 289–297 (2001)
Acknowledgements
We are grateful to an anonymous reviewer whose many suggestions improved the quality of this paper. The first author (QC) acknowledges helpful discussions with Chris Eldred.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
The authors declare that they have no conflict of interest.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
This work is supported in part by the Simons Foundation (contract # 319070 to QC), the Office of Naval Research (N00014-19-2295 to QC), the US Department of Energy (DE-SC0020270 to JL), the National Science Foundation (DMS-1818438 to JL), the National Science Foundation (DMS-1510249 to RT), and by the Research Fund of Indiana University (to RT).
Appendices
Specifications of the mesh
Our approximation of the function space is based on discrete meshes that consist of polygons. To avoid potential technical issues with the boundary, we shall assume that the domain \(\Omega \) itself is polygonal. We make use of a pair of staggered meshes, with one called primary and the other called dual. The meshes consist of polygons, called cells, of arbitrary shape, but conforming to the requirements to be specified. The centers of the cells on the primary mesh are the vertices of the cells on the dual mesh, and vice versa. The edges of the primary cells intersect orthogonally with the edges of the dual cells. The line segments of the boundary \(\partial \Omega \) pass through the centers of the primary cells that border the boundary. Thus the primary cells on the boundary are only partially contained in the domain. Two examples of this mesh type are shown in Fig. 2.
In order to construct function spaces on this type of meshes, some notations are in order, for which we follow the conventions made in [6, 24]. As shown in the diagram in Fig. 3, the primary cells are denoted as \(A_i,\, 1\le i\le N_c + N_{cb}\), where \(N_c\) denotes the number of cells that are in the interior of the domain, and \(N_{cb}\) the number of cells that are on the boundary. The dual cells, which all lie inside the domain, are denoted as \(A_\nu ,\,1\le \nu \le N_v\). The area of \(A_i\) (resp. \(A_\nu \)) is denoted as \(|A_i|\) (resp. \(|A_\nu |\)). Each primary cell edge corresponds to a distinct dual cell edge, and vice versa. Thus the primary and dual cell edges share a common index \(e,\, 1\le e\le N_e+N_{eb}\), where \(N_e\) denotes the number of edge pairs that lie entirely in the interior of the domain, and \(N_{eb}\) the number of edge pairs on the boundary, i.e., with dual cell edge aligned with the boundary of the domain. Upon an edge pair e, the distance between the two primary cell centers, which is also the length of the corresponding dual cell edge, is denoted as \(d_e\), while the distance between the two dual cell centers, which is also the length of the corresponding primary cell edge, is denoted as \(l_e\). These two edges form the diagonals of a diamond-shaped region, whose vertices consist of the two neighboring primary cell centers and the two neighboring dual centers. The diamond-shaped region is also indexed by e, and will be referred to as \(A_e\). The Euler formula for planar graphs states that the number of primary cell centers \(N_c + N_{cb}\), the number of vertices (dual cell centers) \(N_v\), and the number of primary or dual cell edges \(N_e + N_{eb}\) must satisfy the relation
The connectivity information of the unstructured staggered meshes is provided by six sets of elements defined in Table 2.
For each edge pair, a unit vector \({\mathbf {n}}_e\), normal to the primary cell edge, is specified. A second unit vector \({\mathbf {t}}_e\) is defined as
with \(\varvec{\mathrm {k}}\) standing for the upward unit vector. Thus \({\mathbf {t}}_e\) is orthogonal to the dual cell edge, but tangent to the primary cell edge, and points to the vertex on the left side of \({\mathbf {n}}_e\). For each edge e and for each \(i\in \mathcal {CE}(e)\) (the set of cells on edge e, see Table 2), we define the direction indicator
and for each \(\nu \in \mathcal {VE}(e)\),
For this study, we make the following regularity assumptions on the meshes. We assume that the diamond-shaped region \(A_e\) is actually convex. In other words, the intersection point of each edge pair falls inside each of the two edges. We also assume that the meshes are quasi-uniform, in the sense that there exists \(h>0\) such that, for each edge e,
for some fixed constants \((m,\,M)\) that are independent of the meshes. The staggered dual meshes are thus designated by \(\mathcal {T}_h\). For the convergence analysis, it is assumed in [5] that, for each edge pair e, the primary cell edge nearly bisect the dual cell edge, and miss by at most \(O(h^2)\). This assumption is also made here for the error analysis. Generating meshes conforming to this requirement on irregular domains, i.e. domains with non-smooth boundaries or domains on surfaces, can be a challenge, and will be addressed elsewhere. But we point out that, on regular domains with smooth boundaries, this type of meshes can be generated with little extra effort in addition to the use of standard mesh generators, such as the centroidal Voronoi tessellation algorithm [7,8,9].
Specifications of the discrete averaging and differential operators
In this work, we denote the piecewise constant characteristic function associated with the cells (\(A_i\); specifications in the above) by \(\chi _i\), the piecewise constant characteristic function associated with the triangles (\(A_\nu \)) by \(\chi _\nu \), and the piecewise constant characteristic function associated with the cell edges (\(A_e\)) by \(\chi _e\). A non-accent symbol, such as \(\psi _h\), usually designates a discrete scalar field defined at the (primal) cell centers, while \(\widetilde{\,}\) on the top, as in \({\widetilde{\psi }}_h\), designates a discrete scalar field at the vertices, i.e. dual cell centers, and \(\widehat{\,}\) on the top, as in \({\hat{\psi }}_h\), designates a discrete scalar field at the edges.
We use the symbol \(\widetilde{\cdot }\) to designate the mappings between primal cell centers and dual cell centers, in both directions. We let \(\psi _h\) be a discrete scalar field defined at cell centers. Then these mappings can be defined as follows,
Generally, on unstructured meshes, the composition of these two mappings is not the identity mapping.
We use the symbol \(\hat{\cdot }\) to designate the mappings between primal cell centers and cell edges, in both directions. Again, with \(\psi _h\) being a discrete scalar field at cell centers, these mappings are specified as follows,
Generally, on unstructured meshes, the composition of these two mappings is not the identity mapping.
The discrete gradient operator \(\nabla _h\) on a cell-centered scalar field \(\psi _h\) is defined as
Clearly, \([\nabla _h\psi _h]_e\) is an approximation of \(\nabla \psi \cdot {\mathbf {n}}\) at cell edge e. Similarly, the discrete gradient operator \(\nabla _h\) on a triangle-centered scalar field \({\widetilde{\psi }}_h\) is defined as
Clearly, \([\nabla _h{\widetilde{\psi }}_h]_e\) is an approximation of \(\nabla \psi \cdot {\mathbf {t}}\) at cell edge e.
The discrete skew gradient operator \(\nabla ^\perp _h\) on a cell-centered scalar field \(\psi _h\):
\([\nabla _h^{\perp }\psi _h]_e\) is a discretization of \(\nabla ^\perp \psi \cdot {\mathbf {t}}\equiv \partial \psi /\partial n\) at cell edge e.
The discrete skew gradient operator \(\nabla ^\perp _h\) on a triangle-centered scalar field \({\widetilde{\psi }}_h\):
with
where \([\nabla _h^{\perp }{\widetilde{\psi }}_h]_e\) is a discretization of \(\nabla ^\perp \psi \cdot {\mathbf {n}}\equiv -\partial \psi /\partial \tau \) at cell edge e.
We denote by \(u_h\) a discrete vector field that is along the normal direction at each cell edge, and by \(v_h\) a discrete vector field that is along the tangential direction at each cell edge; these discrete vector fields can be expressed as
On these discrete vector fields various discrete differential operators can be defined, using the discrete versions of the divergence theorem or the Green’s theorem.
The discrete divergence operator \(\nabla _h\cdot (\cdot )\) on a discrete normal vector field \(u_h\):
It is clear that \(\nabla _h\cdot u_h\) is a discrete scalar field on the primal mesh. It is worth noting that, on partial cells on the boundary, the summation on the right-hand side only includes fluxes across the edges that are inside the domain and the partial edges that intersect with the boundary, and this amounts to imposing a no-flux condition across the boundary.
The discrete divergence operator \(\nabla _h\cdot (\cdot )\) on a discrete tangential vector field \(v_h\):
It is clear that \(\nabla _h\cdot u_h\) is a discrete scalar field on the dual mesh.
The discrete curl operator \(\nabla _h\times (\cdot )\) on a discrete normal vector field:
Thus, the image of the discrete curl operator \(\nabla _h\times (\,)\) on each \(u_h\) is a discrete scalar field on the dual mesh.
The discrete curl operator \(\nabla _h\times (\cdot )\) on a discrete tangential vector field:
Thus, the image of the discrete curl operator \(\nabla _h\times (\,)\) on each \(v_h\) is a discrete scalar field on the primal mesh. It is worth noting that, on partial cells on the boundary, the summation on the right-hand side only includes currents along the edges that are inside the domain and the partial edges that intersect with the boundary, and this amounts to imposing a no-circulation/no-slip condition along the boundary.
For a scalar field \(\phi _h\) defined at cell centers, the discrete Laplacian operator \(\Delta _h\) can also be defined,
Discrete vector calculus
In what follows, we denote the inner product in the \(L^2\) functional space as \((\cdot ,\,\cdot )\). For example, for discrete functions \(\psi _h\) and \(\varphi _h\) piecewise constant on the cells,
The specifications for functions defined on cell edges or cell vertices are similar.
Lemma 1
Proof
We prove the equality (132) first, using the specifications (122) for the remapping between cell centers and cell edges,
Similarly, for the equality (133), one uses the specifications (121), and proceeds,
\(\square \)
Lemma 2
Let \(u_h\) be a discrete normal vector field, \(v_h\) a discrete tangential vector field, \(\psi _h\) a cell-centered discrete scalar field, and \({\widetilde{\psi }}_h\) a triangle-centered discrete scalar field. Then the following relations hold,
The factor 1/2 on the right-hand side comes from the fact that, in the inner products of vector fields on the left-hand side, only one component, normal or tangential, is used. We also note that these equalities hold for general discrete scalar and vector fields, regardless of their boundary conditions. Identities (134) and (136) contain no boundary integral terms, while (135) and (137) do contain boundary terms, but if either the scalar field \(\psi _h\), or the vector field \(u_h\) or \(v_h\) vanishes on the boundary, then these boundary terms will vanish too. The proofs of (134) and (136) can be found in [5]. Here we prove (135). The proof of (137) is similar. In the proof below, we use \(\mathcal {IE}\), \(\mathcal {BE}\) and \(\mathcal {E}\) to denote the edges in the interior, the edges on the boundary, and all the (interior + boundary) edges.
Proof of (135)
By definition,
Substituting the expressions of \([\nabla ^\perp _h {\widetilde{\psi }}_h]_e\) from (126) in the above, we derive that
\(\square \)
Lemma 3
Assume that the domain \(\mathcal {M}\) is simply connected, and \(u_h\) is a discrete normal vector field. Then,
if and only if
for some triangle-centered scalar field \({\widetilde{\psi }}_h\).
Lemma 4
Assume that the domain \(\mathcal {M}\) is simply connected, and \(u_h\) is a discrete normal vector field. Then,
if and only if there exists a cell-centered scalar field \(\varphi _h\) such that
Rights and permissions
About this article
Cite this article
Chen, Q., Ju, L. & Temam, R. Conservative numerical schemes with optimal dispersive wave relations: Part I. Derivation and analysis. Numer. Math. 149, 43–85 (2021). https://doi.org/10.1007/s00211-021-01218-3
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00211-021-01218-3
Keywords
- Unstructured meshes
- Shallow water equations
- Large-scale geophysical flows
- Energy conservation
- Enstrophy conservation
- Hamiltonian structures
- Poisson brackets
- Dispersive wave relations