Reference implementation of variational integrators for ideal and inertial magnetohydrodynamics in 2D.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc
examples
external
imhd
.gitignore
LICENSE.md
Makefile
README.md
config.py
diag_B.py
diag_B_alfven.py
diag_B_current_sheet.py
diag_B_loop.py
diag_E.py
diag_J.py
diag_X.py
diag_spectrum.py
ideal_mhd2d_nonlinear_newton_snes_gmres.py
inertial_mhd2d_nonlinear_newton_snes_gmres.py
inertial_mhd2d_nonlinear_newton_split_gmres.py
inertial_mhd2d_nonlinear_newton_split_lu.py
movie_current_density.py
movie_magnetic_field.py
movie_pressure.py
movie_reconnection.py
petsc_mhd2d.py
petsc_mhd2d_linear.py
petsc_mhd2d_newton.py
petsc_mhd2d_newton_diag.py
petsc_mhd2d_newton_split.py
petsc_mhd2d_nonlinear.py
petsc_mhd2d_nonlinear_direct.py
petsc_mhd2d_nonlinear_newton_direct.py
petsc_mhd2d_nonlinear_newton_gmres.py
petsc_mhd2d_nonlinear_newton_snes.py
petsc_mhd2d_nonlinear_newton_snes1.py
petsc_mhd2d_nonlinear_newton_snes2.py
petsc_mhd2d_nonlinear_schur_direct.py
petsc_mhd2d_nonlinear_schur_direct14.py
petsc_mhd2d_uzawa.py
plot.py
plot_B.py
plot_PJ.py
plot_current_sheet.py
plot_loop.py
replay.py
replay_B.py
replay_PJ.py
replay_current_sheet.py
replay_loop.py
replay_reconnection.py
runspec.cfg

README.md

viIMHD2D

Python/Cython package providing reference implementations of variational integrators for ideal and inertial magnetohydrodynamics in 2D.

Project Status: Inactive License: MIT

The code must first be built by calling make in the main directory. Then the ideal MHD code can be run, e.g., in serial via

> python ideal_mhd2d_nonlinear_newton_snes_gmres.py examples/alfven_wave_travelling.cfg

and in parallel via

> mpiexec -n 4 python ideal_mhd2d_nonlinear_newton_snes_gmres.py examples/alfven_wave_travelling.cfg

The run script for the inertial MHD code is inertial_mhd2d_nonlinear_newton_snes_gmres.py.

References

Michael Kraus, Omar Maj. Variational Integrators for Nonvariational Partial Differential Equations. Physica D: Nonlinear Phenomena, Volume 310, Pages 37-71, 2015. Journal, arXiv:1412.2011.

Michael Kraus, Omar Maj. Variational Integrators for Ideal Magnetohydrodynamics. arXiv:1707.03227.

Michael Kraus. Variational Integrators for Inertial Magnetohydrodynamics. In preparation.

License

The viIMHD2D package is licensed under the MIT "Expat" License.