Lec 5 Solver Settings
Lec 5 Solver Settings
Lec 5 Solver Settings
0Release
Lecture5
SolverSettings
SolutionProcedureOverview
Thesketchtotherightshowsthe
basicworkflowforanysimulation
Thislecturewilllookatalltheitems
This lecture will look at all the items
inthechart
Solutionparameters
Choosingthesolver
Discretizationschemes
h
Initialization
Convergence
Calculate a solution
Monitoringconvergence
Monitoring convergence
Stability
SettingUnderrelaxation
SettingCourantnumber
SettingPseudotimestep
Acceleratingconvergence
No
Accuracy
GridIndependence
p
Adaption
Modify solution
parameters or grid
Yes
Stop
No
AvailableSolvers
TherearetwokindsofsolversavailableinFLUENT
Pressurebased (PBS)
Density based (DBS)
Pressure-Based
Segregated
Coupled
Density-Based
Coupled Implicit
Coupled-Explicit
Solve Mass
Mass,
Momentum,
Energy,
Species
Solve Mass,
Mass
Momentum,
Energy,
Species
Solve U-Momentum
Solve V-Momentum
V Momentum
Solve W-Momentum
Solve Mass
& Momentum
Solve Mass
Continuity;
Update Velocity
Solve Energy
S l Species
Solve
S i
Solve Turbulence Equation(s)
ChoosingaSolver
ChoosingaSolver PressureBased
Thepressurebasedsolver(segregated)isapplicableforawide
rangeofflowregimesfromlowspeedincompressibleflowto
highspeedcompressibleflow
g p
p
Requireslessmemory(storage)comparedtocoupledsolvers
Allowsflexibilityinthesolutionprocedure dampingofallequationsseparately
Examples:Goodforthemajorityofdaytodayapplications;forconvergence
issues switch to PBCS or DBCS
issuesswitchtoPBCSorDBCS
Thepressurebasedcoupledsolverisapplicableformostflows,
andyieldssuperiorperformancetothestandard(segregated)
and
yields superior performance to the standard (segregated)
pressurebasedsolver
NotavailablewithNITA,periodicmassflow,fixed
velocityoption
Requires1.52timesmorememorythanthe
segregatedsolver.
Examples:Moredemandingapplicationswhere
pressurevelocitycouplingrulesconvergence,e.g.
hi h i ti
highinertiaorbodyforces
b d f
Enabling
pressure-based
coupled solver
(PBCS)
PBS PressureVelocityCoupling
Pressurevelocitycouplingreferstothenumericalalgorithmwhichusesa
combinationofcontinuityandmomentumequationstoderiveanequationfor
pressurecorrectionwhenusingthePBS
FivealgorithmsareavailableinFLUENT
SemiImplicitMethodforPressureLinkedEquations
(SIMPLE)
Thedefaultscheme,robust(memoryefficient)
Coupled
EnablethePressurebasedcoupledSolver.(fasterconvergencethansegregated)
SIMPLEConsistent(SIMPLEC)
AllowsfasterconvergencethanSIMPLEforsimpleproblems(allowhighunderrelaxation
factors)
(e.g.,laminarflowswithnophysicalmodelsemployed)
PressureImplicitwithSplittingofOperators(PISO)
Pressure Implicit with Splitting of Operators (PISO)
Usefulforunsteadyflow problemsorformeshescontainingcellswithhigherthanaverage
skewness
FractionalStepMethod(FSM)forunsteadyflowsonly
UsedwiththeNITAscheme;similarcharacteristicsasPISO(usedinLESforexample)
Used with the NITA scheme; similar characteristics as PISO (used in LES for example)
PBSSegregatedProcedure UnderRelaxationFactors
ImplicitunderrelaxationfactorsareusedforSIMPLE,SIMPLEC,PISO
Theunderrelaxationfactor,, isincludedtostabilizetheiterativeprocessfor
thepressurebasedsolver
p
Thefinal,convergedsolutionisindependent
oftheunderrelaxationfactor
Onlythenumberofiterationsrequired
forconvergenceisdependent
for convergence is dependent
Defaultsettingsaresuitablefora
widerangeofproblems
id
f
bl
Youcanreducethevalueswhennecessary
Appropriatesettingsarebestlearned
fromexperience!
Note:Forthedensitybasedsolver,
underrelaxationfactorsforequations
outside the coupled set are modified
outsidethecoupledsetaremodified
asinthepressurebasedsolver
Pseudo-transient:
Better convergence
for meshes with
large aspect ratio
cells
SIMPLE: ~2250
2250 iterations
Coupled: ~120
120 iterations
Approximately 2250iterations
2250 iterations ofSIMPLE(default)in3.5hours
of SIMPLE (default) in 3.5 hours
Approximately 120iterations ofcoupled 13minutes
UsingthePseudotransientSolutionMethod
SolutionMethodpanel
SelectPseudoTransient
RunCalculationpanel
SelectTimestepmethod
Automatic(default)
UserSpecified
Internal Flow
ForAutomatic
SelectLengthScaleMethod(time=length/velocity)
Aggressive:
InternalFlow
Conservative: Max( Lext , LVol )
ExternalFlow
UserSpecified Min( Lext , LVol )
Conservativesettingisthedefault
SpecifyTimeStepScalingfactor:additionalusercontrol
toscaleautomaticmethod
Lext
Lvol = 3 Vol
External Flow
L
ChoosingaSolver DensityBased
Thedensitybased solverisapplicablewhenthereisastrongcoupling,or
interdependence,betweendensity,energy,momentum,and/orspecies
DensitybasedCoupledImplicit
Theimplicitoptionisgenerallypreferredoverexplicitsinceexplicithasaverystrictlimiton
timescalesize(CFLconstraint)asimplicitdoesnothave
time
scale size (CFL constraint) as implicit does not have
Examples:Highspeedcompressibleflowwithcombustion,hypersonicflows,shock
interactions
DensitybasedCoupledExplicit
Theexplicitapproachisusedforcaseswherethecharacteristictimescaleoftheflowison
thesameorderastheacoustictimescale
Example:propagationofhighMachshockwaves,shocktubeproblem
DBSIterativeProcedure CourantNumber
Apseudotransienttermisincludedinthedensitybasedsolverevenforsteady
stateproblems
TheCourantnumber(CFL)definesthe
The Courant number (CFL) defines the
timescalesize
Pseudotransientoptioncanalsobeusedas
pressurebasedcoupledsolver.
Fordensitybasedexplicitsolver:
Stabilityconstraintsimposeamaximumlimit
ontheCourantnumber(<2)
th C
t
b ( 2)
Fordensitybasedimplicitsolver:
TheCourantnumberistheoreticallynotlimited
The Courant number is theoretically not limited
bystabilityconstraints
Defaultvalueis5
(canbereducedforstartupto0.12)
Valuesof100
Values of 100 1000arecommoninexternalaero
1000 are common in external aero
PBS InterpolationMethodsforPressure
Interpolationisrequiredforcalculatingcellfacepressuresinordertocomputepressure
gradient(Gaussmethod):
P =
r
Pface Aface
face
Volcell
Area
Vector
Standard Thedefaultscheme;reducedaccuracyforflowsexhibitinglargesurfacenormal
pressuregradientsnearboundaries(butshouldnotbeusedwhensteeppressurechanges
arepresentintheflow
are
present in the flow PRESTO!schemeshouldbeusedinstead)
PRESTO! scheme should be used instead)
PRESTO! Useforhighlyswirlingflows,flowsinvolvingsteeppressuregradients(porous
media,fanmodel,etc.),orinstronglycurveddomains
Linear Usewhenotheroptionsresultinconvergencedifficultiesorunphysicalbehavior
SecondOrder Useforcompressibleflows;nottobeusedwithporousmedia,jump,fans,
etc.orVOF/Mixturemultiphasemodels
BodyForceWeighted Usewhenbodyforcesarelarge,e.g.,highRanaturalconvectionor
highlyswirlingflows
Discretization(InterpolationMethods)
Fieldvariables(storedatcellcenters)mustbeinterpolatedtothe
facesofthecontrolvolumes
Interpolationschemesfortheconvectionterm:
FirstOrderUpwind Easiesttoconverge,onlyfirstorderaccurate
PowerLaw
Power Law MoreaccuratethanfirstorderforflowswhenRe
More accurate than first order for flows when Recell <5(typ.lowRe
< 5 (typ low Re
flows)
SecondOrderUpwind Useslargerstencilsfor2ndorderaccuracy,essentialwith
tri/tet meshorwhenflowisnotalignedwithgrid;convergencemaybeslower
MonotoneUpstreamCenteredSchemesforConservationLaws(MUSCL)
Monotone UpstreamCentered Schemes for Conservation Laws (MUSCL) Locally3rd
Locally 3rd
orderconvectiondiscretization schemeforunstructuredmeshes;moreaccuratein
predictingsecondaryflows,vortices,forces,etc.
QuadraticUpwindInterpolation(QUICK) Appliestoquad/hexandhybridmeshes,
usefulforrotating/swirlingflows,3rdorderaccurateonuniformQuadmesh
EffectsofDiscretization
RG
C 0
f
d0
dr
f =C0 + C0 dr0
Flow is misaligned
with mesh
C1
If =0wegetthe1stOrderUpwind convection
scheme,i.e.nocorrection
Thisisrobustbutonlyfirstorderaccurate
Sometimesusefulforinitialruns
Sometimes useful for initial runs
If =1wegetthe2ndOrderUpwindScheme
AdditionalLimitersmustbeaddedtoguaranteedthe
0
1st-Order Upwind
p
Scheme
=0
2nd-Order
Scheme
=1.00
solutiontobebounded(
l i
b b
d d (C0<f<C1)
TheQUICKResolution schememaximizes
throughouttheflowdomainwhilekeepingthe
Theory
QUICK
Resolution
Scheme
Discretization (InterpolationMethods)
Interpolationschemesforthediffusiveterm:
Alwayscentraldifferenced&2nd orderaccuracy
InterpolationMethods(Gradients)
Gradientsofsolutionvariablesarerequiredinordertoevaluate
diffusivefluxes,velocityderivatives,andforhigherorder
discretization schemes.
RG
f =C0 + C0 dr0
Cell based/
Least-Squares
Thegradientsofsolutionvariablesatcellcenterscanbe
The gradients of solution variables at cell centers can be
determinedusingthreeapproaches:
GreenGaussCellBased Good,butsolutionmayhavefalsediffusion(smearingof
thesolutionfields)
GreenGaussNodeBased Moreaccurate;minimizesfalsediffusion;(strongly
recommendedfortri/tet andhybridmeshes)
LeastSquaresCellBased Thedefaultmethod.LessexpensivetocomputethanNode
Basedgradients.SlightlymoreexpensivethanCellBasedgradients.However,exactly
reconstruct linear field on highly skewed or distorted meshes (appropriate for any kind of
reconstructlinearfieldonhighlyskewedordistortedmeshes.(appropriateforanykindof
meshes)
Node-Based
Initialization
FLUENTrequiresthatallsolutionvariablesbeinitializedbeforestarting
iterations
Arealisticinitialguessimprovessolutionstabilityandacceleratesconvergence
Insomecasesapoorinitialguessmaycausethesolvertofailduringthefirstfew
iterations
5waystoinitializetheflowfield
Standardinitialization
Patchvalues
Hybridinitialization(solvespotentialequation)
FMGinitialization
Startingfromaprevioussolution
StandardInitializationandPatchValues
StandardInitialization
Generallytheuserselectsaninletboundary
underComputefromtoautomaticallyfillthe
initializationvalueswiththevaluesthatare
specifiedattheinletboundary
Patchvaluesforindividual
variablesincertainregions
g
Freejetflows(highvelocityforjet)
Combustionproblems(hightemperature
regiontoinitializereaction)
Cellregisters(createdbymarkingthe
Cell registers (created by marking the
cellsintheAdaptionpanel)canbeused
forpatchingvaluesintovariousregions
ofthedomain.
Multiphaseflows(patchdifferentphase
Multiphase flows (patch different phase
volumefractionsinoneormoreregions)
HybridInitialization
Thedefaultinitializationmethod
Thisprovidesaquickapproximationofthe
flowfield,byacollectionofmethods.
ItsolvesLaplace'sequationtodeterminethe
velocityandpressurefields.
Allothervariables,suchastemperature,
tturbulence,speciesfractions,volume
b l
i f ti
l
fractions,etc.,willbeautomaticallypatched
basedondomainaveragedvaluesora
particular interpolation method.
particularinterpolationmethod.
FMGInitialization
FullMultigrid (FMG)Initialization
Canbeusedtocreateabetterinitializationoftheflowfield
FMGInitializationisusefulforcomplexflowproblemsinvolvinglargepressureandvelocitygradients
onlargemeshes
FMGusestheFullApproximationStorage(FAS)Multigrid methodtosolvetheflowproblem
onasequenceofcoarsermeshes
Eulerequationsaresolvedwithfirstorderaccuracyonthecoarselevelmeshes
ToenableFMGinitialization,executetheTUIcommand
To enable FMG initialization execute the TUI command
/solve/init/fmg-initialization
SettingscanbeaccessedbytheTUIcommand
/solve/init/set fmg initialization
/solve/init/set-fmg-initialization
StartingfromaPreviousSolution
Apreviouslycalculatedsolutioncan
beusedasaninitialconditionwhen
changes are made to the case setup
changesaremadetothecasesetup
Usesolutioninterpolationtoinitializearun
(especiallyusefulforstartingfinemesh
caseswhencoarsemeshsolutionsare
available)
Oncethesolutionisinitialized,additional
iterationsalwaysusethecurrentdatasetas
thestartingpoint
Sometimessolvingasimplified
versionoftheproblemfirstwill
provideagoodinitialguessforthe
id
di i i l
f h
realproblem:
Actual Problem
Initial Condition
Heat Transfer
Isothermal
Natural convection
Turbulence
CaseCheck
CaseCheckisautilityinFLUENTwhich
searchesforcommonsetuperrorsand
inconsistencies
Providesguidanceinselecting
caseparametersandmodels
Tabbedsectionscontain
recommendationswhichthe
usercanapplyorignore
Convergence
Thesolvermustperformenoughiterationstoachieveaconvergedsolution
Atconvergence,thefollowingshouldbesatisfied:
Alldiscreteconservationequations(momentum,energy,etc.)areobeyedinallcellstoa
All di
t
ti
ti
(
t
t )
b d i ll ll t
specifiedtolerance(Residual).
TheResidualmeasurestheimbalanceofthecurrentnumericalsolutionandisrelatedbutNOTEQUALto
thenumericalerror
Overallmass,momentum,energy,andscalarbalancesareachieved
Overall mass momentum energy and scalar balances are achieved
Targetquantitiesreachconstantvalues
Res
siduals
Isentrop
pic Efficiency
Integral:e.g.Pressuredrop
Local:e.g.Velocityatspecifiedposition
Iteration Number
Iteration Number
ConvergenceMonitors Residuals
Residualplotsshowwhentheresidualvalueshavereachedthe
specifiedtolerance
Itispossibletomodifyordisablethedefault
It is possible to modify or disable the default
checkingcriterionforconvergence
(topreventthecalculationfrombeingstopped
prematurely)
All equations
converged
10-3
10-6
CheckingOverallFluxConservation
Thenetfluximbalance(shownintheGUIasNetResults)should
belessthan1%ofthesmallestfluxthroughthedomain
boundary
ConvergenceMonitors ForcesandSurfaces
Inadditiontoresiduals,youcanalso
monitor
Lift,dragandmomentcoefficients
Lift drag and moment coefficients
Relevantvariablesorfunctions(e.g.surface
integrals)ataboundaryoranydefinedsurface
Theseadditionalmonitoredquantitiesare
Th
dditi
l
it d
titi
importantconvergenceindicators
ConvergenceDifficulties
Numericalinstabilitiescanarisewithanillposedproblem,poorquality
meshand/orinappropriatesolversettings
Exhibitedasincreasing(diverging)orstuckresiduals
Divergingresidualsimplyincreasingimbalanceinconservationequations
Troubleshooting
Ensurethattheproblemiswellposed
Computeaninitialsolutionusinga
firstorderdiscretization scheme
Forthepressure
For the pressurebased
basedsolver,decrease
solver decrease
underrelaxation factorsforequations
havingconvergenceproblems
Forthedensitybasedsolver,reduce
theCourantnumber
h
b
Remesh orrefinecellswhichhavelarge
aspectratioorlargeskewness.
AcceleratingConvergence
Convergencecanbeacceleratedby:
Supplyingbetterinitialconditions
Startingfromaprevioussolution(usingfile/interpolationwhen
necessary)
GraduallyincreasingunderrelaxationfactorsorCourantnumber
Excessivelyhighvaluescanleadtosolutioninstabilityand
convergenceproblems
Youshouldalwayssavecaseanddatafilesbeforecontinuing
iterations
Startingwithagoodqualitymeshwithappropriatemeshresolution
TheorthogonalqualityreportedinMesh>Info>Qualityshould
The orthogonal q alit reported in Mesh > Info > Q alit sho ld
haveaminimumvalueof.01andanaveragevaluethatismuch
higher
Convergencevs Accuracy
Aconvergedsolutionisnotnecessarilyanaccuratesolution
Accuracydependson:
Orderofthediscretization schemes(2nd orderschemesare
recommended)
Meshresolution
M h
l i
BoundaryConditions
Modellimitations
Geometrysimplifications
G
i lifi i
Precisionofthesolver(2d/3dor2ddp/3ddp)
AdaptionExample 2DPlanarShell
Adaptgridinregionsoflargepressuregradienttobetterresolve
thesuddenpressureriseacrosstheshock
Largepressuregradientindicatinga
shock(poorresolutiononcoarsemesh)
Initial Mesh
2DPlanarShell SolutiononAdaptedMesh
Solutionbasedmeshadaptionallowsbetterresolutionofthe
bowshockandexpansionwave.
Adaptedcellsinlocations
Adapted
cells in locations
oflargepressuregradients
Adapted Mesh
Meshadaptionyieldsmuchimproved
Mesh
adaption yields muchimproved
resolutionofthebowshock.
GridAdaption
Gridadaptionaddsmorecellswhereneededto
resolvetheflowfieldwithoutpreprocessor
Adaptionproceedsinthreesteps:
Markcellssatisfyingtheadaptioncriteriaandstore
theminaregister
Displayandmodifytheregister
ClickonAdapttoadaptthecellslistedinthe
register
Registerscanbedefinedbasedon:
Gradientsorisovaluesofallvariables
Allcellsonaboundary
All ll i
Allcellsinaregionwithadefinedshape
i
i h d fi d h
Cellvolumesorvolumechanges
y+incellsadjacenttowalls
Toassistadaptionprocess,youcan:
Combineadaptionregisters
Drawcontoursofadaptionfunction
Displaycellsmarkedforadaption
Limitadaptionbasedoncellsize
andnumberofcells
b
f ll
Always save
case and data
files prior to
adapting the
mesh!
Summary
Solutionprocedureforboththepressurebasedanddensitybasedsolversis
identical
Setadequatesolver&solutionparameters
Set adequate solver & solution parameters
Calculateuntilyougetaconvergedsolution
Obtainasecondordersolution(recommended)
Refinethemeshandrecalculateuntilagridindependentsolutionisobtained
Allsolversprovidetoolsforjudgingandimprovingconvergenceandensuring
stability
Aconvergedsolutionisnotnecessarilyaccurate
SolutionaccuracydependsonMeshresolution,appropriatenessofthephysicalmodels,
boundaryconditions,