24小时热门版块排行榜    

查看: 2737  |  回复: 6

shuzhan7879

木虫 (小有名气)

[求助] Fluent编写udf时,Reaction的变量类型是什么?

在编写udf时查看help文档,有个变量类型是Reaction,如:
DEFINE VR RATE(name,c,t,r,mw,yi,rr,rr t)
Argument Type Description
symbol name——UDF name.
cell_t c——Cell index.
Thread *t——Pointer to cell thread on which the volumetric reaction rate is to be applied.
Reaction *r——Pointer to data structure that represents the current reaction.
real *mw——Pointer to array of species molecular weights.
real *yi——Pointer to array of the species mass fractions.
real *rr——Pointer to laminar reaction rate.
real *rr_t——Pointer to turbulent reaction rate.
上面几种类型,symbol、cell_t、thread、real都遇到过,但这个Reaction的类型到底是什么呢??还请各位高手点拨一下。指教一下,这个变量类型在fluent的help文档中解释在哪?
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

mayo_0

铜虫 (小有名气)

【答案】应助回帖

★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★
感谢参与,应助指数 +1
shuzhan7879: 金币+15, ★★★很有帮助, 还请指教下从哪里找到的~~ 2013-05-17 14:56:28
shuzhan7879: 金币+5, ★★★★★最佳答案 2013-05-17 17:01:07
xiegangmai: 金币+2, 谢谢参与! 2013-05-17 21:15:23
/*************************************************************************
  Reactions
*************************************************************************/

#define REACTION_NAME_LENGTH 32
#define STOICHIOMETRY_LENGTH 128
#define MAX_COV_SPE MAX_SPE_EQNS               /*max coverage species in a reaction = max site species*/
typedef struct reaction_struct
{
  char name[REACTION_NAME_LENGTH];              /* reaction name */
  char stoichiometry[STOICHIOMETRY_LENGTH]; /* stoichiometry equation */

  int n_reactants;                            /* number of reactants */
  Material* mat_reactant[MAX_PDF_SPECIES];  /* species materials of reactants */
  int reactant[MAX_PDF_SPECIES];            /* species indices of reactants */
  real stoich_reactant[MAX_PDF_SPECIES];    /* stoichiometric coefficients of reactants */
  real exp_reactant[MAX_PDF_SPECIES];            /* rate exponents of reactants */
  real eff_reactant[MAX_PDF_SPECIES];            /* 3rd body efficiencies of reactants */

  int n_products;                            /* number of products */
  Material* mat_product[MAX_PDF_SPECIES];   /* species materials of products */
  int product[MAX_PDF_SPECIES];                    /* species indices of products */
  real stoich_product[MAX_PDF_SPECIES];            /* stoichiometric coefficients of products */
  real exp_product[MAX_PDF_SPECIES];            /* rate exponents of products */
  real eff_product[MAX_PDF_SPECIES];            /* 3rd body efficiencies of products */

  int n_others;                                    /* number of other species */
  Material* mat_other[MAX_PDF_SPECIES];            /* materials of other species */
  int other[MAX_PDF_SPECIES];                    /* species indices of other species */
  real exp_other[MAX_PDF_SPECIES];            /* rate exponents of other species */
  real eff_other[MAX_PDF_SPECIES];            /* 3rd body efficiencies of other species */

  /* Coefficients for Arrhenius rate expression */
  double A;                                /* "pre-exponential" factor */
  double logA;
  double b;                                /* temperature exponent     */
  double E;                                /* activation energy        */
  real Cmin;                            /* minimum concentration for negative reaction order */

  /* Coefficients for turbulent mixing rate (eddy breakup) model */
  real Amix, Bmix;

  /* Data for particle surface reaction */
  int diffusion_species;                /* index for diffusion limited species */
  int catalyst_species;                 /* index for catalyst species */
  real C1, eff;                         /* diffusion rate and effectiveness factor */

  /* pressure dependent reaction */
  int press_react;
  int press_type;                       /* Lindeman, Troe, SRI */
  int bath_gas;                         /* mixture or individual species */
  real press_params[8];

  int use_third_body_efficiencies;
  int surface_reaction;
  int particle_reaction;
  int backward_reaction;

  /* cache sum of exponents for rampant jacobians */
  real sum_exponents;

  int surface_coverage ;
  int num_cov_sp ;
  int cov_sp_index[MAX_COV_SPE];
  real cover_para[MAX_COV_SPE][3];
  
  struct reaction_struct *next;                /* next reaction in list */

} Reaction;
精通各种CFD项目(电磁、多相、燃烧等)。QQ85596847。
2楼2013-05-16 23:31:36
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

shuzhan7879

木虫 (小有名气)

引用回帖:
2楼: Originally posted by mayo_0 at 2013-05-16 23:31:36
/*************************************************************************
  Reactions
*************************************************************************/

#define REACTION_NAME_LENGTH 32
...

请问这段代码是出自哪里呢?fluent的help文档里有吗?
3楼2013-05-17 09:17:59
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

shuzhan7879

木虫 (小有名气)

引用回帖:
3楼: Originally posted by shuzhan7879 at 2013-05-17 09:17:59
请问这段代码是出自哪里呢?fluent的help文档里有吗?...

自己找到了,在material.h头文件中
4楼2013-05-17 16:59:24
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

5超7

至尊木虫 (著名写手)

菜鸟

