# Applying restraints in openfoam

 Register Blogs Members List Search Today's Posts Mark Forums Read

 February 14, 2020, 10:16 Applying restraints in openfoam #1 New Member   Pouria Taghikhani Join Date: Sep 2016 Posts: 14 Rep Power: 5 Hi foamers. I am trying to attach a rope to the object in floating object sample in blueCFD 2017_2 (OF 5). I've added some lines to "dynamicMeshDict.sixDoF" file as below but it has no effect on the original tutorial answer. Does anyone have any Idea how to apply these kind of restrains? Code: ```dynamicFvMesh dynamicMotionSolverFvMesh; motionSolverLibs ("libsixDoFRigidBodyMotion.so"); motionSolver sixDoFRigidBodyMotion; sixDoFRigidBodyMotionCoeffs { patches (floatingObject); innerDistance 0.05; outerDistance 0.35; centreOfMass (0.5 0.45 0.35); // Cuboid dimensions Lx 0.3; Ly 0.2; Lz 0.5; // Density of the solid rhoSolid 999; // Cuboid mass mass #calc "\$rhoSolid*\$Lx*\$Ly*\$Lz"; // Cuboid moment of inertia about the centre of mass momentOfInertia #codeStream { codeInclude #{ #include "diagTensor.H" #}; code #{ scalar sqrLx = sqr(\$Lx); scalar sqrLy = sqr(\$Ly); scalar sqrLz = sqr(\$Lz); os << \$mass *diagTensor(sqrLy + sqrLz, sqrLx + sqrLz, sqrLx + sqrLy)/12.0; #}; }; report on; accelerationRelaxation 0.7; //accelerationDamping 0; solver { type Newmark; } constraints { // fixedPoint // { // sixDoFRigidBodyMotionConstraint point; // centreOfRotation (0.5 0.45 0.1); // } fixedLine { sixDoFRigidBodyMotionConstraint line; centreOfRotation (0.5 0.45 0.1); direction (0 1 0); } fixedAxis { sixDoFRigidBodyMotionConstraint axis; axis (0 1 0); } } restraints { chain { sixDoFRigidBodyMotionRestraint linearSpringDamper; refAttachmentPt (0 0 0); anchor table ( (0 (0.3 0.2 0.5)) (2 (0.3 0.2 0.5)) (6 (0.3 0.2 0.5)) (8 (0.3 0.2 0.5)) ); psi 10; wn 8.28; numberOfChains 4; restLength 0.6245; } } }```

 February 17, 2020, 04:17 #2 Senior Member   Yann Join Date: Apr 2012 Location: France Posts: 100 Rep Power: 9 Hello Taghi, Have you checked your allRun script and dynamicMeshDict file to see if there is any reference to the "dynamicMeshDict.sixDoF" file somewhere? AFAIK, solvers only check for the constant/dynamicMeshDict, unless specified otherwise. My best bet is that your dynamicMeshDict.sixDoF is simply not used at all in the tutorial you're running, but it's here to offer another setup for dynamic mesh. Replace your current dynamicMeshDict file with the content of your dynamicMeshDict.sixDoF file and see if it solves your problem. Cheers, Yann Tobi likes this.

 February 27, 2020, 13:09 #3 New Member   Pouria Taghikhani Join Date: Sep 2016 Posts: 14 Rep Power: 5 Tnx a zillion times "dynamicMeshDict.sixDoF" was meant to be replaced to "dynamicMeshDict". problem solved

 Tags chain, floating body, floating object, restraints, rope