使用overset计算浮体在波浪下运动时浮体运动异常(飞出去了。。)
-
本身是一个很简单的案例,二维的方箱在波浪作用下运动,使用了重叠网格,用of自带的floatingBody案例更改的,可是在计算了几步后,方箱的垂向速度振荡,最后慢慢变大,到了18次方的量级,用命令提取了部分方箱的线速度如下:
Linear velocity: (-1.91542457151e-06 -0.00135827305279 0) Linear velocity: (-2.15710332077e-06 0.00111202047891 0) Linear velocity: (-2.41767412947e-06 0.00260261966864 0) .... Linear velocity: (0.0989209598413 -546.73550894 0) Linear velocity: (0.0883712548553 -340.476075085 0) Linear velocity: (0.0467607474571 185.838921431 -0) Linear velocity: (0.150364701271 -361.987863494 0) Linear velocity: (0.359492211159 -1874.79348536 0) Linear velocity: (0.318758482597 -1159.16674178 0) Linear velocity: (0.192438074537 630.147173239 -0) Linear velocity: (0.680108763246 -1456.15159395 0) Linear velocity: (1.49788128146 -6826.0000562 0) Linear velocity: (1.41386364482 -4264.12384652 0) Linear velocity: (0.956295248336 2153.26695027 0) Linear velocity: (2.51485988514 -5514.66212084 0) Linear velocity: (4.96732483128 -24310.1703926 0) Linear velocity: (4.44524314882 -14419.2509978 0) Linear velocity: (2.44194802246 9150.62467989 -0) Linear velocity: (9.1294805619 -23302.6849784 0) Linear velocity: (20.4668906787 -93213.9366717 0) Linear velocity: (19.8687629901 -55798.9112031 0) Linear velocity: (15.9451318073 32453.0741479 -0) Linear velocity: (42.6515469395 -100098.024999 0) Linear velocity: (80.7624597507 -357186.307128 0) Linear velocity: (74.8730279424 -202941.440388 0) Linear velocity: (40.1654968732 138596.03469 -0) Linear velocity: (152.128923734 -409740.496391 0) Linear velocity: (306.976847121 -1346764.10283 0) ... Linear velocity: (461955.202831 -941127581.331 0) Linear velocity: (1454171.11916 -4517414949.32 0) Linear velocity: (30500257.004 -23096949614.6 0) Linear velocity: (-2711275695.75 -9.23445027755e+12 0) Linear velocity: (-182076601222 2.15967217623e+14 0) Linear velocity: (357016928793 3.37572779872e+14 0) Linear velocity: (-165982717722 1.87348726017e+14 0) Linear velocity: (-1.80226889532e+12 -8.18857537503e+13 0) Linear velocity: (1.9713735909e+12 1.46486850954e+14 0) Linear velocity: (1.03390418821e+13 7.76730469486e+14 0) Linear velocity: (1.35887023944e+12 5.06243915037e+14 -0) Linear velocity: (-1.61594169478e+13 -1.7900944247e+14 0) Linear velocity: (-8.51102456927e+12 1.89480548646e+13 0)
这时候后处理发现方箱早就飞出去了😂,我把能想到的地方都尝试了一遍,前后经过了三四天,结果还是不行,感觉已经黔驴技穷了,我把代码贴下面,希望哪位大佬能够指点一二,在下感激不尽。floatingBody.zip
-
附上两个时间步的输出日志,大佬们看看,能不能给点建议,谢谢大佬。
Courant Number mean: 0.00735537390793 max: 0.583636577736 Interface Courant Number mean: 0.000511181990626 max: 0.583636577736 deltaT = 0.000244897959184 Time = 0.0140204 PIMPLE: iteration 1 forces forces: rho: rho Not including porosity effects 6-DoF rigid body motion Centre of rotation: (-8.94498440699e-07 -0.0164456747667 0) Centre of mass: (-8.94498440699e-07 -0.0164456747667 0) Orientation: (0.999999999848 -1.74335290174e-05 0 1.74335290174e-05 0.999999999848 0 0 0 1) Linear velocity: (-0.00293368624098 -48.7266053369 0) Angular velocity: (0 0 0.0260211371501) cellVolumeWeight : detected 2 mesh regions zone:0 nCells:15232 zone:1 nCells:1408 Marking patch-cells on zone 0 Marking patch-cells on zone 1 After patch analysis : nCells : 16640 other : 15832 patch : 604 overset: 204 Creating mesh-to-mesh addressing for region0 and region0 regions using cellVolumeWeight meshToMesh: Using AABBTree method Overlap volume: 0.00109999996229 cellVolumeWeight : detected 3 mesh regions after overset Front : fraction:1 size:364 Overset analysis : nCells : 16640 calculated : 15551 interpolated : 356 hole : 733 Updating StokesII wave model for patch inlet Updating shallowWaterAbsorption wave model for patch outlet Execution time for mesh.update() = 0.13 s Updating StokesII wave model for patch inlet smoothSolver: Solving for alpha.water, Initial residual = 0.000249999048227, Final residual = 6.80498898311e-11, No Iterations 3 Phase-1 volume fraction = 0.503920613005 Min(alpha.water) = -5.13127170995e-12 Max(alpha.water) = 1 MULES: Correcting alpha.water MULES: Correcting alpha.water MULES: Correcting alpha.water Phase-1 volume fraction = 0.50392714434 Min(alpha.water) = -6.63435707652e-05 Max(alpha.water) = 1.0000000001 Updating StokesII wave model for patch inlet smoothSolver: Solving for alpha.water, Initial residual = 0.000249103932209, Final residual = 6.43573158857e-11, No Iterations 3 Phase-1 volume fraction = 0.504175477931 Min(alpha.water) = -2.94680004953e-12 Max(alpha.water) = 1 MULES: Correcting alpha.water MULES: Correcting alpha.water MULES: Correcting alpha.water Phase-1 volume fraction = 0.504183786184 Min(alpha.water) = -0.00017940434073 Max(alpha.water) = 1 Updating StokesII wave model for patch inlet DILUPBiCGStab: Solving for p_rgh, Initial residual = 0.000310868744296, Final residual = 3.04422030153e-06, No Iterations 58 time step continuity errors : sum local = 3.96490246774e-05, global = -1.25171001239e-05, cumulative = -1.49775393475e-05 DILUPBiCGStab: Solving for p_rgh, Initial residual = 1.34902179705e-05, Final residual = 7.69997478103e-10, No Iterations 94 time step continuity errors : sum local = 3.38122940616e-07, global = -3.37601268199e-07, cumulative = -1.53151406157e-05 PIMPLE: iteration 2 Updating StokesII wave model for patch inlet smoothSolver: Solving for alpha.water, Initial residual = 0.00120237279896, Final residual = 3.53930819687e-09, No Iterations 4 Phase-1 volume fraction = 0.504912181473 Min(alpha.water) = 0 Max(alpha.water) = 1 MULES: Correcting alpha.water MULES: Correcting alpha.water MULES: Correcting alpha.water Phase-1 volume fraction = 0.504919520521 Min(alpha.water) = -3.14841185265e-05 Max(alpha.water) = 1.00000029283 Updating StokesII wave model for patch inlet smoothSolver: Solving for alpha.water, Initial residual = 0.00119880798848, Final residual = 6.98825518494e-09, No Iterations 4 Phase-1 volume fraction = 0.506154056117 Min(alpha.water) = 0 Max(alpha.water) = 1.00000002043 MULES: Correcting alpha.water MULES: Correcting alpha.water MULES: Correcting alpha.water Phase-1 volume fraction = 0.506165779936 Min(alpha.water) = -1.68626784389e-05 Max(alpha.water) = 1.00000005014 Updating StokesII wave model for patch inlet DILUPBiCGStab: Solving for p_rgh, Initial residual = 1.90517587839e-05, Final residual = 1.8214651533e-07, No Iterations 37 time step continuity errors : sum local = 4.1923654332e-05, global = -3.05018962765e-05, cumulative = -4.58170368922e-05 DILUPBiCGStab: Solving for p_rgh, Initial residual = 6.39065412577e-06, Final residual = 7.63397439793e-10, No Iterations 75 time step continuity errors : sum local = 1.86237192469e-07, global = -1.31816202546e-07, cumulative = -4.59488530947e-05 ExecutionTime = 8.5 s ClockTime = 12 s Courant Number mean: 0.235814158846 max: 5.37427555926 Interface Courant Number mean: 0.00949195777417 max: 2.51708515605 deltaT = 6.9970845481e-05 Time = 0.0140904 PIMPLE: iteration 1 forces forces: rho: rho Not including porosity effects 6-DoF rigid body motion Centre of rotation: (-1.08067779962e-06 -0.019295752321 0) Centre of mass: (-1.08067779962e-06 -0.019295752321 0) Orientation: (0.999999999816 -1.92012124244e-05 0 1.92012124244e-05 0.999999999816 0 0 0 1) Linear velocity: (-0.00238794043494 -32.7381114221 0) Angular velocity: (0 0 0.0245051469086) cellVolumeWeight : detected 2 mesh regions zone:0 nCells:15232 zone:1 nCells:1408 Marking patch-cells on zone 0 Marking patch-cells on zone 1 After patch analysis : nCells : 16640 other : 15832 patch : 604 overset: 204 Creating mesh-to-mesh addressing for region0 and region0 regions using cellVolumeWeight meshToMesh: Using AABBTree method Overlap volume: 0.00109999999488 cellVolumeWeight : detected 3 mesh regions after overset Front : fraction:1 size:364 Overset analysis : nCells : 16640 calculated : 15551 interpolated : 356 hole : 733 Updating StokesII wave model for patch inlet Updating shallowWaterAbsorption wave model for patch outlet Execution time for mesh.update() = 0.14 s Updating StokesII wave model for patch inlet smoothSolver: Solving for alpha.water, Initial residual = 0.000377707391121, Final residual = 6.71971274391e-09, No Iterations 2 Phase-1 volume fraction = 0.506638642972 Min(alpha.water) = -6.04435695918e-08 Max(alpha.water) = 1.00000001498 MULES: Correcting alpha.water MULES: Correcting alpha.water MULES: Correcting alpha.water Phase-1 volume fraction = 0.506641278027 Min(alpha.water) = -6.02169762921e-08 Max(alpha.water) = 1.00000001498 Updating StokesII wave model for patch inlet smoothSolver: Solving for alpha.water, Initial residual = 0.000377799740649, Final residual = 6.97823487912e-09, No Iterations 2 Phase-1 volume fraction = 0.507013009003 Min(alpha.water) = -2.53184572837e-09 Max(alpha.water) = 1.00000000834 MULES: Correcting alpha.water MULES: Correcting alpha.water MULES: Correcting alpha.water Phase-1 volume fraction = 0.507014571193 Min(alpha.water) = -2.4774186131e-09 Max(alpha.water) = 1.00000000834 Updating StokesII wave model for patch inlet DILUPBiCGStab: Solving for p_rgh, Initial residual = 5.44491503205e-05, Final residual = 1.57391889401e-07, No Iterations 54 time step continuity errors : sum local = 2.51380621235e-06, global = 4.18779084622e-08, cumulative = -4.59069751863e-05 DILUPBiCGStab: Solving for p_rgh, Initial residual = 1.4141816622e-05, Final residual = 6.93894196946e-10, No Iterations 95 time step continuity errors : sum local = 1.92459691085e-08, global = 2.85638433789e-09, cumulative = -4.59041188019e-05 PIMPLE: iteration 2 Updating StokesII wave model for patch inlet smoothSolver: Solving for alpha.water, Initial residual = 0.000607091902099, Final residual = 1.08827165501e-10, No Iterations 3 Phase-1 volume fraction = 0.506766015426 Min(alpha.water) = -3.06640979772e-09 Max(alpha.water) = 1.00000000775 MULES: Correcting alpha.water MULES: Correcting alpha.water MULES: Correcting alpha.water Phase-1 volume fraction = 0.506769027235 Min(alpha.water) = -2.9938628057e-09 Max(alpha.water) = 1.00000000775 Updating StokesII wave model for patch inlet smoothSolver: Solving for alpha.water, Initial residual = 0.000498218264715, Final residual = 9.8336652446e-09, No Iterations 2 Phase-1 volume fraction = 0.507267924831 Min(alpha.water) = -7.65421127887e-10 Max(alpha.water) = 1.00000000487 MULES: Correcting alpha.water MULES: Correcting alpha.water MULES: Correcting alpha.water Phase-1 volume fraction = 0.507269775942 Min(alpha.water) = -7.50043599137e-10 Max(alpha.water) = 1.00000000486 Updating StokesII wave model for patch inlet DILUPBiCGStab: Solving for p_rgh, Initial residual = 9.0967455725e-06, Final residual = 8.77703691491e-08, No Iterations 28 time step continuity errors : sum local = 2.08615978654e-06, global = 1.47998645536e-06, cumulative = -4.44241323466e-05 DILUPBiCGStab: Solving for p_rgh, Initial residual = 1.37725643056e-06, Final residual = 9.51675297182e-10, No Iterations 65 time step continuity errors : sum local = 2.26526056154e-08, global = 1.96253692104e-09, cumulative = -4.44221698096e-05 ExecutionTime = 8.78 s ClockTime = 13 s