FLUENT-UDF代码-颗粒(煤或生物质)床层多相流燃烧过程数值模拟-【第2部分-完结】_第1页
FLUENT-UDF代码-颗粒(煤或生物质)床层多相流燃烧过程数值模拟-【第2部分-完结】_第2页
FLUENT-UDF代码-颗粒(煤或生物质)床层多相流燃烧过程数值模拟-【第2部分-完结】_第3页
FLUENT-UDF代码-颗粒(煤或生物质)床层多相流燃烧过程数值模拟-【第2部分-完结】_第4页
FLUENT-UDF代码-颗粒(煤或生物质)床层多相流燃烧过程数值模拟-【第2部分-完结】_第5页
已阅读5页,还剩11页未读, 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Fluent-UDF_Coal-Combustion-Multiphase-Flow-Processes

---Codesforvariouskindsofheterogeneousreactions

【第二局部-Part2】

DEFINE_HET_RXN_RATE(SteamGasif_Rev_MGAS,c,t,hr,mw,yi,rr,rr_t)

{

Thread**pt=THREAD_SUB_THREADS(t);

Thread*tp=pt[0];/*gasphase*/

intindex_phase=Get_Phase_Index(hr);

Thread*ts=pt[index_phase];/*solidphase*/

*rr=0;

doubledirection=0.0,mol_weight,y_carbon,rr_turb=1e+20;

/*

CO+H2--->H2O+1/25Soot

Thereversesteamgasificationreaction,whichisCO+H2--->1/25Soot+H2Oiswrittenasthereaction

shownabove.SoanegativeratemeansCOandH2isconsumedandH2OandSootaregenerated.Notethatno

C(s)isgenerated,thestoichcoeffforC(s)intheabovereationiszero.

Setthephaseandspeciesindices.Ashspeciesindexisinitializedtozero,withallotherindices.

AshspeciesindexisusedasaflagtoexecuteSetSpeciesIndexonlyonce.Thisisdonebythefirst

reaction,definedintheheterogeneousreactionpanelinFLUENTGUI.

*/

if(IS_ASH==0)

SetSpeciesIndex();

if(MGAS_Gasif)

{

doubleRoRT=C_R(c,tp)*UNIVERSAL_GAS_CONSTANT*C_T(c,tp);

doublep_h2o=RoRT*yi[IP_H2O][IS_H2O]/mw[IP_H2O][IS_H2O]/101325.;

doublep_co=RoRT*yi[IP_CO][IS_CO]/mw[IP_CO][IS_CO]/101325.;

doublep_h2=RoRT*yi[IP_H2][IS_H2]/mw[IP_H2][IS_H2]/101325.;

y_carbon=yi[IP_SOOT][IS_SOOT];

mol_weight=mw[IP_SOOT][IS_SOOT];

if(rp_ke)

rr_turb=Turbulent_rr(c,t,hr,yi);

if(C_VOF(c,ts)>=eps_s_small)

{

*rr=rr_steam_gasif(c,t,ts,tp,p_h2o,p_co,p_h2,y_carbon,mol_weight,&direction);/*mol/(cm^3.s)*/

if(direction>0.0)/*positivevalueimpliesC(s)+H2O--->CO+H2*/

*rr=0.0;

else/*negativevalueimpliesCO+H2--->H2O+1/25Soot*/

{

*rr=abs(*rr);

*rr=MIN(*rr,rr_turb);

}

}

}

}

doublerr_steam_gasif(cell_tc,Thread*t,Thread*ts,Thread*tp,doublep_h2o,doublep_co,doublep_h2,doubley_carbon,doublemol_weight,double*direction)

{

doublerate,prod,T_g=MIN((MAX(TMIN,C_T(c,tp))),TMAX);

doublep_h2o_star=p_h2*p_co/(exp(17.29-16326/T_g));

if(MGAS_Gasif)*direction=p_h2o-p_h2o_star;

if(PCCL_Gasif)*direction=pow(p_h2o,N_steam_gasification)/(1.+K_steam_gasification*p_h2);

prod=y_carbon*(C_R(c,ts)*1e-03)/mol_weight*C_VOF(c,ts);/*1e-3istoconvertdensityfromkg/m^3tog/cm^3*/

if(MGAS_Gasif&&*direction<0.0)/*thisimpliesreverseH2Ogasification*/

prod=y_carbon*(C_R(c,tp)*1e-03)/mol_weight*C_VOF(c,tp);/*1e-3istoconvertdensityfromkg/m^3tog/cm^3*/

rate=A_steam_gasification*exp(-E_steam_gasification/Rgas/T_g)*Annealing_steam_gasification*prod**direction;/*mol/cm^3.s*/

rate*=1000.;/*kmol/(m^3.s)*/

returnrate;

}

