Skip to content

Getting started

William Jussiau edited this page Apr 4, 2025 · 27 revisions

Installation 🛠️

conda

The conda environment required to run the code can be extracted from the file environment.yml.

The environment file should look like this:

name: fenics
channels:
  - conda-forge
  - defaults
dependencies:
  - python=3.12.8
  - fenics=2019.1.0
  - meshio=5.3.5
  - scipy=1.14.1
  - pandas=2.2.3
  - control=0.10.1

It is important that python is installed with a version >=3.10 because dataclasses are being used. Also, it is important that the latest version of fenics is used (namely 2019.1.0).

Additional path tweaking with conda develop may be required for fenics (imported as the dolfin module in Python). It is also important to add custom modules of the flowsolver toolbox to the Python path thanks to conda develop.

Docker 🐳

[coming soon]

Run examples

After the conda environment has been set-up correctly, you can test the installation from a Python terminal:

  1. Try importing FEniCS with import dolfin
  2. Run examples from the examples folder: examples/cylinder/cylinderflowsovler.py and examples/cavity/cavityflowsolver.py. The main method of these scripts should launch fast simulations, only for testing purposes.

Clone this wiki locally