UDF wall velocity
hello is it possible to define velocity of fluid near wall(slip flow):U=B*(dU/dx or dy)^n and write udf for this boundary condition? if n=0.9 & B=0.02, is this udf is correct?
#include "udf.h" DEFINE_PROFILE(slip, c, t) { cell_t c; Thread *t; double m =C_DWDX(c, t); C_W(c, t)=0.02* pow ( m, 0.9); } Yours faithfully Arash Avesta |
Re: UDF wall velocity
Your value for slip should be possible to define using a UDF and if you want to define velocity at the wall you can hook it in at the wall boundary condition panel under the moving wall tab. I would use a Define Profile macro, however, you need the arguments (name, t, i). where name is the name that appears in the Fluent GUI, t is the thread (in this case wall that you apply the UDF to) and i is the this you are going to alter(presumably x, y, or z velocity at the wall)
Therefor you will not beed to define t with the Thread *t; line that you have. You will also need a face loop and an F_PROFILE(f, t, i) = line. If you don't understand these terms it is probably best you consult the fluent 6/6.1 UDF manual. |
?UDF wall velocity
hello thank you is it possible to define velocity of fluid near wall(slip flow):U=B*(dU/dx or dy)^n and write udf for this boundary condition? if n=0.9 & B=0.02, is this udf is correct?
#include "udf.h" DEFINE_PROFILE(slip, thread, nw) { cell_t c; Thread *t; int i; face_t f; begin_f_loop (f,thread) double m =C_DWDY(c, t); { F_PROFILE(f,thread,nw) = 0.02* pow ( m, 0.9); } end_f_loop (f,thread) } please if it is not correct,write it for me correctly Yours faithfully Arash Avesta |
Re: ?UDF wall velocity
I haven't used the C_DWDY(c, t) macro befor, so I can't offer you any help with this. However, I know what you do not need to define you thread again with the Thread *t and you don't use variable i, so you wont need this. Your f_loop should be held within {} brackets. Here is what I would do: #include "udf.h"
DEFINE_PROFILE(slip, thread, nw) { face_t f; begin_f_loop (f, thread) { cell_t c; double m =C_DWDY(c, t); F_PROFILE(f, thread, nw) = 0.02* pow (m, 0.9); } end_f_loop (f,thread) } The last remaining problem with this code is the fact you have not defined c. What cell are you refering to in the C_DWDY(c, t) line. If it is the one next to the boundary face then there are macros for getting this cell avabliable, the information is in the UDF manual. Happy coding |
All times are GMT -4. The time now is 17:07. |