|
[Sponsors] |
May 4, 2012, 07:31 |
udf explaination
|
#1 |
New Member
Ijaz
Join Date: Dec 2011
Location: Singapore
Posts: 17
Rep Power: 14 |
This is the udf for mix tank Tutorial 23- for eulerian multiphase granular flow. Can anyone please explain the udf,as in my case only a simple disc is rotating. I need to modify the udf. Can anyone please help...
#include "udf.h" #include "sg.h" #define FLUID_ID 1 #define ua1 -7.1357e-2 #define ua2 54.304 #define ua3 -3.1345e3 #define ua4 4.5578e4 #define ua5 -1.9664e5 #define va1 3.1131e-2 #define va2 -10.313 #define va3 9.5558e2 #define va4 -2.0051e4 #define va5 1.1856e5 #define ka1 2.2723e-2 #define ka2 6.7989 #define ka3 -424.18 #define ka4 9.4615e3 #define ka5 -7.7251e4 #define ka6 1.8410e5 #define da1 -6.5819e-2 #define da2 88.845 #define da3 -5.3731e3 #define da4 1.1643e5 #define da5 -9.1202e5 #define da6 1.9567e6 DEFINE_PROFILE(fixed_u, thread, np) { real r; begin_c_loop (c,thread) { /* centroid is defined to specify position dependent profiles*/ C_CENTROID(x,c,thread); r =x[1]; F_PROFILE(c,thread,np) = ua1+(ua2*r)+(ua3*r*r)+(ua4*r*r*r)+(ua5*r*r*r*r); } end_c_loop (c,thread) } DEFINE_PROFILE(fixed_v, thread, np) { cell_t c; real x[ND_ND]; real r; begin_c_loop (c,thread) { /* centroid is defined to specify position dependent profiles*/ C_CENTROID(x,c,thread); r =x[1]; F_PROFILE(c,thread,np) = va1+(va2*r)+(va3*r*r)+(va4*r*r*r)+(va5*r*r*r*r); } end_c_loop (c,thread) } DEFINE_PROFILE(fixed_ke, thread, np) { cell_t c; real x[ND_ND]; real r; begin_c_loop (c,thread) { /* centroid is defined to specify position dependent profiles*/ C_CENTROID(x,c,thread); r =x[1]; F_PROFILE(c,thread,np) = ka1+(ka2*r)+(ka3*r*r)+(ka4*r*r*r)+(ka5*r*r*r*r)+(k a6*r*r*r*r*r); } end_c_loop (c,thread) } DEFINE_PROFILE(fixed_diss, thread, np) { cell_t c; real x[ND_ND]; real r; begin_c_loop (c,thread) { /* centroid is defined to specify position dependent profiles*/ C_CENTROID(x,c,thread); r =x[1]; F_PROFILE(c,thread,np) = da1+(da2*r)+(da3*r*r)+(da4*r*r*r)+(da5*r*r*r*r)+(d a6*r*r*r*r*r); } end_c_loop (c,thread) } |
|
May 4, 2012, 13:36 |
|
#2 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,754
Rep Power: 66 |
Try posting in the UDF forum?
|
|
May 5, 2012, 18:32 |
|
#3 |
Member
Join Date: Nov 2011
Location: Czech Republic
Posts: 97
Rep Power: 14 |
The mentioned UDF is just setting velocity and turbulent quantities in the fluid domain according to radius
Code:
r =x[1]; |
|
May 6, 2012, 21:59 |
Thanks
|
#4 |
New Member
Ijaz
Join Date: Dec 2011
Location: Singapore
Posts: 17
Rep Power: 14 |
Thanks for the explanation...does the radius pertain to radius of impeller?
I have an impeller rotating with speed "a" asymmetrically at a distance of 0.16 m from the centre and also need to rotate the tank with speed "b". Could you give me any which way I could do it? is udf necessary? |
|
May 8, 2012, 05:24 |
|
#5 | |
Member
Join Date: Nov 2011
Location: Czech Republic
Posts: 97
Rep Power: 14 |
Quote:
For your simulation, if you don't have an experimental data, which you would like to use, you will have to use a different approach. For example the MRF method comes to my mind (assuming that you want to do steady state simulation). Basically you will have to divide your domain into two subdomains and set demanded angular velocities in them. Last edited by Sixkillers; May 8, 2012 at 06:18. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 23:14 |
How to add a UDF to a compiled UDF library | kim | FLUENT | 3 | October 26, 2011 22:38 |
RE: the explaination of Error while compling UDF | li li | FLUENT | 0 | October 24, 2003 01:47 |
UDF...UDF...UDF...UDF | Luc SEMINEL | FLUENT | 0 | November 25, 2002 05:03 |
UDF, UDF, UDF, UDF | Luc SEMINEL | Main CFD Forum | 0 | November 25, 2002 05:01 |