CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   dynamic mesh not working (http://www.cfd-online.com/Forums/fluent/48834-dynamic-mesh-not-working.html)

studentwhoneedshelp July 22, 2008 01:01

dynamic mesh not working
 
Hi,

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: http://img235.imageshack.us/img235/4...is8fullfb0.png

The box which is set to rotate at z axis with omega = 0.2 rad/s: http://img133.imageshack.us/img133/1...smallbozt5.png

The box (solid volume) rotated, however the outer domain didnot change following the movement of the box: http://img401.imageshack.us/img401/4...rotatedfk4.jpg

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.

Thanks

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
 
Hi,

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

#include "udf.h"

DEFINE_CG_MOTION(boxtwo,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.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.