CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   UDF for pellets (https://www.cfd-online.com/Forums/fluent-udf/92854-udf-pellets.html)

ZsoltiV September 27, 2011 10:35

UDF for pellets
 
Hi everyone,

I want to simulate with eulerian multiphase model one gasifier. The gasifier is just a cylinder in whitch I have 3 phases. The first is the air need to gasification, wood pellets and ash. In this case I want to know just I the air is flows around the pellets. But I need an UDF for changeing the pellets to ash in time. I wrote this UDF. If some can please correct it:

#include "udf.h"


#define OMEGA 7.26E-3
#define K_F0 0.0257
#define K_S0 1.0
#define d_b 0.00683 /* mean diameter of bulk material */
real rho_b = 2250.; /* particle density */
real cp_b = 835.; /* specific heat capacity */
real A_V_sphere = 6.0/d_b; /* area-to-volume ratio of a sphere*/
real A_b_V; /* area-to-volume ratio */


real
k_solid(real e_gas)
{
real k_sol;
real a = K_S0/K_F0;
real b = 1.25*pow((1.-e_gas)/e_gas, 10./9.);
real t1 = (a-1.)/pow((1.-b/a),2.0)*(b/a)*log(a/b);
real t2 = -((b-1.)/(1.-b/a))-0.5*(b+1.);
real gm = (2./(1.-b/a))*(t1+t2);
real k_bs = K_F0*(OMEGA*a + (1.-OMEGA)*gm);
k_sol = k_bs/sqrt(1.-e_gas);
return (k_sol);
}

DEFINE_PROPERTY(conduct_gas,cell,thread)
{
real k_bf, k_gas;
k_bf = K_F0*(1.-sqrt(1.-C_VOF(cell,thread)));
k_gas = k_bf/C_VOF(cell, thread);
return (k_gas);
}


DEFINE_PROPERTY(conduct_solid,cell,thread)
{
real vol; /* cell volume */
real vol_m1; /* cell volume time step minus 1 */
real fac; /* factor in time derivative */
real fac_m1; /* factor at time step minus 1 */
real eps_b = 1.0 - C_POR(c,t); /*solid volume fraction*/

/* d(fac*V*phi)/dt = fac*V/dt*phi - fac_m1*V/dt*phi_m1
= apu * phi - su */
vol = C_VOLUME(c,t);
vol_m1 = vol;
fac = rho_b*cp_b*eps_b;
fac_m1 = fac;
*apu = -fac*vol / delta_t;
*su = fac_m1*vol_m1*C_UDSI_M1(c,t,i)/delta_t;
}


All times are GMT -4. The time now is 12:38.