Skip to content

mikolop1/CFD_Simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CFD Simulator

A 3D Computational Fluid Dynamics simulator built with Qt6 and OpenGL.

Features

  • 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

Requirements

  • 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)

Building the Project

  1. Create a build directory:
mkdir build
cd build
  1. Configure with CMake:
cmake .. -G "Visual Studio 17 2022" -A x64
  1. Build the project:
cmake --build . --config Release
  1. Run the application:
.\Release\CFD_Simulator.exe

Usage

Camera Controls

  • Left Mouse + Drag: Rotate camera around the scene
  • Mouse Wheel: Zoom in/out

Menu Bar

  • 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)

Toolbar

  • Import Object: Quick access to import 3D models
  • Start/Stop Simulation: Toggle the CFD simulation

Object List (Right Panel)

  • Double-click: Toggle object visibility (strikethrough = hidden)
  • Delete Selected: Remove selected object from scene

CFD Simulation

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

Project Structure

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

Supported File Formats

  • OBJ: Wavefront OBJ files with vertex positions, normals, and faces

License

MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors