CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

UDS for droplet collection efficiency

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   May 9, 2012, 15:22
Default UDS for droplet collection efficiency
  #1
New Member
 
Mirko Kozic
Join Date: Apr 2012
Posts: 2
Rep Power: 0
mkozic is on a distinguished road
Applying ANSYS FLUENT discrete phase model (DPM) I obtained water droplet collection efficiency without difficulties for 2D body (circular cylinder with diameter of 10.16 cm, free stream velocity of 80 m/s and median volumetric diameter of 16 μm). Then I tried Eulerian approach using User-Defined-Scalars (UDS). The C source code was checked and initialization performed via DEFINE_INIT. Values on the boundaries and in the domain were according to those defined in DEFINE_INIT. But during iterations values of uds on the wall were not changed, whereas all cell variables were put to zero. I suppose that DEFINE_PROFILE didn't work properly, but I don't know why. I send a part of the source code consisting of the UDFs for initialization, wall boundary condition for volume fraction and source term for x-momentum equation only for Reynolds number between 0 and 0.1 for brevity. Has anyone had a similar problem ?

#include "udf.h"
#define W_DENS 998.2 /* water density */
#define ALFA_INF 1.3E-06 /* water volume fraction at inlet */
#define VX_INF 80.0 /* water x-velocity at inlet */
#define VY_INF 0. /* water y-velocity at inlet */
#define DROP_DIAM 16.0E-06 /* water droplet diameter */
#define AIR_VISC 17.8E-06 /* air viscosity */

DEFINE_INIT(init,mixture_domain)
{
Domain *subdomain,*dom_water;
int phase_domain_index;
int body_ID=3; /* body ID=3 */
c_t c;
face_t f;
Thread *c_thread;
Thread *t_body;
sub_domain_loop(subdomain,mixture_domain,phase_dom ain_index)
{
if(DOMAIN_ID(subdomain)==3) /* water DOMAIN_ID=3 */
thread_loop_c(c_thread,subdomain)
{
begin_c_loop_all(c,c_thread)
{
C_UDSI(c,c_thread,0)=ALFA_INF; /* water volume fraction in cell */
C_UDSI(c,c_thread,1)=VX_INF; /* water x-velocity in cell */
C_UDSI(c,c_thread,2)=VY_INF; /* water y-velocity in cell */
}
end_c_loop_all(c,c_thread)
}
}
dom_water = Get_Domain(3);
t_body=Lookup_Thread(dom_water,body_ID); /* body faces thread */
begin_f_loop(f,t_body)
{
F_UDSI(f,t_body,0)=ALFA_INF; /* water volume fraction at body face*/

F_UDSI(f,t_body,1)=VX_INF; /* water x-velocity at body face */
F_UDSI(f,t_body,2)=VY_INF; /* water y-velocity at body face */
}
end_f_loop(f,t_body)
}
DEFINE_PROFILE(alfa_wall,t_wall,i) /*water volume fraction at body */
{
face_t f;
real A[ND_ND];
real ax,ay;
real vx_abs_f,vy_abs_f,skpr;
begin_f_loop(f,t_wall)
{
F_AREA(A,f,t_wall);
ax=A[0];
ay=A[1];
vx_abs_f=F_UDSI(f,t_wall,1); /* water x-velocity at body surface */
vy_abs_f=F_UDSI(f,t_wall,2); /* water y-velocity at body surface */
skpr=vx_abs_f*ax+vy_abs_f*ay; /* scalar product of velocity vector
and surface normal vector */
if(skpr>0.)
F_PROFILE(f,t_wall,i)=F_UDSI(f,t_wall,0);
else
F_PROFILE(f,t_wall,i)=0.;
}
end_f_loop(f,t_wall)
}
DEFINE_SOURCE(x_mom_water,c,t_water,dS,eqn)
{
Thread *t_air,*mixture_thread;
int phase_domain_index=0;
real source_ux,air_dens,v_slip,rey_nu,cd,ef,ka;
real alfa_c,ux_water_c,uy_water_c,ux_slip,uy_slip;
mixture_thread=THREAD_SUPER_THREAD(t_water); /* mixture thread */
t_air=THREAD_SUB_THREAD(mixture_thread,phase_domai n_index); /* primary
phase thread*/
alfa_c=C_UDSI(c,t_water,0); /* water volume fraction in cell */
ux_water_c=C_UDSI(c,t_water,1); /* water x-velocity in cell */
uy_water_c=C_UDSI(c,t_water,2); /* water y-velocity in cell */
ux_slip=C_U(c,t_air)-ux_water_c; /* cell x-slip velocity */
uy_slip=C_V(c,t_air)-uy_water_c; /* cell y-slip velocity */
air_dens=C_R(c,t_air); /* cell air density */
v_slip=sqrt(ux_slip*ux_slip+uy_slip*uy_slip); /* cell slip velocity */
rey_nu=air_dens*v_slip*DROP_DIAM/AIR_VISC; /* Reynolds number */
if(rey_nu==0)
ka=0.;
else if(0.1>rey_nu>0.)
{
cd=24./rey_nu;
ef=cd*rey_nu/24.;
ka=18.*AIR_VISC*ef/(W_DENS*DROP_DIAM*DROP_DIAM);
}
source_ux=ka*alfa_c*W_DENS*ux_slip;
return source_ux;
}
mkozic is offline   Reply With Quote

