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

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

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 25, 2006, 01: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, 08: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 Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
temperature gradient problem in udf Souviktor Fluent UDF and Scheme Programming 6 March 10, 2019 05:48
UDF to Access Wall Normal Concentration Gradient Daniel Tanner Fluent UDF and Scheme Programming 4 February 18, 2015 14:35
specified shear at wall - temperature gradient - UDF - access violation error senD Fluent UDF and Scheme Programming 9 September 18, 2014 07:29
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 12:55
UDF for species-mass-fraction gradient at outlet sisir FLUENT 0 June 9, 2007 02:40


All times are GMT -4. The time now is 19:37.