Replace ns_code1.py with a monolithic Navier–Stokes example (CR–P0) using PETSc field-split Schur preconditioning

Open
#290 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
jupyter-notebook, python
Domain
backend

Research direction

Start by reading the existing ns_code1.py and the corresponding notebook to understand the current Navier–Stokes example and replacement scope. Then review the proposed CR–P0 formulation, Picard iteration, and PETSc field-split Schur setup. Done means the old example is replaced, the notebook is updated, and the Open Cavity benchmark is covered across the stated viscosity range.

Written by the indexing model from the issue text.

Description

Description
This issue proposes replacing the current ns_code1.py example with a monolithic incompressible Navier–Stokes solver implemented using the Crouzeix–Raviart (CR) element for velocity and DG-0 for pressure (CR–P0 pair).
The solver will employ PETSc’s field-split (Schur complement) preconditioning to demonstrate a modern, scalable monolithic formulation for incompressible flow problems in DOLFINx.
This update will align the Navier–Stokes tutorials with current PETSc practices and provide a clearer, physically accurate alternative to the existing projection/splitting scheme.

Objectives

  • Implement a steady-state monolithic Navier–Stokes solver using Picard iteration.
  • Use CR–P0 elements for an inf-sup stable, div-conforming discretization.
  • Apply PETSc field-split Schur preconditioning with the selfp (SIMPLE-type) Schur approximation.
  • Replace ns_code1.py with this new example and corresponding notebook.
  • Benchmark the solver using the Open Cavity case from Huang et al., “A Large-Scale Benchmark for the Incompressible Navier–Stokes Equations” (arXiv:2112.05309).

Benchmark Setup

  • Domain: 2D open cavity (rectangular domain).
  • Inflow: u=(1−e −5t,0) on the left boundary.
  • Outflow: Zero-Neumann (traction-free).
  • Walls: No-slip top and bottom.
  • Viscosity range: ν=0.0005–0.01.
  • Pressure constraint: Mean-zero enforced by pinning one pressure DOF.
Dominant language
Jupyter Notebook
Stars
167
Forks
89
Avg merge
3h 25m
Merged PRs (30d)
2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from jorgensd/dolfinx-tutorial

All issues in jorgensd/dolfinx-tutorial

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.