need help in this Tutorial : Using a UDF Flexible Oscillating membrane
I read that tutorial name : Using a UDF to Control the Dynamic Mesh of a
Flexible Oscillating Membrane ... and i used it in fluent .. also i used the attachment c file ( that name is : butterflyflex.c ) the moving type of membrane is ( moving arc motion ) . but i note that the memberane length from this coordinates (0.083552375 , 0.1 ) To (0.083552375 , 0.1 ) , which mean its length is 0.16710475 , and the center of arc is ( 0 , 0.1 ) .. i need that : 1 i need to use this ( arc motion ) for another membrane that have another length ( in example for 0.5 ) , what i shall to do in the C file ?? 2 i need to put the center of arc in another point in x direction ( in example : ( 3 , 0.1 ) , how i can do that ?? 3 what is the mean of any one of these ? cg_vel[0] = 0.0; cg_vel[1] = 0.0; cg_vel[2] = 0.0; cg_omega[0] = 0.0; cg_omega[1] = 0.0; cg_omega[2] = omega; 
can any one help me :( ??

1 i need to use this ( arc motion ) for another membrane that have another length ( in example for 0.5 ) , what i shall to do in the C file ??
You need to change the 'moving_arc' part of the UDF based on the dimension and motion of your boundaries. If you have the original UDF (and the PDF file) the comments in the UDF are very useful. 2 i need to put the center of arc in another point in x direction ( in example : ( 3 , 0.1 ) , how i can do that ?? You must do that in fluent (dynamic mesh settings). However you must modify the UDF in accordance to how you anticipate the motion. 3 what is the mean of any one of these ? cg_vel[0] = 0.0; cg_vel[1] = 0.0; cg_vel[2] = 0.0; cg_omega[0] = 0.0; cg_omega[1] = 0.0; cg_omega[2] = omega; There are the linear and angular velocities of the center of gravity. 
i am also facing the same problem.
I have to oscillate the cylinder to 180 degree. i have to write the udf for the same. but when i enter the udf it takes the inlet velocity insted of rotational motion.... 
@Ankit: Can you post your UDF here? we can have a look.

#include"udf.h"
#define ZONE_ID 3 #include<math.h> #define dynamesh_tools.h #define p 22/7 #define a 2*p /* when a=2*p*f, and take f=1*/ static real omega[2]_prev = 0.0; DEFINE_CG_MOTION(cylinder, dt, velocity, omega, time, dtime) { Thread*t; face_t f; velocity[0]=0.0; velocity[1]=0.0; velocity[2]=0.0; omega[0]=0.0; omega[1]=0.0; if (!Data_Valid_P()) return; t=DT_OMEGA_CG(t); domega[2] = a*sin(2*p*f*dtime); omega[2]_prev += omega[2]; Message ("time = %f, omega[2] = %f\n", time, omega[2]_prev); omega[2]=a*sin(2*p*f*time); } but in that omega[2] equation there is forcing frequency... still i dont know... because when i go through the paper they always talk about ration of f/f0. where f0 is vortex shadding frequency of steady cylinder. If there is some prob than pls help me Thanks 
You have so many problems with your UDF.
1. The use of 'f'. 2. The use of 't' 3. The use of 'omega[2]_prev'. 4. I think that you can avoid using 'a' and 't=DT_OMEGA_CG(t);'. And so on......... Here is the corrected UDF. #include "udf.h" #include "dynamesh_tools.h" #define p1 22/7 #define f1 1.0 DEFINE_CG_MOTION(cylinder, dt, cg_vel, cg_omega, time, dtime) { Thread*t; face_t f; real omega_prev; omega_prev = 0.0; cg_vel[0] = 0.0; cg_vel[1] = 0.0; cg_vel[2] = 0.0; if (!Data_Valid_P()) return; /* t = DT_OMEGA_CG(dt); */ cg_omega[0] = 0.0; cg_omega[1] = 0.0; cg_omega[2] = (2*p1)*sin(2*p1*f1*dtime); omega_prev = omega_prev + cg_omega[2]; Message ("time = %f, omega[2] = %f\n", time, omega_prev); } Lets see if that works for you.. 
Sir, Now its create problem in compile.
Its give an error report nmake is not recognized as an internal or external command Open_udf_library: the system cant find the file specified. 
Finally, the udf is successfully executed. Thnaks... But after some iteration it gives an error " divergence detected in AMG solver: Pressure correction"

All times are GMT 4. The time now is 00:35. 