1 Introduction

Dendritic spines were first observed by García-López et al. (2007). They are small protrusions on dendritic shafts and the locus of most excitatory synapses. Typically, dendritic spines have a thin neck and larger head which is the site of synaptic connections. However, there is no stereotypical geometry as the shapes vary greatly from one spine to another (Bourne and Harris 2008) in addition to evolving during learning and development (Yuste and Bonhoeffer 2001; Holtmaat and Svoboda 2009). Dendritic spines can be classified into the following categories: filopode, stubby and mushroom while spines with two branching heads have also been observed (Sorra et al. 1998). Several hypotheses have been put forward with respect to the function(s) of the peculiar geometries of spines. First, the presence of protrusions increases the surface area of the dendritic tree which may allow a greater number of synapses to be formed. The thin neck has also been hypothesized to play a role in electrical and/or chemical compartmentalization of synapses (Yuste 2013). The concept of electrical compartmentalization relates to the fact that a synaptic event can trigger a much larger increase of membrane potential in the spine head than in the neighbouring dendritic shaft thus creating a very depolarized ’compartment’. Meanwhile, the concept of chemical compartmentalization relates to the fact that the chemical products of calcium influx will remain mostly confined to the spine head with little spillover to the dendritic shaft or adjacent spines. Both forms of compartmentalization are believed to play an important role in synaptic potentiation.

Computational modelling has long been used to investigate the propagation of electrical signals and the increase in calcium concentration subsequent to a synaptic event. One of the simplest modelling approach used to describe electrical propagation in dendrites is the cable theory formalism while changes in ionic and proteins concentrations are often described with a diffusion formalism (Mori 2009). However, there is a close loop between the electrical potential which is determined by the distribution of ionic concentrations and the movement of ions itself determined by the gradient of the electrical field. While most modelling formalisms fail to describe this loop accurately, this issue can be tackled by solving the Poisson–Nernst–Planck (PNP) equations. This formalism properly accounts for the coupled nature of electric field and ionic fluxes in addition of being able to describe to extent of the electric field beyond the membrane and within the intracellular space (Lopreore et al. 2008; Dione et al. 2016). The importance of using PNP equations is well exposed in Holcman and Yuste (2015) while omitting to do so might lead to unphysiological situations such as the intracellular medium moving too far from electroneutrality. In the present manuscript, we use this system of partial differential equations to adequately describe the electric and calcic responses in a dendritic spine subjected to a synaptic event.

The PNP equations consist of the Poisson equation which computes the electric field from the distribution of charges and of the Nernst–Planck equation which describes the fluxes of charged molecules in the presence of an electric gradient. These equations can be solved on three dimensional domains with arbitrarily complex geometries though their resolution can lead to substantial numerical and computational difficulties (Pods et al. 2013). The Finite Elements Method (FEM) has a rich history in the field of industrial mathematics (Babuska and Suri 1994) as a tool to resolve complex PDE systems with accuracy and numerical efficiency. With respect to a more closely related field of application, FEM has been successfully applied to resolve heat dependency of models of heart activity (Belhamadia and Grenier 2019). Here, we use the FEM approach with quadratic elements implemented in the MEF++ software (GIREF 2019) to solve the PNP equations with submicroscopic precision. Importantly, this approach enables us to describe spines with irregular shapes which would be infeasible with a simpler description of the geometry as a series of cylindrical or spherical compartments. The use of quadratic elements guarantees that the numerical error will decrease rapidly as the number of spatial elements increases, thus greatly improving upon simpler approaches with respect to numerical accuracy (Brenner and Scott 2008).

On the one hand, our findings support the hypothesis that spine geometry plays an important role in shaping the calcic response to a synaptic event. Indeed, both the maximal calcium concentration in the spine head and the amount of calcium reaching the dendritic shaft depended heavily on geometric parameters such as the volume of the spine head as well as the radius and length of the spine neck. On the other hand, the impact of geometry on the difference of electric potential between the spine head and the dendritic shaft was comparable to the data reported by previous studies (Yuste 2013). Furthermore, as a result of using the FEM approach, we were able to extend computations to scenarios of spines with irregular geometries and resolve the distribution of the electric field and of calcium concentration in such a case.

Another question of interest is to resolve the submicroscopic distribution of calcium concentration. Based on theoretical work by Holcman and Yuste (2015), the calcium concentration in the spine head could be larger near the membrane and smaller at the center. It is also not clear what will the distribution of calcium concentration look like during a synaptic event before \(\mathrm {Ca}^{2+}\) redistribution reaches an equilibrium. Our model could predict the non trivial distribution of \(\mathrm {Ca}^{2+}\) arising from the interplay between synaptic influx, three dimensional diffusion and extrusion by calcium pumps.

Maybe most importantly, our modelling approach allows to describe spines with arbitrarily complex geometries, beyond the oversimplistic ball and stick representation. The use of FEM also makes no a priori assumption about the electric field within the intracellular space nor on the axial distribution of ionic concentrations. This can be of importance in very thin spine necks.

The paper is structured as follows \(\mathbf{1}.\) We validate our computational approach by comparing results of the FEM model to a simpler multi-compartmental model as well as with results previously obtained by Yuste (2013). \(\mathbf{2}.\) We investigate the relationship between shape parameters and electrical signalling. The impact on electrical signalling in our findings and this impact was consistent with previous predictions (Yuste 2013). \(\mathbf{3}.\) We assess the impact of geometry on calcium dynamics in the spine and neighbouring dendritic shaft. Without surprise, our simulations confirm that the radius of the spine head as well as the radius and length of the spine neck were important determinant of calcium accumulation in the spine. We obtained quantitative relations for these influences which were in agreement with previously published experimental results (Volfovsky et al. 1999). \(\mathbf{4}.\) To illustrate the power of the methodology, we describe electro diffusion in a spine with an irregular geometry (see Fig. 11) and we derive the submicroscopic distribution of calcium concentration across the spine head during a synaptic event (see Fig. 5).

2 The model and numerical methods

Our simulations are performed by solving the PNP equations using the FEM approach. We here describe these equations in details as well as the numerical implementation of the model.

