# wall moving on the cylinder

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 LinkBack Thread Tools Display Modes
May 29, 2012, 12:55
wall moving on the cylinder
#1
New Member

Kecin Chang
Join Date: May 2012
Posts: 1
Rep Power: 0
Sponsored Links
Dear all,
I write a velocity profile into the wall moving condition for cylinder rotate

but my UDF had something problem
the velocity vetor on the cylinder will be wrong in the quadrant 2(x<0,y>0)
my cylinder center point is (0,0)

Quote:
 DEFINE_PROFILE(rotate_x, thread, index) { real x[ND_ND]; real y; real k; face_t f; real t = RP_Get_Real("flow-time"); begin_f_loop(f, thread) { F_CENTROID(x,f,thread); y=x[1]; k=x[0]; if(t<=1) { if(y*k<0) { F_PROFILE(f, thread, index) = (0.2)*sin(pi*t)*(k/NV_MAG(x)); } else { F_PROFILE(f, thread, index) = (-0.2)*sin(pi*t)*(k/NV_MAG(x)); } } else { F_PROFILE(f, thread, index) = 0; } end_f_loop(f, thread) } } DEFINE_PROFILE(rotate_y, thread, index) { real x[ND_ND]; real y; real k; face_t f; real t = RP_Get_Real("flow-time"); begin_f_loop(f, thread) { F_CENTROID(x,f,thread); y=x[1]; k=x[0]; if(t<=1) { if(k*y<0) { F_PROFILE(f, thread, index) = (-0.2)*sin(pi*t)*(y/NV_MAG(x)); } else { F_PROFILE(f, thread, index) = (0.2)*sin(pi*t)*(y/NV_MAG(x)); } } else { F_PROFILE(f, thread, index) = 0; } end_f_loop(f, thread) } }

I don't know where is the problem in my code
thank everyone!!

 Sponsored Links

 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 Attesz CFX 7 January 5, 2013 04:32 HFLUENT Fluent UDF and Scheme Programming 0 April 27, 2011 12:03 aiya Main CFD Forum 6 May 10, 2007 11:33 Nikolaos FLUENT 0 September 20, 2006 06:18 Sourabh Main CFD Forum 1 August 8, 2006 07:47

 Sponsored Links

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

 Contact Us - CFD Online - Top