How abhogal-lab/willisworks works
Purpose and entry points
WillisWorks is a browser-based, interactive cerebral-hemodynamics teaching simulator. It is a standalone static application: users download and open WillisWorks.html, or access the hosted documentation/application through docs/index.html. The long-form model manual and operational specification are in README.md.
Delivery model and runtime boundary
The repository has no visible backend, package manifest, or service integration. The application executes locally in a web browser, requires no patient data, and persists comparison state in browser memory. Primary runtime artifact: WillisWorks.html; hosted/static entry: docs/index.html. Images and visual identity are served from img/.
Core hemodynamic network
The model is a zero-dimensional, lumped resistance network with three arterial sources (left ICA, right ICA, basilar), proximal arterial nodes, and eight distal beds: bilateral ACA, MCA, PCA, and vertebrobasilar territories. It solves nodal pressure and source inflow, then derives territorial flow from distal arterial versus effective outflow pressure. The implemented simulator is contained in WillisWorks.html; topology explanation is documented in README.md.
Active regulation and source constraints
After a pressure-network solve, each territory iteratively adjusts arteriolar resistance toward a target flow determined by CPP, metabolic demand, and PaCO₂. Resistance is bounded by vasodilatory reserve; finite ICA/basilar source reserve can reduce effective source pressure under increased demand, enabling modeled redistribution and steal. This is central application logic in WillisWorks.html, with equations and calibration rationale in README.md.
Structural disease and collateral routing
Lesions add steeply increasing resistance for ICA, M1, A1, P1, or basilar disease. Circle of Willis pathways (ACom/PCom), recruited leptomeningeal links, and EC–IC bypass are separate conductance/support mechanisms, allowing donor-recipient pressure redistribution to be inspected independently. These mechanisms are implemented by the interactive app in WillisWorks.html and specified in README.md.
Oxygen, metabolism, and interpretation
A downstream oxygen layer derives CaO₂, oxygen delivery, OEF, and delivered CMRO₂ from solved CBF. It supports classic OEF-ceiling and flow–diffusion interpretations, with CTH, shunt, neural activation, NVC, and endothelial modifiers. Results are summarized as continuous territory metrics plus educational staging labels; these are explicitly not diagnostic outputs. Primary paths: WillisWorks.html, README.md.
User interaction, views, and simulations
Controls alter a shared model state across teaching and advanced modes. Outputs include cortical map visualization, Model/Staging/Dynamics panels, A/B state comparison, and PNG/CSV/JSON export. Time-resolved simulations reuse the static solver with prescribed trajectories for Suzuki progression, pressure/autoregulation, steno-occlusive progression, and oxygen delivery. The app’s single interactive surface is WillisWorks.html; static documentation/navigation is available at docs/index.html.
Assets and limitations
Visual assets are stored under img/, including the logo and explanatory figures referenced by the manual. The model intentionally omits patient-specific geometry, pulse-wave propagation, full venous/capillary networks, validated stenosis-to-resistance mapping, and clinical decision support. License: GPL-3.0-or-later (LICENSE).
Main entry points: WillisWorks.html Arterial resistance network · index.html Hosted entry · README.md Model manual · img Visual assets
Components 18
Static delivery
Standalone files served or opened directly in a browser.
- Web browser · Executes the simulator locally with in-memory comparison state.
- WillisWorks app · Primary interactive simulator and implementation.
WillisWorks.html - Hosted entry · Hosted documentation and application entry point.
docs/index.html - Model manual · Documents equations, topology, calibration, and limitations.
README.md - Visual assets · Logo and explanatory figures.
img
Hemodynamic model
Interactive lumped-network simulation inside the HTML application.
- Arterial resistance network · Solves nodal pressure and source inflow across three sources and distal beds.
WillisWorks.html - ICA & basilar sources · Finite reserve reduces effective source pressure under demand.
WillisWorks.html - Eight distal territories · ACA, MCA, PCA, and vertebrobasilar beds derive flow from pressure gradients.
WillisWorks.html - Active autoregulation · Adjusts bounded arteriolar resistance toward CPP, metabolic, and PaCO₂ targets.
WillisWorks.html - Collateral & bypass routing · ACom/PCom, leptomeningeal, and EC–IC support redistribute pressure.
WillisWorks.html - Structural lesions · ICA, M1, A1, P1, and basilar disease add steep resistance.
WillisWorks.html - Oxygen & metabolism · Derives CaO₂, delivery, OEF, and delivered CMRO₂ from CBF.
WillisWorks.html
Teaching experience
Controls, interpretation, visualization, and export share one model state.
- Shared model state · Control settings and A/B comparison state held in browser memory.
WillisWorks.html - Teaching & advanced controls
WillisWorks.html - Educational staging · Continuous metrics are summarized as non-diagnostic teaching labels.
WillisWorks.html - Map & analysis panels · Cortical map plus Model, Staging, and Dynamics panels.
WillisWorks.html - Time-resolved simulations · Reuses the static solver for prescribed progression and regulation scenarios.
WillisWorks.html - PNG / CSV / JSON export
WillisWorks.html
Connections 20
- Hosted entry → WillisWorks app: hosts entry
- Web browser → WillisWorks app: executes
- WillisWorks app → Visual assets: uses
- Model manual → WillisWorks app: specifies
- Teaching & advanced controls → Shared model state: updates
- Shared model state → Arterial resistance network: configures
- ICA & basilar sources → Arterial resistance network: feeds
- Structural lesions → Arterial resistance network: adds resistance
- Collateral & bypass routing → Arterial resistance network: adds pathways
- Arterial resistance network → Eight distal territories: solves pressures
- Eight distal territories → Active autoregulation: provides flow
- Active autoregulation → Arterial resistance network: iterates resistance
- Eight distal territories → Oxygen & metabolism: provides CBF
- Oxygen & metabolism → Educational staging: supplies metrics
- Eight distal territories → Map & analysis panels: supplies flow state
- Educational staging → Map & analysis panels: supplies stages
- Shared model state → Time-resolved simulations: seeds scenarios
- Time-resolved simulations → Arterial resistance network: repeats solver
- Map & analysis panels → PNG / CSV / JSON export: exports results
- Shared model state → PNG / CSV / JSON export: exports A/B state