A 3D Computational Fluid Dynamics simulator built with Qt6 and OpenGL.
- 3D Viewport: Interactive OpenGL-based 3D visualization with camera controls
- Import 3D Objects: Load OBJ files into the scene
- Simulation Controls: Start/Stop button to toggle CFD simulation
- Object Management: List of scene objects with ability to hide/show and delete
- Real-time Visualization: Animated fluid dynamics simulation
- Qt 6.9.3 (installed at D:\Windows\Programy\Qt\6.9.3)
- CMake 3.16 or higher
- OpenGL compatible graphics card
- Visual Studio 2022 (MSVC compiler)
- Create a build directory:
mkdir build
cd build- Configure with CMake:
cmake .. -G "Visual Studio 17 2022" -A x64- Build the project:
cmake --build . --config Release- Run the application:
.\Release\CFD_Simulator.exe- Left Mouse + Drag: Rotate camera around the scene
- Mouse Wheel: Zoom in/out
- File → Import 3D Object: Open an OBJ file to add to the scene
- File → Exit: Close the application
- Simulation → Start/Stop: Toggle simulation (or press Space)
- Import Object: Quick access to import 3D models
- Start/Stop Simulation: Toggle the CFD simulation
- Double-click: Toggle object visibility (strikethrough = hidden)
- Delete Selected: Remove selected object from scene
The simulator applies a simple fluid dynamics simulation that:
- Applies wind forces to mesh vertices
- Simulates wave propagation through the mesh
- Uses viscosity damping for smooth motion
- Includes restoring forces to maintain object shape
CFD_sim/
├── CMakeLists.txt # Build configuration
├── src/
│ ├── main.cpp # Application entry point
│ ├── mainwindow.h/cpp # Main application window
│ ├── glwidget.h/cpp # OpenGL viewport widget
│ ├── meshobject.h/cpp # 3D mesh representation
│ ├── objloader.h/cpp # OBJ file parser
│ └── cfdsimulator.h/cpp # CFD simulation logic
└── README.md
- OBJ: Wavefront OBJ files with vertex positions, normals, and faces
MIT License