You are on page 1of 3

9/23/2016

HasYourSimulationConverged?

HasYourSimulationConverged?
Everyone who has run any numerical simulation has had to ask themselves this question at one time or
another.Howdoyoutellifthesimulationiscompleteandconverged?Thereareseveralwaystocheckfor
convergence. The most general is to check the residuals for each variable being solved, but other more
specificcheckscanbemadebyusingtheintegratedsummariesandevenplacingmonitorpointsasatelltale
indicationofwhenthesolutionisdone.Eachoftheseapproacheswillbediscussedinthisnote.

Whyisconvergenceimportant?
Thesolutionprocessisaniterativeprocessandbydefinitionvaluesarechangingfromoneiterationtothe
next.Ifthechangeissignificantthenthatmeanstheresultsthatyouarerelyinguponfordecisionmakingare
thereforealsochangingsignificantly.Sohowcanyoumakegooddecisionsifyouarenotconfidentthatthe
solutioniscomplete?Sometimesitisobviousandanunconvergedsolutionwillshowunphysicalresults.
Thisshouldnotbeasurpriseandbeforequestioningthoseunphysicalresultswemustsatisfyourselvesthat
thesolverhascompleteditsjobandproducedaconvergedsolution.

Howmuchconvergenceisrequired?
Everynumericalsolutioncontainserrors.Thekeyistounderstandhowbigthoseerrorsareandwhether
their level is acceptable in the particular application. The acceptable level of error can vary enormously.
While a simulation comparing to minute experimental details for purposes of replacing experimental tests
may require high level of convergence, a simulation to make a go / nogo decision for a particular design
conceptmayrequirealowerlevelofconvergence.
Youwilloftenheartermslikeordersofmagnitude,percenterror,orsignificantdigits.Allbasicallycanbe
relatedasoneorderofmagnitudeissimilarto10%errorandsimilartoonesignificantdigit,twoordersof
magnitudeissimilarto1%errorandtwosignificantdigits,etc.Ageneralruleofthumbisthat35ordersof
magnitudeofconvergenceisagoodidea.

Howisconvergencemeasured?
Residualssolverresidualsrepresenttheabsoluteerrorinthesolutionofaparticularvariable.CFDACE
sumstheabsolutevalueofthiserroroverallthecellsinthesimulationandpresentsthatinformationforeach
variableforeachiterationintheresidualfile(modelname.RSL).Becausetheerrorisnotnormalizedbycell
countorsolutionvalueyouwillseethattheresidualvalueitselfisgenerallydependentonthescaleofthe
variablebeingsolved.Forexample,valuesforvelocityareoftenontheorderof1100m/swhilevaluesfor
enthalpymaybeontheorderof300000J/kg.Forthisreasontheresidualforvelocitymaybe0.001while
theresidualforenthalpymaybe1.Onlyuponlookingatthedropinresidualscanwegetanindicationofthe
overall level of convergence. The rule of thumb is to look at the first residual or the maximum residual
calculatedandthenlookfor35ordersofmagnitudedropfromthere.
WhenusingtheCFDACEGUIresidualplottertheNormalizebuttonwillplottheresidualsnormalizedbytheir
largestvalue.Inthiscasetheresidualplotswillbemorecloselyspacedontheplotandtheirvaluesrepresent
theorderofmagnitudefallfromtheirpeakvalues.Notethatifyourinitialguessvaluesforasteadycalculation
arefarawayfromthefinalsolutionthentheinitialresidualswillbequitelargerelativetothatoftheconverged
solution.Inthatcase,itmaybenecessarytoobtainadditionalordersofmagnituderesidualreductionbefore
fullconvergenceisreached.
Printed Summaries using the printed summaries options you can get information like mass flow, heat
transfer, species flux, electric current, etc. integrated through all boundaries in the system. A converged
solution will show that the total quantity of say mass coming into the system equals that going out. The
differencebetweenincomingandoutgoingiscalledtheimbalanceanditshouldbezero(orsmallrelativeto
theincomingvalue).
MonitorPointsmonitorpointsallowyoutotrackavariablesvalueataparticularlocation.Whenthevalue
stops changing you could be near convergence. You should be aware, however, that variable values will
approach their final converged value at different rates depending upon where they lie in the flow field.
Generally,thesmallestflowstructuresaretheslowesttoconverge.