DEFINE_HET_RXN_RATE(Co2Gasif,c,t,hr,mw,yi,rr,rr_t)

{

Thread**pt=THREAD_SUB_THREADS(t);

Thread*tp=pt[0];/*gasphase*/

intindex_phase=Get_Phase_Index(hr);

Thread*ts=pt[index_phase];/*solidphase*/

*rr=0;

doubledirection=0.0,mol_weight,y_carbon;

/*

C(s)+CO2--->2CO

Setthephaseandspeciesindices.Ashspeciesindexisinitializedtozero,withallotherindices.

AshspeciesindexisusedasaflagtoexecuteSetSpeciesIndexonlyonce.Thisisdonebythefirst

reaction,definedintheheterogeneousreactionpanelinFLUENTGUI.

*/

if(IS_ASH==0)

SetSpeciesIndex();

doubleRoRT=C_R(c,tp)*UNIVERSAL_GAS_CONSTANT*C_T(c,tp);

doublep_co=RoRT*yi[IP_CO][IS_CO]/mw[IP_CO][IS_CO]/101325.;

doublep_co2=RoRT*yi[IP_CO2][IS_CO2]/mw[IP_CO2][IS_CO2]/101325.;

SolidFuel_Reactant(c,t,hr,&y_carbon,&mol_weight);

if(C_VOF(c,ts)>=eps_s_small)

{

*rr=rr_co2_gasif(c,t,ts,tp,p_co,p_co2,y_carbon,mol_weight,&direction);/*mol/(cm^3.s)*/

if(direction<0.0)/*negativeimpliesreversesteamgasification*/

*rr=0.0;

}

}

DEFINE_HET_RXN_RATE(Soot_CO2_Gasif,c,t,r,mw,yi,rr,rr_t)

{

Thread**pt=THREAD_SUB_THREADS(t);

Thread*tp=pt[0];/*gasphase*/

*rr=0;

doublerr_turb=1e+20;

doubleT_g=MIN((MAX(TMIN,C_T(c,tp))),TMAX);

/*

1/25Soot+CO2--->2CO

Setthephaseandspeciesindices.Ashspeciesindexisinitializedtozero,withallotherindices.

AshspeciesindexisusedasaflagtoexecuteSetSpeciesIndexonlyonce.Thisisdonebythefirst

reaction,definedintheheterogeneousreactionpanelinFLUENTGUI.

*/

if(IS_ASH==0)

SetSpeciesIndex();

doubleRoRT=C_R(c,tp)*UNIVERSAL_GAS_CONSTANT*C_T(c,tp);

doublep_co=RoRT*yi[IP_CO][IS_CO]/mw[IP_CO][IS_CO]/101325.;

doublep_co2=RoRT*yi[IP_CO2][IS_CO2]/mw[IP_CO2][IS_CO2]/101325.;

if(rp_ke)

rr_turb=Turbulent_rr(c,t,r,yi);

doubleprod=yi[IP_SOOT][IS_SOOT]*(C_R(c,tp)*1e-03)/mw[IP_SOOT][IS_SOOT]*C_VOF(c,tp);/*1e-3istoconvertdensityfromkg/m^3tog/cm^3*/

*rr=A_soot_co2_gasification*exp(-E_soot_co2_gasification/Rgas/T_g)*Annealing_soot_co2_gasification*prod*

pow(p_co2,N_soot_co2_gasification)/(1.+K_soot_co2_gasification*p_co);/*mol/cm^3.s*/

*rr*=1000.;/*kmol/(m^3.s)*/

*rr=MIN(*rr,rr_turb);

}

DEFINE_HET_RXN_RATE(Co2Gasif_Rev_MGAS,c,t,hr,mw,yi,rr,rr_t)

