For more information about this Master Thesis: Abstract of this Master thesis
- OpenFOAM-7 - Fluid Solver
- KRATOS - Structural Solver and "CoSimulation" Coupling tool
- CoSimIO - Communication tool between the solvers
- Scripts - Bash scripts for consistent & convenient use of Kratos
-
Go to the folder > KratosOpenfoamAdapterFunctionObject
-
Make linker related modifications in the file KratosOpenfoamAdapterFunctionObject/Make/options
-
-I$<Path_to_directory_CoSimIO>/co_sim_io \ -I$<Path_to_directory_CoSimIO> \ -L$<Path_to_directory_CoSimIO>/bin
-
If MPI related error occurs, MPI_ROOT should direct to openmpi/include in your system: e.g. using following commad (For future use its better to add this in bashrc)
export MPI_ROOT=/usr/lib/x86_64-linux-gnu/openmpi/include
-
-
Give following Commands to compile:
wclean wmake
-
It will generate "libKratosOpenfoamAdapterFunctionObjectFunctionObjects.so" shared library file in the same folder. One need to add this file in controlDict while using this function object.
-
Case 1 - Flow-induced vibration of a flexible beam or flap (without MPI):
- Go to the folder > Tutorial_case_1_flap
- In one terminal run the OpneFOAM commands:
blockMesh pimpleFoam
- Simultaneously, open another terminal to run KRATOS:
startkratos runkratos MainKratosCoSim.py
- To see the results in ParaView:
-
paraFoam -case .&
- Load the KRATOS results from the folder > vtk_output_structure
-
- Displacement of the tip can be seen using:
python3 plot_displacement.py
- To clean all generated files during simulation:
./clean.sh
-
Case 1 - Flow-induced vibration of a flexible beam or flap (with MPI):
- Go to the folder > Tutorial_case_1_flap
- In one terminal run the OpneFOAM commands:
blockMesh decomposePar mpirun -np <number_of_processes> pimpleFoam -parallel
- Simultaneously, open another terminal to run KRATOS:
startkratos runkratosmpi MainKratosCoSim.py <number_of_processes>
- To see the results in ParaView:
-
reconstructPar paraFoam -case .&
- Load the KRATOS results from the folder > vtk_output_structure
-
- Displacement of the tip can be seen using:
python3 plot_displacement.py
- To clean all generated files during simulation:
./clean.sh
-
Case 2 - FSI of the CAARC building simulation (with MPI):
- Go to the folder > Tutorial_case_2_CAARC
- In one terminal run the OpneFOAM commands:
blockMesh decomposePar mv 0/ 0_org/ mkdir 0 mpirun -np <number_of_processes> snappyHexMesh -overwrite -parallel reconstructParMesh -constant rm -r 0/ processor0/ processor1/ processor2/ ..... processor<number_of_processes-1> mv 0_org/ 0/ decomposePar mpirun -np <number_of_processes> pimpleFoam -parallel
- Simultaneously, open another terminal to run KRATOS:
startkratos runkratosmpi MainKratosCoSim.py <number_of_processes>
- To see the results in ParaView:
-
reconstructPar paraFoam -case .&
- Load the KRATOS results from the folder > vtk_output_structure
-
- Displacement of the points specified in the ProjectParametesCSD.json can be seen using:
python3 plot_displacement.py
- To clean all generated files during simulation:
./clean.sh
Note: To compile the export and import data files, Dont forget to add Path of the co_sim_io.hpp ($HOME/CoSimIO) into your include path.