Skip to content

hfchen20/foamMooring

Repository files navigation

A mooring restraints library for rigid body motions in OpenFOAM

Documentation: https://hfchen20.gitlab.io/foamMooring/

GitHub mirror: https://github.com/hfchen20/foamMooring

⭐ Consider starring the repository if you find it useful. ⭐

Overview

  • Works for two rigid body motion libraries sixDoFRigidBodyMotion and rigidBodyMotion.
  • Mooring models of restraints include MAP++, MoorDyn, Moody, groups of linear springs.
  • Most restraints support runtime generation of legacy VTK files (including vtk.series).
  • You can compile only part of the library (i.e., certain restraints) if that suits your needs.
  • No need to change and re-compile the built-in motion libraries and flow solvers.
  • Tested on OpenFOAM v2012 ~ v2312, mostly with overset grid solver overInterDyMFoam.
  • Should also work with interFoam (deforming mesh) and other variants waveFoam and olaFlow.
  • Even overPimpleDyMFoam ...

One floater{width=400px height=320px} Two floaters{width=400px height=320px} Two floaters with shared mooring lines{width=600px height=320px}

Compile foamMooring

mkdir -p $WM_PROJECT_USER_DIR 
cd $WM_PROJECT_USER_DIR
git clone https://gitlab.com/hfchen20/foamMooring.git
cd foamMooring 

If there is no interest in the quasi-static mooring model MAP++, specify a branch option, -b dynamic-only, when cloning the repo.

git clone -b dynamic-only https://gitlab.com/hfchen20/foamMooring.git
  • Run Allwmake. Upon successful compilation, there should be at least two libraries in $FOAM_USER_LIBBIN: libsixDoFMooring.so and librigidBodyMooring.so, .
./Allwmake

Code structure

Code structure

How to use

  • Prepare an OpenFOAM case as usual. The floating body motion can be accommodated by either deforming mesh interFoam or overset grid overInterDyMFoam.

  • Add in controlDict

libs    (sixDoFMooring); // or (rigidBodyMooring)
  • Prepare a mooring input file in case subfolder "Mooring". Mooring models can be MoorDyn v1, v2, Moody, MAP++, and simple springs.

  • Define mooring restraints in constant/dynamicMeshDict. sixDoFMooring and rigidBodyMooring have slightly different restraints.

Refer to documentation for more examples.

Main features of mooring models

Three mooring line codes

Visualize mooring lines in Paraview

See docs.

References

Disclaimer

This offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com, and owner of the OPENFOAM® and OpenCFD® trade marks. This offering is not approved or endorsed by any software packages mentioned above or their respective owners, and should not be considered as such.

OpenFOAM is a free, open source CFD software released and developed by OpenCFD Ltd since 2004. It has a large user base across most areas of engineering and science, from both commercial and academic organisations. See documentation