OpenFOAM中LES输出最终残差问题
-
LES模拟,调用了residuals函数输出残差,但发现输出的结果是每步计算的初始残差。根据函数的描述也是输出 initial residuals。请问大家有什么方法可以输出final residuals吗?
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 8 \\/ M anipulation | ------------------------------------------------------------------------------- Description For specified fields, writes out the initial residuals for the first solution of each time step; for non-scalar fields (e.g. vectors), writes the largest of the residuals for each component (e.g. x, y, z). \*---------------------------------------------------------------------------*/ #includeEtc "caseDicts/postProcessing/numerical/residuals.cfg" fields (p U); // ************************************************************************* //
-
-
好像不是这个问题,下面是我输出的 log.pisoFoam 和 对应的 residuals.dat。 residuals.dat 输出的都是每步计算开始的 Initial residual,好像无法选择输出每步计算最后的 Final residual
-
计算的log.pisoFoam文件
Time = 0.0015 Courant Number mean: 0.18933236 max: 3.0134083 smoothSolver: Solving for Ux, Initial residual = 0.94279208, Final residual = 4.1036105e-07, No Iterations 4 smoothSolver: Solving for Uy, Initial residual = 0.24479151, Final residual = 9.6080469e-07, No Iterations 3 smoothSolver: Solving for Uz, Initial residual = 0.21776409, Final residual = 8.4350179e-07, No Iterations 3 GAMG: Solving for p, Initial residual = 0.0048258603, Final residual = 0.00021860641, No Iterations 18 GAMG: Solving for p, Initial residual = 0.17069422, Final residual = 0.0063724156, No Iterations 2 time step continuity errors : sum local = 5.5286369e-05, global = 2.8590342e-06, cumulative = 2.6884486e-05 GAMG: Solving for p, Initial residual = 0.025078242, Final residual = 0.0012531841, No Iterations 16 GAMG: Solving for p, Initial residual = 0.058320856, Final residual = 0.0028998385, No Iterations 27 time step continuity errors : sum local = 2.6808848e-06, global = -4.4628639e-09, cumulative = 2.6880023e-05 GAMG: Solving for p, Initial residual = 0.017046775, Final residual = 0.0008362502, No Iterations 36 GAMG: Solving for p, Initial residual = 0.0020386497, Final residual = 9.9487967e-07, No Iterations 305 time step continuity errors : sum local = 8.7201563e-10, global = -1.7811338e-12, cumulative = 2.6880021e-05 ExecutionTime = 16.02 s ClockTime = 16 s
- 对应输出的 residuals.dat 文件
# Residuals # Time p Ux Uy Uz 0 N/A N/A 0.0005 1.00000000e+00 1.00000000e+00 1.00000000e+00 1.00000000e+00 0.001 3.79477181e-03 9.31777378e-01 3.20163786e-01 3.21921547e-01 0.0015 4.82586027e-03 9.42792079e-01 2.44791510e-01 2.17764088e-01
-