# UDF for slip and moving wall

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

 May 20, 2005, 11:25 UDF for slip and moving wall #1 lichun Dong Guest   Posts: n/a Dear all: I am trying to put a slip and moving boundary condition at the wall. so I write a UDF as the followed. But the FLUENT said there is a fatal problem "Segmentation violation". I select moving wall and non-slip at Fluent, maybe that is the reason? But if I select slip wall, I can not specify the wall velocity. Anybody has some experience to put a slip moving wall boundary? please give some suggestion. Thanks a lot #include "udf.h" DEFINE_PROFILE(wall_velocity,t,i) { face_t f; cell_t c; real cellnumber = 0; /*the number of the cells on the boundary*/ real A = 0.002; /*the amplitude of the oscillation*/ real omega = 100; /*the frequency of the oscillation*/ real dudy; /*the y derivative of the horizontal velocity*/ real sumdudy = 0; /*the sum of the velocity derivative*/ real avgdudy; /*the average of the velocity derivative*/ real beta = 0.2; /*the slippy coefficient*/ Thread *tc; tc = THREAD_T0(t); if (NULL != C_DUDY(c,tc)) { begin_c_loop(c,tc) { cellnumber = cellnumber + 1; dudy = C_DUDY(c,tc); sumdudy = sumdudy + dudy; } end_c_loop(c,tc) avgdudy = sumdudy/cellnumber; begin_f_loop(f,t) { real tempt = RP_Get_Real("flow-time"); F_PROFILE(f,t,i) = omega*A*cos(omega*tempt) - beta*avgdudy; } end_f_loop(f,t) } else { begin_f_loop(f,t) { real tempt = RP_Get_Real("flow-time"); F_PROFILE(f,t,i) = omega*A*cos(omega*tempt) - beta*avgdudy; } end_f_loop(f,t) } }

 May 21, 2005, 21:55 How to access variables in Fluent #2 lichun Dong Guest   Posts: n/a Dear all: This seems a hard question. I checked that once I try to access the variables, the "Segmentation violation" appears. So what is the trick to access the varibles in Fluent? I attached my UDF again. #include "udf.h" DEFINE_PROFILE(wall_velocity, t, i) { face_t f; cell_t c; real cellnumber = 0; /*the number of the cells on the boundary*/ real A; /*the amplitude of the oscillation*/ real omega; /*the frequency of the oscillation*/ real dudy; /*the y derivative of the horizontal velocity */ real sumdudy = 0; /*the sum of the velocity derivative */ real avgdudy; /*the average of the velocity derivative */ real beta; /*the slippry coeeficient*/ if (NULL != C_DUDY(c,t)) { begin_c_loop(c, t) { cellnumber++; dudy = C_DUDY(c,t); sumdudy =+ dudy; } end_f_loop(f,t); avgdudy = sumdudy/cellnumber; begin_f_loop(f, t) { real t = RP_Get_Real("flow-time"); F_PROFILE(f,t,i) = omega*A*cos(omega*t) - beta*avgdudy; } end_f_loop(f,t); } else { begin_f_loop(f, t) { real t = RP_Get_Real("flow-time"); F_PROFILE(f,t,i) = omega*A*cos(omega*t); } end_f_loop(f,t); } }

 May 30, 2005, 14:24 Re: UDF for slip and moving wall #3 ramesh Guest   Posts: n/a Hi, DEFINE_PROFILE takes input the boundary face not the cell. So when u are running a loop on the faces u cant access the particular cell directly. Because the thread for face is different from thread for cells. If u want to access the cell of the partciular boundary face use F_C0(f,tf). I hope this should solve the problem

 March 26, 2014, 05:37 moving wall slip #4 New Member   elaf Join Date: May 2013 Posts: 9 Rep Power: 5 Hi all I was wondering if any body can help me? I am using flow around cylinder, the shear stresses at the wall need to be specified to constant value. In this option, there are 3 components for the shear stresses, i.e. x direction components and so on. Does anyone know for example how can set these values for cylinder surface Regard.

 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 lingo FLUENT 9 August 19, 2014 09:14 noa FLUENT 0 March 13, 2011 06:26 lyf FLUENT 14 December 25, 2010 11:27 lingo FLUENT 2 April 23, 2004 02:38 Big Stone FLUENT 10 February 23, 2004 11:03

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