# Grid-rotation with UDF Files

 Register Blogs Members List Search Today's Posts Mark Forums Read

 May 27, 2010, 12:21 Grid-rotation with UDF Files #1 New Member   Maxime Join Date: Apr 2010 Posts: 19 Rep Power: 9 Sponsored Links Hi, I need to simulate a sort of grid-rotation with UDF Files. To simplify, just imagine a circle with a radius equal to 1.1m and its origin on (-1.5, 0, 0) which have to turn around the origin (0, 0, 0) in z-direction. In real, there is two parts of fluid separate by a sliding mesh interface. This is my UDF File : #include"udf.h" DEFINE_GRID_MOTION(motion,domain,dt,time,dtime) { Thread *tf = DT_THREAD(dt); face_t f; Node *v; real NV_VEC(axis_1); real NV_VEC(axis_2); real displx; real disply; int n; displx=-1.5*(cos(10.47*(time+dtime))-cos(10.47*(time))); disply=-1.5*(sin(10.47*(time+dtime))-sin(10.47*(time))); NV_D(axis_1, =, 1.0, 0.0, 0.0); NV_D(axis_2, =, 0.0, 1.0, 0.0); begin_f_loop(f,tf) { f_node_loop(f,tf,n) { v = F_NODE(f,tf,n); /* update node if the current node has not been previously visited when looping through previous faces */ if ( NODE_POS_NEED_UPDATE (v)) { /* indicate that node position has been update so that it's not updated more than once */ NODE_POS_UPDATED(v); NV_V_VS(NODE_COORD(v), =, NODE_COORD(v), +, axis_1,*,displx); NV_V_VS(NODE_COORD(v), =, NODE_COORD(v), +, axis_2,*,disply); } } } end_f_loop(f,tf); } The number 10.47 represents the angular velocity (100 rpm = 10.47 rad/s) I am pretty close to fix this problem. I just don't know how inplement that on Fluent. I try with Define -> Dynamic Mesh -> Zones and under type i choose User-defined. The thing is i don't know if i have to choose the fluid, the interface or the both of them. All the test i did create en Error on Fluent : Error : Update dynamic mesh failed. Negative cell volume detected. or Note : zone-surface : cannot create surface from sliding interface zone. Creating empty surface. If someone could help me, Thank you, Regards, Titasse,

 May 27, 2010, 13:23 #2 New Member   Maxime Join Date: Apr 2010 Posts: 19 Rep Power: 9 That works now, but i only have the translation in the y-direction. I need the translation in x-direction too. If someone see where i made a mistake on my UDF File. Cheers, Titasse

 July 15, 2010, 10:59 #3 Senior Member   aerospain Join Date: Sep 2009 Location: Madrid, Spain Posts: 128 Rep Power: 9 Hi Titasse, did you sort your problem out? Could you tell me how? I have been using a UDF for a single rotating domain but using the velocity as the sinusoidal function, but your way of using displacement every time-step may work better for me. Do you have PDF files with infor about UDF? Besides the ANSYS "official" ones. cheers!

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post fivos Fluent UDF and Scheme Programming 3 December 24, 2016 11:50 abhishukla FLUENT 0 April 8, 2010 02:08 Miao FLUENT 0 November 2, 2008 19:59 Lorenzo FLUENT 2 October 10, 2008 10:37 Riccardo FLUENT 2 June 26, 2002 10:45