2.1 Geometry

The geometry of real spines is diverse and irregular (Jones and Powell 1969; Hering and Sheng 2001). In the first part of the paper, we however rely on a simplified regular geometry in order to study the dependence of calcium concentration and electric potential on a few stereotypical geometric parameters (spine head volume, spine neck length and spine neck radius) (Fig. 1b). This approach also enables us to validate the model and perform comparisons with previous studies (Yuste 2013; Volfovsky et al. 1999). The spine head is modelled as a sphere, the spine neck and dendrite section as cylinders. The dendrite section on which the spine is attached has a radius of \(0.5\; \upmu {\hbox {m}}\) and a length of \(27\; \upmu {\hbox {m}}\), the diameter of the spine neck is varied from 0.1 to \(0.18\; \upmu {\hbox {m}}\), the radius of the spine head from 0.25 to \(0.5\; \upmu {\hbox {m}}\) and the length of the spine neck from 0.25 to \(1.5\; \upmu {\hbox {m}}\) (Volfovsky et al. 1999).

We used the \(COMSOL\; Multiphysics\) software version 5.2 to construct the geometries and tetrahedral meshes (see Fig. 1c).

Fig. 1
figure 1

Model description: a schematic representation of the elements included in the model; b schematic of geometry and boundary conditions; c tetrahedral mesh of a spine and dentritic shaft

2.2 Mathematical model

The classical Poisson equation infers the electric potential (V) from the electric charge distribution

$$\begin{aligned} -\nabla \cdot (\varepsilon \nabla V) = Q \end{aligned}$$
(1)

where \(\varepsilon \) is the dielectric permittivity of the medium and Q corresponds to the net charge distribution. We write \(\varepsilon =\varepsilon _0\varepsilon _r\) where \(\varepsilon _0\) is the vacuum dielectric permittivity and \(\varepsilon _r\) is the relative dielectric permittivity of the medium. The charge distribution Q is inferred from the distribution of ionic concentrations as

$$\begin{aligned} Q=F\sum _{j=1}^nz_jC_j \end{aligned}$$
(2)

where n is the number of distinct ionic species considered in the model, F is the Faraday constant, \(z_j\) is the valence of the jth ionic specie and \(C_j\) the concentration of the jth ionic specie. The evolution of ionic concentrations is given by the Nernst–Planck equation

$$\begin{aligned} \frac{\partial C_j}{\partial t}=D_j\nabla \cdot \left( \nabla C_j+\frac{z_j F}{RT}C_j\nabla V\right) \end{aligned}$$
(3)

where \(D_j\) is the diffusion coefficient of the jth ionic specie, R is the perfect gas constant and T is the absolute temperature. In physiological neurons, ionic diffusion coefficients can be spatially dependant as crowding by large molecules can slow down diffusion. We however omitted this possibility for the sake of simplicity and because it is not clear a priori what this spatial dependence would look like. Observe that Eqs. (2) and (3) describe a closed interaction loop between ionic concentrations and electrical potential. Equation (2) describes the impact of ionic concentrations on the electric field while Eq. (3) describes the impact of the electric field on ionic fluxes. This interaction loop is absent from simpler formalism. For convenience, Eq. (3) will be written as

$$\begin{aligned} \frac{\partial C_j}{\partial t}=\nabla \cdot F_j \end{aligned}$$
(4)

where \(F_j\) is defined as

$$\begin{aligned} F_j=D_j\left( \nabla C_j+\frac{z_j F}{RT}C_j\nabla V\right) . \end{aligned}$$
(5)

Though many ionic species as well as charged proteins can be a priori considered, we limited ourselves to a minimal set: \(\mathrm {K}^{+}\), \(\mathrm {Na}^{+}\), \(\mathrm {Ca}^{2+}\) and an anion specie \(\mathrm {A}^{-}\). The term \(\mathrm{A}^-\) is a generic term meant to include both anions such as \(\mathrm {Cl}^{-}\) and \(\mathrm {HCO}_3^{-}\) as well as impermeant negatively charged proteins. Calcium buffer and bound calcium will not be described explicitly as discussed below. Parameters related to the PNP equations are given in Table 2.

2.3 Calcium binding

Calcium binds with several calcium binding proteins or calcium buffers. However, since our aim here is not to describe the buffering molecules in details, we modelled \(\mathrm {Ca}^{2+}\) binding by the simple equation:

$$\begin{aligned} \mathrm {Ca}^{2+}+B\,{\mathop {\rightleftharpoons }\limits _{K_{-}}^{K_{+}}}\,\mathrm {CaB}, \end{aligned}$$

where B stands for a generic calcium buffer and \(\mathrm {CaB}\) for bound calcium. The forward and backward rate constants (\(\mathrm {K}_{+}\) and \(\mathrm {K}_{-}\) respectively) are given in Table 1. The rates of change of free calcium concentration, buffer concentration and bound calcium resulting from this reaction are modelled as:

$$\begin{aligned} \frac{\partial [\mathrm {Ca}^{{2+}}]}{\partial t}= & {} K_{-}\,[\mathrm {CaB}]-K_{+}\;[\mathrm {Ca}^{{2+}}]\;[B], \end{aligned}$$
(6)
$$\begin{aligned} \frac{\partial B}{\partial t}= & {} K_{-}[\mathrm {CaB}]-K_{+}\;[\mathrm {Ca}^{{2+}}]\;[B], \end{aligned}$$
(7)
$$\begin{aligned} \frac{\partial [\mathrm {CaB}]}{\partial t}= & {} -K_{-}[\mathrm {CaB}]+K_{+}\;[\mathrm {Ca}^{{2+}}]\;[B]. \end{aligned}$$
(8)
Table 1 Calcium binding parameters

The total buffer concentration is given as \({[\mathrm{B}_\mathrm{T}]}= [B]+\mathrm {[CaB]}\) and the rate of change of this quantity is null:

$$\begin{aligned} \frac{\partial [\mathrm {B}_\mathrm{T}]}{\partial t}=0. \end{aligned}$$
(9)

We can rewrite Eqs. (6) and (8) as:

