|
[Sponsors] |
March 25, 2006, 01:00 |
UDF of gradient-------please help
|
#1 |
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.
|
|
March 27, 2006, 09:18 |
Re: UDF of gradient-------please help
|
#3 |
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.
|
|
March 27, 2006, 21:33 |
Re: UDF of gradient-------please help
|
#4 |
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) } |
|
|
|
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 |