Skip to content

BaoKhanhMa/CFD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CFD

Introduction

This project is a small 3D CFD code in C++ built on a structured Cartesian mesh.

The current simulation path is a transient lid-driven cavity solver advanced in time step by step. The solver stores velocity and pressure at cell centers and uses a projection-style update to enforce incompressibility.

System Design

The code is split into a few small modules. Each module has its own manual.

  • Mesh
    Defines the structured 3D grid, geometric spacing, flat indexing, cell centers, and boundary checks.

  • Field3D
    Defines scalar storage on the mesh and the memory layout used by the solver.

  • FlowState
    Groups the flow unknowns u, v, w, and p into one state object.

  • Solver
    Defines the time-marching algorithm, lid-driven cavity boundary conditions, pressure projection, and divergence monitor.

Build

mkdir -p build
cd build
cmake ..
cmake --build .

About

A simple CFD for experimentation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors