| 查看: 2231 | 回复: 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); } 希望大神看到后能够给予指导,多谢了。 |
» 猜你喜欢
计算机、0854电子信息(085401-058412)调剂
已经有4人回复
基金申报
已经有3人回复
国自然申请面上模板最新2026版出了吗?
已经有9人回复
溴的反应液脱色
已经有6人回复
纳米粒子粒径的测量
已经有7人回复
常年博士招收(双一流,工科)
已经有4人回复
推荐一本书
已经有10人回复
参与限项
已经有5人回复
有没有人能给点建议
已经有5人回复
假如你的研究生提出不合理要求
已经有12人回复












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