请教大神们一个Fluent熔化凝固模型的问题。
我想模拟双组分混合物的熔融结晶过程,结晶器如下图所示,沿Y轴方向有刺状的几何结构。
在模拟过程中考虑了重力影响(-Y),开启了层流,能量,组分输运,熔化凝固模型,混合物含量是7wt%A和93wt%B,纯A的熔点是35℃,纯B的熔点是21℃,低共熔温度-10℃;冷却壁面温度设置为14℃,无滑移;顶面和底面为无滑移绝热壁面;初始化温度为25℃;计算方法设置如下:
计算结束后,XY平面的液相体积分数分布如下:
实验结果发现,在刺状的部分生成了较多的冷凝物,但计算结果显示凝固的物质沿壁面均匀分布,跟实验结果差距挺大,想请教一下各位大神该如何改进
关伯兰在笑
帖子
-
【熔化与凝固】熔融结晶过程模拟求助 -
求书——《多相流及群体平衡模型的数值计算方法》@李东岳 好的,谢谢李老师!
-
求书——《多相流及群体平衡模型的数值计算方法》@李东岳 ,李老师,《多相流及群体平衡模型的数值计算方法》这本书在哪里可以下载或者买到呢?我看到了19年5月的一版PDF,还有很多地方未完成。但找遍各个地方都没找到,特来询问您一下。感谢!
-
求助UDF并行计算的问题各位大佬,求帮忙看一下计算出错的原因。
我模拟一个结晶的过程,在PBE模型中挂上成核与生长的UDF时,计算一开始就出现了报错,不挂UDF就可以正常计算下去。报错时控制台的提示信息如下:Initialize using the hybrid initialization method. Checking case topology... -This case has both inlets & outlets -Pressure information is not available at the boundaries. Case will be initialized with constant pressure iter scalar-0 1 1.000000e+00 2 1.145484e-05 3 8.608675e-07 4 2.028824e-07 5 2.753174e-08 6 5.988739e-09 7 9.756630e-10 8 2.840014e-10 9 5.402100e-11 10 1.498808e-11 Hybrid initialization is done. Creating new file G:\.\mass_frac_z=0-rfile_1_1.out Creating new file G:\.\mass_frac_z=-40-rfile_1_1.out Creating new file G:\.\mass_frac_z=5-rfile_1_1.out iter continuity u-solution u-crystal v-solution v-crystal w-solution w-crystal energy-p1 energy-p2 k epsilon paracetamo water-solu bf-0-cryst bf-1-cryst bf-2-cryst bf-3-cryst bf-4-cryst bf-5-cryst bf-6-cryst bf-7-cryst bf-8-cryst bf-9-cryst bf-10-crys bf-11-crys bf-12-crys bf-13-crys bf-14-crys vf-crystal time/iter temperature limited to 1.000000e+00 in 1345882 cells on zone 8407 in domain 2 1 1.0000e+00 6.0854e-04 0.0000e+00 6.0847e-04 0.0000e+00 9.3036e-04 0.0000e+00 8.2651e-03 0.0000e+00 7.5450e-02 1.6778e-01 1.7762e+00 1.6993e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0:00:31 1 Error at Node 0: floating point exception Error at Node 1: floating point exception Error at Node 2: floating point exception Error at Node 3: floating point exception Error at Node 4: floating point exception Error at Node 5: floating point exception Error at Node 6: floating point exception Error at Node 7: floating point exception Error at Node 8: floating point exception Error at Node 9: floating point exception Error at Node 10: floating point exception Error at Node 11: floating point exception Error at Error at Node 13: floating point exception Error at Node 15: floating point exception N Error at Node 14: floating point exception ode 12: floating point exception Experiencing convergence difficulties - temporarily relaxing and trying again... Experiencing convergence difficulties - temporarily relaxing and trying again... Experiencing convergence difficulties - temporarily relaxing and trying again... Experiencing convergence difficulties - temporarily relaxing and trying again... Stabilizing pressure coupled to enhance linear solver robustness. Stabilizing pressure coupled using GMRES to enhance linear solver robustness. Experiencing convergence difficulties - temporarily relaxing and trying again... Divergence detected in AMG solver: pressure coupled Stabilizing solution-species-0 to enhance linear solver robustness. Stabilizing solution-species-0 using GMRES to enhance linear solver robustness. Divergence detected in AMG solver: solution-species-0 Stabilizing solution-species-1 to enhance linear solver robustness. Stabilizing solution-species-1 using GMRES to enhance linear solver robustness. Divergence detected in AMG solver: solution-species-1 temperature limited to 1.000000e+00 in 273407 cells on zone 8407 in domain 2 Stabilizing vof-1 to enhance linear solver robustness. Stabilizing vof-1 using GMRES to enhance linear solver robustness. Divergence detected in AMG solver: vof-1 Divergence detected in AMG solver: pressure coupled Divergence detected in AMG solver: solution-species-0 Divergence detected in AMG solver: solution-species-1 Divergence detected in AMG solver: vof-1 Divergence detected in AMG solver: pressure coupled Divergence detected in AMG solver: solution-species-0 Divergence detected in AMG solver: solution-species-1 Divergence detected in AMG solver: vof-1 Divergence detected in AMG solver: pressure coupled Divergence detected in AMG solver: solution-species-0 Divergence detected in AMG solver: solution-species-1 Divergence detected in AMG solver: vof-1 Divergence detected in AMG solver: pressure coupled Divergence detected in AMG solver: solution-species-0 Divergence detected in AMG solver: solution-species-1 Divergence detected in AMG solver: vof-1 Divergence detected in AMG solver: pressure coupled Divergence detected in AMG solver: solution-species-0 Divergence detected in AMG solver: solution-species-1 Divergence detected in AMG solver: vof-1 Divergence detected in AMG solver: pressure coupled Divergence detected in AMG solver: solution-species-0 Divergence detected in AMG solver: solution-species-1 Divergence detected in AMG solver: vof-1 Divergence detected in AMG solver: pressure coupled Divergence detected in AMG solver: solution-species-0 Divergence detected in AMG solver: solution-species-1 Divergence detected in AMG solver: vof-1 Divergence detected in AMG solver: pressure coupled Divergence detected in AMG solver: solution-species-0 Divergence detected in AMG solver: solution-species-1 Divergence detected in AMG solver: vof-1 Divergence detected in AMG solver: pressure coupled Divergence detected in AMG solver: solution-species-0 Divergence detected in AMG solver: solution-species-1 Divergence detected in AMG solver: vof-1 Divergence detected in AMG solver: pressure coupled Divergence detected in AMG solver: solution-species-0 Divergence detected in AMG solver: solution-species-1 Divergence detected in AMG solver: vof-1 Divergence detected in AMG solver: pressure coupled Divergence detected in AMG solver: solution-species-0 Divergence detected in AMG solver: solution-species-1 Divergence detected in AMG solver: vof-1 Divergence detected in AMG solver: pressure coupled Divergence detected in AMG solver: solution-species-0 Divergence detected in AMG solver: solution-species-1 Divergence detected in AMG solver: vof-1 Divergence detected in AMG solver: pressure coupled Divergence detected in AMG solver: solution-species-0 Divergence detected in AMG solver: solution-species-1 Divergence detected in AMG solver: vof-1 Divergence detected in AMG solver: pressure coupled Divergence detected in AMG solver: solution-species-0 Divergence detected in AMG solver: solution-species-1 Divergence detected in AMG solver: vof-1 Divergence detected in AMG solver: pressure coupled Divergence detected in AMG solver: solution-species-0 Divergence detected in AMG solver: solution-species-1 Divergence detected in AMG solver: vof-1 Error at host: floating point exception Error: floating point exception Error Object: #f
应该是UDF的问题,但不知道具体是什么问题。生长速率udf代码如下:
#include "sg_mphase.h" DEFINE_PB_GROWTH_RATE(growth_rate,cell,thread,d_1) { real G;/* growth rate in m/s*/ real Kg = 1.280e-5; /* growth rate constant */ real g = 1.947;/* primary nucleation law power index */ real x;/* the antisolvent proportion in kg-antisolvent/kg-antisolvent and solvent */ real y;/* the solubility in kg-solute/kg-antisolvent and solvent */ real C;/* the solute concentration in kg-solute/kg-solvent */ real Solubility;/* the solubility in kg-solute/kg-solvent */ real delta_C;/* the difference between the solute concentration and the solubility, kg-solute/kg-solvent */ real solute_mass_frac,solvent_mass_frac,antisolvent_mass_frac; Thread *tc = THREAD_SUPER_THREAD(thread); /* obtain mixture thread */ Thread **pt = THREAD_SUB_THREADS(tc); /* pointer to sub_threads */ Thread *tp = pt[P_PHASE]; /* primary phase thread */ solute_mass_frac = C_YI(cell,tp,0);/* mass fraction of solute in primary phase (solvent,antisolvent,Paracetamol) */ solvent_mass_frac = C_YI(cell,tp,2);/* mass fraction of solvent in primary phase (solvent,antisolvent,Paracetamol ) */ antisolvent_mass_frac = 1.-solute_mass_frac-solvent_mass_frac;/* mass fraction of antisolvent in primary phase (solvent,antisolvent,Paracetamol) */ x = antisolvent_mass_frac/(antisolvent_mass_frac+solvent_mass_frac);/* the antisolvent proportion in kg-antisolvent/kg-antisolvent and solvent */ y = -2.63748*pow(x,4)+9.04654*pow(x,3)-10.86277*pow(x,2)+5.04399*x-0.57920;/* the solubility in kg-solute/kg-antisolvent and solvent */ Solubility = y*(1.+(antisolvent_mass_frac /solvent_mass_frac));/* the solubility in kg-solute/kg-solvent */ C = solute_mass_frac/solvent_mass_frac;/* the solute concentration in kg-solute/kg-solvent */ delta_C = C-Solubility; /* Definition of Supersaturation */ if (delta_C == 0.) { G = 0.; } else { G = Kg*pow(delta_C,g); } return G; }
-
关于成核模型中的UDF问题@bestucan
在开始里面搜commander是这个吗
-
关于成核模型中的UDF问题@lee459317530
请问为什么要将Thread **pt = THREAD_SUB_THREADS(tc);
改成Thread *pt = THREAD_SUB_THREADS(thread);
呢?
我使用Thread **pt = THREAD_SUB_THREADS(tc);
的时候就显示“生成成功”了
但还是有之前同样的问题
-
关于成核模型中的UDF问题@bestucan 多谢多谢!
-
关于成核模型中的UDF问题各位大佬好,最近在PBM模型中要写入一个关于成核的UDF,按照教程中的示例做了修改,然后再fluent中编译时出现了问题,麻烦各位大佬看看时怎么了
代码如下:
/************************************************************************ UDF that computes the particle nucleation rate *************************************************************************/ #include "udf.h" #include "sg_pb.h" #include "sg_mphase.h" DEFINE_PB_NUCLEATION_RATE(nuc_rate, cell, thread) { real B;/* nucleation rate in #/(s kg-solvent)*/ real Kb_1 = 4.355; /* primary nucleation rate constant */ real Kb_2 = 3.968e14;/* secondary nucleation rate constant */ real b_1 = 1.852;/* primary nucleation law power index */ real b_2 = 4.226;/* secondary nucleation law power index */ real x;/*the antisolvent proportion in kg- antisolvent/kg-antisolvent and solvent */ real y;/*the solubility in kg-solute/kg- antisolvent and solvent */ real C;/*the solute concentration in kg-solute/kg-solvent*/ real Solubility;/*the solubility in kg-solute/kg-solvent */ real delta_C;/*the difference between the solute concentration and the solubility, kg-solute/kg-solvent*/ real solute_mass_frac,solvent_mass_frac,antisolvent_mass_frac; real m; Thread *tc = THREAD_SUPER_THREAD(thread); /*obtain mixture thread */ Thread **pt = THREAD_SUB_THREADS(tc); /* pointer to sub_threads */ Thread *tp = pt[P_PHASE]; /* primary phase thread */ solute_mass_frac = C_YI(cell,tp,0);/*mass fraction of solute in primary phase (solvent,antisolvent,Paracetamol)*/ solvent_mass_frac = C_YI(cell,tp,1);/* mass fraction of solvent in primary phase (solvent,antisolvent,Paracetamol ) */ antisolvent_mass_frac = 1-solute_mass_frac-solvent_mass_frac;/* mass fraction of antisolvent in primary phase (solvent,antisolvent,Paracetamol)*/ x=antisolvent_mass_frac/(antisolvent_mass_frac+solvent_mass_frac);/*the antisolvent proportion in kg- antisolvent/kg-antisolvent and solvent */ y =-2.63748*pow(x,4)+9.04654*pow(x,3)-10.86277*pow(x,2)+5.04399*x-0.57920;/*the solubility in kg-solute/kg- antisolvent and solvent */ Solubility=y*(1+(antisolvent_mass_frac/solvent_mass_frac));/*the solubility in kg-solute/kg- solvent */ C=solute_mass_frac/solvent_mass_frac;/*the solute concentration in kg-solute/kg- solvent*/ delta_C = C-Solubility; /* Definition of Supersaturation */ m=C_VOF(cell,pt[1])*1293; if (delta_C == 0.) { B = 0.; } else { B = (Kb_1)*pow(delta_C,b_1)+(Kb_2)*pow(delta_C,b_2)*m; } return B; }
Build的时候提示是这样的
然后点击Load的提示是这样的
编程功力不太行,只能按照示例在上面修改,很多地方不太懂,还请各位大佬帮忙看看,这究竟是咋回事呢?@东岳
-
HR算法应用于求解PBE刚刚接触PBE与有限体积法相关的东西,入门起来比较吃力,希望得到指点,感谢
最近看到一篇使用HR算法求解PBE的文献,文献中对算法的介绍和对PBE的离散过程如下:
文中写出的PBE形式为
离散后得到如下形式:
!
我不是很理解如何离散的,看不懂这个过程,比如公式6中的a代表什么,minmod limiter又是什么东东?公式11,12又是怎么来的等等,感觉自己脑子都浆糊了,小白希望得到李老师的解答
-
小白求助帖:关于不同形式的PBE有点明白了,我再好好看看李老师的论文,谢谢!
-
小白求助帖:关于不同形式的PBE最近刚刚接触PBE的方向,看过一些文献后,发现关于PBE有几种形式的写法,想问问论坛的大佬如何理解这些形式,有什么区别,又如何统一呢?感谢!
(1)
(2)
(3)
(4)
(5)