{

Thread**pt=THREAD_SUB_THREADS(t);

Thread*tp=pt[0];/*gasphase*/

intindex_phase=Get_Phase_Index(hr);

Thread*ts=pt[index_phase];/*solidphase*/

*rr=0;

doubledirection=0.0,mol_weight,y_carbon,rr_turb=1e+20;

/*

2CO--->CO2+1/25Soot

ThereverseCO2gasificationreaction,whichis2CO--->1/25Soot+CO2iswrittenasthereaction

shownabove.SoanegativeratemeansCOisconsumedandCO2andSootaregenerated.Notethatno

C(s)isgenerated,thestoichcoeffforC(s)intheabovereationiszero.

Setthephaseandspeciesindices.Ashspeciesindexisinitializedtozero,withallotherindices.

AshspeciesindexisusedasaflagtoexecuteSetSpeciesIndexonlyonce.Thisisdonebythefirst

reaction,definedintheheterogeneousreactionpanelinFLUENTGUI.

*/

if(IS_ASH==0)

SetSpeciesIndex();

if(MGAS_Gasif)

{

doubleRoRT=C_R(c,tp)*UNIVERSAL_GAS_CONSTANT*C_T(c,tp);

doublep_co=RoRT*yi[IP_CO][IS_CO]/mw[IP_CO][IS_CO]/101325.;

doublep_co2=RoRT*yi[IP_CO2][IS_CO2]/mw[IP_CO2][IS_CO2]/101325.;

y_carbon=yi[IP_SOOT][IS_SOOT];

mol_weight=mw[IP_SOOT][IS_SOOT];

if(rp_ke)

rr_turb=Turbulent_rr(c,t,hr,yi);

if(C_VOF(c,ts)>=eps_s_small)

{

*rr=rr_co2_gasif(c,t,ts,tp,p_co,p_co2,y_carbon,mol_weight,&direction);/*mol/(cm^3.s)*/

if(direction>0.0)/*positivevalueimpliesC(s)+CO2--->2CO*/

*rr=0.0;

else/*negativevalueimplies2CO--->CO2+1/25Soot*/

{

*rr=abs(*rr);

*rr=MIN(*rr,rr_turb);

}

}

}

}

doublerr_co2_gasif(cell_tc,Thread*t,Thread*ts,Thread*tp,doublep_co,doublep_co2,doubley_carbon,doublemol_weight,double*direction)

{

doubleT_g=MIN(MAX(TMIN,C_T(c,tp)),TMAX),prod;

doublep_co2_star=p_co*p_co/(exp(20.92-20282/T_g));

if(MGAS_Gasif)*direction=p_co2-p_co2_star;

if(PCCL_Gasif)*direction=pow(p_co2,N_co2_gasification)/(1.+K_co2_gasification*p_co);

prod=y_carbon*C_R(c,ts)*1.e-3/mol_weight*C_VOF(c,ts);/*1e-3istoconvertdensityfromkg/m^3tog/cm^3*/

if(MGAS_Gasif&&*direction<0.0)/*thisimpliesreverseCO2gasification*/

prod=y_carbon*(C_R(c,tp)*1e-03)/mol_weight*C_VOF(c,tp);/*1e-3istoconvertdensityfromkg/m^3tog/cm^3*/

doublerate=A_co2_gasification*exp(-E_co2_gasification/Rgas/T_g)*Annealing_co2_gasification*prod*(*direction);/*mol/cm^3.s*/

rate*=1000.;/*kmol/(m^3.s)*/

returnrate;

}

DEFINE_HET_RXN_RATE(H2Gasif,c,t,hr,mw,yi,rr,rr_t)

{

Thread**pt=THREAD_SUB_THREADS(t);

Thread*tp=pt[0];/*gasphase*/

intindex_phase=Get_Phase_Index(hr);

Thread*ts=pt[index_phase];/*solidphase*/

*rr=0;

doubledirection=0.0,mol_weight,y_carbon;

/*

1/2C(s)+H2--->1/2CH4

Setthephaseandspeciesindices.Ashspeciesindexisinitializedtozero,withallotherindices.

AshspeciesindexisusedasaflagtoexecuteSetSpeciesIndexonlyonce.Thisisdonebythefirst

reaction,definedintheheterogeneousreactionpanelinFLUENTGUI.

*/

if(IS_ASH==0)

SetSpeciesIndex();

doubleRoRT=C_R(c,tp)*UNIVERSAL_GAS_CONSTANT*C_T(c,tp);

doublep_h2=RoRT*yi[IP_H2][IS_H2]/mw[IP_H2][IS_H2]/101325.;

doublep_ch4=RoRT*yi[IP_CH4][IS_CH4]/mw[IP_CH4][IS_CH4]/101325.;

SolidFuel_Reactant(c,t,hr,&y_carbon,&mol_weight);

if(C_VOF(c,ts)>=eps_s_small)

{

*rr=rr_h2_gasif(c,t,ts,tp,p_h2,p_ch4,y_carbon,mol_weight,&direction);/*mol/(cm^3.s)*/

if(direction<0.0)/*negativeimpliesreversesteamgasification*/

*rr=0.0;

}

}

