FEniCS install via Docker

I have finally updated my laptop from the arcane Ubuntu 16.04 to 18.04. First thing to configure: fluxbox :heart: of course. Second, xterm and emacs font, size and color. And third, custom FEniCS installation! Very easy this time around, but recording it here for future reference:

# Install curl 
sudo apt install curl

# Download FEniCS project script
curl -s https://get.fenicsproject.org | bash

# fenicsproject script is installed as /foo/.local/bin/fenicsproject
# Add to e.g. .bashrc:
# export PATH=/foo/.local/bin/fenicsproject:$PATH

# Check that you are using the expected version of fenicsproject, by
# examining output of
which fenicsproject

# Ready to go!
fenicsproject run

Paper on cerebrospinal fluid dynamics in syringomyelia cavities published!

Our paper on Fluid dynamics in syringomyelia cavities: Effects of heart rate, CSF velocity, CSF velocity waveform and craniovertebral decompression was published earlier this fall in The Neuroradiology Journal.


How fluid moves during the cardiac cycle within a syrinx (a fluid-filled cyst in the spinal cord) may affect its development. We measured syrinx fluid velocities before and after craniovertebral decompression in a patient and simulated syrinx fluid velocities for different heart rates, syrinx sizes and cerebrospinal fluid (CSF) flow velocities in a model of syringomyelia. With phase-contrast magnetic resonance we measured CSF and syrinx fluid velocities in a Chiari patient before and after craniovertebral decompression. With an idealized two-dimensional model of the subarachnoid space (SAS), cord and syrinx, we simulated fluid movement in the SAS and syrinx with the Navier-Stokes equations for different heart rates, inlet velocities and syrinx diameters. In the patient, fluid oscillated in the syrinx at 200 to 210 cycles per minute before and after craniovertebral decompression. Velocities peaked at 3.6 and 2.0 cm per second respectively in the SAS and the syrinx before surgery and at 2.7 and 1.5 cm per second after surgery. In the model, syrinx velocity varied between 0.91 and 12.70 cm per second. Increasing CSF inlet velocities from 1.56 to 4.69 cm per second increased peak syrinx fluid velocities in the syrinx by 151% to 299% for the three cycle rates. Increasing cycle rates from 60 to 120 cpm increased peak syrinx velocities by 160% to 312% for the three inlet velocities. Peak velocities changed inconsistently with syrinx size. In conclusion, CSF velocity, heart rate and syrinx diameter affect syrinx fluid velocities, but not the frequency of syrinx fluid oscillation. Craniovertebral decompression decreases both CSF and syrinx fluid velocities.

New preprint on mixed finite elements for multiple-network poroelasticity available!

Our new paper on A mixed finite element method for nearly incompressible multiple-network poroelasticity is now available on arXiv!

In this paper, we present and analyze a new mixed finite element formulation of a general family of quasi-static multiple-network poroelasticity (MPET) equations. The MPET equations describe flow and deformation in an elastic porous medium that is permeated by multiple fluid networks of differing characteristics. As such, the MPET equations represent a generalization of Biot’s equations, and numerical discretizations of the MPET equations face similar challenges. Here, we focus on the nearly incompressible case for which standard mixed finite element discretizations of the MPET equations perform poorly. Instead, we propose a new mixed finite element formulation based on introducing an additional total pressure variable. By presenting energy estimates for the continuous solutions and a priori error estimates for a family of compatible semi-discretizations, we show that this formulation is robust in the limits of incompressibility, vanishing storage coefficients, and vanishing transfer between networks. These theoretical results are corroborated by numerical experiments. Our primary interest in the MPET equations stems from the use of these equations in modelling interactions between biological fluids and tissues in physiological settings. So, we additionally present physiologically realistic numerical results for blood and tissue fluid flow interactions in the human brain.

Waterscales Cécile Daversin-Catty wins Best presentation award at FEniCS’18

oxfordCongratulations to Cécile Daversin-Catty for winning the Best postdoctoral presentation award at the FEniCS’18 conference at the University of Oxford from March 21-23 2018! Cécile, postdoctoral fellow with the Waterscales project, presented her exciting and versatile work on mixed-dimensional coupled finite elements in FEniCS.

Overall, the Waterscales and Waterscape projects were well represented in the FEniCS’18 program with additional talks from Waterscape post doc Travis Thompson (on Stokes-Biot stable H(div)-based mixed finite element methods for generalized poroelasticity), from SUURPh PhD candidate Eleonora Piersanti (on Parameter-robust discretization and preconditioning of the multiple-network poroelasticity equations), and a poster presentation from Waterscales PhD candidate Ada Ellingsrud (on Numerical modelling of the role of glial cells in cerebral interstitial fluid movement). Well done Waterscapers!


New preprint on multilevel Monte Carlo with non-nested meshes available!

Our new paper on Efficient white noise sampling and coupling for multilevel Monte Carlo with non-nested meshes is now available on arXiv!


When solving stochastic partial differential equations (SPDEs) driven by additive spatial white noise, the efficient sampling of white noise realizations can be challenging. In this paper, we present a new sampling technique that can be used to efficiently compute white noise samples in a finite element method and multilevel Monte Carlo (MLMC) setting. The key idea is to exploit the finite element matrix assembly procedure and factorize each local mass matrix independently, hence avoiding the factorization of a large matrix. Moreover, in a MLMC framework, the white noise samples must be coupled between subsequent levels. We show how our technique can be used to enforce this coupling even in the case of non-nested mesh hierarchies. We demonstrate the efficacy of our method with numerical experiments. We observe optimal convergence rates for the finite element solution of the elliptic SPDEs of interest in 2D and 3D and we show convergence of the sampled field covariances. In a MLMC setting, a good coupling is enforced and the telescoping sum is respected.

Hjernens vannveier in Bergen

This week I’ve been in Odense for a PhD defense (Congratulations to Dr. Christian Valdemar Hansen!), while today I am giving at a talk at Nansensenteret i Bergen for a meeting organized by Norges Tekniske Vitenskapsakademi and Tekna. I will talk about the brain’s waterscape/Hjernens vannveier, of course. This presentation targets a semi-academic, semi-technical audience and the slides are publicly available.