{"id":45951714,"url":"https://github.com/struphy-hub/struphy","last_synced_at":"2026-04-24T17:01:15.694Z","repository":{"id":320435002,"uuid":"1081847287","full_name":"struphy-hub/struphy","owner":"struphy-hub","description":"A Python package for plasma physics PDEs.","archived":false,"fork":false,"pushed_at":"2026-04-23T11:56:34.000Z","size":286706,"stargazers_count":32,"open_issues_count":34,"forks_count":0,"subscribers_count":0,"default_branch":"devel","last_synced_at":"2026-04-23T13:32:39.030Z","etag":null,"topics":["fusion","hpc","plasma-physics","python","simulations"],"latest_commit_sha":null,"homepage":"https://struphy-hub.github.io/struphy/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/struphy-hub.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-23T11:26:40.000Z","updated_at":"2026-04-23T07:27:49.000Z","dependencies_parsed_at":"2025-10-23T20:49:24.150Z","dependency_job_id":null,"html_url":"https://github.com/struphy-hub/struphy","commit_stats":null,"previous_names":["struphy-hub/struphy"],"tags_count":76,"template":false,"template_full_name":null,"purl":"pkg:github/struphy-hub/struphy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/struphy-hub%2Fstruphy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/struphy-hub%2Fstruphy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/struphy-hub%2Fstruphy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/struphy-hub%2Fstruphy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/struphy-hub","download_url":"https://codeload.github.com/struphy-hub/struphy/tar.gz/refs/heads/devel","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/struphy-hub%2Fstruphy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32232612,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fusion","hpc","plasma-physics","python","simulations"],"created_at":"2026-02-28T12:47:24.275Z","updated_at":"2026-04-24T17:01:15.672Z","avatar_url":"https://github.com/struphy-hub.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n![STRUPHY Header](https://raw.githubusercontent.com/struphy-hub/.github/refs/heads/main/profile/struphy_header_with_subs.png)\n\n\u003cp\u003e\n\n\u003ca href=\"https://github.com/struphy-hub/struphy/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/struphy-hub/struphy?label=Release\" alt=\"Release\"\u003e\u003c/a\u003e \u003ca href=\"https://github.com/struphy-hub/struphy/blob/devel/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-violet\" alt=\"License\"\u003e\u003c/a\u003e \u003ca href=\"https://mybinder.org/v2/gh/struphy-hub/struphy-tutorials/main\"\u003e\u003cimg src=\"https://img.shields.io/badge/launch-tutorials-579ACA.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFkAAABZCAMAAABi1XidAAAB8lBMVEX///9XmsrmZYH1olJXmsr1olJXmsrmZYH1olJXmsr1olJXmsrmZYH1olL1olJXmsr1olJXmsrmZYH1olL1olJXmsrmZYH1olJXmsr1olL1olJXmsrmZYH1olL1olJXmsrmZYH1olL1olL0nFf1olJXmsrmZYH1olJXmsq8dZb1olJXmsrmZYH1olJXmspXmspXmsr1olL1olJXmsrmZYH1olJXmsr1olL1olJXmsrmZYH1olL1olLeaIVXmsrmZYH1olL1olL1olJXmsrmZYH1olLna31Xmsr1olJXmsr1olJXmsrmZYH1olLqoVr1olJXmsr1olJXmsrmZYH1olL1olKkfaPobXvviGabgadXmsqThKuofKHmZ4Dobnr1olJXmsr1olJXmspXmsr1olJXmsrfZ4TuhWn1olL1olJXmsqBi7X1olJXmspZmslbmMhbmsdemsVfl8ZgmsNim8Jpk8F0m7R4m7F5nLB6jbh7jbiDirOEibOGnKaMhq+PnaCVg6qWg6qegKaff6WhnpKofKGtnomxeZy3noG6dZi+n3vCcpPDcpPGn3bLb4/Mb47UbIrVa4rYoGjdaIbeaIXhoWHmZYHobXvpcHjqdHXreHLroVrsfG/uhGnuh2bwj2Hxk17yl1vzmljzm1j0nlX1olL3AJXWAAAAbXRSTlMAEBAQHx8gICAuLjAwMDw9PUBAQEpQUFBXV1hgYGBkcHBwcXl8gICAgoiIkJCQlJicnJ2goKCmqK+wsLC4usDAwMjP0NDQ1NbW3Nzg4ODi5+3v8PDw8/T09PX29vb39/f5+fr7+/z8/Pz9/v7+zczCxgAABC5JREFUeAHN1ul3k0UUBvCb1CTVpmpaitAGSLSpSuKCLWpbTKNJFGlcSMAFF63iUmRccNG6gLbuxkXU66JAUef/9LSpmXnyLr3T5AO/rzl5zj137p136BISy44fKJXuGN/d19PUfYeO67Znqtf2KH33Id1psXoFdW30sPZ1sMvs2D060AHqws4FHeJojLZqnw53cmfvg+XR8mC0OEjuxrXEkX5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Foo56zyo6becOS5UVDdj7Vih0zp+tcMhwRpBeLyqtIjlJKAIZSbI8SGSF3k0pA3mR5tHuwPFoa7N7reoq2bqCsAk1HqCu5uvI1n6JuRXI+S1Mco54YmYTwcn6Aeic+kssXi8XpXC4V3t7/ADuTNKaQJdScAAAAAElFTkSuQmCC\" alt=\"badge\"\u003e\u003c/a\u003e \u003ca href=\"https://github.com/struphy-hub/struphy/actions/workflows/scheduled-ubuntu.yml\"\u003e\u003cimg src=\"https://github.com/struphy-hub/struphy/actions/workflows/scheduled-ubuntu.yml/badge.svg\" alt=\"Ubuntu latest\"\u003e\u003c/a\u003e \u003ca href=\"https://github.com/struphy-hub/struphy/actions/workflows/scheduled-macos.yml\"\u003e\u003cimg src=\"https://github.com/struphy-hub/struphy/actions/workflows/scheduled-macos.yml/badge.svg\" alt=\"MacOS latest\"\u003e\u003c/a\u003e \u003ca href=\"https://github.com/struphy-hub/struphy/actions/workflows/static_analysis.yml\"\u003e\u003cimg src=\"https://github.com/struphy-hub/struphy/actions/workflows/static_analysis.yml/badge.svg\" alt=\"isort and ruff\"\u003e\u003c/a\u003e \u003ca href=\"https://pypi.org/project/struphy/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/struphy?label=PyPI\" alt=\"PyPI\"\u003e\u003c/a\u003e \u003ca href=\"https://pypi.org/project/struphy/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/dm/struphy.svg?label=PyPI%20downloads\" alt=\"PyPI Downloads\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# Welcome!\n\n**This is a Python package for solving partial differential equations (PDEs) mainly - but not exclusively - for plasma physics.**\n\n**STRUPHY** stands for **STRU**cture-**P**reserving **HY**brid code (or **STRU**cture-preserving **PHY**sics code). The package provides off-the-shelf models for plasma physics problems, such as\n\n- Maxwell’s equations\n- Magneto-hydrodynamics (MHD)\n- Vlasov-Poisson and Vlasov-Maxwell kinetic models\n- Drift-kinetic models for strongly magnetized plasma\n- MHD-kinetic hybrid models\n\nAll models can be run on multiple cores through MPI (distributed memory) and OpenMP (shared memory). The compute-intensive parts of the code are translated and compiled (“transpiled”) using [pyccel](https://github.com/pyccel/pyccel), giving you the speed of Fortran or C while working within the familiar Python environment.\n\nThe code is freely available under an [MIT license](https://github.com/struphy-hub/struphy/blob/devel/LICENSE) - Copyright (c) 2019-2026, Struphy developers, Max Planck Institute for Plasma Physics.\n\n![Max Planck Institute Logo](https://raw.githubusercontent.com/struphy-hub/.github/refs/heads/main/profile/MPI_PP_Logo_Vertical_E_green_rgb_centered.png)\n\n## Tutorials\n\nGet familiar with Struphy right away on [mybinder](https://mybinder.org/v2/gh/struphy-hub/struphy-tutorials/main) - no installation needed.\n\n## Quick install\n\nQuick install on your computer (using a virtual environment):\n\n    python -m venv struphy_env\n    source struphy_env/bin/activate\n    pip install -U pip\n    pip install -U struphy\n    struphy compile\n\nIn case you face troubles with install/compile:\n\n1.  check the [prerequisites](https://struphy-hub.github.io/struphy/sections/install.html#requirements)\n2.  visit [trouble shooting](https://struphy-hub.github.io/struphy/sections/install.html#trouble-shooting)\n\n## Python API\n\nTry out the Python API in a Jupyter notebook or any Python environment. For example, you can create a simulation object and show the domain and equilibrium magnetic field of the linear MHD model via\n\n``` python\nfrom struphy import (\n    Simulation,\n    domains,\n    equils,\n)\nfrom struphy.models import LinearMHD\n\nmodel = LinearMHD()\n\ndomain = domains.DESCunit()\nequil = equils.DESCequilibrium(use_nfp=False)\n\nsim = Simulation(\n    model=model,\n    domain=domain,\n    equil=equil,\n)\n\nsim.show_domain(scalars=\"absB0\", window_size = (850, 250), zoom_factor=2.0)\n```\n\n![](README_files/figure-commonmark/cell-2-output-1.png)\n\nThis will show the domain and equilibrium magnetic field of the linear MHD model. You can find more examples in the [documentation](https://struphy-hub.github.io/struphy/index.html).\n\n## Quick run\n\nAs an example, let’s say we want to solve Maxwell’s equations. We can use the CLI and generate a default launch file via\n\n    struphy params Maxwell\n\nHit yes when prompted - this will create the file `params_Maxwell.py` in your current working directory (cwd). You can open the file and - if you feel like it already - change some parameters, then run\n\n    python params_Maxwell.py\n\nThe default output is in `sim_1/` in your cwd. You can change the output path via the class `EnvironmentOptions` in the parameter file.\n\nParallel simulations are run for example with\n\n    pip install -U mpi4py\n    mpirun -n 4 python params_Maxwell.py\n\nYou can also put the run command in a batch script.\n\n## Docker\n\nIf you want to get started right away without installing anything, you can use the [Docker image](https://hub.docker.com/r/spossann/struphy) - just pull and run:\n\n    docker pull spossann/struphy:main\n    docker run -it --rm spossann/struphy:main\n    ls struphy_*\n\nThis will show three available Struphy environments, which you can activate for example via\n\n    source struphy_fortran_/env_fortran_/bin/activate\n\nThere is also a [Docker image with just the prerequisites](https://hub.docker.com/r/spossann/ubuntu-for-struphy) (on Ubuntu), so you can install and compile Struphy on top of it yourself:\n\n    docker pull spossann/ubuntu-for-struphy:main\n    docker run -it --rm spossann/ubuntu-for-struphy:main\n\n## Documentation\n\nThe doc is on [Github pages](https://struphy-hub.github.io/struphy/index.html), we recommend in particular to visit:\n\n- [Install](https://struphy-hub.github.io/struphy/sections/install.html)\n- [Userguide](https://struphy-hub.github.io/struphy/sections/userguide.html)\n- [Available models](https://struphy-hub.github.io/struphy/sections/models.html)\n- [Numerical methods](https://struphy-hub.github.io/struphy/sections/numerics.html)\n\n## Get in touch\n\n- [Issues](https://github.com/struphy-hub/struphy/issues)\n- [Discussions](https://github.com/struphy-hub/struphy/discussions)\n- [@spossann](https://github.com/spossann) [stefan.possanner@ipp.mpg.de](mailto:spossann@ipp.mpg.de) (Maintainer)\n- [@max-models](https://github.com/max-models) [max.lindqvist@ipp.mpg.de](mailto:Max.Lindqvist@ipp.mpg.de) (Maintainer)\n- [LinkedIn profile](https://www.linkedin.com/company/struphy/)\n\n## Citing Struphy\n\n- S. Possanner, F. Holderied, Y. Li, B.-K. Na, D. Bell, S. Hadjout and Y. Güçlü, [**High-Order Structure-Preserving Algorithms for Plasma Hybrid Models**](https://link.springer.com/chapter/10.1007/978-3-031-38299-4_28), International Conference on Geometric Science of Information 2023, 263-271, Springer Nature Switzerland.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstruphy-hub%2Fstruphy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstruphy-hub%2Fstruphy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstruphy-hub%2Fstruphy/lists"}