DEFINE_HET_RXN_RATE(Soot_H2_Gasif,c,t,r,mw,yi,rr,rr_t)

{

Thread**pt=THREAD_SUB_THREADS(t);

Thread*tp=pt[0];/*gasphase*/

*rr=0;

doublerr_turb=1e+20;

doubleT_g=MIN((MAX(TMIN,C_T(c,tp))),TMAX);

/*

1/25Soot+2H2--->CH4

Setthephaseandspeciesindices.Ashspeciesindexisinitializedtozero,withallotherindices.

AshspeciesindexisusedasaflagtoexecuteSetSpeciesIndexonlyonce.Thisisdonebythefirst

reaction,definedintheheterogeneousreactionpanelinFLUENTGUI.

*/

if(IS_ASH==0)

SetSpeciesIndex();

doubleRoRT=C_R(c,tp)*UNIVERSAL_GAS_CONSTANT*C_T(c,tp);

doublep_h2=RoRT*yi[IP_H2][IS_H2]/mw[IP_H2][IS_H2]/101325.;

if(rp_ke)

rr_turb=Turbulent_rr(c,t,r,yi);

doubleprod=yi[IP_SOOT][IS_SOOT]*(C_R(c,tp)*1e-03)/mw[IP_SOOT][IS_SOOT]*C_VOF(c,tp);/*1e-3istoconvertdensityfromkg/m^3tog/cm^3*/

*rr=A_soot_h2_gasification*exp(-E_soot_h2_gasification/Rgas/T_g)*Annealing_soot_h2_gasification*prod*

pow(p_h2,N_soot_h2_gasification);/*mol/cm^3.s*/

*rr*=1000.;/*kmol/(m^3.s)*/

*rr=MIN(*rr,rr_turb);

}

DEFINE_HET_RXN_RATE(H2Gasif_Rev_MGAS,c,t,hr,mw,yi,rr,rr_t)

{

Thread**pt=THREAD_SUB_THREADS(t);

Thread*tp=pt[0];/*gasphase*/

intindex_phase=Get_Phase_Index(hr);

Thread*ts=pt[index_phase];/*solidphase*/

*rr=0;

doubledirection=0.0,mol_weight,y_carbon,rr_turb=1e+20;

/*

1/2CH4--->H2+(0.5)*1/25Soot

ThereverseH2gasificationreaction,whichis1/2CH4--->1/25Soot+H2iswrittenasthereaction

shownabove.SoanegativeratemeansCH4isconsumedandH2andSootaregenerated.Notethatno

C(s)isgenerated,thestoichcoeffforC(s)intheabovereationiszero.

Setthephaseandspeciesindices.Ashspeciesindexisinitializedtozero,withallotherindices.

AshspeciesindexisusedasaflagtoexecuteSetSpeciesIndexonlyonce.Thisisdonebythefirst

reaction,definedintheheterogeneousreactionpanelinFLUENTGUI.

*/

if(IS_ASH==0)

SetSpeciesIndex();

if(MGAS_Gasif)

{

doubleRoRT=C_R(c,tp)*UNIVERSAL_GAS_CONSTANT*C_T(c,tp);

doublep_h2=RoRT*yi[IP_H2][IS_H2]/mw[IP_H2][IS_H2]/101325.;

doublep_ch4=RoRT*yi[IP_CH4][IS_CH4]/mw[IP_CH4][IS_CH4]/101325.;

y_carbon=yi[IP_SOOT][IS_SOOT];

mol_weight=mw[IP_SOOT][IS_SOOT];

if(C_VOF(c,ts)>=eps_s_small)

{

if(rp_ke)

rr_turb=Turbulent_rr(c,t,hr,yi);

*rr=rr_h2_gasif(c,t,ts,tp,p_h2,p_ch4,y_carbon,mol_weight,&direction);/*mol/(cm^3.s)*/

if(direction>0.0)/*positivevalueimplies1/2C(s)+H2--->1/2CH4*/

*rr=0.0;

else/*negativevalueimplies1/2CH4--->H2+(0.5)*1/25Soot*/

{

*rr=abs(*rr);

*rr=MIN(*rr,rr_turb);

}

}

}

}

