FEDM

A finite element electric discharge modelling code

Published: Aug 8, 2022 by Liam Pattinson

Project info

licence LGPL3.0

The Finite Element Discharge Modelling code (FEDM) is a collection of functions to assist in the simulation of electric discharges using finite element methods, created by Aleksandar Jovanovic at the Leibniz Institute for Plasma Science and Technology. Utilising the FEniCS finite element library and its Python API Dolfin, FEDM is able to simulate a large number of particle species and the reactions that may occur between them during an electrical discharge. These systems can involve a large number of source terms, some of which may be stiff in nature, and coding these by hand can be very laborious and error-prone. FEDM aims to simplify the development of these models.

FEniCS can be difficult to get running, in part because it has no officially maintained Anaconda distribution; the recommended ways to obtain it are to either perform a system-wide install using Debian’s apt package manager, or to run all FEniCS code within a Docker container. Complicating matters further, FEniCS has recently been updated to version 0.4, which is not backwards compatible with the legacy versions. As the new version is not yet widely used and may be unstable, FEDM is designed to run on the legacy v0.3 Docker container.

Despite the difficulty of working with FEniCS, the steps required to get FEDM to run on a Docker container were well explained in the project README, so it was relatively easy to start work on the library. Our work on the project included an upgrade to allow FEDM to be installed using pip, allowing it to be easily run and tested from anywhere on the system, and preparing the package for a potential future public release. Further updates included improved runtime error checking, some refactoring to avoid repeated code segments, and some changes to simplify the control flow. The provided examples were also modified to create some integrated tests that can be run using pytest.

A future upgrade for FEDM may include a custom Docker image that provides FEDM pre-installed alongside FEniCS, as this would make it easier for others to use the software, and it could be used for automated testing using a CI service such as Github Actions.

As of September 2022, FEDM is not a publicly accessible library, although this may change within the year.

finite element electric discharge

Share