This repository is the source code for a new OpenFOAM's solidBodyMotionFunction
which automatically integrates shear forces and returns the next position of the body patch. Here are two examples.
OpenFOAM provides asolidBodyMotionFunction
class which is very convenient for solving flow around moving bodies. However, all the option under this class like, linearMotion, rotatingMotion, etc all seem to solve flow around presribed motion. I needed to solve for floating body whose motion is coupled with flow around it. OpenFoam also has this sixDoFRigidBodyMotion
class, which allows intgration for pressure and shear force around a patch, and solve for the resulting motion of the rigid body associated with this patch.
I created this sixDoFDynamicMotion
class which is a child of solidBodyMotionFunction
, and as private member motion_
of the type sixDoFRigidBodyMotion
. This member, motion_
, is responsible for integrating pressure and shear force around the given patch, and solve for the resulting translation and rotations. The resulting motion is returned as a septernion
, through the transform()
function. This is tested on two examples. Trajectory of a projectile motion, and a simple pendulum. Results look alright to me.
Switch to the src
directory and run
wmake libso
Switch to tutorial/pendulam
or tutorial/projectile
and run
overPimpleDyMFoam
Enjoy.