关于nOuterCorrectors影响计算速度和计算精度的问题
-
计算一个简单二维多圆柱绕流的动网格算例,网格数量大概40-50万,fvsolution中的nOuterCorrectors和nCorrecters我尝试了不同的值,发现随着该值设置的越来越大,结果才会收敛,最终分别等于20和10。但是这个条件下,计算时间特别久,一个二维40-50万网格的算例要计算将近90个小时,感觉很不合理。想请教一下各位大佬,我是不是哪里设置出错了?
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2006 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { "(p|pcorr)" { solver PCG; preconditioner DIC; tolerance 1e-04; relTol 0.1; } "(p|pcorr)Final" { $p; relTol 0; } U { solver smoothSolver; smoother symGaussSeidel; tolerance 1e-04; relTol 0.1; } UFinal { $U; tolerance 1e-04; relTol 0.0; } } PIMPLE { momentumPredictor no; correctPhi yes; nOuterCorrectors 20; nCorrectors 10; nNonOrthogonalCorrectors 1; ddtCorr true; pRefPoint (20.0 0.0 0.5); pRefValue 0.0; } relaxationFactors { fields { } equations { "U.*" 1; } } // ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2006 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default Euler; } gradSchemes { default Gauss linear; } divSchemes { default none; div(U) Gauss linear; div(phi,U) Gauss linearUpwind grad(U); div(phi,k) Gauss linearUpwind grad(U); div(phi,K) Gauss linearUpwind grad(U); div(phi,omega) Gauss linearUpwind grad(U); div((nuEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { default Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } wallDist { method meshWave; } // ************************************************************************* //
-
算的什么多圆柱?有多少个圆柱?图形摆出来看看
-
nCorrectors太大了,推荐1-3,最多我见过用到3的。PISO算法本来只有2步压力修正,所以这个值你可以固定,不放心的话用3好了。
nOuterCorrectors你需要仔细的测试一下,这个和时间步大小也有关系。大致范围5-100左右吧。FLUENT那边的推荐值是20-25,我自己不管是在FLUENT还是FOAM测试出来的结果也都差不多,最多会用到30,一般情况下20左右。如果很多外迭代还无法收敛那你需要考虑缩小时间步长,而不是去无限制的去增大外迭代步数。另外你没有给relaxationFactors,为什么?
收敛不收敛是你自己设置的,不是说收敛了就对,没收敛就错。最终要靠结果去判断,特别是和实验结果的对比。
-
@cccrrryyy 感谢感谢,我在正式计算之前,算了单个圆柱的,和Oseen公式推出来的理论解能够比上。
您说的方法我试试,由于OpenFoam我也只是初学,没有特别系统的学过,您说的relaxationFactors 我还不太清楚,我去好好了解一下。
-
@波流力 网格差不多长这样