FSI 3D Upgrade
This page follows on from the standard FSI installation instructions. Follow those instructions first before continuing with this page.
If you experience any issues, please let Nik Lebedenko know.
Modify the adapter for 3D FSI
Download all the files from this GitHub repository using git clone https://github.com/cuspaceflight/fsi-3D-upgrade
Locate this installation location of your FEniCS-preCICE adapter using python3 -m pip show fenicsprecice
Navigate to this location, in my case: cd /home/nik/.local/lib/python3.8/site-packages/fenicsprecice
Replace each file in your installation location with the version found in fsi-3D-upgrade/fenicsprecice-3D
Verify everything is working correctly
Navigate to the perpendicular-flap-3D
tutorial case downloaded from the GitHub repository earlier.
Navigate to the solid-fenics
folder and do ./run.sh
- there should be no errors, and the output should pause after a short setup period.
Now open another Ubuntu terminal, and navigate to the fluid-openfoam
folder and do ./run.sh
Both terminals should now have command outputs flying, similar to the original 2D tutorial case you ran when installing the 2D FSI software.
After 2-3 mins, both terminals should stop. View the results in ParaView, and verify it looks similar to the original 2D tutorial case.
View the fluid domain by navigating to fluid-openfoam
and running paraview.exe fluid-openfoam.foam
View the solid's displacement by navigating to solid-fenics
and running paraview.exe Solid/FSI-S/u_fsi.pvd
- By default, the solid will appear stationary. To visualise its movement, add a "Warp By Vector" filter with the Displacement vector and scale factor 1.
Install mesh conversion software
FEniCS sadly does not natively support the import of ANSYS or OpenFOAM meshes, so a workaround must be used to generate its .xml
mesh files.
Install meshio
with all optional dependencies using python3 -m pip install meshio[all]
Download the foamToFenics
OpenFOAM case from the GitHub repository (should already be present).
Convert between ANSYS mesh and FEniCS mesh
- Export the ANSYS mesh as
.msh
- Open an Ubuntu terminal, navigate to the
foamToFenics
OpenFOAM case, and copy the.msh
file there. - Import the mesh with
fluentMeshToFoam <your msh file>
, replacing<your msh file>
with the full filename and extension of your.msh
file. - Run
./exportFenics
Convert between OpenFOAM mesh and FEniCS mesh
- Open an Ubuntu terminal, navigate to the
foamToFenics
OpenFOAM case, and copy the.msh
file there. - Copy the
polyMesh
directory intofoamToFenics/constant
- Run
./exportFenics