Skip to content

Repository files navigation

MLegS: Modernized and Parallelized Mapped Legendre Spectral Method Code

DOI

MLegS (Mapped Legendre Spectral Method Code) is a code package based on a modernized and parallelized spectral method for numerical simulations in a radially unbounded domain.

Based on the numerical algorithm proposed by T. Matsushima and P. S. Marcus (1997)1, MLegS incorporates scalable multiprocessing interfaces for high-performance computing. MLegS is written in Modern Fortran; the code package is open-source under a BSD license.

Prior to its open-source release, MLegS was successfully used in several vortex dynamics studies in the context of wake vortices in the atmosphere. One example is S. Lee and P. S. Marcus (2023)2, where one can find the detailed mathematical formulation of the mapped Legendre (pseudo-)spectral method.

Preparation

Refer to the Notebook tutorial to complete the prerequisites before using MLegS (/tutorials/01_prerequisites.ipynb). An online, ready-to-read (though non-interactive) version is available on the MLegS documentation site: https://ucbcfd.github.io/MLegS/tutorial/prerequisites.html.

The latest release supports GNU Fortran on Linux and macOS, adds guarded periodic de-aliasing and optional tail-energy SVV control to the 3D vortex example, and includes an executable tutorial validation gate. See the Update Notes for the release history, numerical safeguards, validation commands, and current limitations.

python3 tools/validate_tutorials.py --ranks 2

Links

Contributors

  • Jinge Wang (code - parallelization)
  • Sangjoon Lee (code - modernization, documentation)
  • UC Berkeley CFD Lab (codebase)

Footnotes

  1. J. Comput. Phys., vol. 137, no. 2, 1997, pp. 321-345

  2. J. Fluid Mech., vol. 967, 2023, A2

About

Mapped Legendre Spectral Method Code for Radially Unbounded Simulations

Resources

Stars

Watchers

Forks

Releases

Used by

Contributors

Languages