svMultiPhysics
Loading...
Searching...
No Matches
ActiveStressRegazzoni.h
1// SPDX-FileCopyrightText: Copyright (c) Stanford University, The Regents of the
2// University of California, and others. SPDX-License-Identifier: BSD-3-Clause
3
4#ifndef ACTIVE_STRESS_REGAZZONI_H
5#define ACTIVE_STRESS_REGAZZONI_H
6
7#include "ActiveStress.h"
8
9#include <array>
10
11/**
12 * @brief Mean-field active stress model (implements the RDQ20-MF formulation).
13 *
14 * This class implements the mean-field RDQ20-MF sarcomere model of
15 * cardiomyocyte force generation of Regazzoni, Dede', and Quarteroni (2020),
16 * described in [1] and validated against the authors' reference implementation
17 * [2]. The node-local state has 20 variables: 16 regulatory-unit (RU)
18 * probabilities (entries 0-15) describing the tropomyosin/troponin
19 * configuration of a triplet of neighbouring units, and 4 crossbridge (XB)
20 * moments (entries 16-19). The RU probabilities are advanced with an explicit
21 * forward-Euler substepping scheme — for every macro time step, a number of
22 * smaller sub-steps are taken to update the RU states — and the XB moments with
23 * one implicit-Euler step per time step; the active tension is then
24 * reconstructed from the XB first moments.
25 *
26 * The returned scalar active tension is
27 * @f[
28 * \Tact = a_\text{XB} \, (\mu_P^1 + \mu_N^1) \, \phi(SL)\;,
29 * @f]
30 * where @f$\mu_P^1@f$ and @f$\mu_N^1@f$ are the permissive and non-permissive
31 * first XB moments (state entries 17 and 19), @f$\phi(SL)@f$ is the
32 * single-overlap fraction of the sarcomere at sarcomere length @f$SL = SL_0 \,
33 * \fiberstretch@f$ (with @f$\fiberstretch@f$ the fiber stretch), and
34 * @f$a_\text{XB}@f$ is the tension upscaling factor. Because @f$\mu_P^1 +
35 * \mu_N^1@f$ and @f$\phi(SL)@f$ are dimensionless, @f$a_\text{XB}@f$ sets the
36 * units of the returned active tension.
37 *
38 * **References**:
39 * 1. [Regazzoni, Dede', Quarteroni
40 * (2020)](https://doi.org/10.1371/journal.pcbi.1008294)
41 * 2. [F. Regazzoni, cardiac-activation reference
42 * implementation](https://github.com/FrancescoRegazzoni/cardiac-activation)
43 *
44 * @note Although this model is governed by a system of ODEs, it inherits from
45 * @c ActiveStress rather than @c ActiveStressODE because it requires a
46 * customized time-stepping scheme to handle the stiffness of the model.
47 *
48 * @todo[michelebucelli] Force-strain-rate feedback requires a stabilization
49 * strategy for robust use in coupled electromechanics. This will be addressed
50 * in a follow-up PR.
51 */
53public:
54 /// Model label, used for factory registration and XML selection.
55 static inline const std::string label = "Regazzoni";
56
57 /// @name State vector layout
58 /// @{
59
60 /// Number of regulatory-unit (RU) probability states (entries 0-15).
61 static constexpr unsigned int n_ru_states = 16;
62
63 /// Number of crossbridge (XB) moment states (entries 16-19).
64 static constexpr unsigned int n_xb_states = 4;
65
66 /// Total number of state variables.
67 static constexpr unsigned int n_state_variables = n_ru_states + n_xb_states;
68
69 /**
70 * @brief Flat index of the RU probability state P(TL, TC, TR, CC).
71 *
72 * Each argument is 0 or 1 and denotes the state of, respectively, the left
73 * tropomyosin unit, the central tropomyosin unit, the right tropomyosin unit
74 * and the central troponin (calcium unbound/bound). The ordering matches the
75 * reference implementation's serialization (TL outermost, CC innermost) and
76 * spans [0, 15].
77 */
78 static constexpr unsigned int ru_index(unsigned int TL, unsigned int TC,
79 unsigned int TR, unsigned int CC) {
80 return 8 * TL + 4 * TC + 2 * TR + CC;
81 }
82
83 /// Flat index of the XB moment state @p i (in [0, 3]), spanning [16, 19].
84 static constexpr unsigned int xb_index(unsigned int i) {
85 return n_ru_states + i;
86 }
87
88 /// @}
89
90 /**
91 * @brief Model parameters class.
92 *
93 * Declares the parameters required by the model. All parameters are
94 * marked as required, and omitting a parameter will cause a parse error.
95 */
96 class Parameters : public ActiveStressModelParameters {
97 public:
98 Parameters() : ActiveStressModelParameters(label) {
99 constexpr bool required = true;
100
101 // Reference values: Regazzoni 2020 human body-temperature calibration,
102 // expressed consistently with the unit system used by this parameter set.
103 add_parameter("Kbasic", 0.013, required);
104 add_parameter("Koff", 0.1, required);
105 add_parameter("Q", 2.0, required);
106 add_parameter("mu", 10.0, required);
107 add_parameter("gamma", 12.0, required);
108 add_parameter("Kd0", 3.81e-4, required);
109 add_parameter("alphaKd", -5.71e-4, required);
110 add_parameter("SL0", 2.2, required);
111 add_parameter("ru_substep", 2.5e-2, required);
112 add_parameter("kd_reference_sarcomere_length", 2.15, required);
113
114 add_parameter("r0", 0.13431, required);
115 add_parameter("alpha", 25.184, required);
116 add_parameter("mu0_fP", 0.032653, required);
117 add_parameter("mu1_fP", 7.78e-4, required);
118
119 add_parameter("LA", 1.25, required);
120 add_parameter("LM", 1.65, required);
121 add_parameter("LB", 0.18, required);
122 add_parameter("a_XB", 22.894, required);
123 }
124 };
125
126 /**
127 * @brief Constructor.
128 */
130 : ActiveStress(/* n_state_variables = */ n_state_variables,
131 /* needs_fiber_stretch = */ true,
132 /* needs_fiber_stretch_rate = */ true) {}
133
134 /**
135 * @brief Construct an instance of model parameters.
136 */
137 virtual std::unique_ptr<ActiveStressModelParameters>
138 get_parameters() const override {
139 return std::make_unique<Parameters>();
140 }
141
142protected:
143 /**
144 * @brief Read model parameters from a parameter object.
145 */
147 const ActiveStressModelParameters &params) override;
148
149 /**
150 * @brief Distribute model parameters to all parallel processes.
151 */
152 virtual void distribute_model_specific_parameters(const CmMod &cm_mod,
153 const cmType &cm) override;
154
155 /**
156 * @brief Initialize the state vector for a single node.
157 *
158 * Sets the state to (1, 0, ..., 0), i.e. all probability mass in the RU state
159 * P(0, 0, 0, 0) and all crossbridge moments equal to zero.
160 *
161 * @param[out] state State vector for a single node, to be initialized by
162 * this function.
163 */
164 virtual void init_local(Vector<double> &state) const override;
165
166 /**
167 * @brief Advance in time for a single node.
168 *
169 * Advances the RU probabilities (entries 0-15) with the forward-Euler
170 * substepping scheme and then the XB moments (entries 16-19) with one
171 * implicit-Euler step, using the calcium, fiber stretch and fiber-stretch
172 * rate at the node.
173 */
174 virtual void advance_time_step_local(const double t, const double dt,
175 const double calcium,
176 const double fiber_stretch,
177 const double fiber_stretch_rate,
178 Vector<double> &state) const override;
179
180 /**
181 * @brief Compute the scalar active tension for a single node.
182 *
183 * Evaluates @f$\Tact@f$ as defined in the class description, using
184 * @p fiber_stretch to compute the sarcomere length
185 * @f$SL = SL_0 \, \fiberstretch@f$. The returned value has the stress
186 * units of @f$a_\text{XB}@f$.
187 */
188 virtual double
190 const double fiber_stretch) const override;
191
192 /**
193 * @brief Compute the derivative of the active tension with respect to the
194 * fiber stretch, at fixed state, for a single node.
195 *
196 * The state enters @ref compute_active_tension_local as a factor, so the
197 * derivative is that same factor times the derivative of the single-overlap
198 * fraction, chained through @f$SL = SL_0 \, \fiberstretch@f$:
199 * @f[
200 * \pdv{\Tact}{\fiberstretch} = a_\text{XB}
201 * \left(\mu_P^1 + \mu_N^1\right) SL_0 \, \phi'(SL)\;.
202 * @f]
203 */
205 const Vector<double> &state,
206 const double fiber_stretch) const override;
207
208private:
209 /// Array indexed over the four binary RU configuration variables (TL, TC, TR,
210 /// CC).
211 using RUArray =
212 std::array<std::array<std::array<std::array<double, 2>, 2>, 2>, 2>;
213
214 /// Array indexed over a pair of binary state variables.
215 using BinaryPairArray = std::array<std::array<double, 2>, 2>;
216
217 /// Array of the four crossbridge moment state variables.
218 using XBArray = std::array<double, 4>;
219
220 /// @name Regulatory-unit (RU) dynamics helpers
221 /// @{
222
223 /**
224 * @brief Compute the central-tropomyosin transition rate for each local RU
225 * configuration.
226 *
227 * Returns an @c RUArray where entry @c [TL][TC][TR][CC] is the rate at which
228 * the central tropomyosin changes state for that configuration. Because the
229 * rate depends on the neighbour states TL and TR, nearest-neighbour
230 * cooperativity is retained through the tracked TL-TC-TR configuration.
231 * These rates depend only on the model parameters, not on calcium or stretch.
232 *
233 * @return Central-tropomyosin transition rates, indexed @c [TL][TC][TR][CC].
234 */
235 RUArray ru_transition_rates_tropomyosin() const;
236
237 /**
238 * @brief Advance the 16 RU-state probabilities by one forward-Euler substep.
239 *
240 * Computes the probability fluxes caused by central-state transitions and the
241 * effective boundary-neighbour transitions from the mean-field closure, then
242 * updates @p state_RU in place.
243 *
244 * @param[in] dt Substep size [time].
245 * @param[in] rates_T Central-tropomyosin transition rates,
246 * indexed @c rates_T[TL][TC][TR][CC].
247 * @param[in] rates_C Troponin transition rates, indexed @c rates_C[CC][TC].
248 * @param[in,out] state_RU The 16 RU-state probabilities,
249 * indexed @c state_RU[TL][TC][TR][CC].
250 */
251 void ru_forward_euler_substep(double dt, const RUArray &rates_T,
252 const BinaryPairArray &rates_C,
253 RUArray &state_RU) const;
254
255 /**
256 * @brief Advance the four crossbridge moments by one implicit-Euler step.
257 *
258 * Computes the permissivity and the effective permissive/non-permissive
259 * transition rates from the updated RU probabilities, forms the 4x4 linear
260 * system for the implicit update, and returns the updated moments.
261 *
262 * @param[in] dt Outer time step [time].
263 * @param[in] velocity Shortening velocity @f$-\dot{SL}/SL_0@f$ [1/time].
264 * @param[in] rates_T Central-tropomyosin transition rates,
265 * indexed @c rates_T[TL][TC][TR][CC].
266 * @param[in] state_RU The updated 16 RU-state probabilities,
267 * indexed @c state_RU[TL][TC][TR][CC].
268 * @param[in] state_XB The four crossbridge moments (input), ordered
269 * @f$[\mu_P^0, \mu_P^1, \mu_N^0, \mu_N^1]@f$.
270 * @return Updated crossbridge moments, ordered
271 * @f$[\mu_P^0, \mu_P^1, \mu_N^0, \mu_N^1]@f$.
272 */
273 XBArray xb_implicit_update(double dt, double velocity, const RUArray &rates_T,
274 const RUArray &state_RU,
275 const XBArray &state_XB) const;
276
277 /**
278 * @brief Single-overlap fraction of the sarcomere at a given length.
279 *
280 * Returns the fraction @f$\phi(SL) \in [0, 1]@f$ of the sarcomere over which
281 * thin and thick filaments overlap exactly once, a piecewise-linear function
282 * of the sarcomere length built from the filament geometry (LA, LM, LB).
283 *
284 * @param[in] sarcomere_length Sarcomere length @f$SL@f$ [length].
285 */
286 double fraction_single_overlap(double sarcomere_length) const;
287
288 /**
289 * @brief Derivative of the single-overlap fraction with respect to the
290 * sarcomere length.
291 *
292 * @ref fraction_single_overlap is piecewise linear, so this is piecewise
293 * constant and jumps at the ends of its pieces. It is taken to be the
294 * derivative from the left there, matching the intervals of
295 * @ref fraction_single_overlap.
296 *
297 * @param[in] sarcomere_length Sarcomere length @f$SL@f$ [length].
298 */
299 double fraction_single_overlap_derivative(double sarcomere_length) const;
300
301 /// @}
302
303 /// @name RU model parameters
304 /// @{
305
306 double Kbasic; ///< Basic tropomyosin transition rate [1/time].
307 double Koff; ///< Troponin unbinding rate [1/time].
308 double Q; ///< Tropomyosin transition-rate asymmetry factor [-].
309 double mu; ///< Calcium-binding cooperativity factor [-].
310 double gamma; ///< Nearest-neighbour cooperativity factor [-].
311 double Kd0; ///< Calcium dissociation constant at reference length [calcium].
312 double alphaKd; ///< Length dependence of the dissociation constant
313 ///< [calcium/length].
314 double SL0; ///< Reference sarcomere length [length]; maps stretch to length.
315 double ru_substep; ///< RU forward-Euler substep size [time].
316
317 /// Reference sarcomere length [length] used in the length-dependent
318 /// dissociation constant (distinct from the parameter SL0).
319 double kd_reference_sarcomere_length;
320
321 double r0; ///< Combined attachment-detachment rate at zero velocity [1/time].
322 double alpha; ///< Coefficient of |v| in r(v) = r0 + alpha * |v| [-].
323 double mu0_fP; ///< Permissive influx into the zeroth-moment crossbridge state
324 ///< [1/time].
325 double mu1_fP; ///< Permissive influx into the first-moment crossbridge state
326 ///< [1/time].
327
328 double LA; ///< Thin-filament (actin) length [length].
329 double LM; ///< Thick-filament (myosin) length [length].
330 double LB; ///< Length of the myosin bare zone [length].
331
332 /// Tension upscaling factor [stress].
333 ///
334 /// Because the crossbridge moments and the overlap fraction are
335 /// dimensionless, a_XB sets the stress unit of the returned active tension.
336 /// It must be expressed in the same stress unit as the mechanical
337 /// configuration.
338 double a_XB;
339
340 /// @}
341};
342
343#endif
ActiveStress(const unsigned int n_states_, const bool needs_fiber_stretch, const bool needs_fiber_stretch_rate)
Constructor.
Definition ActiveStress.h:270
Parameters for a generic active stress model.
Definition Parameters.h:1450
ActiveStressModelParameters(const std::string &xml_element_name_)
Constructor.
Definition Parameters.cpp:1860
void add_parameter(const std::string &label, double default_value, bool required)
Add a new parameter to this object.
Definition Parameters.h:1496
static constexpr unsigned int n_xb_states
Number of crossbridge (XB) moment states (entries 16-19).
Definition ActiveStressRegazzoni.h:64
static constexpr unsigned int xb_index(unsigned int i)
Flat index of the XB moment state i (in [0, 3]), spanning [16, 19].
Definition ActiveStressRegazzoni.h:84
virtual void read_model_specific_parameters(const ActiveStressModelParameters &params) override
Read model parameters from a parameter object.
Definition ActiveStressRegazzoni.cpp:11
virtual double compute_active_tension_derivative_local(const Vector< double > &state, const double fiber_stretch) const override
Compute the derivative of the active tension with respect to the fiber stretch, at fixed state,...
Definition ActiveStressRegazzoni.cpp:146
static constexpr unsigned int ru_index(unsigned int TL, unsigned int TC, unsigned int TR, unsigned int CC)
Flat index of the RU probability state P(TL, TC, TR, CC).
Definition ActiveStressRegazzoni.h:78
ActiveStressRegazzoni()
Constructor.
Definition ActiveStressRegazzoni.h:129
virtual void advance_time_step_local(const double t, const double dt, const double calcium, const double fiber_stretch, const double fiber_stretch_rate, Vector< double > &state) const override
Advance in time for a single node.
Definition ActiveStressRegazzoni.cpp:74
virtual double compute_active_tension_local(const Vector< double > &state, const double fiber_stretch) const override
Compute the scalar active tension for a single node.
Definition ActiveStressRegazzoni.cpp:135
virtual std::unique_ptr< ActiveStressModelParameters > get_parameters() const override
Construct an instance of model parameters.
Definition ActiveStressRegazzoni.h:138
static const std::string label
Model label, used for factory registration and XML selection.
Definition ActiveStressRegazzoni.h:55
static constexpr unsigned int n_state_variables
Total number of state variables.
Definition ActiveStressRegazzoni.h:67
virtual void init_local(Vector< double > &state) const override
Initialize the state vector for a single node.
Definition ActiveStressRegazzoni.cpp:67
virtual void distribute_model_specific_parameters(const CmMod &cm_mod, const cmType &cm) override
Distribute model parameters to all parallel processes.
Definition ActiveStressRegazzoni.cpp:43
static constexpr unsigned int n_ru_states
Number of regulatory-unit (RU) probability states (entries 0-15).
Definition ActiveStressRegazzoni.h:61
The CmMod class duplicates the data structures in the Fortran CMMOD module defined in COMU....
Definition CmMod.h:37
The Vector template class is used for storing int and double data.
Definition Vector.h:26
The cmType class stores data and defines methods used for mpi communication.
Definition CmMod.h:57