You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# 1. Stretch the tissue to a specific length and lock the boundaries (isometric condition).
8
8
# 2. Measure the **passive** stress generated by stretching the hyperelastic collagen/myocardium matrix.
9
9
# 3. Activate the tissue and measure the additional **active** stress generated.
10
-
# 4. Repeat this for different stretch lengths to reconstruct the ascending limb of the cardiac length-tension curve.
11
-
10
+
# 4. Compare a standard active stress model against our custom Frank-Starling model.
11
+
#
12
+
# ## Mathematical Formulation of Active Stress
13
+
# In a standard active stress approach, the total 2nd Piola-Kirchhoff active stress acts purely along the reference fiber direction $\mathbf{f}_0$ and is independent of stretch:
# Where $a(t)$ is the time-dependent activation scalar.
20
+
#
21
+
# For the **Frank-Starling** mechanism, we introduce a stretch-dependent scalar multiplier $g(\lambda)$. The total active First Piola-Kirchhoff stress ($\mathbf{P}_{\text{act}}$) evaluated by the FEM solver becomes:
# Where $\mathbf{F}$ is the deformation gradient, and $\lambda = \sqrt{\mathbf{f}_0 \cdot (\mathbf{F}^T \mathbf{F} \mathbf{f}_0)}$ is the dynamic fiber stretch.
28
+
#
29
+
# The multiplier $g(\lambda)$ is defined as a piecewise function representing the ascending limb of the length-tension curve:
# m = \frac{a_{\max} - a_{\min}}{\lambda_{\text{opt}} - \lambda_{\text{thres}}}
44
+
# $$
45
+
#
12
46
# %% [markdown]
13
47
# ## 1. Imports and Problem Setup
14
-
# First, we import the necessary modules. We use `pulse` for the mechanics framework, `dolfinx` for the finite element backend, and `mpi4py` for parallel execution.
48
+
# First, we import the necessary modules. We use `pulse` for the mechanics framework, `dolfinx` for the finite element backend, `mpi4py` for parallel execution, and `matplotlib` for plotting our final results.
15
49
16
50
# %%
17
51
frommpi4pyimportMPI
18
52
importdolfinx
19
53
importpulse
20
54
importnumpyasnp
21
55
importufl
56
+
importmatplotlib.pyplotasplt
22
57
fromscifemimportevaluate_function
23
58
24
59
# %% [markdown]
25
60
# ## 2. Defining the Isometric Twitch Experiment
26
61
# We define a function that takes a prescribed pre-stretch (in mm) and an active twitch tension (in kPa). It will stretch a 10x1x1 mm block of tissue, lock it in place, and then apply the active tension.
62
+
#
63
+
# We include a boolean flag `use_frank_starling` to easily toggle between the standard active stress model and our stretch-dependent model.
# To generate the length-tension curve, we loop over increasing amounts of stretch (from 0% up to 15%) and run the experiment. We can then observe the non-linear stiffening of the passive matrix against the dynamic active response of the tissue.
191
+
# ## 3. Running the Curve and Comparison
192
+
# We will loop over increasing amounts of stretch (from 0% up to 15%) and run the experiment twice per stretch: once with the standard active stress, and once with the Frank-Starling model.
154
193
155
194
# %%
156
-
if__name__=="__main__":
157
-
twitch_force=1.0# kPa of active baseline tension
158
195
159
-
# We will test stretches from 0 mm (0%) up to 1.5 mm (15%)
# While a table is useful, plotting the results makes the physiological phenomenon instantly clear. We will use `matplotlib` to plot the Active Stress (comparing both models) on the left axis, and the Passive hyperelastic stress on the right axis.
plt.title('Isometric Contraction: Frank-Starling vs. Standard Active Stress', fontsize=14)
261
+
fig.tight_layout()
262
+
plt.show()
169
263
170
264
# %% [markdown]
171
265
# ### Conclusion
172
266
#
173
-
# The output from the script prints a table showcasing:
174
-
# 1. The **Passive Stress** climbs exponentially as the tissue is stretched (capturing the non-linear stiffening of the collagen matrix).
175
-
# 2. The **Active Stress** scales independently and mimics the Frank-Starling law. At 0% stretch, the tissue produces low active force. As it is stretched towards 15%, the local fibers dynamically detect the stretch and generate a much larger active contractile stress.
267
+
# The plot generated by the script perfectly illustrates two primary mechanics of the heart wall:
268
+
# 1. **Exponential Passive Stiffening (Red Line):** As the tissue is stretched past 10%, the collagen fibers un-crimp and become highly resistant to further stretch.
269
+
# 2. **Frank-Starling Law (Dark Blue vs Light Blue):** The standard model (dashed light blue) assumes a constant, 100% force capacity regardless of how compressed or stretched the sarcomeres are. The Frank-Starling model (solid dark blue) dynamically scales the force—starting lower at rest, and sharply climbing as the tissue stretches toward its optimal operating length.
270
+
#
271
+
# **Wait, why does the Standard Active Stress slightly increase?**
272
+
# You might notice that the standard model's active stress isn't perfectly flat across stretches. This is actually physically and mathematically correct! In continuum mechanics, the active stress is defined in the *reference* configuration (2nd Piola-Kirchhoff stress). When we measure the *true* (Cauchy) stress in the *deformed* configuration, the solver applies a geometric "push-forward".
273
+
#
274
+
# As the tissue stretches, it physically narrows due to incompressibility (the Poisson effect). Because the cross-sectional area shrinks, the true stress (Force / Area) mechanically increases, even if the chemical contraction capability remained identical.
275
+
#
276
+
# Thus, the Standard model increases purely due to **kinematic/geometric stiffening**, while the Frank-Starling model increases due to that same geometric effect *plus* the **biological recruitment** of more myosin-actin cross-bridges.
0 commit comments