$$\begin{aligned} \frac{\partial [\mathrm {Ca}^{{2+}}]}{\partial t}= & {} K_{-}\,[\mathrm {CaB}]-K_{+}\,\left( \mathrm {[B_T]-[CaB]}\right) \;[\mathrm {Ca}^{{2+}}], \end{aligned}$$
(10)
$$\begin{aligned} \frac{\partial [\mathrm {CaB}]}{\partial t}= & {} -K_{-}\,[\mathrm {CaB}]+K_{+}\,\left( \mathrm {[B_T]-[CaB]}\right) \;[\mathrm {Ca}^{{2+}}]. \end{aligned}$$
(11)

The rate of change of free calcium concentration is then obtained by adding Eqs. (3) and (10):

$$\begin{aligned} \frac{\partial [\mathrm {Ca}^{{2+}}]}{\partial t}=\nabla \cdot \mathrm {F}_{\mathrm{Ca}}+K_{-}\,[\mathrm {CaB}]-K_{+}\,\left( \mathrm {[B_T]-[CaB]}\right) \;[\mathrm {Ca}^{{2+}}], \end{aligned}$$
(12)

where \(\mathrm {F}_{\mathrm{Ca}}=\mathrm {D}_{\mathrm{Ca}}\left( \nabla [\mathrm {Ca}^{{2+}}]\;\frac{[\mathrm {Ca}^{{2+}}]}{\alpha _{c}}\nabla V\right) \), \(\alpha _{c}=\frac{RT}{Fz_c}\) and \(z_c=2\) is the valence of calcium.

The total calcium concentration is the sum of free and bound calcium concentrations at all times. That is to say \([\mathrm {Ca}^{{2+}}]_T=[\mathrm {Ca}^{{2+}}]+[\mathrm {CaB}]\), and therefore the rate of change of total calcium concentration is obtained by summing Eqs. (12) and (11):

$$\begin{aligned} \frac{\partial [\mathrm {Ca}^{{2+}}]_T}{\partial t}=\frac{\partial [\mathrm {Ca}^{{2+}}]}{\partial t}+\frac{\partial [\mathrm {CaB}]}{\partial t}=\nabla \cdot \mathrm {F}_{\mathrm{Ca}}. \end{aligned}$$
(13)

Given how fast the buffering reaction is compared to the time scale of synaptic events, we assume that the buffering reaction is at equilibrium (Neher and Augustine 1992). Thus, we have from Eq. (10):

$$\begin{aligned} K_{+}\,[\mathrm {B}_\mathrm{T}]\;[\mathrm {Ca}^{{2+}}]= & {} \left( K_{-}+K_{+}\;[\mathrm {Ca}^{{2+}}]\right) \,[\mathrm {CaB}], \end{aligned}$$
(14)
$$\begin{aligned} {[\mathrm {CaB}]}= & {} \frac{K_{+}\,[\mathrm {B}_\mathrm{T}]\;[\mathrm {Ca}^{{2+}}]}{K_{-}+K_{+}\;[\mathrm {Ca}^{{2+}}]}, \end{aligned}$$
(15)
$$\begin{aligned} {[\mathrm {CaB}]}= & {} \frac{{[\mathrm{B}_\mathrm{T}]}\;[\mathrm {Ca}^{{2+}}]}{\mathrm {K}_\mathrm{m}+[\mathrm {Ca}^{{2+}}]}, \end{aligned}$$
(16)

where \(\mathrm {K}_\mathrm{m}=\frac{K_-}{K_+}\). Then upon substituting Eq. (16) into Eq. (13), we have:

$$\begin{aligned}&\frac{\partial }{\partial t}\left[ \mathrm {Ca}^{{2+}}+\frac{[\mathrm {Ca}^{{2+}}]\,{[\mathrm{B}_\mathrm{T}]}}{\mathrm {K}_\mathrm{m}+[\mathrm {Ca}^{{2+}}]}\right] = \nabla \cdot \mathrm {F}_{\mathrm{Ca}},\nonumber \\&\left[ 1+\frac{\mathrm {K}_\mathrm{m}\,[\mathrm{B}_\mathrm{T}]}{\left( \mathrm {K}_\mathrm{m}+[\mathrm {Ca}^{{2+}}]\right) ^2}\right] \frac{\partial [\mathrm {Ca}^{{2+}}]}{\partial t}= \nabla \cdot \mathrm {F}_{\mathrm{Ca}},\nonumber \\&\frac{\partial [\mathrm {Ca}^{{2+}}]}{\partial t}=\left[ 1+\frac{\mathrm {K}_\mathrm{m}\,[\mathrm{B}_\mathrm{T}]}{\left( \mathrm {K}_\mathrm{m}+[\mathrm {Ca}^{{2+}}]\right) ^2}\right] ^{-1} \nabla \cdot \mathrm {F}_{\mathrm{Ca}}. \end{aligned}$$
(17)

This expression suggests the use of an effective diffusion coefficient calcium ion as proposed by Wagner and Keizer (1994), namely

$$\begin{aligned} \mathrm {D}_{\mathrm{Ca}}^{\mathrm{app}}=\left( 1+\frac{\mathrm {K}_\mathrm{m}\,\mathrm{B}_\mathrm{T}}{\left( \mathrm {K}_\mathrm{m}+[\mathrm {Ca}^{2+}]\right) ^2}\right) ^{-1}. \end{aligned}$$

Following their approach, we make the assumption that this effective diffusion coefficient can be well approximated by substituting the actual calcium concentration by a constant value \(\mathrm {C}_\mathrm{s}\). Then, we can write the effective diffusion coefficient for calcium ion as:

$$\begin{aligned} \mathrm {D}_{\mathrm{Ca}}^{\mathrm{app}} =\left( 1+\frac{\mathrm {K}_\mathrm{m}\,\mathrm{B}_\mathrm{T}}{\left( \mathrm {K}_\mathrm{m}+\mathrm{C}_\mathrm{s}\right) ^2}\right) ^{-1}. \end{aligned}$$
(18)

Hence, we compute the rate of change of calcium concentration with:

