Coder Social home page Coder Social logo

mimsem's Introduction

MiMSEM

A parallel framework for solving geophysical flow problems at both planetary and non-hydrostatic scales using mixed mimetic spectral elements. The code is based on spatial and temporal discretisations that preserve the exact balance of energy exchanges for an improved representation of dynamical processes.

Includes solvers (and test configurations) for:

  • The 2D advection equation with explicit time integration
    • solid body rotation (on the sphere)
    • deformational flow (on the sphere)
  • The rotating shallow water equations with semi-implicit time integration
    • Wilkinson2 steady flow (on the sphere)
    • Rossby-Haurwitz wave (on the sphere)
    • Barotropic instability (Galewsky) (on the sphere)
  • The 3D compressible Euler equations with horizontally explicit/vertically implicit time integration
    • Baroclinic instability (on the sphere)
    • Non-hydrostatic gravity wave (on the sphere)
    • Warm bubble (doubly periodic planar)

Supports geometric configurations for:

  • Doubly periodic box (3D)
  • Cubed-sphere (2D/3D)

Optional stabilisation/forcing terms include:

  • Biharmonic viscosity for horizontal momentum and temperature equations
  • Energetically consistent variational upwinding for potential vorticity (in the horizontal) and potential temperature (in the vertical)
  • Held-Suarez forcing of temperature and lower atmosphere Rayleigh friction

How to run the baroclinic instability test case on the sphere

  1. Install the dependencies (C++, Python3, OpenBLAS, MPI, PETSc)
  2. Clone the repository
  3. Run the set up script: ./scr/Setup.py <polynomial_degree> <number_of_elements_per_dimension> <number_of_processors> where
    • polynomial_degree is the polynomial order of the basis functions in the horizontal
    • number_of_elements_per_dimension is the number of elements in each dimension on each of the six faces of the cubed sphere
    • number_of_processors is the number of cores to run the code on. Note that this must be for integer n, ie: 6, 24, 54, 96, etc, and number_of_elements_per_dimension must fit evenly into n
  4. Build the code: cd eul/; make mimsem
  5. Run the code: mpirun -np <number_of_processors> ./mimsem <start_dump>, where 0 indicates starting from the analytic initial condition rather than a start dump
  6. Plot an image: ../scr/WriteImage_NorthHemi.py <file_path> <field_name> <plot_contours> <vertical_level> <dump_time>

Picture Gallery

Baroclinic instability on the sphere, day 9: surface level Exner pressure, and potential temperature and vertical voricity component at z=1.5km

Baroclinic instability on the sphere, day 11: surface level Exner pressure, and potential temperature and vertical voricity component at z=1.5km

Global simulation with Held-Suarez forcing at day 40, surface level Exner pressure, potential temperature at z = 2.36km and vertical vorticity component at z = 3.14km

Vorticity field at days 5, 6 and 7 for the Galewsky test case for the rotating shallow water on the sphere using energetically balanced upwinding of potential vorticity and and energetically balanced IMEX time splitting without dissipation.

Potential temperature for the 3D rising bubble test case in planar geometry without dissipation and with energetically consistent variational upwinding at times 200s (left) and 400s (right)

References

Ricardo, K., Lee, D. and Duru, K. (2024) Entropy and energy conservation for thermal atmospheric dynamics using mixed compatible finite elements J. Comp. Phys. 496 112605

Lee, D., Martin, A., Bladwell, C. and Badia, S. (2024) A comparison of variational upwinding schemes for geophysical fluids, and their application to potential enstrophy conserving discretisations in space and time Comput. Math. Appl. 165 150-162

Lee, D. and Palha, A. (2021) Exact spatial and temporal balance of energy exchanges within a horizontally explicit/vertically implicit non-hydrostatic atmosphere J. Comp. Phys. 440 110432

Lee, D. (2021) An energetically balanced, quasi-Newton integrator for non-hydrostatic vertical atmospheric dynamics J. Comp. Phys. 429 109988

Lee, D. (2021) Petrov-Galerkin flux upwinding for mixed mimetic spectral elements, and its application to geophysical flow problems Comput. Math. Appl. 89 68-77

Lee, D. and Palha, A. (2020) A mixed mimetic spectral element model of the 3D compressible Euler equations on the cubed sphere J. Comp. Phys. 401 108993

Lee, D. and Palha, A. (2018) A mixed mimetic spectral element model of the rotating shallow water equations on the cubed sphere J. Comp. Phys. 375 240-262

Lee, D., Palha, A. and Gerritsma, M. (2018) Discrete conservation properties for shallow water flows using mixed mimetic spectral elements J. Comp. Phys. 357 282-304

Comments? Questions? Like to Contribute?

Email Dave Lee at [email protected]

mimsem's People

Contributors

davelee2804 avatar

Stargazers

YaoXiao avatar Alberto F. Martin avatar

Watchers

Artur Palha avatar  avatar Alberto F. Martin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.