## 2 Materials and Methods  
The computer tools used to model the heart usually involve several phenomena: blood flow, wall movement, and the transport of electrical signals. Fluid dynamics is used to model the blood flow within the heart ventricle, while solid mechanics is used to calculate the deformation of the myocardium. The movement of the fluid in the ventricles of the heart is considered an incompressible laminar fluid flow described according to [27] using Navier-Stokes and continuity equations:  
\[-\rho\left(\frac{\partial v_{i}}{\partial t}+v_{j}\frac{\partial v_{i}}{ \partial x_{j}}\right)+\mu\frac{\partial^{2}v_{i}}{\partial x_{j}\partial x _{j}}-\frac{\partial p}{\partial x_{i}}+f_{Vi}=0,\quad i=1,2,3;\quad sum\ on\ j \tag{1}\]  
\[\frac{\partial v_{x}}{\partial x}+\frac{\partial v_{y}}{\partial y}+\frac{ \partial v_{z}}{\partial z}=\frac{\partial v_{i}}{\partial x_{i}}=0 \tag{2}\]  
where \(\mu\) is the viscosity of the fluid, \(\rho\) is the density of the fluid, \(v_{i}\) is the velocity field within the space, \(p\) is the pressure within the fluid, and the volumetric forces per unit volume in direction \(x_{i}\) are \(f_{Vi}\) [N/m\({}^{3}\)]. These equations are transformed by using the standard Galerkin method [27; 28] in the balance equations of a finite element. The final form of this equation is solved for increments of blood velocity and pressure \(\Delta\mathbf{V}^{(i)}\) and \(\Delta\mathbf{P}^{(i)}\)  
Figure 1: Effects of different drugs on calcium transient. (**a**) Referent calcium transient predictions for HCM [6], disopyramide lowering total calcium transient (purple dashed line) [4] and dATP significantly lowering diastolic calcium concentration, reducing wall stiffness, and increasing contractility (black dashed line) [25]. (**b**) Calcium transient predictions for DCM without (purple) and with (pink) digoxin, significantly lowering calcium concentration [24]. \[\left[ \begin{array}{cc}\frac{1}{\Delta t}\mathbf{M}+\ ^{n+1}\mathbf{\hat{K}}_{vv}^{(i-1)}&\mathbf{K}_{vp} \\ \mathbf{K}_{vp}^{T}&\mathbf{0}\end{array} \right]\left\{ \begin{array}{cc}\Delta \mathbf{V}^{(i)}\\ \Delta\mathbf{P}^{(i)}\end{array} \right\}_{blood}=\left\{ \begin{array}{cc} {}^{n+1}\mathbf{F}_{ext}^{(i-1)}\\ 0\end{array} \right\}-\left[ \begin{array}{cc}\frac{1}{\Delta t}\mathbf{M}+ \ ^{n+1}\mathbf{K}^{(i-1)}&\mathbf{K}_{vp}\\ \mathbf{K}_{vp}^{T}&0\end{array} \right]\left\{ \begin{array}{cc}{}^{n+1} \mathbf{V}^{(i-1)}\\ {}^{n+1}\mathbf{p}^{(i-1)}\end{array} \right\}+\left\{ \begin{array}{cc}\frac{1 }{\Delta t}\mathbf{M}\ ^{n}\mathbf{V}\\ 0\end{array} \right\} \tag{3}\]  
within the iteration \"\(I\)\" and the current time step \"\(n+1\)\" of the simulation, with time step duration \(\Delta t\), the velocity vector from the last time step \"\(\mathbf{V}\), the velocity \({}^{n+1}\mathbf{V}^{(i-1)}\) and pressure \({}^{n+1}\mathbf{P}^{(i-1)}\) from the previous iteration \"\(1-1\)\", the stiffness matrix \(\mathbf{K}\) (details about matrices \(\mathbf{K}_{vp}\) and \(\mathbf{\hat{K}}_{vp}\) are given elsewhere [27]), and mass matrix \(\mathbf{M}\), to find the vectors of velocity \({}^{n+1}\mathbf{V}^{(i)}\) and pressure \({}^{n+1}\mathbf{p}^{(i)}\) at the end of the current time step \"\(n+1\)\". The mechanical stresses in the heart wall can be divided into passive, \(\sigma\), which depend on the material deformation and tissue constitutive relationships, and active, \(\sigma_{a}\), which are the consequence of changes in calcium concentration in the sarcomeres due to the transport of electrical signals. To determine the passive response of the heart muscle, we used a recently introduced model [29] that is based on the biaxial and shear experimental curves obtained in the study that is published in references [30; 31]; see Figure 2. In this approach, experimentally measured constitutive curves [30] are directly used in the computer model presented in [29] to calculate the internal stresses.