FEMfuns: A Volume Conduction Modeling Pipeline that Includes Resistive, Capacitive or Dispersive Tissue and Electrodes

M. Vermaas*, M. C. Piastra, T. F. Oostendorp, N. F. Ramsey, P. H.E. Tiesinga

*Corresponding author for this work

Research output: Contribution to journalArticleAcademicpeer-review

5 Citations (Scopus)


Applications such as brain computer interfaces require recordings of relevant neuronal population activity with high precision, for example, with electrocorticography (ECoG) grids. In order to achieve this, both the placement of the electrode grid on the cortex and the electrode properties, such as the electrode size and material, need to be optimized. For this purpose, it is essential to have a reliable tool that is able to simulate the extracellular potential, i.e., to solve the so-called ECoG forward problem, and to incorporate the properties of the electrodes explicitly in the model. In this study, this need is addressed by introducing the first open-source pipeline, FEMfuns (finite element method for useful neuroscience simulations), that allows neuroscientists to solve the forward problem in a variety of different geometrical domains, including different types of source models and electrode properties, such as resistive and capacitive materials. FEMfuns is based on the finite element method (FEM) implemented in FEniCS and includes the geometry tessellation, several electrode-electrolyte implementations and adaptive refinement options. The Python code of the pipeline is available under the GNU General Public License version 3 at https://github.com/meronvermaas/FEMfuns. We tested our pipeline with several geometries and source configurations such as a dipolar source in a multi-layer sphere model and a five-compartment realistically-shaped head model. Furthermore, we describe the main scripts in the pipeline, illustrating its flexible and versatile use. Provided with a sufficiently fine tessellation, the numerical solution of the forward problem approximates the analytical solution. Furthermore, we show dispersive material and interface effects in line with previous literature. Our results indicate substantial capacitive and dispersive effects due to the electrode-electrolyte interface when using stimulating electrodes. The results demonstrate that the pipeline presented in this paper is an accurate and flexible tool to simulate signals generated on electrode grids by the spatiotemporal electrical activity patterns produced by sources and thereby allows the user to optimize grids for brain computer interfaces including exploration of alternative electrode materials/properties.

Original languageEnglish
Pages (from-to)569-580
Number of pages12
Issue number4
Publication statusPublished - 1 Oct 2020
Externally publishedYes


  • Complete electrode model
  • Computational modeling
  • Dispersive tissue
  • Electrical double layer
  • Finite element method


Dive into the research topics of 'FEMfuns: A Volume Conduction Modeling Pipeline that Includes Resistive, Capacitive or Dispersive Tissue and Electrodes'. Together they form a unique fingerprint.

Cite this