This project implements a finite element discretization of the stationary incompressible Stokes equations in two spatial dimensions. The formulation is based on the mixed velocity-pressure weak form with Dirichlet and Neumann boundary conditions.
The implementation includes:
- Assembly of the velocity stiffness matrix
$A$ - Construction of the pressure coupling matrices
$B_x$ and$B_y$ - Formation of the saddle-point system
- Handling of Dirichlet lifting functions
- Structured sparse matrix assembly using
scipy.sparse - Mesh refinement and orientation correction utilities
- Visualization tools for:
- sparse matrix structures,
- streamline fields,
- refined finite element meshes
The numerical discretization uses triangular finite elements and constructs the global system through element-wise assembly of local contributions derived from affine reference mappings.
The saddle-point system has the block structure
where
The repository additionally contains routines for post-processing and visualization of the computed velocity field, including streamline interpolation on unstructured meshes.