doublerr_h2_gasif(cell_tc,Thread*t,Thread*ts,Thread*tp,doublep_h2,doublep_ch4,doubley_carbon,doublemol_weight,double*direction)

{

doublerate=0.0,prod;

doubleT_g=MIN((MAX(TMIN,C_T(c,tp))),TMAX);

doublep_h2_star=pow((p_ch4/(exp(-13.43+10999/T_g))),0.5);

prod=y_carbon*C_R(c,ts)*1.e-3/mol_weight*C_VOF(c,ts);/*1e-3istoconvertdensityfromkg/m^3tog/cm^3*/

if(MGAS_Gasif)

{

*direction=p_h2-p_h2_star;

if(*direction<0.0)/*thisimpliesreverseH2gasification*/

prod=y_carbon*(C_R(c,tp)*1e-03)/mol_weight*C_VOF(c,tp);/*1e-3istoconvertdensityfromkg/m^3tog/cm^3*/

rate=exp(-7.087-8078/T_g)*prod**direction;/*mol/cm^3.s*/

}

if(PCCL_Gasif)

{

*direction=p_h2;

rate=A_h2_gasification*exp(-E_h2_gasification/Rgas/T_g)*Annealing_h2_gasification*prod**direction;/*mol/cm^3.s*/

}

rate*=1000.;/*kmol/(m^3.s)*/

returnrate;

}

DEFINE_HET_RXN_RATE(coal_combustion,c,t,hr,mw,yi,rr,rr_t)

{

Thread**pt=THREAD_SUB_THREADS(t);

Thread*tp=pt[0];/*gasphase*/

intindex_phase=Get_Phase_Index(hr);

Thread*ts=pt[index_phase];/*solidphase*/

doublemol_weight,y_carbon,y_ash;

*rr=0.0;

/*Setthephaseandspeciesindices.Ashspeciesindexisinitializedtozero,withallotherindices.

AshspeciesindexisusedasaflagtoexecuteSetSpeciesIndexonlyonce.Thisisdonebythefirst

reaction,definedintheheterogeneousreactionpanelinFLUENTGUI.

*/

if(IS_ASH==0)

SetSpeciesIndex();

if(C_YI(c,tp,IS_O2)>=spe_small)

{

SolidFuel_Reactant(c,t,hr,&y_carbon,&mol_weight);

y_ash=yi[index_phase][IS_ASH];

*rr=rr_combustion(c,t,ts,tp,yi[IP_O2][IS_O2],y_ash,y_carbon);/*mol/(cm^3.s)*/

*rr*=1000.;/*kmol/(m^3.s)*/

}

}

doublerr_combustion(cell_tc,Thread*t,Thread*ts,Thread*tp,doubleyi_O2,doubley_ash,doubley_carbon)

