|
[Sponsors] |
July 31, 2013, 06:17 |
udf : velocity profile in DPM (and mass)
|
#1 |
New Member
Join Date: Jul 2013
Posts: 21
Rep Power: 13 |
Hello,
I am an user of FINE/Open. I would like to make a comparison with Fluent. Therefore, I need a little help in Fluent. I would like to insert a radial velocity profile for the DPM module. I saw that it had to use P_VEL. The code is correct? My injection point is located at (0,0,0.059) in my domain and I choose a solid cone (radius = 0.025 m) for the injection. #include "udf.h" real some_func(real r) { real vel; real r0[] = {0.0, 0.02, 0.022, 0.025}; real v0[] = {25.0, 20.0, 10.0, 0.00}; int i=0; if ( r >= r0[3] ) return 0.0; while( r >= r0[++i]) ; return v0[i-1]+((v0[i] - v0[i-1])/(r0[i] - r0[i-1]))*(r-r0[i-1]); } DEFINE_DPM_INJECTION_INIT(DPM_VELOCITY,I) { static const real orig[3]={0.0, 0.0, 0.059}; real x[ND_ND]; real r; Particle *p; loop(p,I->p) { NV_VV(x,=,x,-,orig); r = sqrt(x[0]*x[0]+x[1]*x[1]); P_VEL(p)[2] = some_func(r); P_VEL(p)[1]=0; P_VEL(p)[0]=0; } } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
DPM mass problem | Henrik Ström | FLUENT | 9 | May 20, 2016 12:00 |
Add Mass to a Particle with UDF (DPM) | sega | Fluent UDF and Scheme Programming | 6 | October 24, 2013 23:14 |
Hooking a DPM Particle Heat and Mass Transfer UDF to FLUENT | subhankar_bhandari | Fluent UDF and Scheme Programming | 0 | August 19, 2010 04:09 |
Hooking a DPM Particle Heat and Mass Transfer UDF to FLUENT | subhankar_bhandari | FLUENT | 0 | August 19, 2010 04:01 |
Hooking a DPM Particle Heat and Mass Transfer UDF to FLUENT | subhankar_bhandari | Main CFD Forum | 0 | August 19, 2010 04:01 |