引用回帖:
2楼: Originally posted by mayo_0 at 2013-05-16 23:31:36
/*************************************************************************
  Reactions
*************************************************************************/

#define REACTION_NAME_LENGTH 32
...

udf帮助里面好像没有这个程序的把?
我要奋斗到底
5楼2013-05-18 08:04:52
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

shuzhan7879

木虫 (小有名气)

引用回帖:
5楼: Originally posted by 5超7 at 2013-05-18 08:04:52
udf帮助里面好像没有这个程序的把?...

不在udf帮助里,在Fluent.Inc安装目录下搜头文件materials.h,里面就有段代码
6楼2013-05-20 15:55:09
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

5超7

至尊木虫 (著名写手)

菜鸟

引用回帖:
6楼: Originally posted by shuzhan7879 at 2013-05-20 15:55:09
不在udf帮助里,在Fluent.Inc安装目录下搜头文件materials.h,里面就有段代码...

这样的程序很纠结,都不知道宏该怎么用
我要奋斗到底
7楼2013-05-21 08:04:23
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 shuzhan7879 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[硕博家园] 售SCI一区T0P文章,我:8O.55.1.O.54,科目全,可伽急 +3 23jxep3nCNZb 2026-09-14 3/150 2026-09-15 01:21 by mibUvS8DDCwf
[考博] 售SCI一区T0P文章,我:8O.55.1.O.5.4,科目齐全,可+急 +4 s3fFTmArrBt6 2026-09-14 5/250 2026-09-14 23:57 by vZfe6xYu34yj
[硕博家园] 售SCI一区T0P文章,我:8.O55.1.O.54,科目全,可十急 +3 s3fFTmArrBt6 2026-09-14 3/150 2026-09-14 23:45 by vZfe6xYu34yj
[考博] 售SCI一区文章,我:8O5.5.1.O5.4,科目全,可伽急 +5 s3fFTmArrBt6 2026-09-14 5/250 2026-09-14 23:33 by vZfe6xYu34yj
[公派出国] 售SCI-T0P文章,我:8O.5.5.1.O.54,科目齐全,可+急 +3 LwdutQ8HoqWP 2026-09-13 6/300 2026-09-14 22:37 by vZfe6xYu34yj
[考研] 售SCI文章,我:8O5.5.1.O.54,科目齐全,可+急 +5 LwdutQ8HoqWP 2026-09-13 5/250 2026-09-14 22:25 by vZfe6xYu34yj
[硕博家园] 售一区SCI文章T0P,我:8O.551.O54,科目全,可十急 +3 LwdutQ8HoqWP 2026-09-13 3/150 2026-09-14 22:24 by vZfe6xYu34yj
[博后之家] 售SCI一区T0P文章,我:8.O55.1.O.54,科目全,可十急 +5 3n8v2C8RimXI 2026-09-13 5/250 2026-09-14 22:12 by vZfe6xYu34yj
[考研] 售SCI一区T0P文章,我:8.O.55.1.O54,科目全,可伽急 +4 3n8v2C8RimXI 2026-09-13 5/250 2026-09-14 22:00 by vZfe6xYu34yj
[博后之家] 售SCI一区T0P文章,我:8.O.55.1.O.5.4,科目全,可+急 +4 QUjhNVAcOSff 2026-09-13 4/200 2026-09-14 21:37 by vZfe6xYu34yj
[考博] 售SCI文章,我:8O5.5.1.O.54,科目齐全,可+急 +5 QUjhNVAcOSff 2026-09-13 5/250 2026-09-14 21:36 by vZfe6xYu34yj
[找工作] 售SCI一区T0P文章,我:8.O.55.1.O.5.4,科目全,可+急 +3 QUjhNVAcOSff 2026-09-13 5/250 2026-09-14 21:25 by vZfe6xYu34yj
[考研] 售SCI一区T0P文章,我:8.O.55.1.O54,科目全,可伽急 +3 s3fFTmArrBt6 2026-09-14 3/150 2026-09-14 18:01 by Aj1rhIDL5ixY
[找工作] 售SCI一区T0P文章,我:8.O.55.1.O54,科目全,可伽急 +3 s3fFTmArrBt6 2026-09-14 4/200 2026-09-14 17:48 by Aj1rhIDL5ixY
[教师之家] 售SCI一区文章,我:8.O.55.1.O.54,科目齐全,可伽急 +3 LwdutQ8HoqWP 2026-09-13 4/200 2026-09-14 16:13 by Aj1rhIDL5ixY
[找工作] 售SCI一区T0P文章,我:8.O.55.1.O.5.4,科目全,可+急 +5 QUjhNVAcOSff 2026-09-13 6/300 2026-09-14 15:21 by Aj1rhIDL5ixY
[考研] 售SCI一区文章,我:8.O.551.O.5.4,科目全,可伽急 +3 QUjhNVAcOSff 2026-09-13 3/150 2026-09-14 14:57 by Aj1rhIDL5ixY
[基金申请] 求教各位大神:2026教育部人文社科青年基金项目何时公示呀? +5 云宴山人 2026-09-10 7/350 2026-09-14 12:11 by ecnu2013
[考博] 27秋季材料博士申请求助 10+3 Cahal1 2026-09-11 4/200 2026-09-14 08:50 by 北京莱茵编辑
[教师之家] 浙江师范大学是怎么坑我的 +10 recruit123 2026-09-09 15/750 2026-09-13 10:45 by seaskyy
信息提示
请填处理意见