CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

question in transient simulation residual control

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

Like Tree8Likes
  • 8 Post By cdegroot

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 7, 2020, 12:53
Default question in transient simulation residual control
  #1
Member
 
chen112p's Avatar
 
Junting Chen
Join Date: Feb 2016
Location: Ontario Canada
Posts: 38
Rep Power: 10
chen112p is on a distinguished road
Hello, I am running a transient simulation in pimple mode.

The output message looks like this:

PIMPLE: iteration 1
smoothSolver: Solving for Ux, Initial residual = 0.000440701, Final residual = 4.72948e-07, No Iterations 1
smoothSolver: Solving for Uy, Initial residual = 0.00289414, Final residual = 3.24e-06, No Iterations 1
smoothSolver: Solving for Uz, Initial residual = 0.00359891, Final residual = 4.18849e-06, No Iterations 1
GAMG: Solving for p, Initial residual = 0.0437064, Final residual = 0.000168448, No Iterations 3
time step continuity errors : sum local = 3.08156e-09, global = 1.22026e-11, cumulative = 3.97829e-08
GAMG: Solving for p, Initial residual = 0.00118827, Final residual = 1.07359e-05, No Iterations 13
time step continuity errors : sum local = 1.91293e-10, global = 7.26332e-13, cumulative = 3.97836e-08
PIMPLE: iteration 2
smoothSolver: Solving for Ux, Initial residual = 1.38144e-06, Final residual = 1.38144e-06, No Iterations 0
smoothSolver: Solving for Uy, Initial residual = 7.85471e-06, Final residual = 7.85471e-06, No Iterations 0
smoothSolver: Solving for Uz, Initial residual = 9.58205e-06, Final residual = 9.58205e-06, No Iterations 0
GAMG: Solving for p, Initial residual = 0.00719454, Final residual = 4.54821e-05, No Iterations 3
time step continuity errors : sum local = 8.11247e-10, global = 3.20639e-12, cumulative = 3.97868e-08
GAMG: Solving for p, Initial residual = 0.000324782, Final residual = 3.15394e-06, No Iterations 11
time step continuity errors : sum local = 5.62928e-11, global = 2.55802e-13, cumulative = 3.97871e-08
PIMPLE: iteration 3
smoothSolver: Solving for Ux, Initial residual = 1.14465e-08, Final residual = 1.14465e-08, No Iterations 0
smoothSolver: Solving for Uy, Initial residual = 7.12225e-08, Final residual = 7.12225e-08, No Iterations 0
smoothSolver: Solving for Uz, Initial residual = 8.70611e-08, Final residual = 8.70611e-08, No Iterations 0
GAMG: Solving for p, Initial residual = 0.000141656, Final residual = 1.29472e-06, No Iterations 9
time step continuity errors : sum local = 2.31057e-11, global = 1.21503e-13, cumulative = 3.97872e-08
GAMG: Solving for p, Initial residual = 9.54773e-06, Final residual = 8.854e-08, No Iterations 29
time step continuity errors : sum local = 1.58007e-12, global = 8.1018e-15, cumulative = 3.97872e-08
PIMPLE: iteration 4
smoothSolver: Solving for Ux, Initial residual = 2.24401e-10, Final residual = 2.24401e-10, No Iterations 0
smoothSolver: Solving for Uy, Initial residual = 1.40553e-09, Final residual = 1.40553e-09, No Iterations 0
smoothSolver: Solving for Uz, Initial residual = 1.6992e-09, Final residual = 1.6992e-09, No Iterations 0
GAMG: Solving for p, Initial residual = 3.71452e-06, Final residual = 3.49174e-08, No Iterations 10
time step continuity errors : sum local = 6.23125e-13, global = 3.26394e-15, cumulative = 3.97872e-08
GAMG: Solving for p, Initial residual = 3.90144e-07, Final residual = 3.90144e-07, No Iterations 0
time step continuity errors : sum local = 6.9624e-12, global = 3.21656e-15, cumulative = 3.97872e-08
smoothSolver: Solving for nuTilda, Initial residual = 0.000829544, Final residual = 1.03796e-06, No Iterations 1
bounding nuTilda, min: -0.0189538 max: 1.91802 average: 0.0553777
PIMPLE: converged in 4 iterations
ExecutionTime = 92823 s ClockTime = 92968 s

In the fvSolution file I set the residuals tolerance of p, U and nuTilda at 1e-04 and relative tolerance as 0. I am guessing right now pimpleFoam solver judges the initial residual of each variable and first iteration of the GAMG solver. Shouldn't pimple solver compare the final residual and last iteration of the GAMG solver with the tolerance I set in the fvSolution file? Since that is the residual of the "real" results been carried on into the next time step?

Junting Chen
chen112p is offline   Reply With Quote

Old   August 14, 2020, 11:53
Default
  #2
Senior Member
 
cdegroot's Avatar
 
Chris DeGroot
Join Date: Nov 2011
Location: Canada
Posts: 414
Rep Power: 18
cdegroot is on a distinguished road
The initial residuals are used to judge how well the solution to the linear system approaches the solution to the non-linear governing equations. The final residual can be used to judge how well the linear solver has solved the linear system.

Consider the system Ax = b which is solved by the GAMG solver to find x, given A and b. The final residual is then:

r_{final} = ||b - Ax||

However, A and b are functions of x, since the system is non-linear. With the new solution for x, the updated matrix can be called A* and the updated right side vector can be called b*. The initial residual is then the value with the updated system but the old solution:

r_{initial} = ||b^* - A^*x||

Therefore, the initial residual is the appropriate one to determine when to move on to the next timestep. If the initial residual is small then it means that the linearized solution is a good approximation of the non-linear solution (i.e. A* is close to A and b* is close to b). If you are used to other CFD codes (e.g. Fluent) the residual that is reported is roughly equivalent to the initial residual of OpenFOAM. Other CFD codes do not report an equivalent to the final residual since it is of little importance to judging non-linear convergence.
jherb, thiagopl, chen112p and 5 others like this.
__________________
Chris DeGroot, PhD, PEng
CEO, Maple Key Labs
www.maplekeylabs.com
cdegroot is offline   Reply With Quote

Old   August 19, 2020, 10:38
Default
  #3
Member
 
chen112p's Avatar
 
Junting Chen
Join Date: Feb 2016
Location: Ontario Canada
Posts: 38
Rep Power: 10
chen112p is on a distinguished road
Thanks a lot!
chen112p is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[solidMechanics] Support thread for "Solid Mechanics Solvers added to OpenFOAM Extend" bigphil OpenFOAM CC Toolkits for Fluid-Structure Interaction 686 December 22, 2022 10:10
[solids4Foam] How to calculate drag coeff when using solids4Foam amuzeshi OpenFOAM CC Toolkits for Fluid-Structure Interaction 15 November 7, 2019 13:50
simpleFoam error - "Floating point exception" mbcx4jc2 OpenFOAM Running, Solving & CFD 12 August 4, 2015 03:20
Compressor Simulation using rhoPimpleDyMFoam Jetfire OpenFOAM Running, Solving & CFD 107 December 9, 2014 14:38
Micro Scale Pore, icoFoam gooya_kabir OpenFOAM Running, Solving & CFD 2 November 2, 2013 14:58


All times are GMT -4. The time now is 10:28.