{

doublerd,k_f,k_r,factor,k_a,rate=0.0,vrel;

doublePt=MAX(0.1,(op_pres+C_P(c,t))/101325);

doublegas_constant=82.06;/*atm^3/mol.K*/

doubleT=C_T(c,tp),T_s=C_T(c,ts),D_p=C_PHASE_DIAMETER(c,ts)*100.;

doublep_o2=C_R(c,tp)*UNIVERSAL_GAS_CONSTANT*T*yi_O2/mw[IP_O2][IS_O2]/101325.;/*atm*/

if(fc_ar>0.)

{

if(y_ash>0.)

{

rd=pow((y_carbon*ash_ar/100.)/(y_ash*fc_ar/100.),(1./3.));

rd=MIN(1.,rd);

}

else

rd=1.;

}

else

rd=0.;

doublediff=MAX((4.26*pow((T/1800.),1.75)/Pt),1.e-10);/*cm^2/s*/

doubleSc1o3=pow(C_MU_L(c,tp)/(C_R(c,tp)*diff*1.e-4),1./3.);

#ifRP_2D

vrel=pow(((C_U(c,tp)-C_U(c,ts))*(C_U(c,tp)-C_U(c,ts))+

(C_V(c,tp)-C_V(c,ts))*(C_V(c,tp)-C_V(c,ts))),0.5);

#endif

#ifRP_3D

vrel=pow(((C_U(c,tp)-C_U(c,ts))*(C_U(c,tp)-C_U(c,ts))+

(C_V(c,tp)-C_V(c,ts))*(C_V(c,tp)-C_V(c,ts))+

(C_W(c,tp)-C_W(c,ts))*(C_W(c,tp)-C_W(c,ts))),0.5);

#endif

doubleRe=C_VOF(c,tp)*D_p/100.*vrel*C_R(c,tp)/(C_MU_L(c,tp)+SMALL_S);

doubleN_sherwood=(7.-10.*C_VOF(c,tp)+5.*C_VOF(c,tp)*C_VOF(c,tp))*

(1.+0.7*pow(Re,0.2)*Sc1o3)+

(1.33-2.4*C_VOF(c,tp)+1.2*C_VOF(c,tp)*C_VOF(c,tp))*

pow(Re,0.7)*Sc1o3;

if(rd<=0.||C_VOF(c,ts)<=0.)

{

rate=0.;

}

else

{

k_f=diff*N_sherwood/(D_p*gas_constant/mw[IP_O2][IS_O2]*T);/*g/(atm^2.s)*/

k_r=A_c_combustion*exp(-E_c_combustion/Rgas/T_s)*rd*rd;

if(rd>=1.)

{

rate=1./(1./k_f+1./k_r);

}

else

{

k_a=2.*rd*diff*f_ep_a/(D_p*(1.-rd)*gas_constant/mw[IP_O2][IS_O2]*T_s);

rate=1./(1./k_f+1./k_r+1./k_a);

}

factor=y_carbon/(y_carbon+1.e-6);

rate*=p_o2*6.*C_VOF(c,ts)*factor/(D_p*32.);/*mol/(cm^3.s)*/

}

returnrate;

}

#if!RP_NODE||!PARALLEL

voidvolatile_mass_fractions()

