一个非常简单的鼓泡床face momentum算法测试+MULES
-
测试了下直接求解alpha方程,简单算例下看起来结果完全一样
MULES的log,最后相分数是0.00850027:
Courant Number mean: 0.00800555 max: 0.0306176 Max Ur Courant Number = 0.072456 Time = 20 PIMPLE: iteration 1 MULES: Solving for alpha.air MULES: Solving for alpha.air alpha.air volume fraction = 0.00850027 Min(alpha.air) = 4.87983e-12 Max(alpha.air) = 0.5 Constructing face momentum equations Constructing face momentum equations GAMG: Solving for p_rgh, Initial residual = 7.45381e-10, Final residual = 7.45381e-10, No Iterations 0 GAMG: Solving for p_rgh, Initial residual = 8.32869e-10, Final residual = 8.32869e-10, No Iterations 0 GAMG: Solving for p_rgh, Initial residual = 8.57256e-10, Final residual = 8.57256e-10, No Iterations 0 DILUPBiCGStab: Solving for epsilon.air, Initial residual = 1.0517e-09, Final residual = 2.2197e-11, No Iterations 1 DILUPBiCGStab: Solving for k.air, Initial residual = 1.20173e-09, Final residual = 3.23306e-11, No Iterations 1 DILUPBiCGStab: Solving for epsilon.water, Initial residual = 1.27695e-09, Final residual = 8.86065e-12, No Iterations 1 DILUPBiCGStab: Solving for k.water, Initial residual = 1.1219e-09, Final residual = 1.42201e-11, No Iterations 1 ExecutionTime = 50.19 s fieldAverage fieldAverage1 write: Calculating averages Writing average fields End
求解方程的log,最后相分数是0.00849429:
Courant Number mean: 0.00800418 max: 0.0305133 Max Ur Courant Number = 0.072237 Time = 20 PIMPLE: iteration 1 diagonal: Solving for alpha.air, Initial residual = 0, Final residual = 0, No Iterations 0 diagonal: Solving for alpha.air, Initial residual = 0, Final residual = 0, No Iterations 0 alpha.air volume fraction = 0.00849429 Min(alpha.air) = -4.17752e-11 Max(alpha.air) = 0.5 Constructing face momentum equations Constructing face momentum equations GAMG: Solving for p_rgh, Initial residual = 7.99935e-10, Final residual = 7.99935e-10, No Iterations 0 GAMG: Solving for p_rgh, Initial residual = 9.18566e-10, Final residual = 9.18566e-10, No Iterations 0 GAMG: Solving for p_rgh, Initial residual = 9.54526e-10, Final residual = 9.54526e-10, No Iterations 0 DILUPBiCGStab: Solving for epsilon.air, Initial residual = 8.57302e-10, Final residual = 8.57302e-10, No Iterations 0 DILUPBiCGStab: Solving for k.air, Initial residual = 9.47766e-10, Final residual = 9.47766e-10, No Iterations 0 DILUPBiCGStab: Solving for epsilon.water, Initial residual = 7.76961e-10, Final residual = 7.76961e-10, No Iterations 0 DILUPBiCGStab: Solving for k.water, Initial residual = 8.9345e-10, Final residual = 8.9345e-10, No Iterations 0 ExecutionTime = 70.7 s fieldAverage fieldAverage1 write: Calculating averages Writing average fields End
-
OpenFOAM里面实际求解的方程是基于:
\begin{equation}
\frac{\partial \alpha_1}{\partial t}+ \nabla \cdot (\alpha_1 \mathbf{U})=\alpha_1 \alpha_2 \mathrm{dgdt}+\alpha_1 \nabla \cdot \mathbf{U}
\end{equation}
目的是为了有界,基于我的不可压缩算例,测试一下直接求解相方程:
\begin{equation}
\frac{\partial \alpha_1}{\partial t}+ \nabla \cdot (\alpha_1 \mathbf{U}_\mathrm{d})=0
\end{equation}
同时增加了点气量,看起来也是无区别 -
@赵一铭
这个MULES是用于保证alpha低耗散+有界的,目前我在测试这个作用大不大。我的算法要去掉MULES,顺便做做测试。刚求解一个一维两相流算例,一个采用GAMG求解,一个采用PCG。网格很少,500个。下面是log:
Time = 70 PIMPLE: iteration 1 MULES: Solving for alpha.air MULES: Solving for alpha.air alpha.air volume fraction = 0.9999999999999999 Min(alpha.air) = 0.9999999999999938 Max(alpha.air) = 1 Constructing momentum equations DICPCG: Solving for p_rgh, Initial residual = 0.7001341621875685, Final residual = 3.246057367678102e-14, No Iterations 1 DICPCG: Solving for p_rgh, Initial residual = 0.157648897023736, Final residual = 2.705464757640693e-14, No Iterations 1 DICPCG: Solving for p_rgh, Initial residual = 0.6904853890921069, Final residual = 2.428959127445399e-14, No Iterations 1 ExecutionTime = 9.76 s fieldAverage fieldAverage1 write: Calculating averages Writing average fields End
上面是
PCG
,一步收敛Time = 7.6 PIMPLE: iteration 1 MULES: Solving for alpha.air MULES: Solving for alpha.air alpha.air volume fraction = 0.1520555867849422 Min(alpha.air) = 2.326855486356723e-92 Max(alpha.air) = 1 Constructing momentum equations GAMG: Solving for p_rgh, Initial residual = 0.9994307238357184, Final residual = 0.0008779296549588346, No Iterations 1000 GAMG: Solving for p_rgh, Initial residual = 0.9994319366641714, Final residual = 0.0007083339635828074, No Iterations 1000 GAMG: Solving for p_rgh, Initial residual = 0.9994305521571339, Final residual = 0.0007359406882024251, No Iterations 1000 ExecutionTime = 7.41 s
上面是
GAMG
,每次都需要1000步收敛。注意:两个求解的结果都一样。