Methods
Model overview
Cardiac activation is simulated with a deterministic, event-driven network model of excitable tissue. The model does not represent membrane voltage, ionic currents or individual cells. Tissue is reduced to a small number of discrete sites joined by conduction pathways (links).
The model represents a limited set of electrophysiological properties: refractoriness and its restitution, decremental conduction and conduction velocity restitution, directional conduction, conduction block and collision, and automaticity with overdrive suppression. Each is described below by its standard definition, followed by how it is represented in the model and what is omitted.
All network configurations use the same rules and differ only in topology and parameter values. Each is described on its page in the app. No rhythm or conduction pattern (for example Wenckebach periodicity, AV-nodal echo beats or reentry) is specified explicitly. When such behaviours occur, they arise from the topology, the tissue rules and the timing of stimulation.
Model structure and simulation
Sites and links. A configuration is a graph of sites (nodes) joined by links (edges). Each site is labelled with a tissue type (sinus, atrial, nodal, His–Purkinje, ventricular or accessory pathway). The label is descriptive and does not change the rules applied to the site. The state of a site is two times: its last activation and the end of its current refractory period. Each link has two directions, each with its own conduction parameters. Links have no internal spatial structure; an impulse in transit is described only by its departure and arrival times.
Event-driven propagation. The model has no fixed time step. Pending events (impulse arrivals, stimuli, automatic firing attempts and collisions) are held in a priority queue and processed in time order. An event that reaches a site is an excitation attempt. If the site is excitable, it activates, its refractory period is set, and an impulse is launched along every enabled outgoing direction of its links, except the links on which the activating impulse arrived. The conduction time of each impulse is fixed at departure. Excitation attempts that reach a site at the same instant are pooled and produce at most one activation.
Stimulation. A stimulus is an excitation attempt delivered to a site at a specified time. It is subject to the same refractoriness as a conducted impulse and differs from one only in its origin.
Refractoriness and ERP restitution
The effective refractory period (ERP) is the interval after activation during which tissue cannot be excited again. ERP restitution is the dependence of ERP on the preceding diastolic interval (DI): an activation that follows a short DI has a shorter ERP, as with action potential duration restitution. Tissue that is excited soon after its ERP ends remains less excitable than fully recovered tissue. The model represents this as slowed conduction (next section), not as a longer ERP.
In the model, a site is refractory from its activation at time t until t + ERP. Excitation attempts that reach it in that window are blocked. ERP is not derived from an action potential; it is assigned directly at each activation from the preceding DI. DI is the time from the end of the previous refractory period to the new activation, which plays the role of the usual cycle length minus action potential duration:
Rmax is the fully recovered ERP, AR the maximum shortening, τR the recovery time constant, and Rmin a lower bound (by default Rmax − AR). A site’s first activation is assigned Rmax. Sites without restitution parameters have a fixed ERP.
ERP depends only on the most recent DI. The model has no short-term memory of earlier beats and no relative refractory period as a separate state; the effects of incomplete recovery on conduction are represented in the next section.
Decremental conduction and conduction velocity restitution
Conduction velocity (CV) restitution is the slowing of conduction in tissue that is activated early in its recovery, that is, at a short preceding DI. Decremental conduction is the corresponding behaviour of the AV node, in which conduction time lengthens progressively as the coupling interval shortens. Both reflect conduction during the relative refractory period.
In the model, each direction of a link has a conduction time T. T is a baseline delay plus slowing that depends on the recovery of the tissue at each end of the link:
- D0 is the conduction time between fully recovered sites.
- DIs is the DI of the source site at the activation that launches the impulse.
- DId is the DI the destination site would have if the impulse activated it on arrival. It is measured from the end of the destination’s refractory period to the nominal arrival time (departure + D0 + source term). If the nominal arrival falls within the destination’s refractory period, this term is zero.
Both terms describe the same property, slowing in incompletely recovered tissue, and have the same exponential form. In continuous tissue this is a single local effect. Because the model does not represent tissue between sites, it is evaluated at both ends of each link. The two terms are parameterised separately (As, τs and Ad, τd), and either may be absent. A site that has not previously been activated contributes no slowing. Because DId is computed after the source term is added, a slowly conducted impulse meets a more recovered destination.
Slowing is bounded by As + Ad. Slowing alone never causes conduction to fail; block arises only from refractoriness. The model does not represent supernormal conduction or dependence of conduction on pacing history beyond the most recent DI.
Conduction velocity. The model works in conduction times, not velocities. Where a velocity is reported, it is a derived quantity: a nominal link length divided by T. Nominal lengths were chosen so that rested velocities fall within physiological ranges for each tissue type. They are not anatomical measurements and do not affect the simulation.
Directional conduction
Conduction properties of a pathway can differ with the direction of propagation. The AV node, for example, has different antegrade and retrograde conduction times and refractoriness, and unidirectional block is the extreme case.
In the model, the two directions of each link are parameterised independently, with their own D0 and slowing terms, and either direction can be disabled to represent fixed unidirectional block. These directional differences are assigned as parameters; they are not derived from tissue structure. The model does not represent anisotropy (dependence of conduction on fibre orientation), tissue geometry or source–sink effects at junctions. In the ring configurations, both directions of every link have the same parameters. No configuration described here disables a direction. In Pathway the left bundle can be blocked by the user, which disables the H–LV link in both directions.
Conduction block and collision
Conduction block. Conduction fails when an impulse reaches tissue that is still refractory. In the model, an impulse that arrives at a site during its refractory period is extinguished and causes no activation. All block in the model is of this functional kind; there is no fixed anatomical block other than a disabled link direction.
Collision. Wavefronts travelling towards each other through the same tissue annihilate, because each meets tissue made refractory by the other. In the model, when two impulses travel in opposite directions on the same link, their meeting time is computed assuming linear progress along the link from departure to arrival. At that time both impulses are removed, and neither reaches its destination.
Automaticity and overdrive suppression
An automatic focus fires spontaneously at its intrinsic cycle length. Capture by a faster rhythm resets it, and pacing faster than the intrinsic rate transiently suppresses it (overdrive suppression), so that the first spontaneous intervals after pacing stops are prolonged and then shorten towards the intrinsic cycle length (warm-up).
In the model, a site with automaticity schedules a spontaneous excitation attempt one intrinsic cycle length C after its last activation. Any activation of the focus, whether spontaneous, paced or conducted, resets this clock. A spontaneous attempt that finds the focus refractory fails, and the next attempt is scheduled one cycle (plus any suppression) later. Excitation attempts that fail to capture the focus do not reset it.
Overdrive suppression is a single quantity S that delays the next spontaneous attempt to C + S after the last activation. When the focus is captured by a non-spontaneous impulse at an interval I shorter than C, S increases:
After each spontaneous firing, S decays to wS, which produces the warm-up. The gain g, ceiling Smax and retention factor w are set per focus. A simplified mode sets S to zero and disables its accumulation and decay, leaving only reset on capture. The focus has no phase-dependent response to a single extrastimulus: any capture resets it fully.
Measurements
Each run produces an ordered record of stimuli, activations, blocked excitation attempts, impulse launches, arrivals and collisions. Each entry stores its causes, so every activation can be traced back through the impulses that produced it. All measurements are computed from this record and use standard EP definitions.
- Conduction intervals (for example the A–H interval) run from an activation to the first activation at a downstream site that descends from it.
- Conduction ratio during incremental pacing is classified from the second half of each pacing train. The shortest repeating pattern of conducted and blocked beats (period of at most 12) gives the ratio. A pattern is classed as Wenckebach when conduction intervals within each group lengthen progressively before the blocked beat, and as fixed otherwise.
- Refractory periods from programmed extrastimulation: ERP is the longest coupling interval that fails to conduct to the reference site, and the functional refractory period (FRP) is the shortest output interval achieved. A conduction curve discontinuity (jump) is recorded when the output interval increases by at least 50 ms for a decrease in coupling interval of at most 10 ms.
- Reentry. A return is recorded when an activation at a site descends, through one unbroken chain of conducted impulses, from the preceding activation at the same site. Reentry is classed as sustained after three consecutive returns along the same path.
- Tachycardia cycle length (TCL) is the latest interval between activations at a reference site. It is classed as stable when the last three intervals agree within 1% or 2 ms, whichever is larger.
- Entrainment and post-pacing interval (PPI). Pacing at a cycle length shorter than the TCL is classed as entraining the circuit when four consecutive stimuli capture the pacing site and each reference site in sequence at the pacing cycle length (within 1%). PPI runs from the last stimulus to the next activation at the pacing site that returns through the circuit in its original direction. PPI − TCL is reported against a stable TCL measured before pacing.
- Return of an automatic focus. After pacing stops, the first spontaneous return is measured against the focus’s intrinsic cycle length, established from three spontaneous intervals within 2 ms of C.
Addendum
Model parameters
All times are in milliseconds. For every site with restitution, Rmin = Rmax − AR. Configurations are named as on their pages. Unless a direction is listed separately, both directions of a link share the same parameters. A dash means the term is absent.
| Configuration | Site | Tissue | Rmax | AR | τR |
|---|---|---|---|---|---|
| Conduction | S | sinus | 200 | 40 | 90 |
| Conduction | A | atrial | 220 | 45 | 90 |
| Conduction | N (AV node) | nodal | 310 | 90 | 130 |
| Conduction | H | His–Purkinje | 180 | 35 | 95 |
| Conduction | V1, V2 | ventricular | 260 | 60 | 80 |
| Pathway | S | sinus | 200 | 40 | 90 |
| Pathway | A | atrial | 220 | 45 | 90 |
| Pathway | N (AV node) | nodal | 310 | 90 | 130 |
| Pathway | AP (accessory pathway) | accessory pathway | 290 (fixed) | – | – |
| Pathway | H | His–Purkinje | 180 | 35 | 95 |
| Pathway | RV, LV | ventricular | 260 | 60 | 80 |
| Ring | R0 | atrial | 180 | 45 | 95 |
| Ring | R1 | atrial | 300 | 60 | 95 |
| Ring | R2–R6 | atrial | 220 | 45 | 95 |
| Ring | R7 | atrial | 200 | 45 | 95 |
| Echo | S | sinus | 200 (fixed) | – | – |
| Echo | HRA, CS proximal | atrial | 230 | 60 | 80 |
| Echo | Fast pathway | nodal | 304 | 60 | 120 |
| Echo | Slow pathway | nodal | 240 | 40 | 100 |
| Echo | Lower common pathway | nodal | 250 | 60 | 120 |
| Echo | H | His–Purkinje | 360 | 160 | 200 |
| Echo | V | ventricular | 250 | 60 | 80 |
| Entrainment | R1 | atrial | 205 | 25 | 85 |
| Entrainment | All other ring and branch sites | atrial | 165 | 25 | 85 |
| Automaticity | All sites (A0–A6) | atrial | 190 | 25 | 85 |
| Configuration | Link | D0 | As / τs | Ad / τd |
|---|---|---|---|---|
| Conduction | S–A | 25 | 10 / 85 | 12 / 60 |
| Conduction | A→N (antegrade) | 35 | 100 / 150 | 110 / 150 |
| Conduction | N→A (retrograde) | 35 | 12 / 85 | 18 / 65 |
| Conduction | N→H (antegrade) | 65 | 10 / 120 | 12 / 60 |
| Conduction | H→N (retrograde) | 65 | 90 / 120 | 12 / 60 |
| Conduction | H–V1 | 25 | 10 / 85 | 10 / 60 |
| Conduction | H–V2 | 45 | 10 / 85 | 10 / 60 |
| Pathway | S–A | 25 | 10 / 85 | 12 / 60 |
| Pathway | A→N (antegrade) | 35 | 100 / 150 | 50 / 150 |
| Pathway | N→A (retrograde) | 35 | 12 / 85 | 18 / 65 |
| Pathway | N→H (antegrade) | 65 | 10 / 120 | 12 / 60 |
| Pathway | H→N (retrograde) | 65 | 90 / 120 | 12 / 60 |
| Pathway | H–RV (right bundle) | 40 | 10 / 85 | 10 / 60 |
| Pathway | H–LV (left bundle) | 50 | 10 / 85 | 10 / 60 |
| Pathway | RV–LV (septum) | 75 | 10 / 85 | 10 / 60 |
| Pathway | A–AP | 121 | – | – |
| Pathway | AP–LV | 28 | – | – |
| Ring | Each ring link (L0–L7) | 60 | 18 / 85 | 24 / 65 |
| Echo | S–HRA | 25 | – | – |
| Echo | HRA–CS proximal | 30 | – | 15 / 40 |
| Echo | CS proximal–fast pathway | 10 | – | 20 / 60 |
| Echo | Fast pathway–lower common pathway | 30 | 30 / 100 | 20 / 60 |
| Echo | CS proximal–slow pathway | 50 | – | 20 / 60 |
| Echo | Slow pathway–lower common pathway | 100 | 60 / 120 | 30 / 80 |
| Echo | Lower common pathway–H | 55 | – | 10 / 40 |
| Echo | H–V | 35 | – | 10 / 40 |
| Entrainment | R0–R1 | 80 | 4 / 85 | 6 / 65 |
| Entrainment | R1–R2 to R6–R7 | 56 | 4 / 85 | 6 / 65 |
| Entrainment | R7–R0 | 64 | 4 / 85 | 6 / 65 |
| Entrainment | Ring junction–near branch site (at R1, R3, R5, R7) | 20 | 4 / 85 | 6 / 65 |
| Entrainment | Near–far branch site | 40 | 4 / 85 | 6 / 65 |
| Automaticity | Each link (focus–proximal, proximal–distal) | 34 | 4 / 85 | 6 / 65 |
Pathway simplifies the anatomy: one atrial site (no separate left atrium), one LV site standing for the region of the pathway’s ventricular insertion, and the left bundle as a single link. A–AP includes atrial conduction to the lateral mitral annulus.
| Configuration | Site | C | g | Smax | w |
|---|---|---|---|---|---|
| Automaticity | A0 (focus) | 450 | 0.15 | 350 | 0.5 |
Numerical implementation
Time is represented as integer microseconds. Each rate law is evaluated in floating point and rounded once to the nearest microsecond, so results are exactly reproducible. Events at the same instant are processed in a fixed order: parameter edits, collisions, stimuli, automatic attempts, then arrivals. Activation outcomes for that instant are then resolved, new impulses are launched and automatic foci are rescheduled. Remaining ties are broken by site identifier and launch order. Collision times are computed with exact rational arithmetic before rounding.
The model is written in JavaScript and runs in a web browser. Visual and audio rendering, including slowed playback, read from the event record and do not affect the simulation. Engine behaviour is covered by an automated test suite with fixed reference traces.
Engine features not used here
The engine also supports autonomic tone, respiratory modulation of sinus and nodal tissue, progressive link lesions, drug-like modifiers of ERP and conduction, entrance block of an automatic focus, and phase-response coupling between foci. None is enabled in the configurations described above.