CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

UDF of gradient-------please help

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 25, 2006, 02:00
Default UDF of gradient-------please help
  #1
Mech
Guest
 
Posts: n/a
Hi I need a UDF to compute velocity gradient. In 2D case it is du/dy where u is the x component along the streamline and y is the distance normal to the wall. can anybody help me? I want to use this gradient value as the fluid velocity on the wall (slip condition). Thanks.
  Reply With Quote

Old   March 25, 2006, 09:24
Default Re: UDF of gradient-------please help
  #2
KP
Guest
 
Posts: n/a
DEFINE_ADJUST Function will let u do that. kp@dal.ca
  Reply With Quote

Old   March 27, 2006, 09:18
Default Re: UDF of gradient-------please help
  #3
Lucy
Guest
 
Posts: n/a
There are macros in UDF for you to access gradients such as C_DUDX(c,t),etc. I think you don't need to compute it yourself.
  Reply With Quote

Old   March 27, 2006, 21:33
Default Re: UDF of gradient-------please help
  #4
Mech
Guest
 
Posts: n/a
Hi I need the streamwise component of velocity gradient i.e. du/dy, where y is the normal vector on the wall. I'll use this value as the velocity on the wall (slip condition). I wrote the following UDF. But the solution diverges and does not give me the gradient.Can anybody do the required correction and send me? I'll be grateful to you. Mech

#include <udf.h> #include <mem.h>

DEFINE_PROFILE(top_wall_vel, t, i)

{

face_t f;

cell_t c0;

Thread *t0;

real g_u, val;

begin_f_loop(f,t)

{

c0=F_C0(f,t);

t0=t->t0;

g_u = - C_U_G(c0,t0)[1];

val = g_u;

F_PROFILE(f,t,i)=val;

}

end_f_loop(f,t) }

  Reply With Quote

Reply

Thread Tools
Display Modes

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
specified shear at wall - temperature gradient - UDF - access violation error senD Fluent UDF and Scheme Programming 9 September 18, 2014 08:29
UDF to Access Wall Normal Concentration Gradient Daniel Tanner Fluent UDF and Scheme Programming 3 May 21, 2012 12:14
UDF for Species Mass Fraction Gradient *IN SPECIFIC ZONE * -- e.g. along axis of sym. ksiegs2 Fluent UDF and Scheme Programming 0 February 27, 2011 13:55
temperature gradient problem in udf Souviktor Fluent UDF and Scheme Programming 2 March 31, 2009 09:43
UDF for species-mass-fraction gradient at outlet sisir FLUENT 0 June 9, 2007 03:40


All times are GMT -4. The time now is 10:25.