Old   July 3, 2012, 16:30
Default Collection efficiency
  #2
New Member
 
amin
Join Date: Jan 2012
Posts: 6
Rep Power: 5
aminrbspace is on a distinguished road
Hi,

1) my problem is computing collection efficiency with fluent.
I know, I must use UDS, also I have all of equations, but I dont know how could I define continunity for phase of water in UDS.

2) when eulerian_multiphase has actived in fluent, it will solve both equations of two phase(air and droplet disperse)couple , here why we must use UDS??(it has confused me)

I become happy to help me.

Regards,

Quote:
Originally Posted by mkozic View Post
Applying ANSYS FLUENT discrete phase model (DPM) I obtained water droplet collection efficiency without difficulties for 2D body (circular cylinder with diameter of 10.16 cm, free stream velocity of 80 m/s and median volumetric diameter of 16 μm). Then I tried Eulerian approach using User-Defined-Scalars (UDS). The C source code was checked and initialization performed via DEFINE_INIT. Values on the boundaries and in the domain were according to those defined in DEFINE_INIT. But during iterations values of uds on the wall were not changed, whereas all cell variables were put to zero. I suppose that DEFINE_PROFILE didn't work properly, but I don't know why. I send a part of the source code consisting of the UDFs for initialization, wall boundary condition for volume fraction and source term for x-momentum equation only for Reynolds number between 0 and 0.1 for brevity. Has anyone had a similar problem ?

#include "udf.h"
#define W_DENS 998.2 /* water density */
#define ALFA_INF 1.3E-06 /* water volume fraction at inlet */
#define VX_INF 80.0 /* water x-velocity at inlet */
#define VY_INF 0. /* water y-velocity at inlet */
#define DROP_DIAM 16.0E-06 /* water droplet diameter */
#define AIR_VISC 17.8E-06 /* air viscosity */

DEFINE_INIT(init,mixture_domain)
{
Domain *subdomain,*dom_water;
int phase_domain_index;
int body_ID=3; /* body ID=3 */
c_t c;
face_t f;
Thread *c_thread;
Thread *t_body;
sub_domain_loop(subdomain,mixture_domain,phase_dom ain_index)
{
if(DOMAIN_ID(subdomain)==3) /* water DOMAIN_ID=3 */
thread_loop_c(c_thread,subdomain)
{
begin_c_loop_all(c,c_thread)
{
C_UDSI(c,c_thread,0)=ALFA_INF; /* water volume fraction in cell */
C_UDSI(c,c_thread,1)=VX_INF; /* water x-velocity in cell */
C_UDSI(c,c_thread,2)=VY_INF; /* water y-velocity in cell */
}
end_c_loop_all(c,c_thread)
}
}
dom_water = Get_Domain(3);
t_body=Lookup_Thread(dom_water,body_ID); /* body faces thread */
begin_f_loop(f,t_body)
{
F_UDSI(f,t_body,0)=ALFA_INF; /* water volume fraction at body face*/

F_UDSI(f,t_body,1)=VX_INF; /* water x-velocity at body face */
F_UDSI(f,t_body,2)=VY_INF; /* water y-velocity at body face */
}
end_f_loop(f,t_body)
}
DEFINE_PROFILE(alfa_wall,t_wall,i) /*water volume fraction at body */
{
face_t f;
real A[ND_ND];
real ax,ay;
real vx_abs_f,vy_abs_f,skpr;
begin_f_loop(f,t_wall)
{
F_AREA(A,f,t_wall);
ax=A[0];
ay=A[1];
vx_abs_f=F_UDSI(f,t_wall,1); /* water x-velocity at body surface */
vy_abs_f=F_UDSI(f,t_wall,2); /* water y-velocity at body surface */
skpr=vx_abs_f*ax+vy_abs_f*ay; /* scalar product of velocity vector
and surface normal vector */
if(skpr>0.)
F_PROFILE(f,t_wall,i)=F_UDSI(f,t_wall,0);
else
F_PROFILE(f,t_wall,i)=0.;
}
end_f_loop(f,t_wall)
}
DEFINE_SOURCE(x_mom_water,c,t_water,dS,eqn)
{
Thread *t_air,*mixture_thread;
int phase_domain_index=0;
real source_ux,air_dens,v_slip,rey_nu,cd,ef,ka;
real alfa_c,ux_water_c,uy_water_c,ux_slip,uy_slip;
mixture_thread=THREAD_SUPER_THREAD(t_water); /* mixture thread */
t_air=THREAD_SUB_THREAD(mixture_thread,phase_domai n_index); /* primary
phase thread*/
alfa_c=C_UDSI(c,t_water,0); /* water volume fraction in cell */
ux_water_c=C_UDSI(c,t_water,1); /* water x-velocity in cell */
uy_water_c=C_UDSI(c,t_water,2); /* water y-velocity in cell */
ux_slip=C_U(c,t_air)-ux_water_c; /* cell x-slip velocity */
uy_slip=C_V(c,t_air)-uy_water_c; /* cell y-slip velocity */
air_dens=C_R(c,t_air); /* cell air density */
v_slip=sqrt(ux_slip*ux_slip+uy_slip*uy_slip); /* cell slip velocity */
rey_nu=air_dens*v_slip*DROP_DIAM/AIR_VISC; /* Reynolds number */
if(rey_nu==0)
ka=0.;
else if(0.1>rey_nu>0.)
{
cd=24./rey_nu;
ef=cd*rey_nu/24.;
ka=18.*AIR_VISC*ef/(W_DENS*DROP_DIAM*DROP_DIAM);
}
source_ux=ka*alfa_c*W_DENS*ux_slip;
return source_ux;
}
aminrbspace is offline   Reply With Quote

