|
[Sponsors] |
September 3, 2011, 09:25 |
udf
|
#1 |
New Member
RAVI KUMAR
Join Date: Aug 2011
Location: HYDERABAD
Posts: 16
Rep Power: 14 |
hello friends!!!
can any body help me in writing an UDF for the below boundary conditions,as m very new to fluent and that to i never come across writing an UDF while using fluent till this time. my boundary conditions are as below : 1) dT/dy = 0 where T stands for Temperature and y is the direction of flow. 2) u = o where u is the x component of velocity, 3) v not equal to zero. i mean v component of velocity is not zero. help will me very much appreciated |
|
September 5, 2011, 10:34 |
|
#2 |
New Member
Ali
Join Date: Mar 2011
Posts: 27
Rep Power: 15 |
Hi,
First of all, you should take a glance at Fluent 'UDF Manual'. There is a great number of examples for assigning parameters. I tell you some key words: DEFINE_PROFILE , thread_loop_c , begin_c_loop , C_U , F_U , C_V , F_V , C_T , F_T. Here is an example from manual, which I hope help you: Code:
DEFINE_PROFILE(pressure_profile,t,i) { real x[ND_ND]; /* this will hold the position vector */ real y; face_t f; begin_f_loop(f,t) { F_CENTROID(x,f,t); y = x[1]; F_PROFILE(f,t,i) = 1.1e5 - y*y/(.0745*.0745)*0.1e5; } end_f_loop(f,t) } Code:
DEFINE_PROFILE(fixed_v,t,i) { cell_t c; real x[ND_ND]; real r; begin_c_loop(c,t) { /* centroid is defined to specify position dependent profiles*/ C_CENTROID(x,c,t); r =x[1]; F_PROFILE(c,t,i) = va1+(va2*r)+(va3*r*r)+(va4*r*r*r)+(va5*r*r*r*r); } end_c_loop(c,t) } |
|
September 7, 2011, 01:43 |
|
#3 |
New Member
EB
Join Date: Aug 2010
Posts: 6
Rep Power: 15 |
Hi,
First of all your problem - at least your boundary conditions (BC's) - seems like you don't need UDFs since you can insert those BC's directly in the UserGraphicalInterface. Perhaps it is a matter of choosing proper BCs for your inlet, or making a more flexible geometry by splitting up your inlet in 2 boundary regions!? Secondly, I think Ansys Fluent really needs a stronger manual for using UDF, for people who can't write C-scripts. It is very weak and jumps to complex code-writing while it doesn't explained well how to structure C-language script. They made already 522 pages of UDF-manual, why not a more comprehensive introduction into C first?! It should be an independent manual. Anyway I hope you are on your way to solve this model. Regards |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dynamic Mesh UDF | Qureshi | FLUENT | 7 | March 23, 2017 07:37 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 22:14 |
How to add a UDF to a compiled UDF library | kim | FLUENT | 3 | October 26, 2011 21:38 |
UDF...UDF...UDF...UDF | Luc SEMINEL | FLUENT | 0 | November 25, 2002 04:03 |
UDF, UDF, UDF, UDF | Luc SEMINEL | Main CFD Forum | 0 | November 25, 2002 04:01 |