Hi Rob, thanks for the answer.
I should specify that I am using dynamic mesh method and only layering method. I have the mesh and all set up and it works fine without the viscous force in the UDF.
To answer your question. Before I use dynamic mesh (with the UDF) I have computed few thousands of timesteps without the movement of the body to develop the pressure and velocity field. Then I "free" the body with the compiled 6DOF UDF. If the UDF contains the viscous force, it crashes with the SIGSEGV errror.