I have been working from 2012-2016 as an adjunct research scientist at Simula Research Laboratory. Here I had the great honor to be working with the late Prof. Hans Petter Langtangen Valen-Sendstad et al. (2011)Mortensen & Langtangen (2016)Mortensen et al. (2012)Mortensen et al. (2011), at the Center for Biomedical Computing.
I have contributed quite a bit to the FEniCS project, and the incompressible Navier-Stokes solver Oasis has been developed within the FEniCS framework. The solver has been developed for efficiency, with MPI, and it is written entirely in Python. The Oasis solver is documented in the Computer Physics Communications paper Mortensen & Valen-Sendstad (2015), where we show that it may run as fast and accurate as the low-level finite volume C++ solvers OpenFOAM and CDP (Stanford).
The Oasis solver has been used in a range of master theses (see Teaching). For one of my master students, Per Thomas Haga, the thesis led to a journal paper on injecting drugs in the Cerebrospinal fluid (CSF) Haga et al. (2017). The animation on the right shows how an injected drug moves up and down inside the CSF channel. It can also be seen that, due to the very low diffusivity of the scalar drug, we modelled the scalar transport using Lagrangian particle tracking.
I have been working quite a bit together with Kristian Valen-Sendstad at Simula, on different aspects of biomedical flows. Our simulations on intracranial aneurysms Valen-Sendstad et al. (2011), actually reached the headlines of Norway’s larges newspaper VG, when we found a correlation between transition to turbulence and the risk of aneurysm rupture (more famously known as stroke). For this work I performed most of the simulations when still at FFI.
More recently we have been studying transition and mesh sensitivity in the FDA nozzle benchmark. In Bergersen et al. (2019) we use both regular CFD and linear stability analysis to show that care must be taken when designing a CFD benchmark. Transition to turbulence can only come from a seed, or perturbation, and an ideal case like the FDA benchmark should not transtition at all unless some noise is added to the system. Figure is showing an unstable eigenmode in the FDA bechmark, showing that transition should in deed occur at the Reynolds number=3500. Here I have conducted the stability simulations using the dog linear stability analysis software package.

Figure 1:Linear stability analysis of the FDA benchmark. Showing the most unstable eigenmode.
References¶
- Valen-Sendstad, K., Mardal, K.-A., Mortensen, M., Reif, B. A. P., & Langtangen, H. P. (2011). Direct Numerical Simulation of Transitional Flow in a Patient-Specific Intracranial Aneurysm. Journal of Biomechanics, 44(16), 2826–2832. 10.1016/j.jbiomech.2011.08.015
- Mortensen, M., & Langtangen, H. P. (2016). High Performance Python for Direct Numerical Simulations of Turbulent Flows. Computer Physics Communications, 203, 53–65. 10.1016/j.cpc.2016.02.005
- Mortensen, M., Mardal, K.-A., & Langtangen, H. P. (2012). Simulation of Transitional Flows. In A. Logg, K.-A. Mardal, & G. Wells (Eds.), Automated Solution of Differential Equations by the Finite Element Method: The FEniCS Book (pp. 421–440). Springer. 10.1007/978-3-642-23099-8_22
- Mortensen, M., Langtangen, H. P., & Wells, G. N. (2011). A FEniCS-Based Programming Framework for Modeling Turbulent Flow by the Reynolds-Averaged Navier-Stokes Equations. Advances in Water Resources, 34(9), 1082–1101. 10.1016/j.advwatres.2011.02.013
- Mortensen, M., & Valen-Sendstad, K. (2015). Oasis: a High-Level/High-Performance Open Source Navier-Stokes Solver. Computer Physics Communications, 188, 177–188. 10.1016/j.cpc.2014.10.026
- Haga, P. T., Pizzichelli, G., Mortensen, M., Kuchta, M., Pahlavian, S. H., Sinibaldi, E., Martin, B. A., & Mardal, K.-A. (2017). A Numerical Investigation of Intrathecal Isobaric Drug Dispersion Within the Cervical Subarachnoid Space. PLOS ONE, 12(3), 1–21. 10.1371/journal.pone.0173680
- Bergersen, A. W., Mortensen, M., & Valen-Sendstad, K. (2019). The FDA nozzle benchmark: “In theory there is no difference between theory and practice, but in practice there is.” International Journal for Numerical Methods in Biomedical Engineering, 35(1), e3150. 10.1002/cnm.3150