OpenFOAM使用icoFoam周期边界条件时压力如何处理?
-
@学流体的小明 非常感谢您的回复!!!看到了李老师在CFD公众号推送了你的解决办法,膜拜!
“icoFoam不能使用fvOptions“我好想是在cfd-online上看到的,但是现在找不到了......
大佬你好,我现在有以下几个问题,不知道能否帮我解答一下:
- icoFoam在使用fvOptions时,需不需要修改icoFoam呢?或者在controlDict中添加如何调用的fvOptions呢?因为我使用了fvOptions,但是并没有什么作用!
- 在fvOptions中使用Ubar的原理是什么呢?在整个流场中添加一个平均速度驱动流体流动吗?但是我想要的是压力驱动,也就是在入口和出口处有一定的压差,两者有什么区别吗?
- 如果使用pGrad的话,是不是在动量预测方程和速度矫正方程中都加入源项pGrad?
谢谢!!!
-
Courant Number mean: 5.2432853e-05 max: 0.0046787387 Interface Courant Number mean: 4.565481e-08 max: 0.0046787387 deltaT = 1.4332535e-07 Time = 6.199610856e-07 PIMPLE: iteration 1 smoothSolver: Solving for alpha.water, Initial residual = 4.7622511e-07, Final residual = 6.3664377e-13, No Iterations 1 Phase-1 volume fraction = 0.9736 Min(alpha.water) = -1.7852346e-28 Max(alpha.water) = 1.0007297 MULES: Correcting alpha.water MULES: Correcting alpha.water Phase-1 volume fraction = 0.9736 Min(alpha.water) = -2.7157011e-21 Max(alpha.water) = 1.0007297 smoothSolver: Solving for alpha.water, Initial residual = 4.7608513e-07, Final residual = 6.3691332e-13, No Iterations 1 Phase-1 volume fraction = 0.9736 Min(alpha.water) = -1.7851287e-28 Max(alpha.water) = 1.0007295 MULES: Correcting alpha.water MULES: Correcting alpha.water Phase-1 volume fraction = 0.9736 Min(alpha.water) = -8.890103e-22 Max(alpha.water) = 1.0007295 smoothSolver: Solving for alpha.water, Initial residual = 4.7594589e-07, Final residual = 6.3718766e-13, No Iterations 1 Phase-1 volume fraction = 0.9736 Min(alpha.water) = -1.7850229e-28 Max(alpha.water) = 1.0007294 MULES: Correcting alpha.water MULES: Correcting alpha.water Phase-1 volume fraction = 0.9736 Min(alpha.water) = -1.3578505e-21 Max(alpha.water) = 1.0007294 GAMG: Solving for p_rgh, Initial residual = 0.0020968541, Final residual = 8.4986345e-06, No Iterations 3 **Pressure gradient source: uncorrected Ubar = 0.040000839, pressure gradient = 3324.6917** //这一行 time step continuity errors : sum local = 8.2519519e-10, global = -9.3757905e-24, cumulative = -9.9860764e-23 GAMG: Solving for p_rgh, Initial residual = 0.00014216941, Final residual = 1.3187746e-06, No Iterations 3 **Pressure gradient source: uncorrected Ubar = 0.040000842, pressure gradient = 3323.7643** //这一行 time step continuity errors : sum local = 1.2809363e-10, global = 3.3488584e-24, cumulative = -9.6511905e-23 GAMG: Solving for p_rgh, Initial residual = 8.9943051e-06, Final residual = 8.3146747e-08, No Iterations 5 **Pressure gradient source: uncorrected Ubar = 0.040000838, pressure gradient = 3325.0637** //这一行 time step continuity errors : sum local = 8.102696e-12, global = -6.6915661e-25, cumulative = -9.7181062e-23 ExecutionTime = 5.7 s ClockTime = 6 s
你看看你那边是不是就没有生效。
2. 原理是在流场中添加一个体积力源项,不是你想的压差,具体深入的探索可以看 http://xiaopingqiu.github.io/2016/03/20/fvOptions2/ 。 压差的方法可以找找帖子,我记得也有讨论。
3. 是的,就是UEqn.H和pEqn.H都得改。 -
@李东岳 在 OpenFOAM使用icoFoam周期边界条件时压力如何处理? 中说:
原理可以看一下这个。不过有一阵子没更新了。我这几天重新整理一下
插一句,我更新了一下 http://dyfluid.com/boundaryFoam.html
-
@MingfengWang 是的,没有这个
-
@MingfengWang 压差的方法我也没用过。我也没啥经验,帮不了太多的忙,邮件交流就算了。李老师建议你换pisoFoam应该能解决问题。