Hi all,
Here i am a help from those people having experimence with using PBE in fluent.
I was trying to access the PBE bin fractions using C_PB_DISCI(c,t,i). While i am interpreting the udf, it is showing the undeclared variable c_pb_disci. If i include sg_pb.h, it the above problem is eliminated but with a new error: line 123: parse error, thought the line 123 does not exist in my udf or there is nommand in that line. If i define c_pb_disci as real then one more problem: c_pb_disci: no function prototype. I am using discrete phase pbe and i am basically trying to calculate average particle diameter in phase 2. I there any any other option to calculate the average dia through other macro?
My eisting code is
DEFINE_PB_GROWTH_RATE(growth_rate, cell, t,d_1)
{
real G,G0, G1, den, particle_dia,SS0,lamda,f0,f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15;
real v0,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,sumn,sumd,rc;
real rv0,rv1,rv2,rv3,rv4,rv5,rv6,rv7,rv8,rv9,rv10,rv11,rv12,rv13,rv14,rv15;
real Volfrac_s_phase, Volfrac,C_YI,C_PB_QMOMI;
//real *yi;
//real d_1; /* Particle diameter */
real nav = 6.023e23; /* avagadro number */
real vm = 2.7e-5; /* molar volume, m3/gm_mol */
real dif_coef=1e-9; /*m2/s need to be checked*/
real bulk_solub=2.55; /*mol/m3,*/
real solub=0.153; //kg/m3
real int_tension=0.1; /*J/m2 needs to be checked for silica */
real R=8.314; //j/mol/k//
real T=313;
Thread *tc = THREAD_SUPER_THREAD(t); /*obtain mixture thread */
Thread **pt = THREAD_SUB_THREADS(tc); /* pointer to sub_threads */
Thread *tp = pt[P_PHASE]; /* primary phase thread */
//T = C_T(cell,tp); /* Temperature of primary phase in Kelvin */
den=C_R(cell,tp);
particle_dia = d_1;
//SS0 = C_YI(cell,tp,0); /* Ce(no3)3.6h2o massfraction */
// SS1 = C_YI(cell,tp,1); /* nh4oh massfraction */
SS0 = C_YI(cell,tp,0); /* ceo2 massfraction */
// SS3 = C_YI(cell,tp,3); /* n2o massfraction */
// SS4 = C_YI(cell,tp,4); /* h2 massfraction */
// SS5 = C_YI(cell,tp,5); /* h2o massfraction*/
//Formulation for OR inclusion//
//Thread *tc = THREAD_SUPER_THREAD(thread); /*obtain mixture thread */
//Thread **st = THREAD_SUB_THREADS(tc);
Thread *tp = pt[S_PHASE];
f0=C_PB_DISCI(cell,t,0);
}
I have spent about 1 year behind this problem. now i am in a trap of this problem. Any kind of help from expert is welcome.
Waiting for your reply
thanks
Vivek