-
-
November 30, 2019 at 5:38 amjianan.zhaoSubscriber
Hi
I am trying to write a UDF to define a rigid body motion. The motion includes translation in y direction (dash line), rotation around y axis and rotation around x axis (normal to the plane) relative to the center of gravity of the object as shown in the graph.
My question is how to define the rotation in x direction with a moving CG? Any help would be appreciated. - Jianan
I have attached my UDF to define translation and rotation in y direction.
#include "udf.h"
#define pi 3.1415926
#define A 6.0e-4 /* amplitude of oscillation in Y */
#define T_oscY 0.1 /* time period of oscillation in Y */
#define T_rotY 0.1 /* time period of rotation in Y */
DEFINE_CG_MOTION(capsule, dt, vel, omega, time, dtime)
{
vel[0] = 0;
//vel[1] = A*2*pi/T_oscY*cos(2*pi*time/T_oscY);
vel[2] = 0;
omega[0] = 0;
omega[1] = 2 * pi / T_rotY;
omega[2] = 0;
N3V_S(origin, =, 0.0); /* default values, line could be omitted */
N3V_D(axis, =, 0.0, 0.0, 0.0); /* default values, line could be omitted */
}
/**End of UDF**/
-
December 3, 2019 at 1:51 pmRobForum Moderator
Have a look at the 6DOF examples. You may find it's easier to set a rotating zone (have a look in the tutorials that come with the documentation) and then move that.
-
December 4, 2019 at 5:29 pmjianan.zhaoSubscriber
Dear Rwoolhou,
Thank you for your suggestion. I will look into 6DOF.
-
- The topic ‘How to use DEFINE_CG_MOTION to define both translation and rotation’ is closed to new replies.
- Non-Intersected faces found for matching interface periodic-walls
- Script error Code: 800a000d
- Unburnt Hydrocarbons contour in ANSYS FORTE for sector mesh
- Fluent fails with Intel MPI protocol on 2 nodes
- Help: About the expression of turbulent viscosity in Realizable k-e model
- Cyclone (Stairmand) simulation using RSM
- error udf
- Mass Conservation Issue in Methane Pyrolysis Shock Tube Simulation
- Script Error
- Facing trouble regarding setting up boundary conditions for SOEC Modeling
-
1406
-
599
-
591
-
550
-
366
© 2025 Copyright ANSYS, Inc. All rights reserved.