Simulate the circulation in your browser
This page runs the project's real Python engine (physiosim) with Pyodide, entirely on your device. Choose a model, change a few parameters, press Run and watch pressure, volume and flow evolve over the last three heartbeats.
Loading Python engine…
First visit downloads about 30 MB (Python, numpy, scipy, physiosim) from this site; your browser caches it afterwards.
1 · Model and parameters
2 · Animated circulation
Shape area ∝ volume, fill colour = pressure. Valves are drawn open when their recorded flow is > 0. Moving dashes show flow direction and speed (∝ flow). Select a shape or an edge for numbers.
t = –
- Volume (V)
- – mL
- Pressure (P)
- – mmHg
- Flow (Q)
- – mL/s
- Edge state
- –
All values at this time
3 · Plots
Final three beats. The vertical line is the animation time; click or tap a time plot to move it.
4 · Summary metrics (computed by the engine)
All engine metrics
| Metric | Value | Unit | Engine key |
|---|
Parameter values used in this run
| Parameter | Value |
|---|
Agreement with the native engine
The same code path (runner.py) was run twice: natively (CPython 3.11, numpy 2.4.6, scipy 1.17.1) and inside this page's Pyodide (CPython 3.14.2, numpy 2.4.6, scipy 1.18.0), for the default scenarios of both models. Different numpy/scipy builds mean the results are not bit-identical; the differences below are the measured ones.
Loading comparison…
How this works
- Pyodide runs the unmodified
physiosimpackage (commite3d560e) in your browser, in a Web Worker so the page stays responsive. Only the model and simulation modules are imported. - Nothing is sent to a server. Python, numpy, scipy and the physiosim wheel are served from this site; there are no cookies, storage or analytics.
- Parameter values are exploratory design choices, not fitted to data. Phase 1 uses
Parameters(); M1 uses the synthetic test fixture. Neither represents a patient or normal physiology. - The solver is the repository's event-aware integrator (ideal-diode valves; valve events located exactly). A fixed number of beats does not prove a steady state — see the beat-to-beat change reported with the metrics.
- The models omit atrial contraction, AV delay, vessel inertance, valve regurgitation, pericardial and septal coupling, and any control or drug models.