{

read_c3m_data();

/*pan2:Oct2023...addedCX_Messagesfordebugging*/

CX_Message("PCCL_Devol=%d\n",PCCL_Devol);

CX_Message("MGAS_Devol=%d\n",MGAS_Devol);

CX_Message("CPD_Devol=%d\n",CPD_Devol);

CX_Message("FGDVC_Devol=%d\n",FGDVC_Devol);

CX_Message("HPTR_Devol=%d\n",HPTR_Devol);

CX_Message("MGAS_Moisture=%d\n",MGAS_Moisture);

CX_Message("PCCL_Moisture=%d\n",PCCL_Moisture);

CX_Message("MGAS_TarCracking=%d\n",MGAS_TarCracking);

CX_Message("PCCL_2nd_Pyro=%d\n",PCCL_2nd_Pyro);

CX_Message("MGAS_gasif=%d\n",MGAS_Gasif);

CX_Message("PCCL_gasif=%d\n",PCCL_Gasif);

CX_Message("PCCL_TarCracking=%d\n",PCCL_TarCracking);

CX_Message("MGAS_WGS=%d\n",MGAS_WGS);

CX_Message("PCCL_soot_gasif=%d\n",PCCL_soot_gasif);

CX_Message("MGAS_char_combustion=%d\n",MGAS_char_combustion);

CX_Message("PCCL_char_combustion=%d\n",PCCL_char_combustion);

CX_Message("PCCL_soot_oxidation=%d\n",PCCL_soot_oxidation);

CX_Message("TAR_oxidation=%d\n",TAR_oxidation);

CX_Message("MGAS_gas_phase_oxidation=%d\n",MGAS_gas_phase_oxidation);

CX_Message("fc_ar=%f\n",fc_ar);

CX_Message("vm_ar=%f\n",vm_ar);

CX_Message("ash_ar=%f\n",ash_ar);

CX_Message("moist_ar=%f\n",moist_ar);

CX_Message("a1_devolatilization=%f\n",A1_devolatilization);

CX_Message("e1_devolatilization=%f\n",E1_devolatilization);

CX_Message("a2_devolatilization=%f\n",A2_devolatilization);

CX_Message("e2_devolatilization=%f\n",E2_devolatilization);

CX_Message("a_tar_cracking=%f\n",A_tar_cracking);

CX_Message("e_tar_cracking=%f\n",E_tar_cracking);

CX_Message("A_steam_gasification=%f\n",A_steam_gasification);

CX_Message("E_steam_gasification=%f\n",E_steam_gasification);

CX_Message("K_steam_gasification=%f\n",K_steam_gasification);

CX_Message("N_steam_gasification=%f\n",N_steam_gasification);

CX_Message("Annealing_steam_gasification=%f\n",Annealing_steam_gasification);

CX_Message("A_co2_gasification=%f\n",A_co2_gasification);

CX_Message("E_co2_gasification=%f\n",E_co2_gasification);

CX_Message("K_co2_gasification=%f\n",K_co2_gasification);

CX_Message("N_co2_gasification=%f\n",N_co2_gasification);

CX_Message("Annealing_co2_gasification=%f\n",Annealing_co2_gasification);

CX_Message("A_h2_gasification=%f\n",A_h2_gasification);

CX_Message("E_h2_gasification=%f\n",E_h2_gasification);

CX_Message("N_h2_gasification=%f\n",N_h2_gasification);

CX_Message("Annealing_h2_gasification=%f\n",Annealing_h2_gasification);

CX_Message("A_soot_steam_gasification=%f\n",A_soot_steam_gasification);

CX_Message("E_soot_steam_gasification=%f\n",E_soot_steam_gasification);

CX_Message("K_soot_steam_gasification=%f\n",K_soot_steam_gasification);

CX_Message("N_soot_steam_gasification=%f\n",N_soot_steam_gasification);

CX_Message("Annealing_soot_steam_gasification=%f\n",Annealing_soot_steam_gasification);

CX_Message("A_soot_co2_gasification=%f\n",A_soot_co2_gasification);

CX_Message("E_soot_co2_gasification=%f\n",E_soot_co2_gasification);

CX_Message("K_soot_co2_gasification=%f\n",K_soot_co2_gasification);

CX_Message("N_soot_co2_gasification=%f\n",N_soot_co2_gasification);

CX_Message("Annealing_soot_co2_gasification=%f\n",Annealing_soot_co2_gasification);

CX_Message("A_soot_h2_gasification=%f\n",A_soot_h2_gasification);

CX_Message("E_soot_h2_gasification=%f\n",E_soot_h2_gasification);

CX_Message("N_soot_h2_gasification=%f\n",N_soot_h2_gasification);

CX_Message("Annealing_soot_h2_gasification=%f\n",Annealing_soot_h2_gasification);

CX_Message("A_soot_combustion=%f\n",A_Soot_Combustion);

CX_Message("E_soot_combustion=%f\n",E_Soot_Combustion);

CX_Message("A_c_combustion=%f\n",A_c_combustion);

CX_Message("E_c_combustion=%f\n",E_c_combustion);

CX_Message("N_c_combustion=%f\n",N_c_combustion);

CX_Message("Annealing_c_combustion=%f\n",Annealing_c_combustion);

CX_Message("A_moisture_release=%f\n",A_moisture_release);

CX_Message("E_moisture_release=%f\n",E_moisture_release);

CX_Message("wg3=%f\n",wg3);

CX_Message("moisture_flux=%f\n",Moisture_Flux);

/*f_ep_aisusedinshrinkingcoremodel,incoalcombustionmodel*/

doubleep_a=0.25+0.75*(1-ash_ar/100.);

f_ep_a=pow(ep_a,2.5);

}

/*panc3mstart*/

staticvoidSetBooleanValue(char*var,char*svalue)/*pan:Oct2023...newfunction*/

