1 Introduction

Intergrid transfer operators, acting among different grids defined over the same computational domain or accross different geometries, are employed in a variety of applications [15], whereas radial basis functions (RBF) are used in several fields in both computer science and applied mathematics, such as neural networks [31] and mesh free methods for solving PDEs [30, 88, 89]. The application of RBF as intergrid transfer operators is documented in [29] with the aim of exchanging information on a fluid-structure interface between non-conforming meshes defined on two different computational domains. Here we aim at constructing a new appropriate intergrid transfer operator based on RBF that has the capability to interpolate in a fast and accurate way both scalar and vectorial fields between different meshes defined on the same computational domain. We deal with systems of PDEs whose solution components represent different physical variables, and we want to use non-nested grids on the same computational domain to represent these different numerical variables. For the sake of illustration we will first introduce and verify our method on a simple elliptic system with two variables \(u_1\) and \(u_2\) that will be approximated on two different grids. Then we will address our target application in the framework of cardiac electromechanics. To the best of our knowledge, in this context, only techniques involving nested meshes have been used. Nested meshes are less flexible to accommodate geometrical heterogeneity and to be tuned to different local accuracy requirements. Besides, they cannot be generated in a completely independent fashion [14, 19]. Moreover, proofs of scalability are not provided for this kind of techniques; also, comparisons in terms of computational costs are lacking.

Our focus in cardiac electromechanics moves from the need to better understand cardiac function, especially in pathological cases. Cardiovascular diseases are indeed one of the most common causes of death globally [48], and several pathologies are still not completely understood. Mathematical modeling of the heart and numerical simulations allow a better understanding of the phenomena occurring both in physiological and pathological conditions [36, 50, 59, 85, 86]. Several types of processes occur in the human heart, such as propagation of an action potential in the myocardium, which contracts, together with the blood flowing in the four chambers (atria and ventricles) and through the valves [21, 27, 56, 78, 80, 81]. This problem is challenging from the numerical standpoint [13, 17, 28, 42] as it involves different temporal and spatial scales. Cardiac electrophysiology, blood fluid dynamics and myocardial mechanics require a different numerical resolution in space and time, going from a really detailed one for what concerns the electric part, moving towards a bigger one for the mechanical behaviour [60, 61]. For this reason the application of multi-mesh and staggered methods is strongly justified from a physical viewpoint, and permits to solve in a really efficient way this multiphysics problem without loosing the details of the phenomena that we want to model.

In this work we focus on the electromechanical modeling of the left ventricle, which has been extensively studied over the past years [14, 20, 32], but still needs further investigations both from theoretical and numerical perspectives. For the electric part we consider the monodomain and Bueno-Orovio models [9, 58, 73]. For the mechanical part we use the Holzapfel-Ogden model [40] together with the active strain formulation [2, 3], combined with a model for the transmural heterogeneous thickening of the myocardium [6]. Myocardial fibers contraction defines the bridge between electrophysiology and mechanics [71]. From the numerical viewpoint, the Finite Element Method (FEM) is used in order to discretize in space the continuous single core models (i.e. electrophysiology, activation and mechanics) by means of piecewise linear elements, whereas time discretization is carried on using Backward Differentiation Formulas (BDFs) of order 1 [62]. As already done in literature [5, 14, 45], the integration of the discrete core models leads to the formulation of segregated (i.e. which are all solved separately and sequentially) and staggered (i.e. using with different timesteps) algebraic equations. The timestep changes according to the time scale of the single problem. Semi-implicit or implicit time discretizations are considered depending on the stiffness of the models. Moreover, according to the required space resolution, we use different independent (i.e. non-nested) meshes and we perform intergrid fields transfer by means of RL-RBF. We use different simplified Cauchy models to describe the blood flow inside the left ventricle. In this way we can compute how pressure and volume evolve along the heartbeat [26, 69, 86]. We also consider a prestress technique, which is applied in the pre-processing phase, to estimate the internal stresses of the myocardium at the initial time of the simulation [41, 82].

As observed before, electrophysiology and mechanics are solved separately, in a segregated (partitioned) fashion. We use different meshes and timesteps (staggered approach) for the two fields. After space and time discretization we solve each block linear system by means of generalized minimal residual (GMRES) method. We use our partitioned and staggered electromechanics solver to carry out a numerical simulation in the High Performance Computing framework of the whole cardiac cycle for an idealized left ventricle geometry, and we analyze the numerical results in terms of clinically relevant indicators: specifically, we produce the so-called pressure-volume loops in order to assess the left ventricle function and its properties.

The paper is organized as follows: in Sect. 2 we present the interpolant based on RBF that will act as intergrid transfer operator. In Sect. 3 we propose a test case with known exact solution to show the accuracy and the reliability of the operator introduced in Sect. 2. In Sect. 4 we apply the methodology that we have developed and tested to cardiac electromechanics, a complex framework in which different physics (electrophysiology, mechanical activation and mechanical deformation of the myocardium) and different space scales are present. We also propose a novel partitioned scheme for the time discretization of the single core models related to cardiac electromechanics, for the numerical simulation of one heartbeat of an idealized left ventricle. We finally draw our conclusions in Sect. 5.

2 Intergrid transfer operator

Our aim is to transfer the values of a certain function from one mesh to another one. However we present in this section our intergrid transfer operator in the most general framework. We exploit several properties of RBF to perform the interpolation task considering a general function f, following the idea developed in [22].

Let \(f : {\mathbb {R}}^3 \rightarrow {\mathbb {R}}^d\) be a scalar (d = 1) or possibly vector field (\(d>1\)) in the 3D setting. Given a set of M nodes \(\varXi = \{ \varvec{\xi _m} \}_{m=1}^M\) in \({\mathbb {R}}^3\), we define an interpolant \(\varPi _f({\varvec{x}})\) (with \({\varvec{x}} \in {\mathbb {R}}^3\)) of the general field f by means of RBF in the following way:

$$\begin{aligned} \varPi _{f}({\varvec{x}}) = \sum _{m = 1}^M \gamma _m^f \pi (|| {\varvec{x}} - \varvec{\xi _m} ||, r), \end{aligned}$$
(1)

with \(\{ \gamma _m^f \}_{m = 1}^M\) set of the interpolation weights. RBF are denoted by \(\pi (\cdot , r)\), which can be either globally or locally supported according to the choice of the radius r.

We use Beckert & Wendland RBF \(\pi (|| {\varvec{x}}||, r) = \left( 1 - \dfrac{||{\varvec{x}}||}{r}\right) ^4 \left( 1 + 4 \dfrac{||{\varvec{x}}||}{r} \right) \), which are locally supported. Other options, involving also globally supported basis functions, are available as well [10, 25]. We introduce an interpolation matrix \(\varvec{\varPhi }^{int} \in {\mathbb {R}}^{M \times M}\) such that \(\varvec{\varPhi }^{int}_{i, j} = \pi (|| \varvec{\xi }_i - \varvec{\xi }_j ||, r)\) with \(i, j = 1, \ldots , M\). We call \({\varvec{f}}_{\varXi }\) the evaluation of the field f in all the M interpolation nodes that belong to the set \(\varXi \). The interpolation constraint is algebraically expressed as follows:

$$\begin{aligned} \varvec{\varPhi }^{int} \varvec{\gamma ^f} = {\varvec{f}}_\varXi , \end{aligned}$$
(2)

with \(\varvec{\gamma ^f} = \{ \gamma _m^f \}_{m = 1}^M\) solution of linear system (2).

Both fields f and \(\varPi _{f}({\varvec{x}})\) have the same value at the interpolation nodes, i.e. \(\varPi _{f}(\varvec{\xi _m}) = f(\varvec{\xi _m})\) with \(m = 1, \ldots , M\). The choice of local RBF leads to a sparse pattern of the matrix \(\varvec{\varPhi }^{int}\). At this point, once \(\varPi _{f}({\varvec{x}})\) is determined, we can evaluate the interpolant on a set \(\varLambda = \{ \varvec{\lambda _n}\}_{n=1}^N\) of N different points with respect to the interpolation nodes contained in \(\varXi \):

$$\begin{aligned} \varPi _{f}(\varvec{\lambda }_n) = \sum _{m = 1}^M \gamma _m^f \pi (|| \varvec{\lambda }_n - \varvec{\xi _m} ||, r). \end{aligned}$$
(3)

In our application \(\varXi \) and \(\varLambda \) will be two different sets of nodes of two independent triangulations of the computational domain \(\varOmega \subset {\mathbb {R}}^3\) where the interpolant \(\varPi _{f}(\cdot )\) is defined.

We introduce a matrix \(\varvec{\varPhi }^{eval} \in {\mathbb {R}}^{N \times M}\) such that \(\varvec{\varPhi }^{eval}_{i, j} = \pi (|| \varvec{\lambda }_i - \varvec{\xi }_j ||, r)\) with \(i = 1, \ldots , N\) and \(j = 1, \ldots , M\). This sparse matrix is used to determine \({\varvec{f}}_\varLambda \), i.e. the evaluation of the RBF interpolant \(\varPi _{f}\) on \(\varLambda \):

$$\begin{aligned} {\varvec{f}}_{\varLambda } = \varvec{\varPhi }^{eval} \varvec{\gamma ^f} = \varvec{\varPhi }^{eval} (\varvec{\varPhi }^{int})^{-1} {\varvec{f}}_{\varXi }. \end{aligned}$$
(4)

In order to obtain a smoother interpolant that is able to interpolate exactly any constant field and that is accurate for small values of the radius r [22], we rescale \(\varPi _{f}({\varvec{x}})\) by the interpolant \(\varPi _{g}({\varvec{x}})\) of the constant function \(g({\varvec{x}}) = 1\), which assumes a value equal to one at each interpolation point:

$$\begin{aligned} \bar{\varPi }_{f}({\varvec{x}}) = \dfrac{\varPi _f({\varvec{x}})}{\varPi _g({\varvec{x}})} = \dfrac{\sum _{m = 1}^M \gamma _m^f \pi (|| {\varvec{x}} - \varvec{\xi _m} ||, r) }{\sum _{l = 1}^M \gamma _l^g \pi (|| {\varvec{x}} - \varvec{\xi _l} ||, r) }. \end{aligned}$$
(5)

We formulate in this way Rescaled Localized Radial Basis Functions (RL-RBF).

From the algebraic perspective, the interpolation problem associated with (5) can be written in the following form:

$$\begin{aligned}&\varvec{\varPhi }^{int} \varvec{\gamma ^f} = {\varvec{f}}_\varXi , \end{aligned}$$
(6)
$$\begin{aligned}&\varvec{\varPhi }^{int} \varvec{\gamma ^g} = {\varvec{1}}_\varXi , \end{aligned}$$
(7)

where \(\varvec{\gamma ^g} = \{ \gamma _m^g \}_{m = 1}^M\) and \({\varvec{1}}_\varXi \) vector of ones on the interpolation nodes defined in \(\varXi \). Linear systems (6) and (7) are solved separately. The evaluation of interpolant \(\bar{\varPi }_{f}\) in a specific point \({\varvec{x}}\) is:

$$\begin{aligned} \bar{\varPi }_{f}({\varvec{x}}) = \dfrac{\varvec{\varPhi }^{eval} (\varvec{\varPhi }^{int})^{-1} {\varvec{f}}_{\varXi }}{\varvec{\varPhi }^{eval} (\varvec{\varPhi }^{int})^{-1} {\varvec{1}}_{\varXi }}, \end{aligned}$$
(8)

where \((\varvec{\varPhi }^{eval})^T \in {\mathbb {R}}^{M}\) such that \((\varvec{\varPhi }^{eval})^T_{j} = \pi (|| {\varvec{x}} - \varvec{\xi }_j ||, r)\).

3 Numerical test for elliptic PDEs

