How ihmegroup/stanshock works
StanShock is a quasi-1D gas-dynamics solver for shock-tube experiments and scramjet engines, with a separate method-of-characteristics inlet-design package in the same source tree. The principal workflow is to define a flow geometry and initial state, configure gas physics and numerical methods, run the solver, then inspect or export results. The inlet package separately builds characteristic nets and solves shock interactions. README-level capabilities are included, but wiring between unsampled solver modules is intentionally limited.
Main entry points: base.py Simulation system · char_net.py Characteristic net · geometry.py Geometry · net_shock.py Shock solver
Components 24
Flow setup
- Geometry
src/stanshock/system/geometry.py - Initial conditions
src/stanshock/processing/initialize.py
Quasi-1D solver
- Fluid state
src/stanshock/physics/fluid_base.py - Thermo models
src/stanshock/physics/thermotable.py - Chemistry
src/stanshock/physics/chemistry_source.py - Numerical methods
src/stanshock/numerics/inviscid_flux.py - Face averaging
src/stanshock/numerics/face_average.py - Boundary conditions
src/stanshock/numerics/boundary_conditions.py - Time integration
src/stanshock/numerics/time_integration.py - Simulation system
src/stanshock/system/base.py - Flow models
src/stanshock/models/area_change.py - Boundary layer
src/stanshock/models/boundary_layer.py - Fuel injection
src/stanshock/models/jicf.py
Results and components
- Shock tube
src/stanshock/components/shocktube.py - Combustor
src/stanshock/components/combustor.py - Probes
src/stanshock/processing/probe.py - Output and plots
src/stanshock/processing/csv_writer.py
MOC inlet design
- Planar inlet
src/inlet_moc/planar_inlet.py - Characteristic net
src/inlet_moc/char_net.py - Shock solver
src/inlet_moc/shock_solvers/net_shock.py - Shock visualization
src/inlet_moc/plot/net_shock.py - MOC processing
src/inlet_moc/processing/_processing.py
Other components
- Engineer
- Inlet designer
Connections 23
- Engineer → Geometry: defines flow path
- Engineer → Initial conditions: sets initial state
- Geometry → Initial conditions: provides mesh
- Initial conditions → Simulation system: initializes
- Geometry → Simulation system: configures domain
- Fluid state → Thermo models: thermodynamic properties
- Simulation system → Time integration: advances state
- Numerical methods → Face averaging: averages face states
- Boundary conditions → Simulation system: constrains flow
- Chemistry → Simulation system: adds source terms
- Flow models → Simulation system: models area effects
- Boundary layer → Simulation system: models wall effects
- Fuel injection → Simulation system: models injection
- Shock tube → Simulation system: configures experiment
- Combustor → Simulation system: models combustor
- Probes → Simulation system: samples flow
- Output and plots → Simulation system: exports results
- Inlet designer → Planar inlet: defines inlet
- Planar inlet → Characteristic net: sets wall geometry
- Characteristic net → Shock solver: supplies net
- Shock solver → Characteristic net: solves shock net
- Shock solver → Shock visualization: records shock steps
- MOC processing → Characteristic net: processes solution