CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   rigidBodyDynamics library using restraints (https://www.cfd-online.com/Forums/openfoam/179106-rigidbodydynamics-library-using-restraints.html)

nddpsdw October 23, 2016 12:48

rigidBodyDynamics library using restraints
 
Hii
I am a new user in openFoam. I have been trying to use rigidbodydynamics library(introduced in new versions of openfoam) to simulate floating object on which a linear damper or linear spring restraint has been applied. This spring will have one end on the object and the other end attached to stationary walls. Floating object tutorial exists but it does not have any restraints. It can be seen in the dynamicmesh dict. dynamicmeshdict.sixdof is for the older sixdofrigidbodymotion library. Please don't use that dictionary. Also if i want to couple two bodies interconnected by spring or damper. Is there any way to do it. This case is more difficult as the two bodies are floating on water so we don't have a fixed anchor position for the spring or damper.
The dynamicmeshdict for linear spring restraint for a floating object ahs been edited to looks like this:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 4.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object motionProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dynamicFvMesh dynamicMotionSolverFvMesh;

motionSolverLibs ("librigidBodyMeshMotion.so");

solver rigidBodyMotion;

rigidBodyMotionCoeffs
{
report on;

solver
{
type Newmark;
}

accelerationRelaxation 0.7;

bodies
{
floatingObject
{
type cuboid;
parent root;
bodyID floating;

// Cuboid dimensions
Lx 0.3;
Ly 0.2;
Lz 0.5;

// Density of the cuboid
rho 500;

// Cuboid mass
mass #calc "$rho*$Lx*$Ly*$Lz";
L ($Lx $Ly $Lz);
centreOfMass (0 0 0.25);
transform (1 0 0 0 1 0 0 0 1) (0.5 0.45 0.1);

joint
{
type composite;
joints
(
{
type Py;
}
{
type Ry;
}
);
}
restraints //restraint
{
horizontalspring
{

type linearSpring;
bodyID floating;
anchor (0.5 0 0.35);
refAttachmentPt (0.5 0.35 0.35); //reference attachment point
stiffness 1000000;
damping 0;
restLength 0.1;
}
}

patches (floatingObject);
innerDistance 0.05;
outerDistance 0.35;
}
}
}


// ************************************************** *********************** //
This does not seem to work as restraints are not being read when this case is executed. It works as if not restraints exist.


All times are GMT -4. The time now is 04:56.