Isaconvergedsolutioncorrect?
Aconvergedsolutionmeansthatthesolverhasdoneitsjobandproducedthebestsolutionitcanforthe
givenproblem.However,thatdoesnotguaranteethatthesolutioniscorrect.Thereareotherfactorsthatare
involved, most notably the influence of discretization (grid system) and problem definition (user setup). A
poorqualityoroverlycoarsegridsystemaswellasusererrorsinsetupcouldcausethesolvertoproduce
inaccurateresults.
Ifthistopicinterestsyou,thenpleasereadontoseeacasestudywhichputstheseideasintopractice.
Ifyouhaveanyquestionsaboutthisfeatureorwouldlikeustodiscusssomeothertopicinthefuture,please
letusknow.
Regards,
RichardThoms
Manager,ESIGroupCFDCustomerSupport
http://support.esicfd.com/esiusers/convergence/

1/3

9/23/2016

HasYourSimulationConverged?

CaseStudy:LaminarFlowoveraBackwardFacingStep
A low Reynolds steady flow is sent over a backward facing step. For this note we will only discuss the
convergence of the U equation (velocity in the xdirection) but the same arguments and details could be
shownfortheVandPequations.Thesimulationwasrunfor1000iterationsandwewilllookatthelevel
ofconvergenceafter1,10,100,and1000iterations.
Residual File a quick look at the residual plot shows that the residuals reached a level of 1E17 after
approximately500iterationsandremainedflatthereafter.Thisindicatesthatthesolutionreachedmachine
accuracyandinfactrunninganythingafter500iterationswasnotcausinganychangeinthesolution.

Iteration UResidual

Comment

5.08E04

initial

2.80E02

peak

10

4.15E04

2ordersfrompeak

100

1.98E06

4ordersfrompeak

1000

1.10E017

15ordersfrompeak

So according to the guidelines we consider this case converged four orders of magnitude after just 100
iterations.
PrintedSummariesforthiscaseweaskedforthesolvertowritetheprintedmassflowsummary.After1000
iterationsthatsummarylookslikethis:

You can see that the inflow is equal to the outflow to 6 significant digits and in fact the imbalance/inflow
indicatesthatwehave16ordersofmagnitudeofconvergence.Lookingatselectedsnapshotsofthemass
flowsummaryafter1,10,100,and1000iterationsshowsthefollowing:

Guidelinesindicatethatthemassflowsummaryshows5ordersofconvergenceafterjust10iterationsandif
massflowisallwewerelookingforthenthatmayhavebeengoodenough,butinthiscasewewanttosee
theflowrecirculationandthatmaytakelongertodevelop.Thisshowsthatevenifmassflowcontinuityis
satisfieditmaynotbesufficienttodetermineifthesimulationisconverged.
MonitorPoints we put a monitor point just 1 step height downstream form the step in the center of the
channel.Theplotofthatdatacanbeseenbelowanditisclearthatafter100iterationstheUvelocityisnot
changingatthatlocationanymore.Lookingatselectedsnapshotsofthemonitorpointdataaround1,10,
100,and1000iterationsshowsthefollowing:

http://support.esicfd.com/esiusers/convergence/

2/3

9/23/2016

HasYourSimulationConverged?

So according to the guidelines we could say that the monitor point showed 5 orders of magnitude of
convergenceafterjust100iterations.
Baseduponalloftheaboveconvergencetests(residuals,massflowsummary,monitorpoints)wecansafely
saythatthiscasewasconvergedtoasuitablelevelofaccuracyafterjust100iterations.Belowarecontour
plotsofthexdirectionvelocitytakenatvariousiterations.Itisclearthatthesolutionat100iterationsand
1000iterationsarequitesimilar.

http://support.esicfd.com/esiusers/convergence/

3/3

You might also like