The implementation of 2D strong two-way fluid-solid coupling in the variational framework, based on the paper by Batty titled "A fast variational framework for accuratesolid-fluid coupling". The simulation part is implemented in C++, with rendering part handled by OpenCV.
This project is a cross-platform project based on CMake, which will automate the entire pipeline (simulation + rendering), making it easy to compile and run. The commands given below are for Linux; the operations on Windows are similar (Visual Studio is recommended).
#install OpenCV
sudo apt update
sudo apt install libopencv-dev
git clone https://github.com/RYQ-22/FluidRigidCoupling2D.git
cd ./FluidRigidCoupling2D
mkdir build
cd ./build
cmake ..
make
./FluidSimAfter running FluidSim, the output video output.avi can be found in the build folder. Settings for related parameters can be modified by editing the main.cpp file.
The implementation in 3D is here, which needs some improvements to update the "level set".