$$\begin{aligned} \frac{\partial \mathrm {Ca}^{2+}}{\partial t}=\mathrm {D}_{\mathrm{Ca}}^{\mathrm{app}} \nabla \cdot \mathrm {F}_{\mathrm{Ca}}, \end{aligned}$$
(19)

where \(\mathrm {F}_{\mathrm{Ca}}=\mathrm {D}_{\mathrm{Ca}}^{\mathrm{app}}\left( \nabla [\mathrm {Ca}^{{2+}}]\frac{[\mathrm {Ca}^{{2+}}]}{\alpha _{C}}\,\nabla V\right) \).

2.4 Intracellular calcium stores

We describe a release of calcium from stores in the spine head and in the dendrite according to Schiegg et al. (1995)

$$\begin{aligned} \frac{\partial [\mathrm {Ca}^{2+}_{\mathrm{store}}]}{\partial t}=\rho \;X\left( \mathrm {[Ca}^{2+}]_{\mathrm{store}}-[\mathrm{Ca}^{2+}]_{\mathrm{spine}}\right) , \end{aligned}$$
(20)

where \(\mathrm {[Ca}^{2+}]_{\mathrm{store}}\) and \(\mathrm {[Ca}^{2+}]_{\mathrm{spine}}\) are calcium concentrations inside the store and in the spine respectively, \(\rho \) is the store depletion rate which depends on the number of channels and X is the fraction of open channels. The calcium concentration inside stores is modeled as

$$\begin{aligned} \frac{\partial \mathrm {[Ca}^{2+}]_{\mathrm{store}}}{\partial t}=-\rho \;X\left( \mathrm {[Ca}^{2+}]_{\mathrm{store}}\right) \end{aligned}$$
(21)

and the fraction of open channels X is given as

$$\begin{aligned} \frac{\partial \mathrm {X}}{\partial t}=-\frac{1}{\tau _{store}}\;\left( X-(RA)\;Re\left( [\mathrm {Ca}^{2+}]_{\mathrm{spine}}\right) \right) , \end{aligned}$$
(22)

where \(\tau _{\mathrm {store}}\) is the channel closing time constant and \(Re(\mathrm {[Ca}^{2+}]_{\mathrm{spine}})\) expresses the calcium release defined for \([\mathrm {Ca}^{{2+}}]\) greater than \(\mathrm {[Ca}^{2+}]_{\theta }\). The function \(Re(\mathrm {[Ca}^{2+}]_{\mathrm{spine}})\) is given by

$$\begin{aligned}&Re(\mathrm {[Ca}^{2+}]_{\mathrm{spine}})\nonumber \\&\quad =R_0\frac{(\mathrm {[Ca}^{2+}]_{\mathrm{spine}}-[\mathrm{Ca}^{2+}]_{\theta })}{(\mathrm {[Ca}^{2+}]_{\mathrm{max}}-[\mathrm{Ca}^{2+}]_{\theta })} \;\exp \left( -\frac{([\mathrm{Ca}^{2+}]_{\mathrm{spine}} -[\mathrm{Ca}^{2+}]_{\theta })}{(\mathrm {[Ca^{2+}]_{max}-[Ca^{2+}]}_{\theta })}\right) , \end{aligned}$$
(23)

where \({[\mathrm{Ca}^{+2}]_{\mathrm{max}}}\) is the calcium concentration at which the maximum release occurs and \({[\mathrm{Ca}^{+2}]_{\mathrm{max}}}\) is the threshold for calcium release. The release function is an alpha function with a normalizing constant \(\mathrm {R}_0\). In our model, calcium stores are located in the spine head and in the dendritic shaft.

2.5 Limit conditions

2.5.1 Limit conditions for ionic concentrations

At the membrane, except at the synaptic area, the flux of ions is assumed to be null except for \(\mathrm {Ca}^{{2+}}\), we impose a Neumann null condition accordingly. At the synapse, a null flux is also imposed for ionic species other than \(\mathrm {Na}^{+}\) and \(\mathrm {Ca}^{{2+}}\).

At the open ends of the dendritic section (\(\varGamma _g\) in Fig. 1b), we impose Dirichlet conditions equal to the initial values of concentrations. This corresponds to the physical scenario of the ionic concentrations being unperturbed by the synaptic activity of the spine outside the modelled dendritic section.

2.5.2 Calcium and sodium synaptic influx

Instead of modelling individual channels, we describe calcium and sodium conductance through NMDA and AMPA channels as uniformly distributed at synaptic area (Fig. 1a, b). The \(\mathrm {Ca}^{{2+}}\) and \(\mathrm {Na}^{+}\) currents through the AMPA-receptors are modelled by imposing the following Neumann boundary condition

$$\begin{aligned} \frac{\partial C_{k}}{\partial \mathbf {n}}=\frac{\mathrm {g}_{\mathrm {AMPA}}^\mathrm{k}(V-E_k)}{\text{ Sur }\cdot z_k\cdot F}, \end{aligned}$$
(24)

where \(\mathrm {g}_{\mathrm{AMPA}}^\mathrm{k}\) is the AMPA conductance with respect to ionic specie k, (\(\mathrm {Ca}^{2+}\) or \(\mathrm {Na}^+\)), \(\mathbf {n}\) denotes the unit outer normal vector, \(\text{ Sur }\) is the surface area of the synapse and the Nernst potential equation of ion specie k, \(E_{k}\) is given by

$$\begin{aligned} E_k = \frac{R\,T}{z_k\,F}\ln \left( \frac{C_{k,ext}}{C_{k}}\right) , \end{aligned}$$

with \(C_{k,ext}\) being the extracellular concentration of ion k considered fixed in our model. The notation \(\frac{\partial \cdot }{\partial \mathbf {n}}\) stands for the outward normal derivative. The synaptic conductance (\(\mathrm {g}_{\mathrm{AMPA}}^\mathrm{k}\)) is modelled according to the following alpha function

$$\begin{aligned} \mathrm {g}_{\mathrm{AMPA}}^\mathrm{k}=H(t-\mathrm {t}_{\mathrm{AMPA}})\;x_k\; \mathrm {g}_{\mathrm{AMPA}}^{\mathrm{max}}\,\frac{t-\mathrm {t}_{\mathrm{AMPA}}}{\tau _{\mathrm {AMPA}}}\,\exp \left( -\frac{t-\mathrm {t}_{\mathrm{AMPA}} -\tau _{\mathrm {AMPA}}}{\tau _{\mathrm {AMPA}}}\right) ,\nonumber \\ \end{aligned}$$
(25)

where \(\mathrm {g}_{\mathrm{AMPA}}^{\mathrm{max}}\) is the maximal synaptic conductance, \(\tau _{\mathrm {AMPA}}\) is the decay time constant of AMPA synapses and \(\mathrm {t}_{\mathrm{AMPA}}\) stands for the time of initiation of the synaptic event. The function H(t) stands for the heaviside function equal to 1 if \(t\ge 0\) and to 0 otherwise. The value of \(x_k\) corresponds to the fraction of the conductance due to ion k. This fraction with respect to \(\mathrm {Ca}^{{2+}}\) is taken to be \(1.4\%\) while the rest is due to \(\mathrm {Na}^{+}\) influx (Schneggenburger et al. 1993).

Influx of \(\mathrm {Ca}^{{2+}}\) and \(\mathrm {Na}^{+}\) also occur through synaptic NMDA channels. The NMDA current fraction due to \(\mathrm {Ca}^{{2+}}\) is taken as \(10\%\) in our model while the rest of the current is carried by \(\mathrm {Na}^{+}\) (Jahr and Stevens 1993). The NMDA currents through the synapse are described by the following Neumann conditions

$$\begin{aligned} \frac{\partial [\mathrm {Ca}^{{2+}}]}{\partial \mathbf {n}}=\frac{0.1}{2\cdot F}\,\mathrm {g}_{\mathrm{NMDA}}\left( t\right) \,s\left( V\right) \,\left( V\left( t\right) -\mathrm {E}_{\mathrm{NMDA}}\right) \end{aligned}$$
(26)

and

$$\begin{aligned} \frac{\partial [\mathrm {Na}^{{+}}]}{\partial \mathbf {n}}=\frac{0.9}{F}\,\mathrm {g}_{\mathrm{NMDA}}\left( t\right) \,s\left( V\right) \,\left( V\left( t\right) -\mathrm {E}_{\mathrm{NMDA}}\right) \end{aligned}$$
(27)

where \(E_{\mathrm {NMDA}}=0\;mV\) is the reversal potential \(\mathrm {NMDA}\) channels and \(s\left( V\right) \) describes the blocking of \(\mathrm {NMDA}\) receptors channel by a positively charged magnesium ion and thus its dependence on the postsynaptic voltage. This blockage is removed if the cell is depolarized. The proportion of channels s(V) that are not blocked by magnesium ion is modelled as

$$\begin{aligned} s\left( V\right) =\frac{1}{1+\frac{1}{b}\left[ \mathrm {M}_\mathrm{g}^{2+}\right] _0\exp ^{-a\;V}}, \end{aligned}$$
(28)

where \(a=0.062\;\mathrm { mV^{-1}}\), and \(b=3.57\; \mathrm {mM}\) (Koch 1999). The extracellular magnesium concentration \([\mathrm {M}_\mathrm{g}^{2+}]_0\) is taken as constant and equal to \(1\; \mathrm {mM}\). The synaptic conductance \(g_\mathrm {{NMDA}}\), is described as a sum of two exponentials with time constants \((\tau _{\mathrm {open}})\) for the rising phase and \((\tau _\mathrm {{close}})\) for the decay phase(Koch 1999). Explicitly, we have:

$$\begin{aligned} g_\mathrm {{NMDA}}\left( t\right) =H(t-t_\mathrm {{NMDA}})g_\mathrm {{NMDA}^{max}}\left( \exp ^{\frac{-(t-t_\mathrm {{NMDA}})}{\tau _\mathrm {{close}}}}-\exp ^{\frac{-(t-t_\mathrm {{onset}})}{\tau _\mathrm {{open}}}}\right) \end{aligned}$$
(29)

where \(g_\mathrm {{NMDA}^{max}}\) is the maximal \(\mathrm {NMDA}\) conductance and \(t_\mathrm {{NMDA}}\) is the onset time of the synaptic event.

2.5.3 Calcium extrusion

Calcium is pumped out of the spine by extrusion mechanisms such as the Plasma Membrane Calcium ATPase (PMCA) (Yuste 2010). Two types of calcium pumps are considered in our model, the \(\mathrm {Ca}^{{2+}}\)/\(\mathrm {Na}\) exchanger, and an ATP-dependent \(\mathrm {Ca}^{{2+}}\) pump. We model the calcium pumps as uniformly distributed on the membrane of the dendritic spine (see Fig. 1a, b). The extrusion of \(\mathrm {Ca}^{{2+}}\) from the spine is described as a Michaelis Menten process given by the following Neumann boundary condition (Sala and Hernandez-Cruz 1990)

$$\begin{aligned} \frac{\partial [\mathrm {Ca}^{{2+}}]}{\partial \mathbf {n}}=-V_\mathrm {{max}}\,\frac{[\mathrm {Ca}^{{2+}}]}{[\mathrm {Ca}^{{2+}}]+\mathrm {K}_\mathrm{a}} +J_\mathrm {{Leak}}, \end{aligned}$$
(30)

where \(V_\mathrm {{max}}\) is the maximum speed of transport, \(\mathrm {K}_\mathrm{a}\) is the pump affinity for \(\mathrm {Ca}^{{2+}}\) and \(J_\mathrm {{Leak}}\) is a steady \(\mathrm {Ca}^{{2+}}\) leakage that maintains calcium concentration at rest. The values of these parameters are presented in Table 2. The leakage equation is given by

$$\begin{aligned} J_\mathrm {{Leak}}=V_\mathrm {{max}}\,\frac{[\mathrm {Ca}^{{2+}}]_0}{[\mathrm {Ca}^{{2+}}]_0 +\mathrm {K}_\mathrm{a}}, \end{aligned}$$
(31)

