# What is the difference between "includefunc residuals" and the residuals in log-file?

 Register Blogs Members List Search Today's Posts Mark Forums Read

 July 13, 2018, 13:40 What is the difference between "includefunc residuals" and the residuals in log-file? #1 Member   Bruno Join Date: Jun 2016 Location: Siegen, Germany Posts: 59 Rep Power: 4 Hi, I'm trying to run an inviscid, incompressible flow (Euler equations) around a wing with simpleFoam with nu set to zero. I'm trying to judge convergence and noticed that the final residuals in the log-file (by running simpleFoam > log) are in the order of e-09, whereas the residuals in the .dat file generated with "includefunc residuals" are in the order of e-02. What is the difference between the two? Why are they not the same? Here's the last log entry: Code: ```Time = 3000 DILUPBiCG: Solving for Ux, Initial residual = 0.00244323, Final residual = 6.17655e-10, No Iterations 8 DILUPBiCG: Solving for Uy, Initial residual = 0.0121557, Final residual = 7.31898e-09, No Iterations 7 DILUPBiCG: Solving for Uz, Initial residual = 0.00547038, Final residual = 2.36399e-09, No Iterations 8 DICPCG: Solving for p, Initial residual = 0.0347422, Final residual = 8.60062e-07, No Iterations 75 time step continuity errors : sum local = 2.02144e-08, global = -2.11615e-09, cumulative = -2.57245e-07 ExecutionTime = 235.96 s ClockTime = 236 s End``` Here's the last residuals.dat entry: Code: ```# Time p Ux Uy Uz 3000 3.474220e-02 2.443230e-03 1.215570e-02 5.470380e-03``` Thanks! Bruno

 July 13, 2018, 19:29 #2 Senior Member   Join Date: Aug 2015 Posts: 229 Rep Power: 7 It looks like the initial residuals are those pulled by the function, not the final ones. Caelan MBttR likes this.

July 16, 2018, 10:57
#3
Member

Bruno
Join Date: Jun 2016
Location: Siegen, Germany
Posts: 59
Rep Power: 4
Quote:
 Originally Posted by clapointe It looks like the initial residuals are those pulled by the function, not the final ones. Caelan

Wow, well spotted, thanks!