Add Regazzoni active stress model - #596
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #596 +/- ##
==========================================
+ Coverage 72.54% 72.72% +0.17%
==========================================
Files 252 255 +3
Lines 39032 39285 +253
Branches 6678 6731 +53
==========================================
+ Hits 28317 28571 +254
+ Misses 10480 10472 -8
- Partials 235 242 +7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@samibismar May I suggest using a more meaningful name than |
|
@ktbolt Would I would retain “RDQ20-MF” in the documentation and citations to identify the specific Regazzoni–Dedè–Quarteroni formulation being implemented. |
|
@samibismar I think |
|
@samibismar @ktbolt Sorry to comment on this this late, but: I'm not sure that As far as I know, the standard way of referring to these cellular models is by the name of the author (and sometimes year, if the same authors have published multiple models), since (I think) it is often impossible to come up with a unique descriptive name. This is the same as with ionic models (and indeed we have the classes If you feel the acronym |
|
@michelebucelli That makes sense, thanks. I agree that I think @ktbolt, would that naming approach work for you as well? |
michelebucelli
left a comment
There was a problem hiding this comment.
Thanks @samibismar! Please see my comments below.
| * 1. [Regazzoni, Dede', Quarteroni (2020)](https://doi.org/10.1371/journal.pcbi.1008294) | ||
| * 2. [F. Regazzoni, cardiac-activation reference implementation](https://github.com/FrancescoRegazzoni/cardiac-activation) | ||
| */ | ||
| class MeanFieldActiveStress : public ActiveStress { |
There was a problem hiding this comment.
I don't really like that this class inherits from ActiveStress rather than ActiveStressODE, even if it is an active stress model based on solving a system of ODEs. Is it because it implements its own custom time-stepping method, or are there other reasons?
I think we should figure out if and how this can be brought under ActiveStressODE (although I can see that this is not exactly trivial). I can see a few ways to do that, and I don't like any of them 😅
- Generalize the custom time stepping scheme so that it can be moved to
ActiveStressODE. This would involve introducing an implicit-explicit scheme, with an interface not unlike that ofIonicModel, where state variables are partitioned into gating variables (updated implicitly with a closed-form solution) and others (updated with whatever timestepping method the user chose, preferably explicitly). I don't really like the overhead that this splitting brings. - Derive from
ActiveStressODE, but then don't use the time stepping infrastructure it provides, and override it with custom time stepping. This would satisfy the "is-one-of" interpretation of inheritance, but break the interface in a number of other ways (e.g. the functiongetfwould make no sense). - Implement better explicit time stepping in
ActiveStressODE(say, 4th order Runge-Kutta), and see if it works well enough for this model that we can ditch the custom time stepping scheme. This option has a bit of uncertainty related to finding out if RK4 is enough or not. - If
ActiveStressODEis only used byNashPanfilov, then maybe we can get rid ofActiveStressODEand have each model implement their custom timestepping as needed. I think whether this makes sense or not hinges on whether we expect to useActiveStressODEin other cases: @kko27 are you using it for the Land-Niederer model, and if so did you need custom timestepping or was forward Euler enough?
I think among these option 3 (the Runge-Kutta one) would be the best, if it works.
There was a problem hiding this comment.
@michelebucelli I am using the ActiveStressODE class for my Land-Niederer implementation (for reference, here is my branch) However, I had some convergence issues with the FE time stepping and had to implement RK4 instead.
I am in favor of option 3 (and then 4, if RK4 is not good enough)
There was a problem hiding this comment.
Thanks @kko27! I've asked @samibismar to try out the RK4 solver from your branch on the RDQ model, if it works we'll go with option 3.
There was a problem hiding this comment.
I tested the RK4 approach on the Regazzoni model using both an isolated 20-state comparison and the fully coupled electromechanics slab.
In the isolated comparison, stable RK4 timesteps reproduced the refined current-scheme solution under prescribed calcium and fixed kinematics, which suggests that the unified 20-state RHS is consistent with the current model for those imposed inputs.
In the coupled slab:
dt = 1.0 ms: RK4 failed around 11 ms
dt = 0.5 ms: RK4 failed around 11.5 ms
dt = 0.25 ms: RK4 remained stable for the full simulation
The current Regazzoni implementation remained stable at dt = 1.0 ms. This is consistent with the split scheme resolving the faster RU dynamics with smaller internal steps while advancing the XB moments implicitly.
Both unstable coupled runs failed during the early calcium upstroke, with severely unphysical active tension followed by non-finite mechanics fields. The internal RU and XB states were not exported, so I could not determine which state became invalid first.
The result I found is that the shared RK4 approach works for this model only after substantially reducing the outer timestep. I’ve attached a summary figure. The experimental Regazzoni RK4 implementation is available here.
Current situation
This PR adds the
RegazzoniActiveStressmodel, implementing the RDQ20-MF formulation described by Regazzoni, Dedè, and Quarteroni (2020), using the ActiveStress framework introduced in PR #578.The implementation includes:
ActiveStressmodel factory;The local active-stress interface is extended to provide fiber stretch to each model. RDQ20-MF first computes the paper tension
then returns
This normalization is required because svMultiPhysics assembles the returned coefficient as a second Piola–Kirchhoff stress contribution:
After conversion to first Piola–Kirchhoff stress, this gives
consistent with the RDQ20 paper convention.
Related to #594.
Release Notes
slab_RDQ20MFelectromechanics regression case.Documentation
The RDQ20-MF class documentation describes:
The
slab_RDQ20MFREADME documents:Active_tension_*fieldsTesting
slab_RDQ20MFpytest case passed for all three configured process-count variants.26f05df.was compared node-by-node against the same reference implementation and agreed to approximately machine precision.
to floating-point precision.
svZeroDSolvershared library was unavailable. The same twelve tests fail with the same missing-library error onmainin the same environment.References
Regazzoni, F., Dede', L., & Quarteroni, A.
“Biophysically detailed mathematical models of multiscale cardiac active mechanics.”
PLOS Computational Biology, 2020.
https://doi.org/10.1371/journal.pcbi.1008294
Code of Conduct & Contributing Guidelines