CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   How to use sixDoFRigidBodyDisplacement? (http://www.cfd-online.com/Forums/openfoam-solving/78635-how-use-sixdofrigidbodydisplacement.html)

DLC July 28, 2010 13:21

How to use sixDoFRigidBodyDisplacement?
 
Hi Foamers!
i am playing with OF 1.7 and particularly with the tutorial regarding the floating object.
Does anyone know how to use restrains and constraints?
The new six DOF (sixDoFRigidBodyDisplacement) is told to be very nice, but I couldnt understand how to use it!
Can anyone please help?

Thanks a lot!
DLC

keul August 2, 2010 10:00

Hi DLC!

I'm working on cases which uses sixDoFRigidBodyDisplacement. You could look at the tutorial case "wingMotion" or "wingFlutter" in pimpleDyMFoam in the pointDisplacement file. You have different options.
In "constraint" you could fixe any degree of freedom. For example:
"fixedAxis" fixes one rotation along axis
"fixedPlane" fixes two translations
...

In "restraint" you could define a spring and/or a damp in any direction :
"linearSpring": you define an anchor, an attachment point on the moving body, a restlength, a stiffness and/or a damp.
"linearAxialAngularSpring": you apply a spring and/or a damp on moment along an axis.
...
You can find the source files at:
~/OpenFOAM/OpenFOAM-1.6.x/src/postProcessing/functionObjects/forces/pointPatchFields/derived

If you have any question...

Good Luck!

DLC August 2, 2010 10:15

Hi Keul!
thanks for the reply!
I managed to do what I was trying on friday evening, after going crazy for a whole day! (I couldn't find the sources..)
Thanks again!
DLC

daveatstyacht August 10, 2010 17:58

question on dampening
 
Hi all,
I was just curious if the dampening terms for the springs were given as a fraction of critical dampening (ie: a damping of 1.0 equating to critically damped and greater than 1.0 over-damped)? Also thanks for this posting, it has indirectly helped me to discover the location of the components I need to solve another problem of mine related to the forces/moments acting on an object (now to actually figure out the c++ to implement what I want :)).

Regards,
Dave

keul August 11, 2010 03:26

Hi Dave,

I don't use the damping yet. So I can't answer you. But you could find an answer with a simple case. For example, you could fixe a moving mesh with a spring without fluid and study the oscillation.

Best regards

daveatstyacht August 11, 2010 05:45

In answer to my own question, after looking around in the sixDoFRigidBodyMotionRestraint/linearSpring file I believe it (damping) has units of N*s/m based on the lines below:

vector r = restraintPosition - anchor_;

scalar magR = mag(r);

// r is now the r unit vector
r /= (magR + VSMALL);

vector v = motion.currentVelocity(restraintPosition);

restraintForce = -stiffness_*(magR - restLength_)*r - damping_*(r & v)*r;

Therefore, I believe that damping is equal to "c" in the equation for harmonic motion.

Thanks for the reply and I may yet try to confirm the units still to confirm that I am not mistaken.

Regards,
-Dave

DLC August 17, 2010 05:55

Hi everyone,
I have a very short question for you. I'm interested in printing at every iteration the body orientation. I found that this sixDof works with tensor Q for orientation. I would be interested in angles (degrees or radiant) such as Euler angles or other, to have a more physical flavor... does anyone know if there is in the sixDof such variable?
thanks!

DLC

keul August 17, 2010 07:58

Hi DLC,

I don't think OF could give you the Euler angles. But if you have the matrix rotation you could find the Euler angles and maybe compute the source files to give you results at each iteration. I don't know if it will help you!

best regards

DLC November 20, 2010 07:04

Hello to everyone!
I'm writing now my master thesis and I need to describe the 6DOF implemented in OF.
I'm actually struggling to fully understand the algorithm from the code. Can anyone give me a hand? does anyone know where I can find anything already written on the 6dof in OF 1.7?
any reply can be of great help!
thanks a lot!

DLC

aut_iut November 23, 2010 06:00

Hi David,

I'm interested to have such report. If you find something please share it with us.
Thanks,

Rasoul

dandalf April 1, 2011 10:28

Hi all..

I'm working on a problem involving multibody dynamics,
I have an equation which solves the multibody dynamics of my particular system.
Giving me all the perameters in
sixDoFRigidBodyMotionState

I want to use it in a dynamicMotionSolverFvMesh, for which the following patch types were offered
p, li { white-space: pre-wrap; }
Code:

22
 (
 angularOscillatingDisplacement
 angularOscillatingVelocity
 calculated
 cyclic
 empty
 fixedValue
 global
 mixed
 oscillatingDisplacement
 oscillatingVelocity
 processor
 sixDoFRigidBodyDisplacement
 slip
 surfaceDisplacement
 surfaceSlipDisplacement
 symmetryPlane
 timeVaryingUniformFixedValue
 uncoupledSixDoFRigidBodyDisplacement
 uniformFixedValue
 value
 wedge
 zeroGradient
 )

The only native options that seems to offer the use of this is are
sixDoFRidgidBodyDisplacment and
uncoupledSixDoFRigidBodyDisplacement

Is there a way to determine motion on a patch, by pescribing the variables for sixDoFRigidBodyMotionState on each iteration. preferably from a file written on the fly?

Or is there a simpler solution.

any suggestions would be appreciated.

Dandalf

bouclette August 5, 2011 06:58

Hi Dan,

Not sure if you've solved your issue since its been a while since then but if not, check that you have all the required libs in your controlDict file.

Regards,

Ben

lakeat September 20, 2011 10:52

Quote:

Originally Posted by DLC (Post 284200)
Hello to everyone!
I'm writing now my master thesis and I need to describe the 6DOF implemented in OF.
I'm actually struggling to fully understand the algorithm from the code. Can anyone give me a hand? does anyone know where I can find anything already written on the 6dof in OF 1.7?
any reply can be of great help!
thanks a lot!

DLC

The code follows a paper's procedure as mentioned in their H file, Im not from their field (I'm civil engineer), I wonder if any of you are from that field?

