Codes

PSEM Group software

Models, solvers, and learning tools for planetary plasma physics. This page brings together the research codes we develop and use, alongside compact teaching versions that make the numerical ideas easier to explore.

Research code

In development

GAMERA-YinYang

Global plasma modeling on a Yin–Yang grid

A GAMERA framework for global spherical simulations using overlapping grid patches, designed for efficient treatment of planetary systems without a polar coordinate singularity.

  • Yin–Yang grid
  • Global models
  • Planetary plasma

Project notes, publications, and access information will be added as the code develops.

Research code

Core framework

GAMERA

MHD on non-orthogonal curvilinear grids

The original high-order finite-volume framework for three-dimensional magnetohydrodynamics on distorted grids, built for accurate large-scale space and astrophysical plasma simulations.

  • Curvilinear grids
  • High-order methods
  • HPC

Teaching code

Planned release

MATLAB Teaching Codes

Small models for learning by experimenting

Compact, readable examples for teaching numerical modeling, data analysis, MHD, and plasma dynamics. Future downloads will connect directly to course notes and guided exercises.

  • MATLAB
  • Course exercises
  • Interactive learning

Featured technical overview

Inside GAMERA-OP

GitHub projects

Geometry-aware numerics

High-order finite-volume reconstruction on Cartesian, cylindrical, spherical, and other orthogonal curvilinear grids.

Divergence control

Constrained transport preserves the solenoidal magnetic-field condition to machine precision.

Rotating systems

Angular momentum is conserved to round-off in cylindrical and spherical coordinates, supporting rapidly rotating planetary systems.

Extended physics

Options include ring averaging near the axis, semi-relativistic correction, background-field splitting, and anisotropic MHD.

GAMERA-OP curvilinear grid and field-variable arrangement
Grid geometry and field-variable arrangement in GAMERA-OP.

The solver combines geometry-consistent high-order reconstruction with flexible numerical fluxes and time integrators. Its modular architecture is designed to simplify case setup, the addition of new physics, and coupling to other first-principles models.

Reference

H. Luo, B. Zhang, J. Tian, J. Cai, J. Chen, E. Feng, Z. Zheng, S. Xi, and J. G. Lyon (2026), “GAMERA-OP: A Three-dimensional Finite-volume Magnetohydrodynamic Solver for Orthogonal Curvilinear Geometries,” The Astrophysical Journal Supplement Series, 285(1), 15. https://doi.org/10.3847/1538-4365/ae7344