What if you could build and simulate block-diagram models in your browser — for free, with no installation?
That's what I've been working on for the last 27 months.
The Problem
System simulation — control systems, vehicle dynamics, signal processing — is dominated by MATLAB/Simulink. It's excellent software, but:
- Expensive: €2,000-15,000 per seat per year
- Closed: Proprietary file formats, vendor lock-in
- Heavy: Complex installation, license servers, IT involvement
- Isolated: Awkward Python integration, poor CI/CD support
There's no real open-source equivalent at the system simulation level.
The Solution: PathSim + PathView
PathSim is a pure-Python framework for dynamical system simulation:
pip install pathsim
from pathsim import Simulation, Connection
from pathsim.blocks import Integrator, Amplifier, Adder, Scope
# Build a simple feedback system
integrator = Integrator()
gain = Amplifier(-1.5)
summer = Adder()
scope = Scope()
sim = Simulation(
blocks=[integrator, gain, summer, scope],
connections=[
Connection(summer, integrator),
Connection(integrator, gain),
Connection(integrator, scope),
Connection(gain, summer[1])
]
)
sim.run(duration=10.0)
scope.plot()
PathView is a visual block-diagram editor that runs entirely in your browser via Pyodide/WebAssembly:
Try it now: view.pathsim.org
No signup. No server. Your data never leaves your machine.
Key Features
- 18+ numerical solvers — from basic Euler to implicit BDF for stiff systems
- Hierarchical subsystems — compose complex models from reusable components
- Event handling — hybrid continuous/discrete systems (check the bouncing ball)
- Algebraic loop resolution — automatic detection and solving
- Browser execution — full simulation in WebAssembly (Pyodide), no backend needed
Real-World Adoption
- JSBSim (NASA's flight dynamics simulator) adopted PathSim for system-level modeling
- MIT Plasma Science & Fusion Center uses PathSim for nuclear fusion fuel-cycle simulation
- 300+ GitHub stars, 3,000+ monthly downloads
Python in WebAssembly vs. Server Side
Running a simulation framework in the browser via Pyodide is interesting. You might assume that a dedicated backend serever hosted somewhere on the web wins over Pyodide. But it turns out, when you have a decently performant CPU, the 30% loss of Pyodide over antive Python still places you way ahead of off the shelf server performance.
What's Next
- Model library — 50+ curated, validated simulation models
- Code generation — C code from PathSim models (early stage)
Try It
- Browser editor: view.pathsim.org
-
Install:
pip install pathsim - Docs: docs.pathsim.org
- GitHub: github.com/pathsim
I'd love to hear your feedback. What simulation problems are you working on? What would make PathSim useful for your work?
I'm Milan Rother, a simulation engineer. If you need help with simulation — from Simulink migration to custom model development — reach out at milanrother.com.
Top comments (0)