|
[Sponsors] |
January 29, 2019, 08:40 |
High residuals at last itteration
|
#1 |
Member
benoit favier
Join Date: Jun 2017
Posts: 64
Rep Power: 9 |
Hello,
I am using a modified rhoBuoyantReactingFoam solver from openFoam 6.0. I am solving a transient case. For each time step, my initial residuals are falling as expected until convergence is reached: Code:
PIMPLE: Iteration 98 DILUPBiCGStab: Solving for Ux, Initial residual = 9.8539e-06, Final residual = 1.07935e-07, No Iterations 1 DILUPBiCGStab: Solving for Uy, Initial residual = 2.44866e-05, Final residual = 2.35497e-07, No Iterations 1 DILUPBiCGStab: Solving for Uz, Initial residual = 3.85062e-05, Final residual = 3.43768e-07, No Iterations 1 DICPCG: Solving for p, Initial residual = 0.000102216, Final residual = 9.9092e-07, No Iterations 15 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 3.31665e-09, global = -9.50722e-10, cumulative = 8.78471e-05 PIMPLE: Iteration 99 DILUPBiCGStab: Solving for Ux, Initial residual = 9.59792e-06, Final residual = 1.05153e-07, No Iterations 1 DILUPBiCGStab: Solving for Uy, Initial residual = 2.3872e-05, Final residual = 2.29636e-07, No Iterations 1 DILUPBiCGStab: Solving for Uz, Initial residual = 3.74963e-05, Final residual = 3.34476e-07, No Iterations 1 DICPCG: Solving for p, Initial residual = 9.88698e-05, Final residual = 9.94734e-07, No Iterations 166 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 3.4152e-09, global = -4.49583e-10, cumulative = 8.78466e-05 Code:
PIMPLE: Converged Doing final iteration PIMPLE: Iteration 100 DILUPBiCGStab: Solving for Ux, Initial residual = 0.000108962, Final residual = 9.29881e-07, No Iterations 13 DILUPBiCGStab: Solving for Uy, Initial residual = 0.000238293, Final residual = 6.89688e-07, No Iterations 15 DILUPBiCGStab: Solving for Uz, Initial residual = 0.000525947, Final residual = 7.80032e-07, No Iterations 19 DICPCG: Solving for p, Initial residual = 0.196718, Final residual = 9.90858e-07, No Iterations 304 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 5.80521e-09, global = 4.83121e-12, cumulative = 8.78466e-05 PIMPLE: Converged in 100 iterations ExecutionTime = 28.24 s ClockTime = 29 s Should i use a final relaxation factor different from 1 ? |
|
February 3, 2019, 19:43 |
|
#2 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22 |
No, this is normal. For the last iteration of a time step, no under-relaxation is down, so the solver for the U field is "disturbing" the solution of p.
By applying under-relaxation in the other iterations the new result of the U-solver is only partly used, so the solution of the p solver is more or less still good and therefore the initial residual is low. |
|
February 4, 2019, 04:43 |
|
#3 |
Member
benoit favier
Join Date: Jun 2017
Posts: 64
Rep Power: 9 |
Thank you for your help jherb.
Why is the lat itteration's under-relaxation factor different by default ? Is there something to gain to have a different value of under relaxation at the last itteration ? |
|
February 8, 2019, 06:47 |
|
#4 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22 |
I think, you do not want under-relaxation in the last iteration, to make sure, that your boundary conditions are really fulfilled. If your simulation has perfectly converged then there would be no problem, because under-relaxation would have no effect. But if it had not converged perfectly then your fields might not match the boundary conditions.
So e.g. for a pipe, you specify a velocity of 1 m/s at the inlet, but due to under-relaxation, the internal value (and the value at the outlet) might be different. By setting the under-relaxation to 1.0, meaning no under-relaxation, you really calculate an internal field corresponding to your boundary conditions. |
|
February 8, 2019, 10:48 |
|
#5 |
Member
benoit favier
Join Date: Jun 2017
Posts: 64
Rep Power: 9 |
Thank you Jherb, this was really helpfull.
I made a test with a 10 meters long "pipe" (without walls, a 1D problem) filled with gas at U=1m/s and at T=300K. I set the temperature at the inlet to T=400K. When i run the simulation for 10 seconds with dt = 1E-3 s:
Is it the ddt term of the equations that is multiplied by the under-relaxation factor ? |
|
February 8, 2019, 18:03 |
|
#6 |
Member
Robin Kamenicky
Join Date: Mar 2016
Posts: 74
Rep Power: 11 |
Hi Benoit,
By under-relaxation of the last iteration you can loose some information. If you want to under-relax your final iteration you need to perform a lot of outer iterations. There are two kinds of relaxation. Field relaxation and matrix relaxation. Field relaxation can be found in GeometricField.C:949 Code:
operator==(prevIter() + alpha*(*this - prevIter())); Code:
\phi^_{n+1} = \phi^{n-1} + \alpha(\phi^n-\phi^_{n-1}) The matrix relaxation makes matrices more diagonal dominant. You can find in fvMatrix class Kind regards, Robin |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to understand high resolution scheme and high order scheme | iilw1314 | Main CFD Forum | 7 | April 12, 2022 13:29 |
Fluctuating residuals at high angle of attack for NACA0018 | Anand Thamban | FLUENT | 1 | June 20, 2016 08:58 |
Continuity Residual high but total mass convergence achieved? | MichaelStark331 | FLUENT | 1 | February 8, 2016 11:24 |
High Lift Airfoils At High Angles Of Attack | Luiz Pancini | FLUENT | 2 | April 9, 2015 09:01 |
motorBike Residuals for SST k-omega... and mine | JR22 | OpenFOAM Running, Solving & CFD | 6 | August 1, 2013 10:08 |