https://github.com/rmeli/cavity-flow
Numerical solution of Navier-Stokes equation for 2D cavity flow
https://github.com/rmeli/cavity-flow
Last synced: 3 months ago
JSON representation
Numerical solution of Navier-Stokes equation for 2D cavity flow
- Host: GitHub
- URL: https://github.com/rmeli/cavity-flow
- Owner: RMeli
- License: bsd-3-clause
- Created: 2022-08-14T10:56:39.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-14T11:01:56.000Z (almost 3 years ago)
- Last Synced: 2025-02-01T05:26:03.236Z (4 months ago)
- Language: Cuda
- Size: 233 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cavity Flow
Numerical solution of Navier-Stokes equation for 2D cavity flow. See [CFD Python: the 12 steps to Navier-Stokes equations](https://doi.org/10.21105/jose.00021) for details.

## Parallelisation* Serial
* [OpenMP](https://www.openmp.org/)
* [CUDA](https://developer.nvidia.com/)### Test Machine
```
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 12
On-line CPU(s) list: 0-11
Thread(s) per core: 1
Core(s) per socket: 12
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 63
Model name: Intel(R) Xeon(R) CPU E5-2650L v3 @ 1.80GHz
Stepping: 2
CPU MHz: 1199.354
CPU max MHz: 2500.0000
CPU min MHz: 1200.0000
BogoMIPS: 3598.03
Virtualisation: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 30720K
NUMA node0 CPU(s): 0-11
```### Timings
```
+++ Cavity Flow +++
Lx = 2 Ly = 2
Nx = 101 Ny = 101
dx = 0.02 dy = 0.02
dt = 0.0001
+++ ----------- +++serial::run[1] 13600 ms
omp::run[8] 5733 ms
cu::run[(4,4),(32,32)] 997 ms
```## Plotting
```
python plot.py p_serial.dat u_serial.dat v_serial.dat serial
python ../plot.py p_omp.dat u_omp.dat v_omp.dat omp
python ../plot.py p_cu.dat u_cu.dat v_cu.dat cu
```## Singularity
### Build
```bash
sudo singularity build singularity.sif singularity.def
```### Interactive Shell
```bash
singularity shell --nv singularity.sif
```