A frozen record of a comparison of three ways to couple a cellular force-generation model to tissue mechanics in simcardemsx:
- monolithic: the contraction model is stepped inside the mechanics Newton iteration;
- stabilized segregated: the scheme of Regazzoni & Quarteroni (2021), with
Kathe UFL derivative of the stepped tension; - naive segregated.
The three schemes are compared on one element, a slab and a biventricular (UKB atlas) geometry, for accuracy against the monolithic solution and for cost. The code is simcardemsx commit 335a434 (PR #11), included here as a submodule.
Details, tables and caveats are in RESULTS.md; every number is in report/report.md.
-
The stabilized scheme converges at first order on the slab, with observed orders rising to about 0.9–1.0 at the finest steps. On the BiV it is approaching first order (0.62 → 0.79).
-
The stabilized scheme's error against the monolithic solution at the same dt (RMS fibre stretch) is, at dt 2 ms:
- 1.772e-02 on the slab (zeta split) and 1.913e-02 (Ca_i split);
- 6.834e-03 on the BiV, about 1.7 mL and 1.7 mmHg in the LV.
It roughly halves as dt halves.
-
The naive scheme failed on the BiV at every dt tested: at 52, 55, 66 and 98.25 ms for dt 2, 1, 0.5 and 0.25 ms. The stability indicator
Ka_max > Kp + η/dt + ρh²/dt²predicted this at every dt (Ka_max2824–3466 kPa against a threshold of 81.84–2007 kPa). It also failed at every dt on the slab and on the static element. -
Monolithic is the cheapest at equal accuracy, needing 2.9–28× less mechanics time than stabilized. The exception is the dynamic element, where the two tie in λ.
| Path | What |
|---|---|
| RESULTS.md | The results, with what was compared, the tables, the predictions against observations, and the caveats |
| report/ | The generated report and its figures, as report.py wrote them |
runs/<geometry>/<group>/<scheme>/dt<dt>/ |
The 87 runs' records (run.json, steps.csv, timings.json, launcher.json, and for the BiV log.csv and summary.json). The groups are the element's three studies and the slab's and BiV's splits |
inputs/circulation_biv/ |
The BiV example's cached mesh, circuit operating point and prestress. Rebuilding them needs ukb-atlas and fenicsx-ldrb |
environment/ |
The package versions and pip freeze of the runs |
checksums.json, verify.py |
Checksums of every run's reproducible content, and the script that checks a regeneration against them |
regenerate.sh |
Reruns every study and the report from the submodule, then runs verify.py |
simcardemsx/ |
The code, at 335a434 |
The field snapshots (snapshots.npz, 607 MB), the run logs (206 MB) and the slab example's field output are not in git; all are regenerable. checksums.json still covers the snapshots' arrays.
Without the snapshots, report.py cannot be rerun on runs/ alone, because the field-RMS columns need them. Use regenerate.sh.
git clone --recurse-submodules https://github.com/ComputationalPhysiology/simcardemsx-scheme-comparison.git
cd simcardemsx-scheme-comparison
./regenerate.sh # writes ./regenerated/, then runs verify.py on itThe environment: run it inside ghcr.io/fenics/dolfinx/dolfinx:stable, with simcardemsx installed from the submodule as its .devcontainer/setup.sh does. environment/versions.txt lists the versions that produced the record, among them dolfinx 0.11.0.post0, PETSc 3.25.1, pulse 0.10.0 and beat 0.6.4, on Linux aarch64.
The time: every run is serial. The whole set took about 6 h on one core; the BiV alone took 3.3 h.
What to expect: in the same image and on the same CPU architecture, the records should match checksums.json bit for bit. Elsewhere they agree to round-off at best. Wall times are not checked: the recorded ones were measured on a shared VM (see RESULTS.md).
MIT. simcardemsx itself is licensed separately.
Please cite simcardemsx at commit 335a434, and link this repository.