We want to illustrate the properties of our intergrid transfer operator in terms of scalability and convergence for both the \(L^2\) and \(H^1\) norms in a given domain \(\varOmega \subset {\mathbb {R}}^d\). With this aim, we propose the following test case:

$$\begin{aligned} {\left\{ \begin{array}{ll} - \varDelta u_1 = f_1 &{} \hbox {in} \; \varOmega , \\ - \varDelta u_2 + u_1 + \nabla u_1 \cdot {\varvec{v}} = f_2 &{} \hbox {in} \; \varOmega , \\ u_1 = u_2 = 0 &{} \hbox {on} \; \partial \varOmega , \end{array}\right. } \end{aligned}$$
(9)

with \(\varOmega =(-1, 1)^3\) and \({\varvec{v}}={\varvec{1}}\). The forcing terms are:

$$\begin{aligned} \begin{aligned} f_1&= { f_1(x, y, z) }= 3 \pi ^2 \text {sin}(\pi x) \text {sin}(\pi y) \text {sin}(\pi z), \\ f_2&= { f_2(x, y, z) =} (1 - 3 \pi ^2) \text {sin}(\pi x) \text {sin}(\pi y) \text {sin}(\pi z) \\&+ \pi \text {cos}(\pi x) \text {sin}(\pi y) \text {sin}(\pi z) \\&+ \pi \text {sin}(\pi x) \text {cos}(\pi y) \text {sin}(\pi z) + \pi \text {sin}(\pi x) \text {sin}(\pi y) \text {cos}(\pi z). \end{aligned} \end{aligned}$$

This one-way 2-field coupled system involving Laplace and diffusion-advection-reaction PDEs is well posed and is endowed with an exact solution, \(u_1 {=} \text {sin}(\pi x) \text {sin}(\pi y) \text {sin}(\pi z)\) and \(u_2 = -\text {sin}(\pi x) \text {sin}(\pi y) \text {sin}(\pi z)\). We use the Finite Element method to solve numerically this test case. We provide two different meshes \({\mathcal {T}}_{h_1}\) and \({\mathcal {T}}_{h_2}\) of the computational domain made by tetrahedrons, with \(h_1\) and \(h_2\) representing the maximum size of the element K in terms of maximum mean diameter of the circumscribed circumference, with \(\cup _{K \in {\mathcal {T}}_{h_1}} K = \cup _{K \in {\mathcal {T}}_{h_2}} K = {\overline{\varOmega }}\). Both structured and unstructured meshes can be potentially employed, either in a nested or a non-nested fashion. We denote \(N_{u_1}\) and \(N_{u_2}\) the number of degrees of freedom for \(u_1\) and \(u_2\) respectively (these are the internal finite element nodes). We also introduce two finite dimensional spaces \({\mathcal {X}}_{h_1}^r= \{ v \in C^0(\bar{\varOmega }) : v|_K \in {\mathcal {P}}^r(K) \;\; \forall K \in {\mathcal {T}}_{h_1} \}\), \({\mathcal {X}}_{h_2}^r= \{ v \in C^0(\bar{\varOmega }) : {v|}_{K} \in {\mathcal {P}}^r(K) \;\; \forall K \in {\mathcal {T}}_{h_2} \}\), for \(r \ge 1\). The set of basis functions of \({\mathcal {X}}_{h_1}^r\) with \(N_{u_1}=\text {dim}({\mathcal {X}}_{h_1}^r\)) is defined by \( \{ \phi _i \}_{i=1}^{N_{u_1}}\), whereas the ones of \({\mathcal {X}}_{h_2}^r\) with \(N_{u_2}=\text {dim}({\mathcal {X}}_{h_2}^r\)) are defined by \( \{ \psi _i \}_{i=1}^{N_{u_2}}\). We call \(u_{1, h_1} = \sum _{j=1}^{N_{u_1}} u_{1,j} \phi _j\) and \(u_{2, h_2} = \sum _{j=1}^{N_{u_2}} u_{2,j} \psi _j\) the finite element solutions in \(V_{h_1}^r = {\mathcal {X}}_{h_1}^r \cap H_0^1(\varOmega )\) and \(V_{h_2}^r = {\mathcal {X}}_{h_2}^r \cap H_0^1(\varOmega )\), respectively.

Fig. 1
figure 1

Support of the RBF: chosen either according to the number of links (left) or within a fixed radius (right), for an unstructured grid

Fig. 2
figure 2

Comparison between the numerical (left) and analytical (right) solutions for \(u_1\) and \(u_2\)

Fig. 3
figure 3

Side view of non-nested unstructured meshes (example) made of 10’632 elements for \(u_1\) (left) and 247’030 elements for \(u_2\) (right)

Fig. 4
figure 4

Interpolation CPU time (in seconds) versus number of processors for different choices of the mesh and the number of elements

Fig. 5
figure 5

Convergence analysis for \(L^2\) and \(H^1\) errors versus \(h_{u_1, mean}\) with \(h_{u_2, mean}\) fixed (left) and viceversa (right)

The discretized formulation of (9) reads: find \(u_{1, h_1} \in V_{h_1}^r\) and \(u_{2, h_2} \in V_{h_2}^r\) such that

$$\begin{aligned} {\left\{ \begin{array}{ll} \sum _{j=1}^{N_{u_1}} u_{1,j} \int _{\varOmega } \nabla \phi _j \nabla \phi _i = \int _{\varOmega } f_1 \phi _i &{} \forall i = 1, \ldots , N_{u_1}, \\ \sum _{j=1}^{N_{u_2}} u_{2,j} \int _{\varOmega } \nabla \psi _j \nabla \psi _i {=} \int _{\varOmega } \left( f_2 {-} u_{1{,} h_2} {-} \nabla u_{1{,} h_2} \cdot {\varvec{v}} \right) \psi _i &{} \forall i {=} 1, \ldots , N_{u_2}, \end{array}\right. }\nonumber \\ \end{aligned}$$
(10)

where \(u_{1, h_2} = \sum _{j=1}^{N_{u_2}} u_{1,j} \psi _j\) is the interpolation of \(u_{1, h_1}\) on the second mesh, and again \({\varvec{v}} = {\varvec{1}}\). For this purpose, we use the RL-RBF introduced in Sect. 2, so that, at a continuous level, \(u_{1, h_2}({\varvec{x}}) = {\bar{\varPi }}_{u_1}({\varvec{x}})\). In order to take into account the distribution of mesh points of \({\mathcal {T}}_{h_1}\) and \({\mathcal {T}}_{h_2}\), we define an adaptive strategy to select the radius of the support of Beckert & Wendland basis functions by means of the number of links that a certain vertex of the mesh has with the surrounding neighborhood. In this way we exploit the structure of the mesh to build a variable and local support of the RBF that keeps into account the level of refinement of the mesh in each region of the computational domain. For more details about this technique we refer to [22]. A number of links equal to 1, as shown in Fig. 1, is sufficient to obtain a good interpolated solution. The derivatives of \(u_{1, h_2}\) with respect to x, y and z are calculated using the Zienkiewicz-Zhu gradient recovery method, which is known to be efficient and superconvergent [92, 93].

Table 1 Convergence analysis with \(h_{mean}\) for \(u_{1, h_1}\) and \(u_{2, h_2}\) (both unstructured and structured grids are non-nested)

We have performed strong scalability tests and convergence analysis of both \(L^2\) and \(H^1\) errors for \(u_{1, h_1}\) and \(u_{2, h_2}\), considering structured, nested unstructured and non-nested unstructured grids. \({\mathcal {P}}^1\) finite elements are used in all simulations. In Fig. 2 we show a comparison over the entire computational domain and over a cross-section of \(u_{1, h_1}\) versus \(u_1\) and \(u_{2, h_2}\) versus \(u_2\), considering, as depicted in Fig. 3, two different unstructured grids that are non-nested and providing in both cases a good match of the numerical and analytical solutions. We see that our approach based on a RBF interpolant whose support is chosen by the number of links is able to pass properly the information of \(u_{1, h_1}\) inside the equation of \(u_{2, h_2}\). This is confirmed by the fact that the exact solutions \(u_1\) and \(u_2\) match really well the corresponding numerical solutions \(u_{1, h_1}\) and \(u_{2, h_2}\). We also test the scalability of our RL-RBF operator, as shown in Fig. 4, where we see that the time that we need to interpolate \(u_{1, h_1}\) inside the equation for \(u_{2, h_2}\) decreases with the number of CPUs with all types of grids. We want to underline that this behaviour is observed in the case the coarse mesh is used for \(u_{1, h_1}\) and the fine one for \(u_{2, h_2}\), and viceversa. Moreover, due to the generality that we want to obtain with our intergrid operator, it seems that, independently of the value of the mesh size, the interpolation process scales better with non-nested unstructured grids.

In Fig. 5 we show a convergence analysis of \(L^2\) and \(H^1\) errors where we consider a fixed grid for \(u_{2, h_2}\), with a certain mean diameter of the elements \(h_{u_2} = h_{2, mean}\), and we gradually reduce the \(h_{u_1} = h_{1, mean}\) value, and viceversa. Table 1 reports the results in case we make a progressive increment of the number of mesh elements for both \(u_{1, h_1}\) and \(u_{2, h_2}\) in parallel: we start from a certain couple of non-nested unstructured/structured meshes with specific values of \(h_{1, mean}\) and \(h_{2, mean}\), and then we halve these values and analyse the behaviour of both \(L^2\) and \(H^1\) errors. We highlight that the order of convergence that we expect theoretically (i.e 1 for the \(H^1\) norm error and 2 for the \(L^2\) norm error) is always recovered for every mesh used.

4 Cardiac electromechanics

Now we apply the approach developed and tested in Sects. 2 and 3 to solve the cardiac electromechanics problem.

4.1 Mathematical model

Heart tissue is made of cardiomyocytes, which determines the orthotropic structure of the left ventricle through the organization in fibers and laminar collagen sheets [76]. In this section, we review the model governing the electromechanical behaviour of the left ventricle by accounting the characteristics of myocardium [26].

4.1.1 Electrophysiology

The contraction of a single cardiac cell is initiated by an electric activation due to an action potential, a depolarizing phase that raises the so called transmembrane potential of an excitable cell from its resting value ranging between -90 and -80 mV to slightly positive values, followed by a peak, a plateau, and a repolarization, that returns the transmembrane potential to its resting value [17, 18]. The electric activity of the heart starts at the so called sinoatrial (SA) node and propagates throughout the right atrium [18]. Thanks to the Bachmann’s bundle and some other preferential lines of trasmission, the electric signal reaches the left atrium [17]. Then, the activation front arrives at the atrioventricular (AV) node, which conducts the action potential through the nonexcitable atrioventricular septum, activating the specialized fibers of the bundle of His and the Purkinje network, that spreads as a tree-like left and right bundle branches ending on the endocardial surface of the ventricles. These Purkinje terminations transmit the action potentials to the ventricular walls and cardiac excitation then propagates throughout the ventricles [46, 75].

The monodomain model is a diffusion-reaction PDE system able to describe the electric properties of cardiac muscle cells, assuming the same anisotropy ratios between the intracellular and extracellular spaces [58, 73]. It is a continuum model, which means that it is used to capture average properties of many cardiomyocytes, and not the behaviour of single cells. The monodomain model reads:

$$\begin{aligned} {\left\{ \begin{array}{ll} \chi \big [ C_m \dfrac{\partial u}{\partial t} + I_{ion}(u, {\varvec{z}}) \big ] = \nabla \cdot ( J {\varvec{F}}^{-1} \varvec{D_M} {\varvec{F}}^{-T} \nabla u) + I_{app}(t) &{} \hbox {in} \; \varOmega _{0} \times (0, T), \\ \big ( J {\varvec{F}}^{-1} \varvec{D_M} {\varvec{F}}^{-T} \nabla u \big ) \cdot {\varvec{N}} = 0 &{} \hbox {on} \; \partial \varOmega _0 \times (0, T), \\ u = u_0 &{} \hbox {in} \; \varOmega _0 \times \{0\}. \end{array}\right. }\nonumber \\ \end{aligned}$$
(11)

\(\varOmega _0 \subset {\mathbb {R}}^3\) is the domain in the reference configuration, represented in our case by an idealized left ventricle at the end of the diastolic phase. \(T > 0\) is the final time. \(C_m\) is the total membrane capacitance and \(\chi \) is the area of cell membrane per tissue volume. u is the dimensionless transmembrane potential, whereas the vector \({\varvec{z}} = \{z_1, z_2, \ldots , z_k\}\) expresses k recovery (or gating) variables, which play the role of probability density functions and model the fraction of open ionic channels across the membrane of a single cell. \(\varvec{D_M} = \sigma _t {\varvec{I}} + (\sigma _l - \sigma _t) \varvec{f_0} \otimes \varvec{f_0}\) refers to the diffusion tensor, being \(\varvec{f_0}\) the vector field expressing the fibers direction and \(\sigma _l, \sigma _t \in {\mathbb {R}}^+\) the longitudinal and transversal conductivities respectively [72]. By defining \({\varvec{X}}\) and \({\varvec{x}}\) as the reference and deformed coordinates, we introduce the deformation tensor \({\varvec{F}} = {\varvec{I}} + \dfrac{\partial \varvec{d_s}}{\partial {\varvec{X}}}\) (with \(J=\text {det}({\varvec{F}})>0)\), keeping into account the effect of the mechanical displacement \(\varvec{d_s}\) on the electrophysiology. \(I_{app}(t)\) is an external applied current, which should simulate in our case the behaviour of the Purkinje network. Indeed we use it to trigger the action potential at specific points of the myocardium. \(I_{ion}(u, {\varvec{z}})\) is the feedback from the cellular scale into the tissue one, and strictly depends on the chosen ionic model. A Neumann boundary condition is applied all over the boundary and defines the condition of electrically isolated domain.

In literature there are several possible choices of ionic models [1, 47, 84]. We present here the monodomain equation supplemented by the Bueno-Orovio minimal ionic model, which is specifically designed for the human left ventricle to describe from a phenomenological perspective the microscopical details of each single cardiomyocyte [9]:

$$\begin{aligned} {\left\{ \begin{array}{ll} { \chi \big [ C_m} \dfrac{\partial u}{\partial t} + I_{ion}(u, {\varvec{z}}) { \big ]} = \nabla \cdot (J {\varvec{F}}^{-1} \varvec{D_M} {\varvec{F}}^{-T} \nabla u) + I_{app}(t) &{} \hbox {in} \; \varOmega _{0} \times (0, T), \\ \dfrac{\partial v}{\partial t} = \dfrac{(1 - H(u - \theta _v)) (v_{\infty } - v)}{\tau _v^-} - \dfrac{H(u - \theta _v) v}{\tau _v^+} &{} \hbox {in} \; \varOmega _0 \times (0, T), \\ \dfrac{\partial w}{\partial t} = \dfrac{(1 - H(u - \theta _w)) (w_{\infty } - w)}{\tau _w^-} - \dfrac{H(u - \theta _w) w}{\tau _w^+} &{} \hbox {in} \; \varOmega _0 \times (0, T), \\ \dfrac{\partial s}{\partial t} = \dfrac{1}{\tau _s} \left( \dfrac{1 + \tanh (k_s (u - u_s))}{2}-s \right) &{} \hbox {in} \; \varOmega _0 \times (0, T), \\ \big ( J {\varvec{F}}^{-1} \varvec{D_M} {\varvec{F}}^{-T} \nabla u \big ) \cdot {\varvec{N}} = 0 &{} \hbox {on} \; \partial \varOmega _0 \times (0, T), \\ u = u_0, \, v = v_0, \, w = w_0, \, s = s_0 &{} \hbox {in} \; \varOmega _0 \times \{0\}, \end{array}\right. }\nonumber \\ \end{aligned}$$
(12)

where \(C_m\) = \(\chi \) = 1, \(H(x - x_0)\) is an Heaviside function centered at \(x_0\), \({\varvec{z}} = \{v, w, s\}\) is the vector of gating variables and evolves over the time thanks to a system of 3 ODEs, which are solved at each point of the reference domain. The ionic current \(I_{ion}(u, {\varvec{z}})\) is given by:

$$\begin{aligned} \begin{aligned} I_{ion}(u, {\varvec{z}}) =&-\frac{v H(u - \theta _v) (u - \theta _v) (u_u - u)}{\tau _{fi}} \\&+ \frac{(u - u_0) (1 - H(u - \theta _w))}{\tau _0} + \frac{H(u - \theta _w)}{\tau _{so}} \\&- \frac{H(u - \theta _w) w s}{\tau _{si}}. \end{aligned} \end{aligned}$$

The function \(I_{ion}(u, {\varvec{z}})\) and all the parameters related to the Bueno-Orovio ionic model are taken from [9], by considering values that permit reproducing the behaviour of the ten Tusscher-Noble-Noble-Panfilov (TNNP) model [83].

4.1.2 Mechanical activation

The mechanical activation bridges electrophysiology and passive mechanics. We consider a phenomenological model that keeps into account the local shortening of the fibers \(\gamma _f\) at the macroscopical level [33, 69, 71]. In this way we are able to describe the behaviour of the fibers in a faster but more approximated way, with respect to more complex and accurate models that are able to describe the dynamic of sarcomeres [65]. Myocardial displacement feedback \(\varvec{d_s}\) and concentration of calcium ions \(Ca^{2+}\) play an important role in the time evolution of \(\gamma _f\). As already done in literature [33, 68, 69], the gating variable s substitutes the concentration of \(Ca^{2+}\), due to the fact that they have a pointwise similar time pattern, even if the order of magnitude is different. The formulation is the following:

$$\begin{aligned} {\left\{ \begin{array}{ll} \dfrac{\partial \gamma _f}{\partial t} - \dfrac{\varepsilon }{g(s)} \varDelta \gamma _f = \dfrac{1}{g(s)} \varPhi (s, \gamma _f, \varvec{d_s}) &{} \hbox {in} \; \varOmega _0 \times (0, T), \\ \nabla \gamma _f \cdot {\varvec{N}} = 0 &{} \hbox {on} \; \partial \varOmega _0 \times (0, T), \\ \gamma _f = 0 &{} \hbox {in} \; \varOmega _0 \times \{0\}, \end{array}\right. }\nonumber \\ \end{aligned}$$
(13)

where \(g(s) = \mu _A s^2\), \(\varPhi (s, \gamma _f, \varvec{d_s}) = \alpha H_{s_0}(s) (s -s_0)^2 R_{FL}(I_{4f}) + \sum _{j = 1}^5 (-1)^j (j + 1) (j + 2) I_{4f} \gamma _f^j\) is the active force, \(R_{FL}(x) = \chi _{[SL_{min}, SL_{max}]}(\sqrt{x} l_0) \Big \{ \frac{d_0}{2} + \sum _{n = 1}^3 [d_n \text {sin}(\sqrt{x} l_0) + e_n \text {cos}(\sqrt{x} l_0)]\Big \}\) is a truncated Fourier series expressing the sarcomere force-length relationship [37]. Both \(\alpha \) and \(\mu _A\) should be calibrated according to the specific case under investigation. The active deformation is calculated exploiting the following orthotropic form [3]:

$$\begin{aligned} \varvec{F_A} = {\varvec{I}} + \gamma _f \varvec{f_0} \otimes \varvec{f_0} + \gamma _s \varvec{s_0} \otimes \varvec{s_0} + \gamma _n \varvec{n_0} \otimes \varvec{n_0}, \end{aligned}$$
(14)

where \(\varvec{s_0}\) and \(\varvec{n_0}\) represent the sheets and their normal direction respectively, with \(\gamma _s\) and \(\gamma _n\) corresponding local shortening or elongation [6, 52]:

$$\begin{aligned} \gamma _n= & {} \bar{k}' \left( \bar{k}_{endo} \dfrac{\lambda - \lambda _{epi}}{\lambda _{endo} - \lambda _{epi}} + \bar{k}_{epi} \dfrac{\lambda - \lambda _{endo}}{\lambda _{epi} - \lambda _{endo}} \right) \nonumber \\&\left( \dfrac{1}{\sqrt{1 + \gamma _f}} - 1 \right) , \end{aligned}$$
(15)
$$\begin{aligned} \gamma _s= & {} \dfrac{1}{(1 + \gamma _f) (1 + \gamma _n)} - 1. \end{aligned}$$
(16)

Here \(\lambda \) represents a transmural coordinate, varying from \(\lambda _{endo}\) at the endocardium to \(\lambda _{epi}\) at the epicardium, which permits to have a transversely non-homogeneous thickening of the left ventricular wall. \(\gamma _s\) set like (16) yield to \(\text {det}(\varvec{F_A}) = 1\) (Fig. 6).

Fig. 6
figure 6

Prolate ellipsoidal geometry. Lateral view (left) and view from above (right)

4.1.3 Active and passive mechanics

In order to describe the displacement of the myocardium along the entire heartbeat, we model the properties of the tissue by means of fibers \(\varvec{f_0}\), sheets \(\varvec{s_0}\) and their normals \(\varvec{n_0}\), which permit to obtain highly anisotropic internal stresses associated with a prescribed deformation [39]. We use a nearly-incompressible formulation by weakly penalizing large volumetric variations [77]. Moreover, the dimensionless variable \(\gamma _f\) provides a link between electrophysiology and mechanics. The momentum conservation equation with boundary and initial conditions reads [51]:

$$\begin{aligned} {\left\{ \begin{array}{ll} \rho _s \dfrac{\partial ^2 \varvec{d_s}}{\partial t^2} - \nabla \cdot {\varvec{P}}(\varvec{d_s}, \gamma _f) = {\varvec{0}} &{} \hbox {in} \; \varOmega _0 \times (0, T), \\ ({\varvec{N}} \otimes {\varvec{N}}) \left( K_{\bot }^{epi} \varvec{d_s}+C_{\bot }^{epi} \dfrac{\partial \varvec{d_s}}{\partial t} \right) \\ \; + \; ({\varvec{I}} - {\varvec{N}} \otimes {\varvec{N}}) \left( K_{\parallel }^{epi} \varvec{d_s}+C_{\parallel }^{epi} \dfrac{\partial \varvec{d_s}}{\partial t} \right) + {\varvec{P}}(\varvec{d_s}, \gamma _f) {\varvec{N}} = 0 &{} \hbox {on} \; \varGamma _0^{epi} \times (0, T), \\ {\varvec{P}}(\varvec{d_s}, \gamma _f) {\varvec{N}} = 0 &{} \hbox {on} \; \varGamma _0^{base} \times (0, T), \\ {\varvec{P}}(\varvec{d_s}, \gamma _f) {\varvec{N}} = -p^{endo}(t) {\varvec{N}} &{} \hbox {on} \; \varGamma _0^{endo} \times (0, T), \\ \varvec{d_s} = \varvec{d_{s,0}}, \, \dfrac{\partial \varvec{d_s}}{\partial t} = \dot{\varvec{d_{s,0}}} &{} \hbox {in} \; \varOmega _0 \times \{0\}. \end{array}\right. }\nonumber \\ \end{aligned}$$
(17)

A Robin boundary condition is prescribed at the epicardium to account for the action of the pericardial sac, so that the presence of the pericardium is also addressed and modelled [57]. \(K_{\bot }^{epi}\), \(K_{\parallel }^{epi}\), \(C_{\bot }^{epi}\), \(C_{\parallel }^{epi} \in {\mathbb {R}}^+\) are respectively local values of stiffness and viscosity constants of the epicardial tissue in the normal or tangential directions. A Neumann boundary condition is defined at the base and acts as a free contraction condition. \(p^{endo}(t)\) is the internal pressure of the ventricular chamber and is modelled through a 0D model, as will be detailed in Sect. 4.1.5. The boundary condition at the endocardium should depend on the deformation field [64]: we however neglect this feedback in this work as we deem this to be an acceptable approximation aimed at reducing the overall complexity of our model. The Piola-Kirchhoff tensor \({\varvec{P}} = {\varvec{P}}(\varvec{d_s}, \gamma _f)\) incorporates both the passive and active mechanical properties of the tissue. After defining the symmetric positive definite right Cauchy-Green tensor \({\varvec{C}}={\varvec{F}}^T {\varvec{F}}\), with \({\varvec{F}} = {\varvec{I}} + \nabla \varvec{d_s}\) deformation tensor, the strain energy function \({\mathcal {W}} : {\mathbb {R}}^{3 { \times } 3} \xrightarrow {} {\mathbb {R}}\) provides a link between the strain and the energy of the material. Under the hyperelasticity assumption, the strain energy function can be differentiated with respect to the deformation tensor \({\varvec{F}}\) in order to obtain \({\varvec{P}}\):

$$\begin{aligned} {\varvec{P}}(\varvec{d_s}, \gamma _f) = \dfrac{\partial {\mathcal {W}}({\varvec{C}})}{\partial {\varvec{F}}}. \end{aligned}$$
(18)

There are several models in literature which are able to describe the anisotropic nature of the tissue, such as the Guccione [38] or the Holzapfel-Ogden laws [40]. We use the second one, which formulates the following additive decomposition of the strain energy function:

$$\begin{aligned} \begin{aligned} {\mathcal {W}}({\varvec{C}})&= {\mathcal {W}}_1({\mathcal {I}}_1) + {\mathcal {W}}_{4f}({\mathcal {I}}_{4f}) + {\mathcal {W}}_{4s}({\mathcal {I}}_{4s}) + {\mathcal {W}}_{8fs}({\mathcal {I}}_{8fs}) \\&= \dfrac{a}{2b} e^{b\left( {\mathcal {I}}_1 - 3 \right) } + \dfrac{a_f}{2b_f} \left[ e^{b_f<{\mathcal {I}}_{4f} - 1>^2} - 1 \right] \\&\quad + \dfrac{a_s}{2b_s} \left[ e^{b_s <{\mathcal {I}}_{4s} - 1>^2} - 1 \right] \\&\quad + \dfrac{a_{fs}}{2b_{fs}} \left[ e^{b_{fs} {\mathcal {I}}_{8fs}^2} - 1 \right] , \end{aligned} \end{aligned}$$
(19)

where \({\mathcal {I}}_1 = tr({\varvec{C}})\), \({\mathcal {I}}_{4f} = {\varvec{C}} : \varvec{f_0} \otimes \varvec{f_0}\), \({\mathcal {I}}_{4s} = {\varvec{C}} : \varvec{s_0} \otimes \varvec{s_0}\), \({\mathcal {I}}_{8fs} = {\varvec{C}} : \varvec{f_0} \otimes \varvec{s_0}\) are the invariants of the right Cauchy-Green tensor. \(a_k\), \(b_k\) coefficients are fitted from experimental data [40]. The function \(<y> = y H_0(y)\), with \(H_0(y)\) Heaviside function centered in 0, indicates the positive part of y and permits to switch off the effects of both fibers and sheets when they are under compression. We introduce a convex term \({\mathcal {W}}_{vol}(J) = \dfrac{B}{2} (J - 1) log(J)\) into the strain energy function \({\mathcal {W}}\) such that \(J=1\) is its global minimum. In this way, we are able to set the nearly-incompressible constraint [16, 23, 91]. \(B \in {\mathbb {R}}^+\) is the bulk modulus, which weakly enforced the incompressibility constraint [33]. Following [74], we model the evaluation of the isotropic term \({\mathcal {W}}_1\) in \(J^{-\frac{2}{3}}{\mathcal {I}}_1\) and not directly in the first invariant (Fig. 7).

Fig. 7
figure 7

Dimensions of the prolate ellipsoidal: long axis (left), short axis and thickness (right)

The active part, which is due to the electrical impulse, is formulated in the active strain framework [2, 3, 49, 69]. In addition to the reference configuration \(\varOmega _0\) and the deformed one \(\varOmega \), we introduce an intermediate state \({\hat{\varOmega }}\), which represents the active part of the deformation. By means of the \(2^{nd}\) order tensor \({\varvec{F}}_A\), we map \(\varOmega _0\) into \({\hat{\varOmega }}\), whereas the \({\varvec{F}}_E\) tensor takes the role to finally transform \({\hat{\varOmega }}\) into \(\varOmega \). We finally reach, the multiplicative decomposition of \({\varvec{F}}\) = \({\varvec{F}}_E {\varvec{F}}_A\). The first Piola-Kirchhoff strain tensor \({\varvec{P}}\) reads:

$$\begin{aligned} {\varvec{P}} = \text {det}({\varvec{F}}_A) {\varvec{P}}_E {{\varvec{F}}_A}^{-T}, \quad \quad {\varvec{P}}_E = \dfrac{\partial {\mathcal {W}}({\varvec{C}}_E, J)}{\partial {\varvec{F}}_E}. \end{aligned}$$
(20)

For additional details on the final form of tensor \({\varvec{P}}\), we refer the reader to [33].

he inertial term in (17) allows us to properly account for the evolution in time of the mechanical problem. Moreover, the division by a small timestep of the mass matrix yields a strong zero-th order diagonal contribution in this non-linear system, easing the numerical resolution of this non-linear problem. Nevertheless, the term depending on the Piola-Kirchhoff tensor is dimensionally predominant.

4.1.4 The multifield coupled problem

The fully coupled multifield electromechanical problem is presented here below:

$$\begin{aligned} {\left\{ \begin{array}{ll} \chi \big [ C_m \dfrac{\partial u}{\partial t} + I_{ion}(u, v, w, s) \big ] = \nabla \cdot (J {\varvec{F}}^{-1} \varvec{D_M} {\varvec{F}}^{-T} \nabla u) + I_{app}(t) &{} \mathrm {in} \; \varOmega _0 \times (0, T), \\ \dfrac{\partial v}{\partial t} = \dfrac{(1 - H(u - \theta _v)) (v_{\infty } - v)}{\tau _v^-} - \dfrac{H(u - \theta _v) v}{\tau _v^+} &{} \mathrm {in} \; \varOmega _0 \times (0, T), \\ \dfrac{\partial w}{\partial t} = \dfrac{(1 - H(u - \theta _w)) (w_{\infty } - w)}{\tau _w^-} - \dfrac{H(u - \theta _w) w}{\tau _w^+} &{} \mathrm {in} \; \varOmega _0 \times (0, T), \\ \dfrac{\partial s}{\partial t} = \dfrac{1}{\tau _s} \left( \dfrac{1 + \tanh (k_s (u - u_s))}{2}-s \right) &{} \mathrm {in} \; \varOmega _0 \times (0, T), \\ \dfrac{\partial \gamma _f}{\partial t} - \dfrac{\varepsilon }{g(s)} \varDelta \gamma _f = \dfrac{1}{g(s)} \varPhi (s, \gamma _f, \varvec{d_s}) &{} \mathrm {in} \; \varOmega _0 \times (0, T), \\ \rho _s \dfrac{\partial ^2 \varvec{d_s}}{\partial t^2} - \nabla \cdot {\varvec{P}}(\varvec{d_s}, \gamma _f) = {\varvec{0}} &{} \mathrm {in} \; \varOmega _0 \times (0, T), \\ \big ( J {\varvec{F}}^{-1} \varvec{D_M} {\varvec{F}}^{-T} \nabla u \big ) \cdot {\varvec{N}} = 0 &{} \mathrm {on} \; \partial \varOmega _0 \times (0, T), \\ \nabla \gamma _f \cdot {\varvec{N}} = 0 &{} \mathrm {on} \; \partial \varOmega _0 \times (0, T), \\ ({\varvec{N}} \otimes {\varvec{N}}) \left( K_{\bot }^{epi} \varvec{d_s}+C_{\bot }^{epi} \dfrac{\partial \varvec{d_s}}{\partial t} \right) \\ \; + \; ({\varvec{I}} - {\varvec{N}} \otimes {\varvec{N}}) \left( K_{\parallel }^{epi} \varvec{d_s}+C_{\parallel }^{epi} \dfrac{\partial \varvec{d_s}}{\partial t} \right) + {\varvec{P}}(\varvec{d_s}, \gamma _f) {\varvec{N}} = 0 &{} \mathrm {on} \; \varGamma _0^{epi} \times (0, T), \\ {\varvec{P}}(\varvec{d_s}, \gamma _f) {\varvec{N}} = 0 &{} \mathrm {on} \; \varGamma _0^{base} \times (0, T), \\ {\varvec{P}}(\varvec{d_s}, \gamma _f) {\varvec{N}} = -p^{endo}(t) {\varvec{N}} &{} \mathrm {on} \; \varGamma _0^{endo} \times (0, T), \\ u = u_0, \, v = v_0, \, w = w_0, \, s = s_0 &{} \mathrm {in} \; \varOmega _0 \times \{0\}, \\ \gamma _f = \gamma _{f,0} &{} \mathrm {in} \; \varOmega _0 \times \{0\}, \\ \varvec{d_s} = \varvec{d_{s,0}}, \, \dfrac{\partial \varvec{d_s}}{\partial t} = \dot{\varvec{d_{s,0}}} &{} \mathrm {in} \; \varOmega _0 \times \{0\}, \\ \end{array}\right. }{\!\!\!\!\!\!\!}\nonumber \\ \end{aligned}$$
(21)

where \(p^{endo}(t)\) is the unknown of a 0D fluid problem that changes over the time with the different phases that involve a heartbeat.

4.1.5 Cardiac cycle

We model the evolution of both endocardial pressure and volume along the heartbeat, considering a total duration T = 0.8 s. With this aim, we consider ordinary differential equations to model the fluid in the left ventricle chamber, where we assume that the endocardial pressure is uniform over the domain. The heartbeat is conventionally split into four phases, in which we solve four different ODEs [33]:

  • Isovolumetric contraction: increase of \(p^{endo}\) from the End Diastolic Pressure (EDP, about 10 mmHg) to the aortic pressure (about 85 mmHg) while the volume \(V^{endo}\) remains almost constant, according to the following equation:

    $$\begin{aligned} \dfrac{d V^{endo}}{dt}(p^{endo}) = 0 \quad t \in (0, T_1], \end{aligned}$$
    (22)

    where \(V^{endo}\) is set to the initial volume, and \(T_1=T_1(p^{endo})\) is the earliest occurrence in time at which \(p^{endo} \ge p^{ao}\), that forces the aortic valve opening.

  • Ejection: the left ventricle contracts and pushes blood to flow through the aortic valve, which closes itself at the end of this phase (when \(p^{endo} \le p^{ao}\)). \(V^{endo}\) decreases following a two 0D element Windkessel model [90]:

    $$\begin{aligned} C \dfrac{d p^{endo}}{dt} = - \dfrac{p^{endo}}{R} - \dfrac{dV^{endo}}{dt} \quad t \in (T_1, T_2], \end{aligned}$$
    (23)

    with \(p^{endo}(T_1) = p^{ao}\), \(C,R > 0\) are two parameters representing the capacitance and the resistance of the electric circuit that mimics the blood flowing in the aorta. \(T_2 = T_2(V^{endo})\) is the first instant of time in which \(\dfrac{d V^{endo}}{dt} \ge 0\).

  • Isovolumetric relaxation: decrease of \(p^{endo}\) with constant value of \(V^{endo}\), treated from the mathematical perspective in the same way as the isovolumetric contraction. \(T_3 = T_3(p^{endo})\) is the first occurrence in time at which \(p^{endo} \le p_{min}^{endo} = 5\) mmHg.

  • Filling: the mitral valve opens due to the pressure drop, blood flows inside the left ventricle causing an increment of \(V^{endo}\) until both \(p^{endo}\) and \(V^{endo}\) attain the EDP values. We increase linearly \(p^{endo}\) until it reaches the initial value \(p_{EDP}^{endo}\) at \({\bar{T}}_3 = 0.7\) s and we keep it constant from \({\bar{T}}_3\) to the final time \(T = 0.8\) s by setting:

    $$\begin{aligned} \dfrac{dp^{endo}}{dt} = \xi \quad t \in (T_3, T), \end{aligned}$$
    (24)

    where

    $$\begin{aligned} {\left\{ \begin{array}{ll} \xi = \dfrac{p_{EDP}^{endo} - p^{endo}(T_3)}{{\bar{T}}_3 - T_3} &{} \hbox {if} \; t \in (T_3, {\bar{T}}_3], \\ \xi = 0 &{} \hbox {otherwise}. \end{array}\right. } \end{aligned}$$
    (25)

The endocardial volume \(V^{endo}(t)\) is computed exploiting the following formula:

$$\begin{aligned} V^{endo}(t) = \int _{\varGamma _0^{endo}} J(\varvec{d_s}(t)) \varvec{\xi } \cdot {\varvec{F}}^{-T}(\varvec{d_s}(t)) {\varvec{N}} d \varGamma _0, \end{aligned}$$
(26)

which is derived in [67], with \(\varvec{\xi }\) vector directed in the normal direction of the left ventricle base.

4.2 Numerical discretization

In this section we numerically discretize the problem (21) using the Finite Element Method in space and Backward Differentiation Formula in time. Our numerical method permits to separate and manage properly the space and time scales related to cardiac electromechanics. We try to reduce at maximum the number of interpolations of the fields defined on different grids and the number of time advancements of the different physics while preserving accuracy and stability.

4.2.1 Space discretization

We provide two meshes \({\mathcal {T}}_{h_1}\) and \({\mathcal {T}}_{h_2}\) of the computational domain made of tetrahedrons. \(h_1\) and \(h_2\) (with \(h_1<h_2\)) represent the maximum size of the element K, say the maximum of the mean diameter of the circumscribed circumference. \({\mathcal {T}}_{h_1}\), which is the fine mesh, is used for electrophysiology. The coarser \({\mathcal {T}}_{h_2}\) mesh is employed for both activation and mechanics. This is motivated by the fact that we need a higher resolution for the electric part, going down to the cellular level, whereas both cardiac mechanics and activation evolve on larger space scales. The geometry for the left ventricle is represented by a prolate ellipsoid (as often done in literature [26, 33, 38, 67]). We denote by \(N_u\), \(N_{{\varvec{z}}}\), \(N_{\gamma _f}\) and \(N_{\varvec{d_s}}\) the number of degrees of freedom for dimensionless transmembrane potential, gating variables, mechanical activation and displacement respectively. We define the set of polynomials with degree smaller than or equal to r over an element K of the mesh with \({\mathcal {P}}^r(K)\), and we introduce the finite dimensional spaces \({\mathcal {X}}_{h_1}^r= \{ v \in C^0(\bar{\varOmega }_0) : v|_K \in {\mathcal {P}}^r(K) \;\; \forall K \in {\mathcal {T}}_{h_1} \}\) and \({\mathcal {X}}_{h_2}^r= \{ v \in C^0(\bar{\varOmega }_0) : v|_K \in {\mathcal {P}}^r(K) \;\; \forall K \in {\mathcal {T}}_{h_2} \}\), for \(r \ge 1\).

Monodomain model The set of basis functions of \({\mathcal {X}}_{h_1}^r\) with \(N_u = \)dim(\({\mathcal {X}}_{h_1}^r\)) is defined by \( \{ \phi _i \}_{i=1}^{N_u}\). The semidiscretized formulation of the Monodomain equation reads: find \(u_{h_1}(t) \in {\mathcal {X}}_{h_1}^r \)\(\forall t \in (0, T)\) such that

$$\begin{aligned} \begin{aligned}&\int _{\varOmega _0} {\dot{u}}_{h_1}{(t)} \phi _i d \varOmega _0 + \int _{\varOmega _0} (J {\varvec{F}}_{h_1}^{-1}({\varvec{d}}_{{\varvec{s}}, h_1}{(t)}) {\varvec{D}}_m {\varvec{F}}_{h_1}^{-T}({\varvec{d}}_{{\varvec{s}}, h_1}{(t)}) \nabla u_{h_1}{(t)}) \\&\quad \cdot \nabla \phi _i d\varOmega _0 + \int _{\varOmega _0} I_{ion}(u_{h_1}{(t)}, {\varvec{z}}_{h_1}{(t)}) \phi _i d \varOmega _0 \\&\quad = \int _{\varOmega _0} I_{app}(t) \phi _i d \varOmega _0 \quad \forall i = 1, \ldots , N_u, \end{aligned} \end{aligned}$$
(27)

with \(u_{h_1}(0) = \sum _{j=1}^{N_u} (u_0, \phi _j)_{L^2(\varOmega _0)} \phi _j\). \({\varvec{z}}_{h_1}(t)\) and \({\varvec{F}}_{h_1}\) are the semidiscretized versions of the gating variables and the interpolated deformation tensor respectively, whereas \(u_{h_1}(t) = \sum _{j=1}^{N_u} { u_{j, h_1}}(t) \phi _j\) is the finite element solution that approximates u(t).

\({\varvec{F}}_{h_1}\) is obtained with the following procedure:

  • RL-RBF are employed for the interpolation of \({\varvec{d}}_{{\varvec{s}}, h_2}\), which is obtained from (17). The interpolant \({\bar{\varPi }}_{{\varvec{d}}_{{\varvec{s}}}}({\varvec{x}})\) is built on \({\mathcal {T}}_{h_2}\) and it is used to obtain \({\varvec{d}}_{{\varvec{s}}, h_1}\) on \({\mathcal {T}}_{h_1}\) following the procedure explained in Sect. 2 and exploiting formula (5).

  • We get \({\varvec{F}}_{h_1} = {\varvec{I}} + \nabla {\varvec{d}}_{{\varvec{s}}, h_1}\) through the adaptation of the Zienkiewicz-Zhu gradient recovery method [92, 93] to the tensor case.

We can rewrite equation (27) as a system of non linear ODEs by setting \({ \overline{{\varvec{u}}}_{h_1}}(t) = \{ u_{j, h_1}(t) \}_{j=1}^{N_u}\):

$$\begin{aligned} {\left\{ \begin{array}{ll} {\mathcal {M}} { \dot{\overline{{\varvec{u}}}}_{h_1}}(t) + {\mathcal {K}} ({ \overline{{\varvec{d}}}_{{\varvec{s}}, h_1}}(t)) { \overline{{\varvec{u}}}_{h_1}}(t) + {\varvec{I}}_{ion}({ \overline{{\varvec{u}}}_{h_1}}(t), { \overline{{\varvec{z}}}_{h_1}}(t)) = {\varvec{I}}_{app}(t) &{} \forall t \in (0, T), \\ { \overline{{\varvec{u}}}_{h_1}}(0) = { \overline{{\varvec{u}}}_{0, h_1}}, \end{array}\right. }\nonumber \\ \end{aligned}$$
(28)

where \({\mathcal {M}}_{ij}{=}\int _{\varOmega _0} \phi _j \phi _i d \varOmega _0\), \({\mathcal {K}}_{ij} ({ \overline{{\varvec{d}}}_{{\varvec{s}}, h_1}}(t)){=} \int _{\varOmega _0} (J {\varvec{F}}_{h_1}^{{-}1} {\varvec{D}}_m {\varvec{F}}_{h_1}^{-T} \nabla \phi _j ) \cdot \nabla \phi _i d\varOmega _0\) and:

$$\begin{aligned} \begin{aligned} \left( {\varvec{I}}_{ion}({ \overline{{\varvec{u}}}_{h_1}}(t), { \overline{{\varvec{z}}}_{h_1}}(t)) \right) _i&= \int _{\varOmega _0} I_{ion}(u_{h_1}{ (t)}, {\varvec{z}}_{h_1}{ (t)}) \phi _i d \varOmega _0, \\ \left( {\varvec{I}}_{app}(t)\right) _i&= \int _{\varOmega _0} I_{app}(t) \phi _i d \varOmega _0. \end{aligned} \end{aligned}$$

In order to avoid numerical instabilities, we use a lumped \({\mathcal {M}}_L\) approximation of the mass matrix \({\mathcal {M}}\) [11]. There are several strategies in literature for the treatment of the non linear term \({\varvec{I}}_{ion}({\varvec{u}}_{h_1}(t), {\varvec{z}}_{h_1}(t))\) [33, 43, 53,54,55]. We use the so-called state variable interpolation (SVI) approach. By denoting with \(\{ {\varvec{x}}_s^K \}_{s=1}^{N_q}\) and \(\{ \omega _s^K \}_{s=1}^{N_q}\) the quadrature nodes and weights of a generic element of the mesh \(K \in {\mathcal {T}}_{h_1}\), both \(u_{h_1}\) and \({\varvec{z}}_{h_1}\) are evaluated at the quadrature nodes as follows:

$$\begin{aligned} \begin{aligned}&\int _{\varOmega _0} I_{ion}(u_{h_1}{ (t)}, {\varvec{z}}_{h_1}{ (t)}) \phi _i d \varOmega _0 \\&\quad \approx \sum _{K \in {\mathcal {T}}_{h_1}} \left( \sum _{s=1}^{N_q} I_{ion} \left( \sum _{j=1}^{N_u} { u_{j, h_1}}(t) \phi _j({\varvec{x}}_s^K),\right. \right. \\&\qquad \,\,\left. \left. \sum _{j=1}^{N_u} { {\varvec{z}}_{j, h_1}}(t) \phi _j({\varvec{x}}_s^K) \right) \phi _i({\varvec{x}}_s^K) \omega _s^K \right) . \end{aligned} \end{aligned}$$
(29)

Bueno-Orovio ionic model The ionic model is a system of ODEs which indirectly depends on the space variable through the transmembrane potential u. The vector of gating variables, which is a state vector located at the nodes of the mesh, is rearranged as follows:

$$\begin{aligned} { \overline{{\varvec{z}}}_{h_1}}(t) = \{ { \overline{{\varvec{v}}}_{h_1}}(t), { \overline{{\varvec{w}}}_{h_1}}(t), { \overline{{\varvec{s}}}_{h_1}}(t) \}, \end{aligned}$$
(30)

with \({ \overline{{\varvec{v}}}_{h_1}}(t)=\{ v_{j, h_1}(t) \}_{j=1}^{N_{{\varvec{z}}}}\), \({ \overline{{\varvec{w}}}_{h_1}}(t)=\{ w_{j, h_1}(t) \}_{j=1}^{N_{{\varvec{z}}}}\), \({ \overline{{\varvec{s}}}_{h_1}}(t)=\{ s_{j, h_1}(t) \}_{j=1}^{N_{{\varvec{z}}}}\). The semi-discrete formulation can be written as follows:

$$\begin{aligned} {\left\{ \begin{array}{ll} { \dot{\overline{{\varvec{z}}}}_{h_1}}(t) = {\varvec{F}}({ \overline{{\varvec{u}}}_{h_1}}(t), { \overline{{\varvec{z}}}_{h_1}}(t)) &{} \forall t \in (0, T), \\ { \overline{{\varvec{z}}}_{h_1}}(0) = { \overline{{\varvec{z}}}_{0, h_1}}. \end{array}\right. } \end{aligned}$$
(31)

Activation model The Galerkin formulation related to the equation for \(\gamma _f\) reads: given \({\varvec{d}}_{{\varvec{s}}, h_2}(t)\) and \(s_{h_2}(t) = \bar{\varPi }_{s_{h_1}}({\varvec{x}})\) interpolation of \(s_{h_1}(t)\) by means of RL-RBF, i.e. formula (5), find \(\gamma _{f,h_2}(t) \in {\mathcal {X}}_{h_2}^r\)\(\forall t \in (0, T)\) such that

$$\begin{aligned} \begin{aligned}&\int _{\varOmega _0} \dfrac{\partial \gamma _{f,h_2}{ (t)}}{\partial t} \phi _i d \varOmega _0 + \varepsilon \int _{\varOmega _0} \dfrac{1}{g(s_{h_2}{ (t)})} \nabla \gamma _{f, h_2}{ (t)} \cdot \nabla \phi _i d \varOmega _0 \\&\quad - \int _{\varOmega _0} \dfrac{1}{g(s_{h_2}{ (t)})} \varPhi (s_{h_2}{ (t)}, \gamma _{f, h_2}{ (t)}, {\varvec{d}}_{{\varvec{s}}, h_2}{ (t)}) \phi _i d \varOmega _0 = 0 \quad \forall i = 1, \ldots , N_{\gamma _f}, \end{aligned} \end{aligned}$$
(32)

with \(\gamma _{f, h_2}(0) = \sum _{j=1}^{N_{{\gamma }_f}} (\gamma _{f, 0}, \phi _j)_{L^2(\varOmega _0)} \phi _j\). By introducing the proper matrices, the following system of ODEs is obtained:

$$\begin{aligned} {\left\{ \begin{array}{ll} {\mathcal {M}} { \dot{\overline{\varvec{\gamma }}}_{f, h_2}}(t) + \varepsilon {\mathcal {K}}({ \overline{{\varvec{s}}}_{h_2}}(t)) {\overline{\varvec{\gamma }}_{f, h_2}}(t) + \varvec{\varPhi }({ \overline{{\varvec{s}}}_{h_2}}(t), { \overline{\varvec{\gamma }}_{f, h_2}}(t), { \overline{{\varvec{d}}}_{{\varvec{s}}, h_2}}(t)) = {\varvec{0}} &{} \forall t \in (0, T), \\ { \overline{\varvec{\gamma }}_{f, h_2}}(0) = { \overline{\varvec{\gamma }}_{f, 0, h_2}}. \end{array}\right. }\nonumber \\ \end{aligned}$$
(33)

Mechanical model We denote by \([{\mathcal {X}}_{h_2}^r]^3\) the finite dimensional subspace of vector valued functions and by \(\{ \varvec{\phi }_i \}_{i=1}^{N_{\varvec{d_s}}}\) its basis. The semi-discretized version of (17) reads: given \(\gamma _{f, h_2} (t)\), find \({\varvec{d}}_{{\varvec{s}}, h_2}(t) \in [{\mathcal {X}}_{h_2}^r]^3\)\(\forall t \in (0, T)\) such that

$$\begin{aligned} \begin{aligned} \int _{\varOmega _0}&\rho _s \frac{\partial ^2 {\varvec{d}}_{{\varvec{s}}, h_2}{(t)}}{\partial t^2} \cdot \varvec{\phi }_i d \varOmega _0 + \int _{\varOmega _0} {\varvec{P}}({\varvec{d}}_{{\varvec{s}}, h_2}{(t)}, \gamma _{f, h_2}{(t)}) : \nabla \varvec{\phi }_i d \varOmega _{0} \\&+ \int _{\varGamma _0^{epi}} \Bigg [ ({\varvec{N}} \otimes {\varvec{N}}) \left( K_{\bot }^{epi} {\varvec{d}}_{{\varvec{s}}, h_2}{(t)} + C_{\bot }^{epi} \dfrac{\partial {\varvec{d}}_{{\varvec{s}}, h_2}{(t)}}{\partial t} \right) \\&+ ({\varvec{I}} - {\varvec{N}} \otimes {\varvec{N}}) \left( K_{\parallel }^{epi} {\varvec{d}}_{{\varvec{s}}, h_2}{(t)} + C_{\parallel }^{epi} \dfrac{\partial {\varvec{d}}_{{\varvec{s}}, h_2}{(t)}}{\partial t} \right) \Bigg ] \cdot \varvec{\phi }_i d \varGamma _0 \\&= -\int _{\varGamma _0^{endo}} p^{endo}(t) {\varvec{N}} \cdot \varvec{\phi }_i d \varGamma _0 \quad \forall i = 1, \ldots , N_{\varvec{d_s}}, \end{aligned} \end{aligned}$$
(34)

with \({\varvec{d}}_{{\varvec{s}}, h_2}(0) = \sum _{j = 1}^{N_{\varvec{d_s}}} (\varvec{d_{s, 0}}, \varvec{\phi }_j)_{[L^2(\varOmega _0)]^3} \varvec{\phi }_j\), \(\varvec{\dot{d}}_{{\varvec{s}}, h_2}(0) = \sum _{j = 1}^{N_{\varvec{d_s}}} (\varvec{\dot{d}_{s, 0}}, \varvec{\phi }_j)_{[L^2(\varOmega _0)]^3} \varvec{\phi }_j\).

The algebraic formulation reads:

$$\begin{aligned} {\left\{ \begin{array}{ll} \rho _s {\mathcal {M}} { \ddot{\varvec{{\overline{d}}}}_{{\varvec{s}}, h_2}}(t) {+} {\mathcal {F}} { \dot{\varvec{{\overline{d}}}}_{{\varvec{s}}, h_2}}(t) {+} {\mathcal {G}} { \overline{{\varvec{d}}}_{{\varvec{s}}, h_2}}(t) {+} {\varvec{S}}({ \overline{{\varvec{d}}}_{{\varvec{s}}, h_2}}(t){,} { \overline{\varvec{\gamma }}_{f, h_2}}(t)) = {\varvec{p}}^{endo}(t) &{} \; {\forall } t \in (0, T), \\ { \overline{{\varvec{d}}}_{{\varvec{s}}, h_2}}(0) = { \overline{{\varvec{d}}}_{\varvec{s, 0}, h_2}}, \quad { \dot{\varvec{{\overline{d}}}}_{{\varvec{s}}, h_2}}(0) = { \dot{\varvec{{\overline{d}}}}_{\varvec{s, 0}, h_2}}, \end{array}\right. }\nonumber \\ \end{aligned}$$
(35)

with:

$$\begin{aligned}&{(}{\varvec{S}}({ \overline{{\varvec{d}}}_{{\varvec{s}}, h_2}}(t), { \overline{\varvec{\gamma }}_{f, h_2}}(t)){)_{i}}=\int _{\varOmega _0} {\varvec{P}}({\varvec{d}}_{{\varvec{s}}, h_2}{ (t)}, \varvec{\gamma }_{f, h_2}{ (t)}):\nabla \varvec{\phi }_i d \varOmega _0,\\&{\mathcal {F}}_{i j} = \int _{\varGamma _0^{epi}} \left[ ({\varvec{N}} \otimes {\varvec{N}}) C_{\bot }^{epi} + ({\varvec{I}} - {\varvec{N}} \otimes {\varvec{N}}) C_{\parallel }^{epi} \right] \varvec{\phi }_j \cdot \varvec{\phi }_i d \varGamma _0,\\&{\mathcal {G}}_{i j} = \int _{\varGamma _0^{epi}} \left[ ({\varvec{N}} \otimes {\varvec{N}}) K_{\bot }^{epi} + ({\varvec{I}} - {\varvec{N}} \otimes {\varvec{N}}) K_{\parallel }^{epi} \right] \varvec{\phi }_j \cdot \varvec{\phi }_i d \varGamma _0. \end{aligned}$$

Equations (27), (31), (32) and (34) provide the semi-discretization of (21) in a splitted fashion ready for a partitioned and staggered time discretization.

4.2.2 Time discretization

In order to fully discretize the electromechanical problem, we introduce a block vector \({\varvec{y}} = \{ \varvec{y_z}, {\varvec{y}}_u, {\varvec{y}}_{\gamma _f}, {\varvec{y}}_{\varvec{d_s}} \}\) containing all the unknowns of the problem and we reformulate the semi-discrete problem as follows:

$$\begin{aligned} {\left\{ \begin{array}{ll} \dfrac{d \varvec{y_z}(t)}{d t} + {\mathcal {T}}_{\varvec{y_z}} ({ \varvec{y_z}(t), {\varvec{y}}_u(t)}) = { {\varvec{0}}} &{} \forall t \in (0, T), \\ {\mathcal {M}} \dfrac{d {\varvec{y}}_{u}(t)}{d t} + {\mathcal {T}}_{{\varvec{y}}_u}({ \varvec{y_z}(t), {\varvec{y}}_u(t), {\varvec{y}}_{\varvec{d_s}}(t)}) = {\varvec{H}}_{{\varvec{y}}_u}(t) &{} \forall t \in (0, T), \\ {\mathcal {M}} \dfrac{d {\varvec{y}}_{\gamma _f}(t)}{d t} + {\mathcal {T}}_{{\varvec{y}}_{\gamma _f}}({ \varvec{y_z}(t), {\varvec{y}}_{\gamma _f}(t)}) = { {\varvec{0}}} &{} \forall t \in (0, T), \\ \rho _s {\mathcal {M}} \dfrac{d^2 {\varvec{y}}_{\varvec{d_s}}(t)}{d t^2} + {\mathcal {T}}_{{\varvec{y}}_{\varvec{d_s}}} ({ {\varvec{y}}_{\gamma _f}(t), {\varvec{y}}_{\varvec{d_s}}(t)}) = { {\varvec{0}}} &{} \forall t \in (0, T), \\ \varvec{y_z}(0) = \varvec{y_{z,0}}, \\ {\varvec{y}}_u(0) = {\varvec{y}}_{u,0}, \\ {\varvec{y}}_{\gamma _f}(0) = {\varvec{y}}_{\gamma _f, 0}, \\ {\varvec{y}}_{\varvec{d_s}}(0) = {\varvec{y}}_{\varvec{d_s, 0}}, \\ \dot{{\varvec{y}}}_{\varvec{d_s}}(0) = {\varvec{0}}, \end{array}\right. }\nonumber \\ \end{aligned}$$
(36)

where \({\mathcal {T}}\) and \({\varvec{H}}\) terms represent the core models. The time discretization performed with the BDF scheme of general order \(\sigma \) [62] reads as follows:

$$\begin{aligned} \begin{aligned}&\dfrac{d \varvec{y_z}(t^{n+1})}{d t} \approx \dfrac{1}{\varDelta t} \left( \theta _0^I {\varvec{y}}_{{\varvec{z}}}^{n+1} - {\varvec{y}}_{{\varvec{z}}}^I \right) , \quad {\varvec{y}}_{{\varvec{z}}}^I = \sum _{k=1}^{\sigma } \theta _k^I \varvec{y_z}^{n-k+1}, \\&\quad \dfrac{d {\varvec{y}}_{u}(t^{n+1})}{d t} \approx \dfrac{1}{\varDelta t} \left( \theta _0^I {\varvec{y}}_{u}^{n+1} - {\varvec{y}}_{u}^I \right) , \quad {\varvec{y}}_{u}^I = \sum _{k=1}^{\sigma } \theta _k^I {\varvec{y}}_{u}^{n-k+1}, \\&\quad \dfrac{d {\varvec{y}}_{\gamma _f}(t^{n+1})}{d t} \approx \dfrac{1}{\varDelta t} \left( \theta _0^I {\varvec{y}}_{\gamma _f}^{n+1} - {\varvec{y}}_{\gamma _f}^I \right) , \quad {\varvec{y}}_{\gamma _f}^I = \sum _{k=1}^{\sigma } \theta _k^I {\varvec{y}}_{\gamma _f}^{n-k+1}, \\&\quad \dfrac{d^2 {\varvec{y}}_{\varvec{d_s}}(t^{n+1})}{d t^2} \approx \dfrac{1}{(\varDelta t)^2} \left( \theta _0^{II} {\varvec{y}}_{\varvec{d_s}}^{n+1} - {\varvec{y}}_{\varvec{d_s}}^{II} \right) , \quad {\varvec{y}}_{\varvec{d_s}}^{II} = \sum _{k=1}^{\sigma + 1} \theta _k^{II} {\varvec{y}}_{\varvec{d_s}}^{n-k+1}, \end{aligned} \end{aligned}$$
(37)

where \(\varDelta t = \dfrac{T}{N_T}\) is the timestep, \(N_T\) is the total number of timesteps, and \(\theta _k^I\), \(\theta _k^{II}\), \(k = 0, \ldots , \sigma / \sigma + 1\) depend on the order of the BDF scheme. We use \(\sigma = 1\).

4.2.3 Segregated scheme

Implicit monolithic strategies are stable and lead to accurate results, as shown in [33]. However there are two types of drawbacks connected with this approach. One is we are forced to use the same timestep for both electrical and mechanical parts even if the timescale of electrophysiological phenomena is much smaller than the one of the myocardial activation/mechanics. Moreover, the calculation of the Jacobian matrix \({\mathcal {J}}_{EM}\) is quite demanding and this matrix requires a significant amount of RAM. In order to overcome these issues, we propose a segregated strategy based on the Godunov splitting scheme [35]. This approach permits to advance in time faster and consuming less memory, at the expense of introducing first order error on the solution [32, 34]. This splitting error, along with the first order accuracy of the BDF scheme with \(\sigma = 1\), degrades the overall convergence of the numerical solution in time by another term of order one. Due to the fact that the time integration scheme does not guarantee unconditional stability in general [62], we have to impose a limitation on the timestep size \(\varDelta t\). For both electrophysiology and activation we employ, as done in [32], a semi-implicit scheme. Mechanics is instead numerically discretized in time implicitly, due to the fact that the highly non-linear (exponential) terms of the strain energy function \({\mathcal {W}}\) would need a restrictive \(\varDelta t\) in both the semi-implicit and explicit contexts. We refer from now on to \(({\mathcal {I}}_{{\mathcal {S}}{\mathcal {I}}})-({\mathcal {E}}_{{\mathcal {S}}{\mathcal {I}}})-({\mathcal {A}}_{{\mathcal {S}}{\mathcal {I}}})\) for the fully-segregated-semi-implicit scheme applied to the ionic, monodomain and activation models, and to \({\mathcal {M}}_{\mathcal {I}}\) for the implicit scheme applied to the mechanical core. We employ a staggered approach in which two different timesteps are used for \(({\mathcal {I}}_{{\mathcal {S}}{\mathcal {I}}})-({\mathcal {E}}_{{\mathcal {S}}{\mathcal {I}}})\) and \(({\mathcal {A}}_{{\mathcal {S}}{\mathcal {I}}})-({\mathcal {M}}_{\mathcal {I}})\). We indicate \(\varDelta t\) as the timestep for both activation and mechanics. \(\tau = \frac{\varDelta t}{N_{sub}}\) is the timestep for electrophysiology (ionic and monodomain models), with \(N_{sub} \in {\mathbb {N}}\) number of intermediate substeps that must be done by \(({\mathcal {I}}_{{\mathcal {S}}{\mathcal {I}}})-({\mathcal {E}}_{{\mathcal {S}}{\mathcal {I}}})\) before a timestep \(\varDelta t\) of \(({\mathcal {A}}_{{\mathcal {S}}{\mathcal {I}}})-({\mathcal {M}}_{\mathcal {I}})\) is performed. The time advancement that has been just described is sketched in Fig. 8.

Fig. 8
figure 8

Time advancement for \(({\mathcal {I}}_{{\mathcal {S}}{\mathcal {I}}})-({\mathcal {E}}_{{\mathcal {S}}{\mathcal {I}}})-({\mathcal {A}}_{{\mathcal {S}}{\mathcal {I}}})-({\mathcal {M}}_{\mathcal {I}})\) scheme

We set \(t^{n + \frac{m}{N_{sub}}} = t^n + m \tau \) for \(m = 1, \ldots , N_{sub}\).

Problem \(({\mathcal {I}}_{{\mathcal {S}}{\mathcal {I}}})-({\mathcal {E}}_{{\mathcal {S}}{\mathcal {I}}})\) from \(t^n\) to \(t^{n+1}\) reads:

  • Find \(\bar{{\varvec{z}}}^{n + \frac{m}{N_{sub}}}_{h_1}\) defined on \({\mathcal {T}}_{h_1}\) by solving:

    $$\begin{aligned} \dfrac{\theta _0^I}{\tau } \bar{{\varvec{z}}}^{n + \frac{m}{N_{sub}}}_{h_1} = \dfrac{1}{\tau } \bar{{\varvec{z}}}^I_{h_1} + {\varvec{F}}(\bar{{\varvec{u}}}^*_{h_1}, \bar{{\varvec{z}}}^*_{h_1}). \end{aligned}$$
    (38)
  • Interpolate \(\bar{{\varvec{d}}}_{{\varvec{s}}, h_2}^*\) on the fine mesh \({\mathcal {T}}_{h_1}\) only one time, at \(t = t^n\). Use \(\bar{{\varvec{z}}}^{n + \frac{m}{N_{sub}}}_{h_1}\) from (38) and \(\bar{{\varvec{d}}}_{{\varvec{s}}, h_1}^*\) to find \(\bar{{\varvec{u}}}^{n + \frac{m}{N_{sub}}}_{h_1}\) defined on \({\mathcal {T}}_{h_1}\) by solving:

    $$\begin{aligned} \begin{aligned}&\left( \dfrac{\theta _0^I}{\tau } {\mathcal {M}} + {\mathcal {K}}(\varvec{\bar{d}}^*_{{\varvec{s}}, h_1}) + { {\varvec{I}}_{ion}^u}(\bar{{\varvec{u}}}^*_{h_1}, \bar{{\varvec{z}}}^{n + \frac{m}{N_{sub}}}_{h_1}) \right) \bar{{\varvec{u}}}^{n + \frac{m}{N_{sub}}}_{h_1} = \dfrac{1}{\tau } {\mathcal {M}} \bar{{\varvec{u}}}^I_{h_1} \\&\quad +{\tilde{{\varvec{I}}}_{ion}}(\bar{{\varvec{u}}}^*_{h_1}, \bar{{\varvec{z}}}^{n + \frac{m}{N_{sub}}}_{h_1}) - { {\varvec{I}}^{{\varvec{z}}}_{ion}}(\bar{{\varvec{u}}}^*_{h_1}, \bar{{\varvec{z}}}^{n + \frac{m}{N_{sub}}}_{h_1}) \bar{{\varvec{z}}}^{n + \frac{m}{N_{sub}}}_{h_1}\\&\quad + {\mathcal {M}} {\mathcal {I}}^{app}(t^{n + \frac{m}{N_{sub}}}), \end{aligned} \end{aligned}$$
    (39)

for \(m = 1, \ldots , N_{sub}\), where \(\bar{{\varvec{u}}}^I_{h_1}, \bar{{\varvec{z}}}^I_{h_1}\) are evaluated by using the variables on the fine mesh \({\mathcal {T}}_{h_1}\) at times \(t^n, t^n - \tau , \ldots , t^n - (\sigma - 1) \tau \), with \(\sigma = 1\) in our case. After solving (38) and (39) for \(N_{sub}\) steps, treat \(({\mathcal {A}}_{{\mathcal {S}}{\mathcal {I}}})-({\mathcal {M}}_{\mathcal {I}})\) at \(t^{n+1}\) in the following way:

  • Interpolate \(\bar{{\varvec{s}}}^{n + 1}_{h_1}\), gating variable contained in \(\bar{{\varvec{z}}}^{n + 1}_{h_1}\), from (38) on the coarse mesh \({\mathcal {T}}_{h_2}\), and use \(\bar{{\varvec{s}}}^{n + 1}_{h_2}\) to find \(\bar{\varvec{\gamma }}_{{\varvec{f}}, h_2}^{n+1}\) by solving:

    $$\begin{aligned}&\left( \dfrac{\theta _0^I}{\tau } {\mathcal {M}} {+} {\varepsilon } {\mathcal {K}}({ \bar{{\varvec{s}}}^{n {+} 1}_{h_2}}) {+}{\varvec{\varPhi }_{\gamma _f}} (\bar{\varvec{\gamma }}_{{\varvec{f}}{,} h_2}^*{,} \bar{{\varvec{d}}}_{{\varvec{s}}{,} h_2}^*{,} { \bar{{\varvec{s}}}^{n {+} 1}_{h_2}}) \right) \bar{\varvec{\gamma }}_{{\varvec{f}}, h_2}^{n {+} 1} \nonumber \\&{=} \dfrac{1}{\tau } {\mathcal {M}} \bar{\varvec{\gamma }}_{{\varvec{f}}, h_2}^I { {-} \varvec{\varPhi }_{s}}(\bar{\varvec{\gamma }}_{{\varvec{f}}, h_2}^*, \bar{{\varvec{d}}}_{{\varvec{s}}, h_2}^*, { \bar{{\varvec{s}}}^{n + 1}_{h_2}}). \end{aligned}$$
    (40)
  • \(\varvec{\bar{d}}_{{\varvec{s}}, h_2}^{n+1}\) is obtained by solving:

    $$\begin{aligned} \begin{aligned}&\left( \rho _s \dfrac{\theta _0^{II}}{(\varDelta t)^2} {\mathcal {M}} {+} \dfrac{\theta _0^{'}}{\varDelta t} {\mathcal {F}} {+} {\mathcal {G}} \right) \varvec{\bar{d}}_{{\varvec{s}}, h_2}^{n+1} + {\varvec{S}}(\varvec{\bar{d}}_{{\varvec{s}}, h_2}^{n+1}, \varvec{\bar{\gamma }}_{{\varvec{f}}, h_2}^{n+1}) \\&= \rho _s \dfrac{1}{(\varDelta t)^2} { {\mathcal {M}}} \varvec{\bar{d}}_{{\varvec{s}}, h_2}^{II} + \dfrac{1}{\varDelta t} { {\mathcal {F}}} \varvec{\bar{d}}_{{\varvec{s}}, h_2}^{I} + {\varvec{p}}^{endo}(t^{n+1}), \end{aligned} \end{aligned}$$
    (41)

    by means of the Newton method [62]. \(\bar{\varvec{\gamma }}_{{\varvec{f}}, h_2}^I\), \(\varvec{\bar{d}}_{{\varvec{s}}, h_2}^{I}\) and \(\varvec{\bar{d}}_{{\varvec{s}}, h_2}^{II}\) are evaluated by using the variables on the coarse mesh \({\mathcal {T}}_{h_2}\) at previous timesteps.

\(\bar{{\varvec{z}}}^*_{h_1}, \bar{{\varvec{u}}}^*_{h_1}, \varvec{\bar{\gamma }}_{{\varvec{f}}, h_2}^*\), \(\bar{{\varvec{d}}}_{{\varvec{s}}, h_1}^*\) and \(\varvec{\bar{d}}^*_{{\varvec{s}}, h_2}\) are extrapolations of all variables of the model using Newton-Gregory backward polynomials [12].

Fig. 9
figure 9

View from above of the prolate ellipsoidal meshes for electrophysiology (left), activation and mechanics (right)

Fig. 10
figure 10

Cut front view of the prolate ellipsoidal meshes for electrophysiology (left) and activation+mechanics (right)

Table 2 Information about the two meshes of the idealized left ventricle with the corresponding number of elements, number of vertices and average edge length
Table 3 Parameters used in the electromechanical model: transversal and longitudinal conductivities \(\left( \dfrac{\hbox {mm}^2}{\hbox {s}}\right) \); transmurally heterogeneous wall thickening coefficients \(\lambda _{epi}\), \(\lambda _{endo}\), \({\bar{k}}_{epi}\), \({\bar{k}}_{endo}\) and \({\bar{k}}^{'}\); activation model coefficients \(\alpha \)\(\left( \upmu \hbox {M}^{-2}\right) \), \(s_0\), and \({\hat{\mu }}_A\)\(\left( \upmu \hbox {M}^2\,\hbox {s} \right) \) of the four cardiac phases; minimum, maximum, reference sarcomere lengths \(SL_{min}\)\(\left( \upmu \hbox {m} \right) \), \(SL_{max}\)\(\left( \upmu \hbox {m} \right) \), \(l_0\)\(\left( \upmu \hbox {m} \right) \) respectively; coefficients of the truncated Fourier series approximation of the force-length relationship \(d_0\), \(d_1\), \(d_2\), \(d_3\), \(e_1\), \(e_2\), \(e_3\); density \(\rho \)\(\left( \dfrac{\hbox {g}}{\hbox {mm}^3} \right) \); bulk modulus B (Pa); Holzapfel-Ogden parameters a (Pa), b, \(a_f\) (Pa), \(b_f\), \(a_s\) (Pa), \(b_s\), \(a_{fs}\) (Pa), \(b_{fs}\); Robin boundary condition coefficients \(\left( \dfrac{\hbox {kPa}}{\hbox {mm}}, \dfrac{\hbox {kPa s}}{\hbox {mm}}\right) \); relaxation parameters for the two isochoric phases \(C_p^I\) and \(C_p^{II}\)\(\left( \dfrac{\hbox {kPa s}}{\hbox {mm}^3} \right) \); Windkessel model parameters C and R\(\left( \dfrac{\hbox {mm}^3}{\hbox {kPa}}, \dfrac{\hbox {kPa s}}{\hbox {mm}^3} \right) \)

Finally we solve the ordinary differential equations representing the fluid in the left ventricle chamber, again in a segregated fashion. The endocardial volume \(V_h^{endo, n + 1}\) is determined with equation (26) using \(\varvec{\bar{d}}_{{\varvec{s}}, h_2}^{n+1}\). Endocardial pressure \(p_h^{endo, n + 1}\) is computed afterwards by an implicit scheme, using different models for the different phases of the cardiac cycle, as explained in Sect. 4.1.5. For more details we refer the reader to [32].

4.3 Numerical results

In this subsection we present a numerical simulation of a full heartbeat lasting 0.8 s in the electromechanical framework, by considering an idealized left ventricle. We use LifeV [44], an open-source finite element library, for the resolution of the electromechanical problem in a High Performance Computing framework and for the implementation of the numerical method. All the computations were carried out using a full node (32 \(\hbox {Intel}^{\small \textregistered }\)\(\hbox {Xeon}^{\small \textregistered }\) E5-4610 v2 2.3GHz cores) of the HPC centre available at MOX.

Fig. 11
figure 11

Evolution of transmembrane potential \(V = 85.7 u - 84\), \(\gamma _f\) and \(|\varvec{d_s}|\) in the idealized left ventricle over the time. The second and the third views of each picture are warped by the displacement vector

Fig. 12
figure 12

Evolution of transmembrane potential \(V = 85.7 u - 84\), \(\gamma _f\) and \(|\varvec{d_s}|\) in the idealized left ventricle over the time. The second and the third views of each picture are warped by the displacement vector

Fig. 13
figure 13

Ventricular volume and endocardial pressure over time (left) with pV-loop (right), for the idealized left ventricle

In Figs. 9 and 10 we show the meshes that we have used. They have been generated using VMTK - the Vascular Modelling Toolkit [4, 79], and their information is reported in Table 2. With VMTK we can choose a certain diameter \(h_{mean}\) and we can generate fine enough meshes featuring elements with similar aspect ratio. This toolkit is also used for the tagging procedure to determine which elements belong to the base, the endocardium and the epicardium. Different tags are assigned to these three different regions of the computational domain to apply in a proper way boundary conditions. With our methodology we are also able to deal with different grids that are completely independent. We use \({\mathcal {P}}^1\) finite elements in order to approximate monodomain, activation and mechanics equations, so that the unknowns are actually calculated on the vertices of each tetrahedron. The ionic model evolves directly on the vertices of each element. We employ a first order BDF scheme in time [62]. The timestep for electrophysiology is \(\varDelta t=50\)\(\upmu \hbox {s}\), whereas the one for activation and mechanics is \(\varDelta t=250\)\(\upmu \hbox {s}\). We also have to solve several linear systems coming from:

  • Interpolation of the gating variable s from the coarse mesh to the fine mesh;

  • Interpolation of the displacement \(\varvec{d_s}\) from the fine mesh to the coarse mesh;

  • \(({\mathcal {I}}_{{\mathcal {S}}{\mathcal {I}}})\) evolution in time with a small timestep;

  • \(({\mathcal {E}}_{{\mathcal {S}}{\mathcal {I}}})\) evolution in space and time with a small timestep;

  • \(({\mathcal {A}}_{{\mathcal {S}}{\mathcal {I}}})\) evolution in space and time with a larger timestep;

  • \(({\mathcal {M}}_{{\mathcal {I}}})\) evolution in space and time with a larger timestep (inversion of the jacobian matrix at each Newton iteration).

We perform these tasks using the GMRES method with a stopping criterion based on the relative residual and a tolerance given by \(10^{-8}\). We apply a current \(I_{app}\) (term of the monodomain model) for 2 ms in three different points of the myocardium to trigger the electrical signal in the left ventricle. Even if we do not keep into account precisely the propagation of stimuli inside the Purkinje network [66, 87], the electrical activation of the tissue that we propose is known to provide physically acceptable results [32] (Table 3).

In literature there are several rule-based techniques to generate fibers and sheets distribution [7, 24, 69] for both idealized and patient-specific cases. We use the strategy proposed in [33], where fibers rotate transmurally from the epicardium, with \(\alpha _{epi} = -60^{\circ }\) to the endocardium, with \(\alpha _{endo} = +60^{\circ }\). In order to properly take into account the internal stresses of the myocardium at the beginning of the electromechanical simulation, we have to apply the so called prestress to our computational domain. We compute a distribution of stresses such that the reference geometry is in equilibrium with the blood pressure \(p^{endo}\) at the end of the diastolic phase. An additive decomposition of tensor \(\hat{{\varvec{P}}} = {\varvec{P}}(\varvec{d_s}) + \varvec{P_0}\) is operated, where the prestress tensor \(\varvec{P_0}\) is determine to ensure a null displacement \(\varvec{d_{s,0}}\) in correspondance of the initial pressure at the endocardium. For more information about this technique we refer to [32,33,34].

In Figs. 11 and 12 we observe the evolution in space and time of the transmembrane potential V, activation variable \(\gamma _f\) and total displacement magnitude \(|\varvec{d_s}|\) over one entire heartbeat. The conduction velocity is overestimated due to the fact that, even if the electrophysiogical mesh is fine, we should use a smaller value of \(h_{mean}\) to describe properly all the space scales and to have a convergent velocity of the wavefront [8, 33, 67]. The activation is slightly delayed with respect to the propagation of the action potential because it is driven by the calcium concentration (here approximated with the gating variable s), that evolves in time more slowly than the transmembrane potential. The myocardial tissue undergoes a significant thickening, which is in accordance with experimental observations [63]. A high value of the bulk modulus B permits to obtain a significant torsion of the left ventricle and to impose the quasi-incompressibility constraint [33]. With the choice of parameters for the Robin boundary condition at the epicardium in the mechanics problem (17), we are able to properly keep into account the effect of the pericardium [57]: in this way we can reduce the movement of the apex and increase the contraction of the base.

The pV-loop is reported in Fig. 13. Even if a comparison with in-vivo measurements would be meaningless, due to the fact that we are dealing with an idealized framework, we can say that the pV-loop developed over the simulation is in accordance with those observed experimentally [70], at least qualitatively.

Table 4 Comparison of monolithic and segregated-staggered-intergrid schemes in terms of CPU times dedicated to the assembly stages of block matrices corresponding to different physics. Results are referred to time \(t = 0.03\) s of the simulation, during the systolic phase
Fig. 14
figure 14

Comparison between monolithic and segregated-staggered-intergrid approaches for transmembrane potential \(V = 85.7 u - 84\) over the computational domain at a certain timestep (\(t = 0.03\) s). We also provide in the third view the pointwise difference in absolute value between the transmembrane potentials of the two schemes, i.e. \(|V_{monolithic}({\varvec{x}}) - V_{segregated}({\varvec{x}})|\)

Fig. 15
figure 15

Comparison between monolithic and segregated-staggered-intergrid approaches for \(\gamma _f\) over the computational domain at \(t = 0.03\) s

Finally, with reference to [33], we have also performed this simulation in a monolithic fashion, considering only the first isochoric phase, for a total time \(T = 50\) ms. In this case we are forced to use the timestep of electrophysiology (here \(\varDelta t = 50\)\(\upmu \hbox {s}\)) also for both activation and mechanics, due to the fact that action potential and calcium dynamics need a higher resolution in time. For what concerns space discretization, we are again forced to use only the mesh of electrophysiology (here the one of the first row in Table 2), even if we do not need such a high number of elements for the mechanical problem. In Table 4, we report the time needed to perform one single timestep with both monolithic and segregated-staggered-intergrid approaches. We place ourselves in the worst scenario where we consider a timestep for the segregated-staggered-intergrid scheme in which we have to solve both the mechanical problem and interpolate the calcium concentration. This does not occur in all the times of the simulation, as explained in Sect. 4.2.3. We see that the use of two different timesteps and two different meshes (allowed by our intergrid transfer operator), yields a significant gain with respect to the monolithic strategy. Monolithic schemes are indeed poorer in terms of performance with respect to segregated ones. With the approach presented in this paper we observe a 10x speed-up in the final computational time with respect to [33], while guaranteeing a proper and accurate capture of both the time and space scales of this multiphysics problem. Indeed, in Figs. 14 and 15, we observe small differences in the velocity of propagation of the wavefronts. This little discrepancy is due to the splitting error of the segregated scheme, to the small error in space introduced by the interpolation process, and finally to the larger timestep used for activation and mechanics. Same conclusions hold also for the electrophysiology problem, due to the feedback that involves the deformation tensor \({\varvec{F}}\).

5 Conclusions

In this work, we proposed a novel segregated solver, which makes use of an accurate and efficient intergrid transfer operator based on RBF to simulate the electromechanical activity of an idealized left ventricle. We consider a coupling between the monodomain equation and the Bueno-Orovio minimal ionic model for the electric part. Cardiac mechanics is modelled in the active strain formulation using the Holzapfel-Ogden constitutive law and a transmurally variable activation. Electrophysiology and mechanics are linked by means of a phenomenological model that reproduces fibers contraction. Prestress and additional 0D problems for the fluid permit to keep into account the interaction of the myocardium with the blood inside the left ventricle. We solve this multifield coupled problem in the High Performance Computing framework. The use of two different meshes is motivated by the fact that the level of resolution required by the two physics is not the same, going from an element size with the order of 0.1 mm for electrophysiology, to 1 mm for mechanics. This allows to obtain a significant speed-up in the numerical simulation with respect to the case in which we use one single mesh that could be forced to adopt the same resolution of the electrophysiological model. The same considerations lead to the choice of different timesteps and to solve the electromechanical problem in a staggered fashion, which is again faster and less memory-demanding than the monolithic approach.