How struphy-hub/struphy works
STRUPHY is a Python framework for structure-preserving PDE simulation, especially plasma physics. The principal workflow is to configure a model and its numerical setup, initialize the simulation, execute its time evolution, and inspect saved results. Its documented model families include fluid, kinetic, and hybrid plasma systems; the tree also shows dedicated geometry, finite-element, particle, and background-field machinery. The graph combines README capabilities with indexed source references; some implementation details are not shown in the excerpts, so uncertain wiring is omitted.
Main entry points: sim.py Simulation driver · models/base.py PDE models · output.py Post-processing output · pic/base.py Particle methods
Components 17
User interface
- Command line
src/struphy/console/main.py
Simulation setup
- Run options
src/struphy/io/options.py - Simulation driver
src/struphy/simulation/sim.py - Mapped domains
src/struphy/geometry/base.py - Initial conditions
src/struphy/initial/perturbations.py
Numerical methods
- FEEC spaces
src/struphy/feec/psydac_derham.py - Mass operators
src/struphy/feec/mass.py - Particle methods
src/struphy/pic/base.py - Spline evaluation
src/struphy/bsplines/evaluation_kernels_3d.py
Physics components
- PDE models
src/struphy/models/base.py - Model species
src/struphy/models/species.py - Model variables
src/struphy/models/variables.py - Fluid equilibria
src/struphy/fields_background/equils.py - Background fields
src/struphy/fields_background/base.py - Kinetic backgrounds
src/struphy/kinetic_background/base.py
Results
- Post-processing output
src/struphy/post_processing/output.py
Other components
- User
Connections 19
- User → Command line: runs commands
README.md - Command line → PDE models: resolves models
src/struphy/console/main.py - Simulation driver → PDE models: uses model
src/struphy/simulation/sim.py - Simulation driver → Run options: reads options
src/struphy/simulation/sim.py - Simulation driver → Mapped domains: uses domain
src/struphy/simulation/sim.py - Simulation driver → Initial conditions: sets initial state
src/struphy/simulation/sim.py - Simulation driver → Background fields: uses backgrounds
src/struphy/simulation/sim.py - Simulation driver → FEEC spaces: uses spaces
src/struphy/simulation/sim.py - Simulation driver → Mass operators: uses operators
src/struphy/simulation/sim.py - Simulation driver → Particle methods: uses particle methods
src/struphy/simulation/sim.py - Simulation driver → Post-processing output: writes results
src/struphy/simulation/sim.py - PDE models → Model species: uses species
src/struphy/models/base.py - PDE models → Model variables: uses variables
src/struphy/models/base.py - PDE models → Particle methods: uses particle methods
src/struphy/models/base.py - Fluid equilibria → Background fields: extends backgrounds
src/struphy/fields_background/equils.py - Mapped domains → Spline evaluation: evaluates splines
src/struphy/geometry/base.py - Post-processing output → Particle methods: reads particle state
src/struphy/post_processing/output.py - Post-processing output → Model variables: reads variables
src/struphy/post_processing/output.py - Simulation driver → Kinetic backgrounds: uses kinetic backgrounds
src/struphy/simulation/sim.py