第一范文网 - 专业文章范例文档资料分享平台

FLUENT UDF代码 - 颗粒(煤或生物质)床层多相流燃烧过程数值模拟-第2部分-完结

来源:用户分享 时间:2025/6/16 7:42:16 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

Fluent-UDF_Coal-Combustion-Multiphase-Flow-Processes

---Codes for various kinds of heterogeneous reactions

【第二部分-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]; /* gas phase */

int index_phase = Get_Phase_Index(hr);

Thread *ts = pt[index_phase]; /* solid phase */

*rr = 0;

double direction = 0.0, mol_weight, y_carbon, rr_turb = 1e+20; /*

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

The reverse steam gasification reaction, which is CO + H2 ---> 1/25 Soot + H2O is written as the reaction

shown above. So a negative rate means CO and H2 is consumed and H2O and Soot are generated. Note that no

C(s) is generated, the stoich coeff for C(s) in the above reation is zero.

Set the phase and species indices. Ash species index is initialized to zero, with all other indices.

Ash species index is used as a flag to execute SetSpeciesIndex only once. This is done by the first

reaction, defined in the heterogeneous reaction panel in FLUENT GUI. */

if(IS_ASH == 0)

SetSpeciesIndex(); if(MGAS_Gasif) {

double RoRT = C_R(c,tp) * UNIVERSAL_GAS_CONSTANT * C_T(c,tp);

double p_h2o = RoRT * yi[IP_H2O][IS_H2O]/mw[IP_H2O][IS_H2O]/ 101325.; double p_co = RoRT * yi[IP_CO][IS_CO]/mw[IP_CO][IS_CO] / 101325.; double p_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];

1

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) /* positive value implies C(s) + H2O ---> CO + H2 */ *rr = 0.0; else /* negative value implies CO + H2 ---> H2O + 1/25 Soot */ { *rr = abs(*rr); *rr = MIN(*rr, rr_turb); } } } }

double rr_steam_gasif(cell_t c, Thread *t, Thread *ts, Thread *tp, double p_h2o, double p_co, double p_h2, double y_carbon, double mol_weight, double* direction) {

double rate, prod, T_g = MIN((MAX(TMIN,C_T(c,tp))),TMAX); double p_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-3 is to convert density from kg/m^3 to g/cm^3 */

if(MGAS_Gasif && *direction < 0.0) /* this implies reverse H2O gasification */

prod = y_carbon*(C_R(c,tp)*1e-03)/mol_weight*C_VOF(c,tp); /*1e-3 is to convert density from kg/m^3 to g/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) */ return rate; }

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

2

Thread **pt = THREAD_SUB_THREADS(t); Thread *tp = pt[0]; /* gas phase */

int index_phase = Get_Phase_Index(hr);

Thread *ts = pt[index_phase]; /* solid phase */

*rr = 0;

double direction = 0.0, mol_weight, y_carbon; /*

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

Set the phase and species indices. Ash species index is initialized to zero, with all other indices.

Ash species index is used as a flag to execute SetSpeciesIndex only once. This is done by the first

reaction, defined in the heterogeneous reaction panel in FLUENT GUI. */

if(IS_ASH == 0)

SetSpeciesIndex();

double RoRT = C_R(c,tp) * UNIVERSAL_GAS_CONSTANT * C_T(c,tp); double p_co = RoRT * yi[IP_CO][IS_CO]/mw[IP_CO][IS_CO] / 101325.;

double p_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) /* negative implies reverse steam gasification */ *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]; /* gas phase */

*rr = 0;

3

double rr_turb = 1e+20;

double T_g = MIN((MAX(TMIN,C_T(c,tp))),TMAX); /*

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

Set the phase and species indices. Ash species index is initialized to zero, with all other indices.

Ash species index is used as a flag to execute SetSpeciesIndex only once. This is done by the first

reaction, defined in the heterogeneous reaction panel in FLUENT GUI. */

if(IS_ASH == 0)

SetSpeciesIndex();

double RoRT = C_R(c,tp) * UNIVERSAL_GAS_CONSTANT * C_T(c,tp); double p_co = RoRT * yi[IP_CO][IS_CO]/mw[IP_CO][IS_CO]/ 101325.;

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

if (rp_ke)

rr_turb = Turbulent_rr(c, t, r, yi); double prod = yi[IP_SOOT][IS_SOOT]*(C_R(c,tp)*1e-03)/mw[IP_SOOT][IS_SOOT]*C_VOF(c,tp); /*1e-3 is to convert density from kg/m^3 to g/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]; /* gas phase */

int index_phase = Get_Phase_Index(hr);

Thread *ts = pt[index_phase]; /* solid phase */

*rr = 0;

double direction = 0.0, mol_weight, y_carbon, rr_turb = 1e+20;

4

FLUENT UDF代码 - 颗粒(煤或生物质)床层多相流燃烧过程数值模拟-第2部分-完结.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c1ecwr9pzd67tdil0369e_1.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top