| 查看: 2245 | 回复: 0 | ||
[求助]
fluent运行过程中出现错误:Divergence detected in AMG solver
|
|
我做的是密相输运床提升管内煤气化的数值模拟。发生的多个化学反应需要写UDF加入进去,没导入UDF之前反应还能进行,可是一导入UDF就不行了。 所以我判断应该是UDF写的有问题,可导入的时候显示语法什么的没错误,具体哪里不合理,我探究了很久也没找出毛病。还希望大神们能够给予指导。 fluent提示的错误如下: # Divergence detected in AMG solver: mp-x-momentum -> Decreasing coarsening group size! # Divergence detected in AMG solver: mp-x-momentum -> Increasing relaxation sweeps! # Divergence detected in AMG solver: pressure correction -> Turning off correction scaling! # Divergence detected in AMG solver: pressure correction -> Increasing relaxation sweeps! Error ivergence detected in AMG solver:pressure correctionError ivergence detected in AMG solver:pressure correction.其中一个UDF如下: #include "udf.h" #include "stdio.h" #include "time.h" DEFINE_HET_RXN_RATE(c_arr,c,t,hr,mw,yi,rr,rr_t) { Domain **domain_reactant = hr->domain_reactant; real *stoich_reactant = hr->stoich_reactant; int *reactant = hr->reactant; int i; int sp_id; int dindex; Thread *t_reactant; real pp; real T,C; real p1,p3,p4,p5,mi,msum,m0,m1,m2,m3,m4,m5,m6,m7,m8,m9,ci; /* instead of compute rr directly, compute log(rr) and then take exp */ *rr = 0; i=0; sp_id = reactant; /* species ID to access mw and yi */ if (sp_id == -1) sp_id = 0; /* if phase does not have species, mw, etc. will be stored at index 0 */ dindex = DOMAIN_INDEX(domain_reactant); /* domain index to access mw & yi */ t_reactant = THREAD_SUB_THREAD(t,dindex); /* get conc. */ pp = 6*C_P(c,t_reactant)/101325; m0 = yi[dindex][0]/mw[dindex][0]; m1 = yi[dindex][1]/mw[dindex][1]; m2 = yi[dindex][2]/mw[dindex][2]; m3 = yi[dindex][3]/mw[dindex][3]; m4 = yi[dindex][4]/mw[dindex][4]; m5 = yi[dindex][5]/mw[dindex][5]; m6 = yi[dindex][6]/mw[dindex][6]; m7 = yi[dindex][7]/mw[dindex][7]; m8 = yi[dindex][8]/mw[dindex][8]; m9 = yi[dindex][9]/mw[dindex][9]; msum=m0+m1+m2+m3+m4+m5+m6+m7+m8+m9; p3=pp*yi[0][3]/mw[0][3]/msum; p4=pp*yi[0][4]/mw[0][4]/msum; p5=pp*yi[0][5]/mw[0][5]/msum; ci = MAX(p3,0); *rr+= log(ci); ci = MAX(p4,0); *rr+= log(ci); ci = MAX(p5,0); *rr+= log(ci); i=1; sp_id = reactant; /* species ID to access mw and yi */ if (sp_id == -1) sp_id = 0; /* if phase does not have species, mw, etc. will be stored at index 0 */ dindex = DOMAIN_INDEX(domain_reactant); /* domain index to access mw & yi */ t_reactant = THREAD_SUB_THREAD(t,dindex); /* get conc. */ ci = yi[1][5]*C_R(c,t_reactant)/mw[1][5];/*获得第二相中反应物碳的质量分数*/ ci = MAX(ci,0); *rr+= log(ci); T =C_T(c,t_reactant); if (T>1117) T=1117; *rr+= log(2250)-42000/(8.314*T)-(17.29-16326/T); /* 1.e-40 < rr < 1.e40 */ *rr = MAX(*rr,-40); *rr = MIN(*rr,40); *rr = exp(*rr); } 希望大神看到后能够给予指导,多谢了。 |
» 猜你喜欢
面上可以超过30页吧?
已经有13人回复
网上报道青年教师午睡中猝死、熬夜猝死的越来越多,主要哪些原因引起的?
已经有10人回复
为什么中国大学工科教授们水了那么多所谓的顶会顶刊,但还是做不出宇树机器人?
已经有13人回复
什么是人一生最重要的?
已经有8人回复
版面费该交吗
已经有17人回复
体制内长辈说体制内绝大部分一辈子在底层,如同你们一样大部分普通教师忙且收入低
已经有19人回复
【博士招生】太原理工大学2026化工博士
已经有8人回复
280求调剂
已经有4人回复













ivergence detected in AMG solver:pressure correction
回复此楼