|
[Sponsors] |
March 7, 2016, 14:59 |
"Residuals" in residualControl
|
#1 |
Member
Join Date: Aug 2015
Posts: 37
Rep Power: 11 |
In system/fvSolution, I can specify tolerances on matrix solvers:
Code:
solvers { p { solver PGC; preconditioner DIC; tolerance 1e-08; relTol 0; } } With SIMPLE/PIMPLE, it's also possible to specify a residualControl: Code:
PIMPLE { nOuterCorrectors 50; nCorrectors 3; nNonOrthogonalCorrectors 3; residualControl { U { tolerance 1e-3; relTol 0; } p { tolerance 1e-2; relTol 0; } } }
I assume that the residuals being considered here quantify, in some way, how well the pressure/momentum coupling is being resolved. Does anyone know which residuals are considered here? |
|
March 7, 2016, 15:23 |
|
#2 |
Senior Member
Alex
Join Date: Jan 2014
Posts: 126
Rep Power: 12 |
This is my interpretation of the problem:
the matrix solver setting (for example GAMG) solves the equation until the tolerance is reached - that's correct. However, this is only valid for the current time step. When the residual of the solver loop (inner loop) is reached, it considers its work done for the timestep. The final residual of the inner loop of this time step is used for the initial residual of the solver in the next pimple loop. So in short: the solver tolerance determines the residual of the GAMG solver for the final residual of THIS current time step while the residual control watches the change of the initial residuals from each time step to the next. |
|
March 7, 2016, 16:09 |
|
#3 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 21 |
You have one equation for conservation of mass and one (to be nitpicky three) for conservation of momentum. The Problem is that you need to couple these two equations.
If you have ax=y and y=b you could combine them into ax=b. Problem however with mass and momentum equations is that you can't do this that easily. Both depend on p and U but for incompressible fluids for example there is no pressure in your mass balance because the density cancels out. Long story short it ain't that easy in this case. In The PIMPLE algorithm (a combination of simple and piso) this is therefore done iteratively. In my example you'd guess x (some initial value) and solve ax=y. Now you check if y=b is fullfilled. If not you correct x until it is. This is what is checked with residualControl and solver tolerance. Solver tolerance is to which error ax=y is solved. residual Control is which error for the actual solution you are interested in ax=b or y=b is allowed. Or to be more precise the initial residual of ax=y after correcting x. Read up on the workings of simple or piso algorithms if you are interested in more specific parts since this seems like a crude way of describing it to me. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
residualControl with coupled solver | itchy | OpenFOAM Running, Solving & CFD | 0 | December 13, 2014 11:37 |
[swak4Foam] groovyBC and residualControl | Tobi | OpenFOAM Community Contributions | 3 | September 14, 2014 08:24 |
pimpleFoam: turbulence->correct(); is not executed when using residualControl | hfs | OpenFOAM Running, Solving & CFD | 3 | October 29, 2013 08:35 |
Error when I try a case with pimple instead of simple solver | samiam1000 | OpenFOAM | 6 | July 29, 2013 12:56 |