This project solves the 2D Couette flow problem using both the Generalized Finite Difference Method (GFDM) — a meshfree approach — and a meshgrid-based method, with GPU acceleration via CuPy. The solution is computed using the Chorin projection scheme, and the results are validated against the analytical solution.
For a particle at position
The analytical steady-state velocity profile is:
Time-dependent analytical solution:
- ✅ Velocity field closely matches the analytical solution.
- ✅ Pressure satisfies Neumann boundary conditions.
- ⚡ Significant speedup observed with GPU (CuPy) over CPU (NumPy) implementation.
- Python 3.11+
- CUDA-enabled GPU (with CUDA 12.x drivers)
- Anaconda (recommended)
git clone https://github.com/nsreelekha/poisson_equation.git
cd poisson_equation
conda env create -f environment.yml
conda activate cupy129env
python -m venv venv
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
pip install -r requirements.txt
You can run the notebooks using Jupyter.
jupyter notebook
Then open:
📘 couette_flow.ipynb — Simulates shear-driven flow between parallel plates using meshfree and meshgrid-based methods.
The notebook will:
-
✅ Generate a meshfree particle distribution (or structured grid)
-
✅ Assemble the GFDM operators using weighted least squares
-
✅ Apply boundary conditions for Couette flow
-
✅ Solve the incompressible Navier–Stokes equations using the Chorin projection method
-
✅ Visualize velocity and pressure fields using Matplotlib
All dependencies are managed via Conda or requirements.txt
- cupy-cuda12x — GPU array library (NumPy-compatible)
- numpy, scipy, matplotlib
- pycuda (optional)
- Python 3.11
Install automatically via:
conda env create -f environment.yml
- No GPU? Replace:
import cupy as cp
with:
import numpy as cp
- Environment errors? Re-create the environment:
conda env remove -n cupy129env
conda env create -f environment.yml
- CuPy errors or crashes?
Ensure that:
- CUDA 12.x is correctly installed
- Your GPU is compatible
- cupy-cuda12x matches your CUDA version
This project is licensed under the MIT License.
Sreelekha Nampally
🎓 B.Tech in Mathematics and Computing, NIT Mizoram
🛠️ Project developed as part of Summer Internship at IIT Tirupati
🌐 LinkedIn | GitHub