udf explaination
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) :confused: { /* 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; :confused: 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) } |
Try posting in the UDF forum?
|
The mentioned UDF is just setting velocity and turbulent quantities in the fluid domain according to radius
Code:
r =x[1]; |
Thanks
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? |
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. |
All times are GMT -4. The time now is 08:05. |