Plotting

Python (matplotlib)

The models/boileau2015/ directory contains plot.py and plot_style.txt for reproducing the benchmark figures. A model-specific script is also available for adan56 (models/boileau2015/adan56/plot.py).

To use them, run the simulation first, then call the plotting script from the model directory:

cd models/boileau2015/adan56
python plot.py

Julia

Results can be loaded with DelimitedFiles and plotted with any Julia plotting library.

using DelimitedFiles
using Plots  # or CairoMakie, GLMakie, etc.

# load a .last file: rows = time-points, cols = [time, inlet, 1/4, mid, 3/4, outlet]
P = readdlm("adan56_results/aorta_P.last")

t = P[:, 1]           # time [s]
p_mid = P[:, 4] / 133.322  # mid-point pressure converted to mmHg

plot(t, p_mid, xlabel="t (s)", ylabel="P (mmHg)", label="aorta mid-point")

Unit conversions

QuantitySI unitCommon display unitFactor
PressurePammHg÷ 133.322
Flowm³/sml/s× 10⁶
Velocitym/scm/s× 100
Areamm²× 10⁶
Radiusmmm× 1000