|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
#include "udf.h"
#define SMALL_S 1.e-29
DEFINE_NOX_RATE(user_nox, c, t, NOx)
{
real kf1, kr1, kf2, kr2;
real o_eq;
real s1, s2, s3, rf, rr;
Rate_Const K_F[2] = {{1.80e8, 0.0, 38370.0},
{1.80e4, 1.0, 4680.0}};
Rate_Const K_R[2] = {{3.80e7, 0.0, 425.0},
{3.80e3, 1.0, 20820.0}};
Rate_Const K_O = {3.664e1, 0.5, 27123.0};
if (NOX_EQN(NOx) != EQ_NO) return;
kf1 = ARRH(NOx, K_F[0]);
kr1 = ARRH(NOx, K_R[0]);
kf2 = ARRH(NOx, K_F[1]);
kr2 = ARRH(NOx, K_R[1]);
s1 = kf2*MOLECON(NOx, O2);
s3 = s1 + kr1*MOLECON(NOx, NO);
/* determine O concentration (partial equilibrium)*/
o_eq = ARRH(NOx, K_O)*sqrt(MOLECON(NOx, O2));
/* calculate NO rate */
s2 = 2.*o_eq;
/* forward rate... */
rf = s2*(kf1*MOLECON(NOx, N2))*s1/s3;
/* reverse rate... */
这是udf手册中关于NOX的一个例子程序 我在使用他的时候 FLUNT出现如下错误
Error: D:\sample\1.c: line 12: type_size: don';t know what to do with TYPE_STRUCT
Error: D:\sample\1.c: line 12: invalid type conversion: float -> structure.
求教高手怎么回事?
|
|