where \([\mathrm {Ca}^{{2+}}]_0\) is the initial calcium concentration.

Table 2 Initial concentrations of ions

2.5.4 Limit conditions for the electric potential

In our model, we avoided an explicit geometrical description of the membrane which can be numerically costly (Lopreore et al. 2008; Dione et al. 2016). To obtain a limit condition for the electric potential at the membrane–intracellular space interface, we made the following two assumptions

  • The extracellular potential is constant at \(0\, \mathrm {mV}\),

  • The gradient of the electric field in the membrane is perpendicular to the membrane–cytosol interface.

Because of the second assumption, the gradient of electric potential within the membrane is given by

$$\begin{aligned} \frac{\varepsilon _w}{\varepsilon _{mem}}\,\frac{\partial V}{\partial \mathbf {n}} \end{aligned}$$

where \(\varepsilon _w\) is the relative dielectric permittivity of water, \(\varepsilon _{mem}\) is the relative dielectric permittivity of the membrane and \(\frac{\partial V}{\partial \mathbf {n}}\) is the normal derivative of the electric potential at the intracellular space–membrane interface.

The first assumption then yields:

$$\begin{aligned} V=-\frac{\varepsilon _w\, d_\mathrm {mem}}{\varepsilon _\mathrm {mem}}\,\frac{\partial V}{\partial \mathbf {n}}, \end{aligned}$$
(32)

where \(d_\mathrm {{mem}}\) is the thickness of the membrane. The values of these parameters are given in Table 2.

At open ends of the dendritic section (\(\varGamma _g\) in Fig. 1b), we specify a time dependant Dirichlet condition for the electric potential. Since electric potential at the end of the modelled dendritic section changes during a synaptic event, we first needed to estimate the time dependant value of this Dirichlet condition. To this end, we performed a coarser simulation with a multi-compartmental model involving a spine head (A), a spine neck (B), a dendrite (constituted by the sections CDE and F) and a soma (G) as shown in Fig. 2. This simulation is implemented using MATLAB version R2015a. Values of membrane potential at the end of the dendrite (taken at the area marked with green color in Fig. 2) are then obtained and used as a time dependent Dirichlet condition in the FEM model (\(\varGamma _g\) in Fig. 1b). A detailed procedure for the implementation of the multi-compartmental model is provided at Appendix 2.

Fig. 2
figure 2

Multi-compartmental model for estimating the boundary condition at the green area to be implemented at the green section of the finite element model in Fig. 1b

2.6 Numerical implementation

2.6.1 Model outline

We solved the following problem:

