# UDF to rotate

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

 July 20, 2005, 07:48 UDF to rotate #1 Jon Guest   Posts: n/a Hi all, I'm looking to write a udf to produce a rotating motion (rad/sec) for a volume, around a specified axis (0,0). I've been able to produce udf's that produce a circular motion by specifying a sinusoidal x and y motion, but now need the volume to actually rotate. Hope you can help, Thanks,

 July 20, 2005, 08:08 Re: UDF to rotate #2 edi ghirardi Guest   Posts: n/a The following is an example on how to ramp up the rotational speed as function of iteration supposing that you use MRF (or SRF). Changing it as function of flow time for unsteady simulations should be straightforward (Rp_Get_Real("Flow Time")). Hope this helps Edi. #include "udf.h" #define Niter 25 /* iteration update interval */ #define omg_mn 0.00001 /* starting omega */ #define omg_mx 20.0 /* final omega */ #define del_omg 0.2 /* incremental omega */ DEFINE_ADJUST(myadjust,domain) { int zoneID; int iter = (nres==0)?(1)(int)count2[nres-1]); float omega; Thread *tc; zoneID = 2; tc = Lookup_Thread(domain,zoneID); if ( (iter%Niter)==0 ) { omega = omg_mn + (iter/Niter)*del_omg; if ( omega > omg_mx ) omega = omg_mx; THREAD_VAR(tc).fluid.omega = omega; Message("At iter=%d - update omega to %f\n",iter,omega); } }

 July 20, 2005, 08:22 Re: UDF to rotate #3 Jon Guest   Posts: n/a thanks for your reply Edi. The rotational velocity is constant throughout however (150 radians per second). I just want to make a volume rotate about a central axis at this speed. Ideally, the udf would use t and simply increment the angle of rotation based on the value of t during interation. Thanks again,

 July 20, 2005, 08:42 Re: UDF to rotate #4 edi ghirardi Guest   Posts: n/a Sorry, might be a silly question, maybe I misunderstood your problem again, but what about defining a moving wall? In the BC panel you can define the rotational speed (relative to adjacent cell zone) and axis of rotation. Edi.

 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 shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14 kim FLUENT 3 October 26, 2011 21:38 pejmanpark Fluent UDF and Scheme Programming 0 July 13, 2009 07:37 Luc SEMINEL FLUENT 0 November 25, 2002 05:03 Luc SEMINEL Main CFD Forum 0 November 25, 2002 05:01

All times are GMT -4. The time now is 21:50.