CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Rigid body rotation NOT through the CG? (https://www.cfd-online.com/Forums/fluent/45435-rigid-body-rotation-not-through-cg.html)

Joe July 18, 2007 16:45

Rigid body rotation NOT through the CG?
 
I would like to rotate a rigid body through an axis that does NOT pass through its centre of gravity e.g. a long rod rotating about one of its own ends like a clock pendulum.

My understanding is that the DEFINE_CG_MOTION, as its name implies, can ONLY be used to specify translational and angular velocities for the body's centre of gravity. Could someone confirm this for me please?

If this is the case then presumably I HAVE to use the DEFINE_GRID_MOTION macro???

Rotating a body around its CG is trivial e.g.

#include "udf.h"

DEFINE_CG_MOTION(james,dt,vel,omega,time,dtime)

{

/* reset velocities */

NV_S(vel, =, 0.0);

NV_S(omega, =, 0.0);

if (!Data_Valid_P()) return;

omega[2] = 0.523599 * cos(392.699 * time) * 392.699;

}

But again this doesnt help my situation as the rotation only occurs about the CG which is not what I need.

Thanks for any clarification!

Joe July 18, 2007 17:05

Re: Rigid body rotation NOT through the CG?
 
Just to add another thought ... My understanding is that the DEFINE_GRID_MOTION macro is mainly for use with deforming bodies i.e. non-rigid bodies as the nodes in the zone undergoing motion are moving relative to each other.

This is the problem: Neither the DEFINE_CG_MOTION nor DEFINE_GRID_MOTION macros seem directly applicable to my case?


Joe July 19, 2007 12:09

Re: Rigid body rotation NOT through the CG?
 
Problem solved ... I just managed to confuse myself.

amir July 20, 2007 08:35

Re: Rigid body rotation NOT through the CG?
 
Dear Joe i have a problem about dynamuc mesh. can you tell me how can i model a vessel by dynamic mesh.? whit king regards Amir

Joe July 20, 2007 16:21

Re: Rigid body rotation NOT through the CG?
 
Do the dynamic mesh tutorial 12 and implement the DEFINE_CG_MOTION and DEFINE_GRID_MOTION examples in the UDF manual. That will get you started.

Juan Carlos April 12, 2010 14:13

User defined functions
 
Dear Joe
In my case I trying to simulate a flapper valve and I'd like to rotate a valve, like a rigid body, through an axis that doesn't pass through its centre of gravity.
Here the flow moves the valve by exerting forces on it. To reproduce the body motion of the valve due to hinge moment I must use Compute_Force_And_Moment function to determinate the moment, but I don’t know how it does.
Do you have any suggestions that can help me?

euzinho May 28, 2010 11:03

Hi Joe,
I am having the same problem, I don´t know how to rotate a butterfly valve,
and my code is a lot like your
can you explain me how did you resolve the problem?

thanks so much
Quote:

Originally Posted by Joe
;143594
I would like to rotate a rigid body through an axis that does NOT pass through its centre of gravity e.g. a long rod rotating about one of its own ends like a clock pendulum.

My understanding is that the DEFINE_CG_MOTION, as its name implies, can ONLY be used to specify translational and angular velocities for the body's centre of gravity. Could someone confirm this for me please?

If this is the case then presumably I HAVE to use the DEFINE_GRID_MOTION macro???

Rotating a body around its CG is trivial e.g.

#include "udf.h"

DEFINE_CG_MOTION(james,dt,vel,omega,time,dtime)

{

/* reset velocities */

NV_S(vel, =, 0.0);

NV_S(omega, =, 0.0);

if (!Data_Valid_P()) return;

omega[2] = 0.523599 * cos(392.699 * time) * 392.699;

}

But again this doesnt help my situation as the rotation only occurs about the CG which is not what I need.

Thanks for any clarification!



All times are GMT -4. The time now is 19:37.