$$\begin{aligned} \left\{ \begin{array}{l@{\quad }l} \frac{\partial C_{k}}{\partial t}= \nabla F_{k}+b_{k}\mathrm {Ca}^{{2+}}_{\mathrm{store}} &{} \text{ in }\;\varOmega ,\,k=1,\ldots ,4,\\ \nabla \cdot \left( \varepsilon \nabla V\right) =-F\sum _{k=1}^{4}z_{k}\,C_{k} &{} \text{ in }\;\varOmega ,\,k=1,\ldots ,4,\\ C_{k}=C_{k}^{0} &{} \text{ on }\;\varGamma _{g}\;\text{ and }\,k=1,\ldots ,4,\\ V=\mathrm {V}_{\mathrm{d}} &{} \text{ on }\;\varGamma _{g},\\ F_{k}\cdot n=L_k &{} \text{ on }\;\varGamma _{b}\;\text{ and }\,k=1,\ldots ,4,\\ \nabla V\cdot n=P &{} \text{ on }\;\varGamma _{b},\\ F_{k}\cdot n=U_k &{} \text{ on }\;\varGamma _{r}\;\text{ and }\,k=1,\ldots ,4,\\ \nabla V\cdot n=P &{} \text{ on }\;\varGamma _{r}, \end{array} \right. \end{aligned}$$
(33)

where \(F_{k}=D_{k}\left( \nabla C_{k}+\frac{C_{k}}{\alpha _{k}}\,\nabla V\right) \) and \(\mathrm {Ca}^{2+}_{\mathrm{store}}=\rho \;X\left( {[\mathrm{Ca}^{2+}]_{\mathrm{store}}-[\mathrm{Ca}^{2+}]_{\mathrm{spine}}}\right) \). Here, the diffusion coefficient of calcium ion is given by \(D_\mathrm {Ca}^{app}D_\mathrm {Ca}\) and

$$\begin{aligned} P=-\frac{\epsilon _{mem}}{\epsilon _{w}\,d_\mathrm {mem}}V. \end{aligned}$$

The value of \(U_k\) describes the synaptic influx of calcium and sodium ions given by Eqs. (24), (26) and (27) and zero for potassium and the anion. The calcium extrusion at the membrane (that is at the boundary \(\varGamma _b\) in Fig. 1 b) is given as

$$\begin{aligned} L_k=b_k\left( -V_\mathrm {{max}}\frac{[\mathrm {Ca}^{{2+}}]}{[\mathrm {Ca}^{{2+}}] +\mathrm {K}_\mathrm{a}}+J_\mathrm {{Leak}}\right) , \end{aligned}$$

where \(J_\mathrm {{Leak}}\) is taken as given in equation (31). The factor \(b_k=1\) for calcium ion and zero for the other ions.

3 Results

3.1 Validation of the model

In order to validate the FEM implementation of our model, we compared the results of our simulations with the predictions of a simpler multi compartmental model. The multi compartmental model consists of a spherical compartment for the spine head, a cylindrical compartment for the spine neck and a cylindrical compartment for the dendrite. The concentrations of \(\mathrm {Na}^{+}\), \(\mathrm {K}^{+}\) and \(\mathrm {A}^{-}\) were assumed to be constant throughout the simplified simulation. The values of \([\mathrm {Ca}^{{2+}}]\) and of the membrane potential were taken to be time dependant quantities with uniform spatial distribution within each compartment.

We compared the time course of electric potential and of calcium concentration in the spine head and in the spine neck in both models (see Fig. 3). As the multi compartmental model contains coarse approximations, we don’t expect the values of the two models to agree exactly but rather to be close to each other and display the same qualitative tendencies. This is indeed what we observe (see Fig. 3). Observe that the electric depolarization of the spine is small which is explained by the fact that for the set of simulations for the model validation, the membrane potential at the end of the dendritic section was kept constant at \(-65\) mV.

We also compared the predictions of our finite element model with previous modelling results obtained by Yuste. As seen in Fig. 3e, the ratio of membrane depolarization in the spine versus the dendrite obtained in the finite element model follows closely the prediction of the passive electrical model in the paper of Yuste (2013).

Fig. 3
figure 3

ad A comparison between the finite element method and the multi compartmental model using a spine of head radius \(0.5\,\upmu \mathrm {m}\), neck radius of \(0.07 \,\upmu \mathrm {m}\), neck length of \(0.5\,\upmu \mathrm {m}\), and no dendrite. Current is injected in the spine head: a Time course of calcium concentration at the spine head; b time course of electric potential at the spine head; c time course of calcium concentration at the spine neck; and, d time course of electric potential at the spine neck. e Comparison of the spine head-dendrite depolarization ratio between the finite element and the electrical model of Rafael Yuste

Fig. 4
figure 4

The impact of spine head radius (rad) on calcium dynamics. Time course of calcium concentration at the spine head (a) and the dendrite (b) for various values of the spine head radius

3.2 Impact of geometry on calcium signalling

A hypothesis regarding the purpose of the peculiar spine geometry is that it plays a role in the chemical compartmentalization of the synapse (Yuste and Denk 1995). In other words, it is believed that the occurrence of a thin and long neck prevents most of the chemical products of \(\mathrm {Ca}^{{2+}}\) influx such as CAMKII to reach other synapses on different spines attached to the same dendrite. The present model doesn’t allow to fully investigate this hypothesis since it doesn’t explicitly describe the products of calcium reactions. We could nevertheless study how spine geometry affects the time course of calcium concentration in the spine head, neck, as well as in the adjacent dendritic shaft. To this end, we investigated the impact of several geometric parameters (radius of the spine head, radius of the spine neck and length of the spine neck) on different components of calcic signalling, maximal \(\mathrm {Ca}^{{2+}}\) concentration, time to reach peak concentration and maximal \(\mathrm {Ca}^{{2+}}\) concentration in the dendritic shaft. (See Figs. 4, 5, 6). Data is taken at spatial points in the spine head and in the dendrite that are indicated in Fig. 1b as x1 and x2 respectively. Remark that we chose to display the total calcium concentration, that is the sum of bounded, free calcium concentrations and the calcium concentration in calcium stores which leads to larger absolute values. We could also compare our model predictions with previously published work of Volfovsky et al. (1999). In their experimental results, they obtained larger response and shorter latency of calcium surge in the spine head than in the adjacent dendritic shaft. They also observed that the rise of calcium concentration in the dendritic shaft is slower when the neck of the spine is longer that of shorter spine neck. The predictions of our model are in qualitative agreement with Volfovsky et al. (1999). It is to be noted that since calcium concentration is typically experimentally measured through the fluorescence of dyes with characteristic times in the tens or hundreds of milliseconds, it seems difficult to quantitatively and accurately and quantitatively compare our simulation results with experimental data.

The length and radius of spine neck had important impacts on the calcium concentration in the dendrite after a synaptic event (Figs. 5, 6). As expected, a longer and thinner spine neck led to a smaller calcium concentration in the dendritic shaft. This validates the hypothesis that spine geometry plays a role in chemical compartmentalization by preventing \(\mathrm {Ca}^{{2+}}\) to reach other synapses. On the other hand, a spine head with larger radius (thus larger volume) leads both to a slower calcium time course and a lower maximal calcium concentration in the spine head. The geometry of the spine head had little impact on calcium dynamics in the dendrites. We also monitored the \(\mathrm {Ca}^{{2+}}\) concentration along the dendritic shaft. As expected, concentration is larger near the spine and decreases with distance from the spine in an exponential manner (Fig. 7c).

Fig. 5
figure 5

The effect of spine neck length (len) on calcium dynamics. Time course of calcium concentration at the spine head (a) and the dendrite (b)

Fig. 6
figure 6

The effect of spine neck radius on calcium dynamics. Time course of calcium concentration at the spine head (a) and the dendrite (b)

A related topic of functional importance is to understand the distribution of calcium concentration at a finer submicroscopic scale which may help to explain how calcium binds to membrane or vesicular molecules. Holcman and Yuste (2015) investigated the nanoscale distribution of concentration in a spherical compartment under the assumptions that a single ionic specie is involved and that the system is at steady-state. They predicted a higher concentration near the membrane than in the center of the compartment. Furthermore, the differences in concentration between the center and membrane were predicted to be important. Our modelling approach allowed to investigate this question without having to rely on simplifying assumptions. In our simulations, we however observed no such effect. This may be explained by the fact that, due to the presence of both anions and cations, the electric gradient extends only a few nanometers beyond the membrane as predicted by theoretical analysis of the Debye layer (Robinson and Stokes 2002). In our simulations, we however observed in Fig. 7a, b, a higher calcium concentration in the center of the spine head before calcium reached its peak of concentration. On the other hand, 50 ms or 100 ms after the onset of the synaptic event, the calcium concentration was almost uniform in a cross section of the spine head albeit very slightly larger in the vicinity of the membrane.

Fig. 7
figure 7

The spatial dynamics of calcium ion in a spine of head radius \({0.5\,\upmu {\hbox {m}}}\), neck radius of \({0.7\,\upmu {\hbox {m}}}\), neck length of \({0.5\,\upmu {\hbox {m}}}\), dendrite radius of \({0.5\,\upmu {\hbox {m}}}\) and dendrite length of \({27\,\upmu {\hbox {m}}}\). a The spatial distribution of calcium concentration at three different time points (2 ms, 5 ms and 10 ms) taken in a cross section of model as illustrated in the right panel. b The distribution of calcium concentration taken along the red line at the spine head as shown in d at four different time points (2 ms, 5 ms, 50 ms and 100 ms), c the distribution of calcium concentration taken along the blue line at the dendrite as shown in d at a time equal to 50 ms

3.3 Impact of geometry on electric signalling

The occurrence of a long and thin spine neck can give rise to an important electrical resistance which in turn, during a synaptic current, will cause a difference between the electric potential of the spine head and of the dendritic shaft. This was investigated for example in Yuste (2013) who derived a relation between the neck resistance and this difference in electric potential.

The electrical resistance of the dendritic shaft can be approximated according to the following equation

$$\begin{aligned} R=\frac{\mathrm {Res}\cdot L}{\pi \cdot r^2} \end{aligned}$$
(34)

where R is the electric resistance of the spine neck, \(\mathrm {Res}\) is the cytoplasmic resistivity, L is the length of the spine neck and r is the radius of the spine neck. The difference in electric potential between the spine head and the dendrite can then be approximated by

$$\begin{aligned} V_{\mathrm {head}}-V_{\mathrm {dend}}\approx I/R \end{aligned}$$
(35)

where I is the synaptic current and R is the neck resistance given in (34). In our electrodifusion model, the cytosol resistivity is not explicitly defined. We can however estimate it with the following equation

$$\begin{aligned} \mathrm {Res}=\left( \sum _k z_k^2 D_k C_k\right) ^{-1}. \end{aligned}$$
(36)

From Eqs. (3436), it is expected that longer and thinner neck should lead to a larger difference between the electric potential of the spine head and the dendritic shaft. This is indeed what is observed in our numerical simulations (see Figs. 9 and 8 respectively). The ratio of the depolarization magnitudes measured in the spine head and in the dendrite is comparable to the values predicted in Fig. 3e (Yuste 2013).

For the sake of completeness, we also investigated the possible impact of the radius of the spine head on the electrical response. We found that the radius of the spine head had a lesser impact on the difference in electrical potential between the spine head and dendritic shaft (see Fig. 10). However, it impacted the extent of the depolarization of the spine head by modulating its electrical capacitance (see Fig. 10).

Fig. 8
figure 8

Electric potential as a function of time in the spine head and dendrite for various values of spine neck radius (rad). Time course of electric potential in the spine head (a) and the dendrite (b)

Fig. 9
figure 9

Electric potential as a function of time in the spine head and dendrite for various values of neck length (len). Time course of electric potential at the spine head (a) and the dendrite (b)

Fig. 10
figure 10

Electric potential as a function of time in the spine head and dendrite for different values of the spine head radius (rad). Time course of electric potential in the spine head (a) and the dendrite (b)

3.4 Modelling electro diffusion in a dendritic spine with an irregular geometry

Thus far, we relied on ball and stick geometries in order to compare our results with those obtained through simpler formalism and to estimate the impact of stereotypical parameters. However, one of the main advantages of the FEM methodology is to be able to solve the PNP system of equations on arbitrarily complex geometries which can be useful as real spine morphology is diverse and can actually differ a great lot from the caricature ball and stick representation (Bourne and Harris 2008). For example, the radius of the spine neck can be non uniform with small bottlenecks hindering electric and chemical propagation. The head may also not be spherical with all sorts of ellipsoids or more irregular shapes occurring. A striking example of irregular spines are spines with a branching head (Bourne and Harris 2008). The functional relevance of these irregularities is unclear as is the question of whether they result from random variation or serve a functional purpose. A bottleneck in the spine neck could for example play a critical role in determining the neck resistance. Though thorough investigation of the functional impact of such irregularities is beyond the present work, we show the power of our modelling approach by simulating electric and calcic responses to a synaptic event in a spine of which neck exhibits a bottleneck geometry in Fig. 11. Let us remark that such simulations can be very numerically costly. Our implementation with quadratic elements however increases the precision while reducing the computational cost (Dione et al. 2016). Such a simulation would be plainly impossible with a simpler multi compartmental approach.

Fig. 11
figure 11

Calcium and electrical potential dynamics in a dendritic spine of irregular shape: a data for the graphs was taken at a point on the spine head (spotted in blue) and at a point on the dendrite (spotted in red); b (blue line) Calcium concentration as a function of time in the spine head and (red line) in the dendrite. c Electric potential as a function of time in the spine head (blue line) and in the dendrite (red line). d Distribution of calcium concentration at five different time points (10 ms, 25 ms, 50 ms, 200 ms and 600 ms) taken along the red line from the dendrite to the spine head as shown in the figure in the bottom right

4 Discussion

Mathematical modelling of dendritic spines is essential to better understand the role of spine geometry with respect to electrical and chemical signalling in both healthy and pathological conditions. While several mathematical models of individual spines or of dendritic branches with several spines have been constructed, most rely on simplifying assumptions such as neglecting the electrical gradient within the intracellular space or the use of a simplified ball and stick type geometry. Solving the PNP equations on three dimensional domains allow to circumvent these limitations.

The predictions of our model qualitatively agree with simpler formalisms with respect to the magnitude of the electric signal and increase in calcium concentration. Our simulation results are also in agreement with previously published results (Volfovsky et al. 1999; Yuste 2013). Moreover, our modelling approach allows to resolve the spatial distribution of calcium and of the electric field at a finer spatial scale. We found in particular that the distribution of \([\mathrm {Ca}^{{2+}}]\) don’t follow predictions based on investigation of closed spherical compartments containing a single ionic specie (Holcman and Yuste 2015).

Several improvements and extensions to the model here presented could be performed in the future. For one, the influx of \([\mathrm {Ca}^{{2+}}]\) in spines triggers a cascade of chemical reactions the end result of which being synaptic potentiation. The natural next step in our investigation would be to add the cascade of chemical reactions triggered by calcium influx. Another important aspect of calcic and chemical signalling is its stochastic nature. This stochasticity is due to several sources: For instance, the stochastic opening and closing of the channels or the very small number of calcium ions or proteins involved. While many models take these stochastic aspects into account, it would be interesting to incorporate these into our 3d electrodiffusion model. Another element that we could take into account is the dynamical evolution of the shape of the dendrite. The last two improvements would require an enrichment of the mathematical formalism used in the model.