{

cxbooleanvalue;

if(strcmp(svalue,"true")==0)/*pan2:Oct2023:correction*/

value=TRUE;

else

value=FALSE;

if(strcmp(var,"pccl_devol")==0)PCCL_Devol=value;

if(strcmp(var,"mgas_devol")==0)MGAS_Devol=value;

if(strcmp(var,"cpd_devol")==0)CPD_Devol=value;

if(strcmp(var,"fgdvc_devol")==0)FGDVC_Devol=value;

if(strcmp(var,"hptr_devol")==0)HPTR_Devol=value;

if(strcmp(var,"mgas_moisture")==0)MGAS_Moisture=value;

if(strcmp(var,"pccl_moisture")==0)PCCL_Moisture=value;

if(strcmp(var,"mgas_tarcracking")==0)MGAS_TarCracking=value;

if(strcmp(var,"pccl_2nd_pyro")==0)PCCL_2nd_Pyro=value;

if(strcmp(var,"mgas_gasif")==0)MGAS_Gasif=value;

if(strcmp(var,"pccl_gasif")==0)PCCL_Gasif=value;

if(strcmp(var,"pccl_tarcracking")==0)PCCL_TarCracking=value;

if(strcmp(var,"mgas_wgs")==0)MGAS_WGS=value;

if(strcmp(var,"pccl_soot_gasif")==0)PCCL_soot_gasif=value;

if(strcmp(var,"mgas_char_combustion")==0)MGAS_char_combustion=value;

if(strcmp(var,"pccl_char_combustion")==0)PCCL_char_combustion=value;

if(strcmp(var,"pccl_soot_oxidation")==0)PCCL_soot_oxidation=value;

if(strcmp(var,"tar_oxidation")==0)TAR_oxidation=value;

if(strcmp(var,"mgas_gas_phase_oxidation")==0)MGAS_gas_phase_oxidation=value;

}

staticvoidSetValue(char*var,char*svalue)/*pan:oct2023...replaceentirefunction*/

{

char*pEnd;

doublevalue=strtod(svalue,&pEnd);

if(strcmp(var,"fc_ar")==0)fc_ar=value;

if(strcmp(var,"vm_ar")==0)vm_ar=value;

if(strcmp(var,"ash_ar")==0)ash_ar=value;

if(strcmp(var,"moist_ar")==0)moist_ar=value;

/*NOTE:

Ifthetwostagedevolatilizationmodelisnotused,A2andE2havetobesettozero

*/

if(strcmp(var,"a1_devolatilization")==0)A1_devolatilization=value;

if(strcmp(var,"e1_devolatilization")==0)E1_devolatilization=value;

if(strcmp(var,"a2_devolatilization")==0)A2_devolatilization=value;

if(strcmp(var,"e2_devolatilization")==0)E2_devolatilization=value;

/* if(strcmp(var,"c3m_aem")==0)c3m_aem=value;shouldnotbeusedpan:Oct2023*/

if(strcmp(var,"a_tar_cracking")==0)A_tar_cracking=value;

if(strcmp(var,"e_tar_cracking")==0)E_tar_cracking=value;

if(strcmp(var,"a_steam_gasification")==0)A_steam_gasification=value;

if(strcmp(var,"e_steam_gasification")==0)E_steam_gasification=value;

if(strcmp(var,"annealing_steam_gasification")==0)Annealing_steam_gasification=value;

if(strcmp(var,"k_steam_gasification")==0)K_steam_gasification=value;

if(strcmp(var,"n_steam_gasification")==0)N_steam_gasification=value;

if(strcmp(var,"a_co2_gasification")==0)A_co2_gasification=value;

if(strcmp(var,"e_co2_gasification")==0)E_co2_gasification=value;

if(strcmp(var,"annealing_co2_gasification")==0)Annealing_co2_gasification=value;

if(strcmp(var,"k_co2_gasification")==0)K_co2_gasification=value;

if(strcmp(var,"n_co2_gasification")==0)N_co2_gasification=value;

if(strcmp(var,"a_h2_gasification")==0)A_h2_gasification=value;

if(strcmp(var,"e_h2_gasification")==0)E_h2_gasification=value;

if(strcmp(var,"annealing_h2_gasification")==0)Annealing_h2_gasification=value;

if(strcmp(var,"n_h2_gasification")==0)N_h2_gasification=value;

if(strcmp(var,"a_soot_steam_gasification")==0)A_soot_steam_gasification=value;

if(strcmp(var,"e_soot_steam_gasification")==0)E_soot_steam_gasification=value;

if(strcmp(var,"annealing_soot_steam_gasification")==0)Annealing_soot_steam_gasification=value;

if(strcmp(var,"k_soot_steam_gasification")==0)K_soot_steam_gasification=value;

if(strcmp(var,"n_soot_steam_gasification")==0)N_soot_steam_gasification=value;

if(strcmp(var,"a_soot_co2_gasification")==0)A_soot_co2_gasification=value;

if(strcmp(var,"e_soot_co2_gasification")==0)E_soot_co2_gasification=value;

if(strcmp(var,"annealing_soot_co2_gasification")==0)Annealing_soot_co2_gasification=value;

if(strcmp(var,"k_soot_co2_gasification")==0)K_soot_co2_g

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论