SkillAgentSearch skills...

FlowControl

Python toolbox for simulating and controlling 2D incompressible flows at low Reynolds number

Install / Use

/learn @williamjussiau/FlowControl
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

:cyclone: FlowControl

The FlowControl toolbox is an open-source toolbox addressing the simulation and control of 2D incompressible flows at low Reynolds number. It aims at providing a user-friendly way to simulate flows with actuators and sensors, a possibility to readily define new use-cases and support for operators & frequency responses computations.

This page contains introductory information about the toolbox. For more in-depth content, feel free to consult the Wiki.

<p align="center"> <img src="illustrations/cylinder_stabilization.gif" alt="Animated GIF featuring the stabilization of the flow past a cylinder at Re=100. The self-sustained, periodic oscillations of the flow (known as vortex shedding) gradually disappear as the controller actuates the flow. The feedback controller uses a sensor in the wake and actuates the flow on the poles of the cylinder. More details are given below." width="500"/> </p>

The toolbox is shipped with two benchmarks for flow control and allows for easy implementation of new cases.

<p align="center"> <img src="illustrations/cavity_stabilization.gif" alt="Animated GIF featuring the stabilization of the flow over an open cavity at Re=7500. The self-sustained, quasi-periodic oscillations of the flow gradually disappear as the controller actuates the flow. The feedback controller uses a wall stress sensor on the wall after the cavity, and actuates the flow with a volume force upstream of the cavity. More details are given below." width="500"/> </p>

The core of the toolbox is in Python and relies on FEniCS 2019.1.0 as a backend.

<p align="center"> <img src="illustrations/fenics_banner.png" alt="FEniCS Project banner, featuring a flame meshed with colorful elements and the text fenics project next to it." width="300"/> </p>

Installation 🛠️

conda

The conda environment required to run the code can be extracted from the file environment.yml. The proposed installation pipeline is:

conda env create -n fenics --file environment.yml
conda-develop src

Additional path tweaking is sometines required for FEniCS to be found through the dolfin module (see e.g. this problem with PKG_CONFIG)

Docker :whale:

[coming soon]

What the toolbox offers

Simulation

  • By default, the toolbox integrates in time the Incompressible Navier-Stokes equations. For a 2D flow defined by its velocity ${v}({x}, t) = [v_1({x}, t), v_2({x}, t)]$ and pressure $p({x}, t)$ inside a domain ${x} = [x_1, x_2] \in\Omega$, the equations read as follows:
\left\{
\begin{aligned} 
&  \frac{\partial {v}}{\partial t} + ({v} \cdot \nabla){v} = -\nabla p +  \frac{1}{Re}\nabla^2 {v}    \\
&  \nabla \cdot {v} = 0
\end{aligned}
\right.
  • The only numerical parameter of the non-dimensional equations, the Reynolds number defined as $Re = \frac{UL}{\nu}$, balances convective and viscous terms.

Actuation and sensing

The toolbox allows the user to define actuators and sensors to respectively force and probe the flow. It also provides utility for controller design and implementation.

Two benchmarks

Two classic oscillator flows used for flow control are shipped with the current code. | Use-case | Description | | ------ | ----------- | | Cylinder | Flow past a cylinder at Re=100 | | Cavity | Flow over an open cavity at Re=7500 |

Examples of use of the toolbox

The following articles were based on previous versions of the code:

Code philosophy

The philosophy of the toolbox for enabling the implementation of new use-cases easily, is the following:

  1. Define a new use-case: inherit the FlowSolver abstract class
  2. Attach Sensors and Actuators to an instance of a FlowSolver subclass
  3. Run a simulation using an input signal $u(t)$ that can be open-loop or generated by a Controller for closed-loop

See the toolbox Wiki for more information on how to perform these steps.

Additional uses of the toolbox

The toolbox provides additional utility related to flow control:

Roadmap

The current roadmap is as follows:

  • Complete the documentation :book:,
  • Refactor and release additional control-related tools and eigenproblem tools,
  • Update the project to FEniCSx,
  • Sort and check all utility functions.

Contact

:mailbox: william.jussiau@gmail.com


This README has been optimized for accessibility based on GitHub's blogpost "Tips for Making your GitHub Profile Page Accessible".

Related Skills

View on GitHub
GitHub Stars6
CategoryDevelopment
Updated2mo ago
Forks1

Languages

Python

Security Score

90/100

Audited on Jan 17, 2026

No findings