Old   July 4, 2012, 11:51
Default
  #3
New Member
 
Mirko Kozic
Join Date: Apr 2012
Posts: 2
Rep Power: 0
mkozic is on a distinguished road
Full eulerian multiphase model can not solve the collection efficiency problem properly, but UDS must be used because the wall boundary conditions are not standard. The wall boundary conditions must be prepared using UDF functions in order to allow the droplets that impinge the wall to escape out of the numerical domain.
mkozic is offline   Reply With Quote

Old   July 4, 2012, 17:20
Default icing
  #4
New Member
 
amin
Join Date: Jan 2012
Posts: 6
Rep Power: 5
aminrbspace is on a distinguished road
Hi,

Tnx a lot for your answer, but I have some eesay that they do it, with full eulerian mutiphase that define permeable wall for phase of water.could you help me for using UDS? I know UDS in fluent.

bests,

Quote:
Originally Posted by mkozic View Post
Full eulerian multiphase model can not solve the collection efficiency problem properly, but UDS must be used because the wall boundary conditions are not standard. The wall boundary conditions must be prepared using UDF functions in order to allow the droplets that impinge the wall to escape out of the numerical domain.
aminrbspace is offline   Reply With Quote

Old   August 18, 2012, 22:59
Default
  #5
New Member
 
rebeca
Join Date: Aug 2012
Posts: 2
Rep Power: 0
rebeccakath is on a distinguished road
Quote:
Originally Posted by mkozic View Post
Applying ANSYS FLUENT discrete phase model (DPM) I obtained water droplet collection efficiency without difficulties for 2D body (circular cylinder with diameter of 10.16 cm, free stream velocity of 80 m/s and median volumetric diameter of 16 μm). Then I tried Eulerian approach using User-Defined-Scalars (UDS). The C source code was checked and initialization performed via DEFINE_INIT. Values on the boundaries and in the domain were according to those defined in DEFINE_INIT. But during iterations values of uds on the wall were not changed, whereas all cell variables were put to zero. I suppose that DEFINE_PROFILE didn't work properly, but I don't know why. I send a part of the source code consisting of the UDFs for initialization, wall boundary condition for volume fraction and source term for x-momentum equation only for Reynolds number between 0 and 0.1 for brevity. Has anyone had a similar problem ?
I want to obtain collection efficiency by DPM method. But I don't know how to get the parameter. Could you tell me about your method? Do you use UDF obtain the velocity and position of the particles?
rebeccakath is offline   Reply With Quote

Reply

Tags
collection efficiency, uds

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Collection Efficiency in Fluent? Jason FLUENT 8 May 5, 2015 03:18
How can I find collection efficiency of cyclone by fluent? YuTsuYu FLUENT 1 July 2, 2013 15:46
Particle Collection Efficiency rval CFX 3 March 7, 2010 05:52
Particle collection efficiency in transient run bharath CFX 0 December 8, 2009 21:58
Collection efficiency Jen FLUENT 0 November 16, 2005 11:16


All times are GMT -4. The time now is 11:44.