lakeat September 20, 2011 10:57

The constraint does not work as the word implies, so I am quite confused.
I mean, you constrain a axis, and the body can still move around that axis, this is absurd, or I am missing something?

Another question is: Is this method only works for the solid bodies that with kind of symmetries? I have some object that I1 ~ I2 >> I3, is it going to work?
Thanks,

daveatstyacht October 6, 2011 18:52

Daniel,
The constraint axis is paradoxically the axis you allow rotation or movement for. If you are interested in more than one axis of motion for rotation and translation there are other BC like fixedPlane. I cant claim to know them all. Hope that helps.
Dave

lakeat October 6, 2011 19:34

Quote:

Originally Posted by daveatstyacht (Post 326978)
Daniel,
The constraint axis is paradoxically the axis you allow rotation or movement for. If you are interested in more than one axis of motion for rotation and translation there are other BC like fixedPlane. I cant claim to know them all. Hope that helps.
Dave



What?
I don't think so.

After several tests, I checked the codes and it seems quite misleading. Okay, here are my finding, I hope this is helpful. And also I wish someone could look into it.

1. line constraint (1 0 0), actually means constraint y direction,
2. line constraint (0 1 0), actually means constraint x direction,

(You don't agree with this? Okay, how about this you constraint both, and you will see that they are both locked, not what you imagined, that there will be two degrees in x and y. And if you delete these two constraints, you will find that they are released, you will get 2 degree of freedom.)

3. axis constraint, behaves just as what you mentioned "paradoxically".

So, quite misleading, aren't they?


I bet many of you know ansys, right, a company who aquires Fluent! In ANSYS, constraint simply means constarint, literally enough, like DX, DY, ROTZ...


Please correct me if I was wrong.
Best,

daveatstyacht October 6, 2011 22:40

Daniel,
Below is the code I use to provide free to trim and heave motion in 1.7.1 (z translation and y axis rotation). The way to produce two translation freedoms is a fixedplane constraint if I recall correctly. A fixed line constraint only allows translation along that one axis. If you use two fixedline constraints you will effectively over constrain the object and it cant move as you have seen. It prevents translation in the other two directions. I don't know why they developed the constraints in this manner.

fixedLine1
{
sixDoFRigidBodyMotionConstraint fixedLine;
tolerance 1e-6;
relaxationFactor 0.7;
fixedLineCoeffs
{
refPoint (-3.23 0 1.21);
direction (0 0 1);
}
}

fixedAxis1
{
sixDoFRigidBodyMotionConstraint fixedAxis;
tolerance 1e-06;
relaxationFactor 0.7;
fixedAxisCoeffs
{
axis ( 0 1 0 );
}
}

I hope this helps.
Dave

lakeat October 6, 2011 23:06

Thanks, but I think this is really funny, very funny.

And how could you explain this, if you delete all the fixedLine entries, and the body will move freely?

That's paper's motivation in using Simplectic method really makes this ODE problem complicated.

lucaBonfiglio January 2, 2013 12:44

Hi foamers,

I would like to fix only one motion (roll), having pitch and yaw free to move. I tried to fix the x axis :

constraints
{
maxIterations 500;
fixedAxis1
{
sixDoFRigidBodyMotionConstraint fixedAxis;
tolerance 1e-06;
relaxationFactor 0.7;
fixedAxisCoeffs
{
axis ( 1 0 0 );
}
}
}

But it didn't work out.
It seems that the roll motion is the only one that is allowed.
I tried to put two fixedAxis: one in the direction (0 1 0) and one in the direction (0 0 1). But in this way it seems that the body can no longer rotate in any direction.

Does anybody have any suggestions??

Regards

najunaju February 7, 2013 01:36

Hai Mr. Luca Bonfiglio,

Did you get anyway to solve your problem?

Here is some explanation. As discussed before, through fixedAxis and fixedLines you can only mention the axis along which object may rotate and translate, respectively. But criteria is only one axis and other two axis are fixed. That means, when you put two fixedAxis or two fixedLines you are completely fixing the object in-terms of rotation or translation respectively.

When you want, two free axis movement and one constrained axis then you have to use fixedPlane.

I might be wrong, correct me if so.

By the way, do you know how to deal with constrain tensor? I am really struggling on that.

best wishes,


All times are GMT -4. The time now is 14:09.