Skip to content

jorgensd/dolfinx_ipcs

Repository files navigation

DOLFINx testing

Author: Jørgen S. Dokken

Repository for a simple BDF2 IPCS solver for the Navier-Stokes equations with an implicit Adam-Bashforth linearization and a Temam device.

Installation

The code in this repository require GMSH, including Python interface, DOLFINx and tqdm.

There are various ways to install these packages.

Docker

You can use the pre-build docker image ghcr.io/jorgensd/dolfinx_ipcs:v0.7.0 from here

Taylor-Green benchmark

To run the 2D Taylor-Green benchmark, run ipcs.py. Use

python3 ipcs.py --help

for command-line options.

The resolution of the mesh can be changed by modifying the lc variable in cfd.geo

To generate the mesh from the geo file, run

python3 create_and_convert_3D_mesh.py

Run

python3 create_and_convert_3D_mesh.py --help

for command-line options.

To solve the problem, run

python3 DFG_benchmark.py --3D

To generate a mesh for the 2D problem, run

python3 create_and_convert_2D_mesh.py --help

for command-line options.

The problem is solved by running

python3 DFG_benchmark.py