CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   dynamic mesh not working (

studentwhoneedshelp July 22, 2008 01:01

dynamic mesh not working

I am new to dynamic mesh and I need your help. I have created simple box model which I wanted to rotate at z axis at certain rotational velocity. I want to see the outer domain mesh changes according to the rotation of the box. If this simple model works, I will use the same method to more complex model. Please check the model using these links.

Full model with BCs:

The box which is set to rotate at z axis with omega = 0.2 rad/s:

The box (solid volume) rotated, however the outer domain didnot change following the movement of the box:

The box volume was rotating, as you can see from the box-shadow BC. However, the outer domain (box BC) didnot change.

Can you please help me to set the case. I believe that there is something wrong with the case setting.


krishna July 22, 2008 04:17

Re: dynamic mesh not working
You have to write a UDF to rotate the rigid box. Use DEFINE_CG_MOTION and with options such as Smoothing, Remeshing. Regards,

studentwhoneedshelp July 22, 2008 05:18

Re: dynamic mesh not working
Hi Krishna,

I am trying to write the udf file now. I am currently reading the sample for the udf with define_cg_motion.

What is the symbol for omega (angular velocity)? Should we set it ourself? They only have example for force and axial velocity.

I want to assign constant angular velocity to the box. At the end of certain period of time, I want to know the moment with respect to the box's cg.

Thank you

studentwhoneedshelp July 23, 2008 09:00

Re: dynamic mesh not working

I wrote this simple udf file to rotate the box at z axis with omega = 0.2 rad/s.

#include "udf.h"


{ /* reset velocities */

NV_S(vel, =, 0.0); NV_S(omega, =, 0.0); if (!Data_Valid_P()) return; omega[2] = 0.2; }

Then when I tried to attach it to the box (volume), I got this error message. Can somebody please show me where is the error.

Warning: incorrect cg motion UDF boxtwo on zone 2 (assuming no motion)

Thank you

krishna July 24, 2008 03:31

Re: dynamic mesh not working
keep the mesh file and the udf in the same directory. you have to load the file in to the solver by using compile option. DEFINE->USER-DEFINED->FUNCTIONS->COMPILE->udf.c and built and load it. You may have problems if you do not have a C compiler. Better load VC++ if you are working on windows operating system. ReGARDS,

All times are GMT -4. The time now is 01:43.