How the Korakianitis–Shi model works
A simple model of the whole circulation: 4 heart chambers, 4 valves and 6 blood-vessel segments. This page shows what goes in, what comes out, and what each number means for the heart.
The circulation is one closed ring
The model splits the circulation into 10 compartments. Each one empties into the next, and the last empties into the first, so no blood is lost. The order is the same as in the code:
Red = oxygen-rich blood, blue = oxygen-poor. Capillaries are included in sat and pat. Click any part to learn more.
Pressure p_*, mmHg
How hard blood is pushed. More volume in a stretchy wall → more pressure.
Flow q_*, mL/s
Blood leaving per second. It runs from high to low pressure.
Volume v_*, mL
Blood held in a compartment. It changes by inflow − outflow. The total never changes.
One heartbeat, step by step
The model's output for the default patient (60 beats/min). Press play or drag across a plot. Coloured bands are the phases of the beat.
Four building blocks
The model uses only four kinds of piece. Move the sliders to see what each parameter does.
A chamber is a balloon that stiffens when it contracts
Relaxed, it fills at low pressure. Contracted, the same volume gives a high pressure, so blood is pushed out.
Active part: grows with contraction A(t). Passive part: grows steeply as the chamber fills.
E_act = contractility (how strong the squeeze is). E_pas, k_pas = stiffness when relaxed (high in a stiff heart). Each loop sits between the two curves.Inputs: the parameters
A virtual patient is a list of numbers in KSParam.toml. 42 of them have a range and can be varied. Click a part of the ring to see its parameters.
⚠ sas.v is the blood volume
Not the aortic-root volume: it is the total blood in all six vessels (700 mL). With the chambers, the total is 870 mL.
⚠ Timings are fractions of T
delay, tr, td0, tpww are multiplied by T to get seconds.
⚠ Fixed values are not sampled
Leaks (RRA = 0) never vary, and the CQ ranges cover only healthy valves. Widen them to study valve disease.
All parameters in one table
Outputs: what the model gives back
The model repeats beats until they stop changing, then returns the last beat as waveforms and summary numbers.
30 waveforms
A volume, pressure and flow for each compartment: v_lv = LV volume, p_sat = arterial pressure, q_ao = aortic-valve flow. Click to compare.
Summary numbers
Each one is read off a single waveform.
Clinical measures you can read from the waveforms
Shown on example patients with a diseased valve.
What drives what
Each row: raise one parameter by 20%, see how the outputs change. Bigger dot = bigger change. Click a row to try it.
RRA: 0 → 0.05
Try it
Pick an example or a parameter. Dashed grey = default patient.
Under the hood
From the first beat to a steady beat
A run starts from the volumes in the file. Beats are repeated until each one matches the last. Top: LV volume, beat by beat. Bottom: change from the previous beat.
How it is solved
- Unknowns: 10 volumes and 4 artery flows.
- Method: Runge–Kutta (4th order): 1000 points per beat, 16 small steps between points.
- Steady beat: stops when
p_pat,q_pat,p_rv,v_rvchange by < 0.01% between beats (3 to 30 beats). - Speed: on a GPU, thousands of patients run at once.
- Units: mmHg, mL, s.
✓ same numbers as the Python code
This page runs a JavaScript copy of KSModel.py. On 14 test patients its outputs matched the Python code to within 0.0002%.
Which file does what
Default value and range of each parameter.
Draws virtual patients from the ranges.
One row per patient.
Simulates every patient to a steady beat.
Computes the summary numbers.
korashi.py uses the same vessels and valves, but takes chamber pressures from a 3D heart model.
Differences from the 2006 paper
| Feature | Paper | This code | Result |
|---|---|---|---|
| Valves | Leaflets move | Open or shut instantly | No dicrotic notch |
| Valve ring motion | Modelled | Not modelled | Small effect |
| Relaxed chamber | Linear stiffness | Exponential stiffness | More realistic filling |
| Small vessels | Separate resistances | Added into sat.r, pat.r | One resistance per circuit |
| Timing | In seconds | Fractions of the beat | Scales with heart rate |