你这个报错应该是createFields里没定义alphacf吧?sparyFoam可以做液滴蒸发,应该也适用你的情况。
lcx
帖子
-
在coalChemistryFoam中加入MPPIC应力模型 -
在coalChemistryFoam中加入MPPIC应力模型颗粒数1e10,那应该是属于密相了。催化反应+颗粒密相OpenFOAM里应该没有现成的求解器。
-
可压缩求解器coalChemistryFoam计算纯气体流动压降有误!前一段时间搭建了流化床求解器(燃烧、密相颗粒流动求解器,下称newSolver),目前需要对这个求解器进行冷态颗粒流动的验证(常温,关闭化学反应、燃烧和传热)。通过验证发现颗粒轴向速度和实验吻合较好,但是气相压降差距很大,而使用MPPICFoam计算相同的case可以得到准确的压降(稳定时newSolver比MPPICFoam压降高两倍多)。
为了找到问题所在,于是关闭颗粒计算纯气体流动的速度和压降,发现newSolver和MPPICFoam计算得到的气相速度相同但是压降有一定差距。因此猜测是气相压力方程计算的问题。
由于newSolver是基于coalChemistryFoam流体方程加入alpha的修改的,纯气体流动情况下alpha=1。为了排除我修改方程所导致的错误,因此用coalChemistryFoam(关闭化学反应、燃烧和传热)计算纯气体流动看能否得到准确的结果。结果发现压降仍然有差距。
难道coalChemisryFoam变密度的求解器无法计算常密度的情况吗?coalChemistryFoam是反应所导致的密度变化,关闭化学反应按理说密度应该是不变的,为何计算结果与实际差距大?常温纯气体流动压降都不准,加上化学反应燃烧后压降会准吗?
MPPICFoam压力方程
fvScalarMatrix pEqn ( fvm::laplacian(alphacf*rAUcf, p) == fvc::ddt(alphac) + fvc::div(alphacf*phiHbyA) );
coalChemistryFoam压力方程
fvScalarMatrix pEqn ( fvm::ddt(psi, p) + fvc::div(phiHbyA) - fvm::laplacian(rhorAUf, p) == coalParcels.Srho() + fvOptions(psi, p, rho.name()) );
纯气体流动验证的几何模型和网格如下图所示
请各位大佬指教!
-
在coalChemistryFoam中加入MPPIC应力模型@lcx 在 在coalChemistryFoam中加入MPPIC应力模型 中说:
在1基础上关闭MPPIC颗粒应力仅考虑颗粒所受曳力和重力得到较为合理的结果。颗粒没有出现过度堆积的情况。(gif见下楼)
结果如下
-
在coalChemistryFoam中加入MPPIC应力模型各位前辈好,
目前在openfoam v2212版本上搭建流化床热态模拟的求解器。主要是通过在coalChemistryFoam中加入体积分数α和MPPIC颗粒应力来考虑密相颗粒。参考了CFD Online上的一个讨论:https://www.cfd-online.com/Forums/openfoam-programming-development/158458-colliding-coal-cloud-coalcollidingchemistryfoam.html 和Chalmers OpenFOAM的课程资料:https://zhuanlan.zhihu.com/p/342917899
体积分数的添加可以参考Chalmers课程资料,没什么变化。MPPIC颗粒应力的添加在新版本v2212出现一些变化。查看MPPICFoam求解器发现MPPICFoam求解过程中直接定义了
#ifdef MPPIC #include "basicKinematicCloud.H" #define basicKinematicTypeCloud basicKinematicCloud
而不是旧版本v2006及以前的
#ifdef MPPIC #include "basicKinematicMPPICCloud.H" #define basicKinematicTypeCloud basicKinematicMPPICCloud
通过gdb调试新版本MPPICFoam求解器确实发现新版本的MPPIC颗粒应力计算整合到了KinematicCloud和KinematicParcel中,因此新版本中调用MPPIC颗粒应力不需要在云、颗粒模板上添加MPPICCloud和MPPICParcel,直接在constant/Cloud1Properties中直接添加packing、damping、isotropyModel关键字就可以实现MPPIC颗粒应力。
目前求解器的搭建已经基本完成。但是通过MPPICFoam下Goldschmidt案例进行热态求解器颗粒运动求解的验证,发现了一些奇异的现象。
-
- 采用MPPICFoam标准算例Goldschmidt验证热态求解器(关闭燃烧、化学反应)的颗粒碰撞,考虑颗粒所受曳力、重力和颗粒应力影响。颗粒在底部出现过度堆积现象(求解过程中固相体积分数甚至已达到6以上),之后体积分数大导致所受曳力增大,颗粒被推起、抛飞。
- 采用MPPICFoam标准算例Goldschmidt验证热态求解器(关闭燃烧、化学反应)的颗粒碰撞,考虑颗粒所受曳力、重力和颗粒应力影响。颗粒在底部出现过度堆积现象(求解过程中固相体积分数甚至已达到6以上),之后体积分数大导致所受曳力增大,颗粒被推起、抛飞。
Log文件部分内容如下
Courant Number mean: 0.0555298 max: 0.12225 Time = 0.4736 Solving3-D cloud coalCloud1 Cloud: coalCloud1 Current number of parcels = 24750 Current mass in system = 0.511442 Linear momentum = (-0.00018024 0.000454129 -0.644986) |Linear momentum| = 0.644987 Linear kinetic energy = 0.450077 Average particle per parcel = 1 Injector model1: - parcels added = 24750 - mass introduced = 0.511478 Surface film: - parcels absorbed = 0 - mass absorbed = 0 - parcels ejected = 0 Parcel fate: system (number, mass) - escape = 9046, 0.186929 Parcel fate: patch (top|bottom|walls|frontAndBack) (number, mass) - escape = 0, 0 - stick = 0, 0 Min cell volume fraction = 0 Max cell volume fraction = 6.86133 Min dense number of parcels = 1258 Temperature min/max = 291.614, 292.984 Mass transfer phase change = 3.60952e-05 Mass transfer devolatilisation = 0 Mass transfer surface reaction = 0 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 PIMPLE: iteration 1 smoothSolver: Solving for Ux, Initial residual = 0.0338563, Final residual = 7.04861e-06, No Iterations 1 smoothSolver: Solving for Uy, Initial residual = 0.132381, Final residual = 9.38479e-08, No Iterations 2 smoothSolver: Solving for Uz, Initial residual = 0.00769001, Final residual = 2.67996e-06, No Iterations 1 smoothSolver: Solving for O2, Initial residual = 0.00121389, Final residual = 1.11529e-06, No Iterations 1 smoothSolver: Solving for CH4, Initial residual = 0, Final residual = 0, No Iterations 0 smoothSolver: Solving for H2, Initial residual = 0, Final residual = 0, No Iterations 0 smoothSolver: Solving for CO2, Initial residual = 0, Final residual = 0, No Iterations 0 smoothSolver: Solving for H2O, Initial residual = 0.00121249, Final residual = 1.11141e-06, No Iterations 1 smoothSolver: Solving for h, Initial residual = 0.0505897, Final residual = 9.40878e-08, No Iterations 2 DICPCG: Solving for G, Initial residual = 0.0108795, Final residual = 9.04101e-06, No Iterations 32 T gas min/max = 291.971, 293.866 GAMG: Solving for p, Initial residual = 0.639901, Final residual = 0.00540426, No Iterations 3 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 5.44867e-05, global = -1.29277e-06, cumulative = -7.83327e-05 GAMG: Solving for p, Initial residual = 0.0144207, Final residual = 7.37421e-07, No Iterations 14 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 7.70534e-09, global = 2.93038e-10, cumulative = -7.83324e-05 ExecutionTime = 1760.01 s ClockTime = 1774 s
-
- 在1基础上关闭MPPIC颗粒应力仅考虑颗粒所受曳力和重力得到较为合理的结果。颗粒没有出现过度堆积的情况。(gif见下楼)
按理说颗粒应力的作用是阻止颗粒体积分数过大,但是就目前的结果看添加了颗粒应力,颗粒反而更加聚集,体积分数更大。是我MPPIC代码理解错误颗粒应力耦合有问题吗?希望得到各位前辈的指点!
-