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.
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- Code repository: https://github.com/ucbcfd/MLegS
- Documentation: https://ucbcfd.github.io/MLegS
- Jinge Wang (code - parallelization)
- Sangjoon Lee (code - modernization, documentation)
- UC Berkeley CFD Lab (codebase)
