Академический Документы
Профессиональный Документы
Культура Документы
Howtochoosetherightcourantnumber?CFDOnlineDiscussionForums
[Sponsors]
Home
News
Forums
Wiki
Links
Jobs
Books
Events
Tools
Feeds
About
Search
Home>Forums>OpenFOAMRunning,Solving&CFD
Howtochoosetherightcourantnumber?
REGISTER
BLOGS
C OMMUNITY
NEWPOSTS
UserName UserName
RememberMe
Password
Login
UPDATEDTHREADS
SEARCH
31 Likes
PAGE1OF2 1 2 >
LINKBACK
October28,2009,14:23
vitor
NewMember
VitorBraga
JoinDate:Oct2009
Posts:28
RepPower:7
THREADTOOLS
DISPLAY MODES
Howtochoosetherightcourantnumber?
#1
HowtochoosetherightCourantnumberincomplexessimulations(3D,withagreatnumberofcells)and
whatareitsimplications?
Thanks.
October29,2009,04:50
MadsR
SeniorMember
MadsReck
JoinDate:Aug2009
Location:C openhagen,
Denmark
Posts:175
RepPower:8
#2
HiVitor.
TheCourant/CFLnumber(wikihere)depends,asyouprobablyknow,onvelocity,cellsizeandtimestep
andistypicallycalculatedforeachcell.TheCourantnumberwillaccordinglychangeabitwithvelocity
whenyouhaveastaticmeshandaconstanttimestep.Now,assumingherethatyourmeshisstatic
(nonmoving/morphing)andthatthevelocityfieldismoreorlessfullydeveloped,changingthetimestep
isagoodwayofcontrollingtheCourantnumber.
Aphysicalexplanation,foraCFDsimulation,oftheCourantnumbercouldbethatittellsyousomething
abouthowfluidismovingthroughyourcomputationalcells.IftheCourantnumberis<=1fluidparticles
movefromonecelltoanotherwithinonetimestep(atmost).Ifitis>1afluidparticlesmovesthrough
twoormorecellsateachtimestepandthiscanaffectconvergencenegatively.Robustsystemsand
finesolvers,asOpenFOAM,easilydealswithlargeCourantnumberswayintothehoundreds,butit'sa
goodplacetolookifyouhaveConvergenceproblemsanditalsocaneffectaccuracyofatransient
simulation.DiffusiondominatedproblemsshouldtypicallyberunwithlowCourantnumbers,ifIremember
correctly.
Hopeithelpsyouabit,Ididn'tmeantolectureyouifyoualreadyknewthis.
Shortansweris:lowertimesteptolowerCourantnumber,raisetimesteptoincreaseCourantnumber.
Cheers
Mads
igo,bioexplore,Paebinand23otherslikethis.
__________________
OnlinefreeairfoilmesherforOpenFOAMhere
http://www.cfdonline.com/Forums/openfoamsolving/69611howchooserightcourantnumber.html
1/8
3/31/2015
Howtochoosetherightcourantnumber?CFDOnlineDiscussionForums
October29,2009,12:46
akidess
SeniorMember
#3
Forcomplexsimulationswithchangingvelocitiesitcanhelptouseautomatictimestepadjustment.See
howit'simplementedintheinterFoamsolver(http://www.opencfd.co.uk/openfoam/doc/damBreak.html),
oralsothreadsintheforum(e.g.ProblemswithadjustabletimestepcontrolandmaxCoNumber).
songwukongandadambarfilikethis.
AntonKidess
JoinDate:May2009
Location:Delft,
Netherlands
Posts:919
RepPower:16
October30,2009,06:23
vitor
NewMember
VitorBraga
JoinDate:Oct2009
Posts:28
RepPower:7
#4
Quote:
OriginallyPostedbyakidess
Forcomplexsimulationswithchangingvelocitiesitcanhelptouseautomatictimestep
adjustment.Seehowit'simplementedintheinterFoamsolver
(http://www.opencfd.co.uk/openfoam/doc/damBreak.html),oralsothreadsintheforum(e.g.
ProblemswithadjustabletimestepcontrolandmaxCoNumber).
I'veseenit,butdoyouhaveanytipsforsettingtherightmaxCo?
Thanks
Vitor
October30,2009,15:10
akidess
SeniorMember
#5
UnfortunatelyIdon'tthinkthereisageneralrecipeforthat.Youwillhavetoplayaroundalittleandsee
whatworksforyou.AsMadsalreadylinedout,maxCowillusuallyhavetobesmallerthan1,andIthink
youwillrarelyhavetomakeitsmallerthan0.5.
AntonKidess
JoinDate:May2009
Location:Delft,
Netherlands
Posts:919
RepPower:16
April24,2010,20:02
vitor.geraldes@ist.utl.pt
NewMember
VitorGeraldes
JoinDate:Dec2009
Posts:7
RepPower:7
#6
Ithinkthatthebestapproachistomakedifferentsimulationswithdecreasingvaluesofthe
timestepuntilthefinalsolutionbecomesindependentofthisvalue.Ihavealreadymade
somesimulationswherethemaximumCourantwasoftheorderofhundredsand,
nevertheless,thesolutionwasalreadyconverged.
http://www.cfdonline.com/Forums/openfoamsolving/69611howchooserightcourantnumber.html
2/8
3/31/2015
Howtochoosetherightcourantnumber?CFDOnlineDiscussionForums
April27,2010,05:31
dohnie
Member
FlorianEttner
JoinDate:Mar2009
Location:Munich,
Germany
Posts:40
RepPower:8
#7
Actually,incompressibleflow(ifyouareinterestedinacousticwavesorshocks)thecourantnumber
shouldnotbebasedonvelocityU,butonU+a(soundspeed).
DoesanybodyknowifthisisimplementedinOpenFOAM?SeemstobetrickierthanIthoughtatfirst,
becauseUisavolVectorFieldandaisavolScalarField(thusitshouldalwaysbeaddedinthepositiveU
direction).
April28,2011,17:48
SMesser
Member
Sarah
JoinDate:Apr2011
Location:EasternUS
Posts:31
RepPower:5
adjustabletimestepdoesn'tlimitCourant?
#8
I'musingsonicDyMFoamwithasolidobjectmovingthroughaconfinedspace(afastgasvalve).I'm
gettinglotsoftroublewith"maxnumberofiterationsexceeded"inthecalculationofeand"timestep
continuityerrors".I'vetriedsettingmaxCo=0.2andmaxAlphaCo=0.2insystem/controlDict,yetthetext
outputshowsthemaxCourantnumberisstillsometimes1orlarger...sometimesthemeanis>1aswell.
Isthisnormal?mycontrolDictisasfollows:
C ode:
/**C++**\
|=========||
|\\/Field|OpenFOAM:TheOpenSourceCFDToolbox|
|\\/Operation|Version:1.7.1|
|\\/And|Web:www.OpenFOAM.com|
|\\/Manipulation||
\**/
FoamFile
{
version2.0;
formatascii;
classdictionary;
location"system";
objectcontrolDict;
}
//*************************************//
applicationsonicDyMFoam;
startFromstartTime;
startTime0;
stopAtendTime;
endTime0.001;
deltaT1e7;
writeControladjustableRunTime;
writeInterval1e6;//2e5
purgeWrite0;
writeFormatascii;
Thanks
writePrecision6;
LasteditedbySMesserMay4,2011at13:37.
writeCompressionuncompressed;
timeFormatgeneral;
April30,2011,08:58
maysmech
SeniorMember
timePrecision6;
#9
runTimeModifiableyes;
Ihavethisproblemtoo.
adjustTimeStepyes;
Ican'tusemaxcourantsettingforpisoFoamandsimpleFoam.
maxCo0.2;
maxAlphaCo0.2;
Anysuggestion?
Best,maxDeltaT1;
JoinDate:Jan2010
Posts:347
BlogEntries:2
//*************************************************************************//
http://www.cfdonline.com/Forums/openfoamsolving/69611howchooserightcourantnumber.html
3/8
3/31/2015
Howtochoosetherightcourantnumber?CFDOnlineDiscussionForums
RepPower:8
May2,2011,04:39
truong_nm
Member
NgocMinhTruong
JoinDate:Feb2010
Location:Toulouse,
France
Posts:42
RepPower:7
CFLinsteadysolvers
#10
Himaysmech,
There'snoCFLNumberinsuchsteadysolvers.InOF,steadysolvermeans"d/dt=0".Thus,thereisno
moretimestepandsonomoreCourantNumber.
Idoagreewithyou:howtocontrolstabilityinsuchcases?
Theansweris:relaxationfactors.
Minh
May2,2011,06:23
maysmech
#11
Youright,ImeantpisoFoamonly.Itisanunsteadysolver.
SeniorMember
JoinDate:Jan2010
Posts:347
BlogEntries:2
RepPower:8
May4,2011,13:35
SMesser
Member
Sarah
JoinDate:Apr2011
Location:EasternUS
Posts:31
RepPower:5
detailsofcrash
#12
AcoupleofupdatesItriedincreasingthespatialandtemporalresolutiontogety+toabout63,
followingtheBestPracticesforTurboMachinerypageontheCFDWiki,butthesimcrashed_faster_...
whichseemsodd.I'mdealingwithafastopeninggasvalve.(40psiArgonononeside,vacuumonthe
otherdevicespatialscalesareontheorderof1cm,andopeningtimeismeasuredinseveraltensof
microseconds.)IalsofoundawebtutorialwithinfoonrevisingOpenFoamcodestodoadaptive
timesteps,butitseemedfairlyoutofdateandledtomereinstallingOpenFoam.(I'mmissingsome
librarycompilationfailsunlessI'minthemidstoftheinstall.)
I'velearnedacoupleotherthings:
1)Strongpressuredifferences(ormaybejuststronggradients?)causecrashiness,butI'mnotsure
_why_orifthere'saworkaround.Ichangedthe"vacuum"to10psitoavoidtheproblem,butthemotion
ofthevalve'spoppetstillgeneratesanearvacuumforsometime.(Themechanicalpartsmoveslower
thanMach1,butthegasstillhastoflowsupersonicallytofillinthegapsthroughnarrowchannels.)
2)nonconvergenceseemstoshowupatcalculationofeithereorT.Thismakesmethinkmyproblem's
inthechoiceofthermodynamicmodel(currently
C ode:
thermoTypeePsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>;
),butI'dlovefeedbackfromsomeonewithmoreexperience
3)Themessagefromthelasttimestepis
C ode:
http://www.cfdonline.com/Forums/openfoamsolving/69611howchooserightcourantnumber.html
4/8
3/31/2015
Howtochoosetherightcourantnumber?CFDOnlineDiscussionForums
Time=5.68e06
CourantNumbermean:0.000260452max:0.850669
DICPCG:SolvingforcellMotionUx,Initialresidual=1.7015e07,Finalresidual=9.6024e09,NoIterations
diagonal:Solvingforrho,Initialresidual=0,Finalresidual=0,NoIterations0
DILUPBiCG:SolvingforUx,Initialresidual=0.641902,Finalresidual=4.55875e06,NoIterations3
DILUPBiCG:SolvingforUy,Initialresidual=0.0790439,Finalresidual=2.72074e07,NoIterations4
DILUPBiCG:Solvingfore,Initialresidual=0.967212,Finalresidual=6.18915e06,NoIterations2
>FOAMFATALERROR:
Maximumnumberofiterationsexceeded
FromfunctionspecieThermo<thermo>::T(scalarf,scalarT0,scalar(specieThermo<thermo>::*F)(constscalar
infile/home/opencfd/OpenFOAM/OpenFOAM1.7.x/src/thermophysicalModels/specie/lnInclude/specieThermoI.Ha
FOAMaborting
#0Foam::error::printStack(Foam::Ostream&)in"/opt/openfoam171/lib/linuxGccDPOpt/libOpenFOAM.so"
#1Foam::error::abort()in"/opt/openfoam171/lib/linuxGccDPOpt/libOpenFOAM.so"
#2Foam::ePsiThermo<Foam::pureMixture<Foam::constTransport<Foam::specieThermo<Foam::hConstThermo<Foam::perfe
#3Foam::ePsiThermo<Foam::pureMixture<Foam::constTransport<Foam::specieThermo<Foam::hConstThermo<Foam::perfe
#4
in"/opt/openfoam171/applications/bin/linuxGccDPOpt/sonicDyMFoam"
#5__libc_start_mainin"/lib/libc.so.6"
#6
in"/opt/openfoam171/applications/bin/linuxGccDPOpt/sonicDyMFoam"
I'mnotsurehow/ifIshouldtrytoincreasethemaxnumberofiterations.Woulditbebettertoincrease
toleranceand/orrelTolinfvSchemes?Tisn'tdirectlylistedthere,butmostlisteditemsareattolerance
of10^5or10^8,withrelTol=0.UsingrelTolseemssketchysincethisisatransientsim,notsteady
state.Again,it'dbeniftytogetfeedbackfromanexpert.
ThanksforansweringthenewBquestions.Thisisn'tmyfirstsimulation,butI'mmuchmoreusedto
wiringuphardwarethantotryingtosimulateitsoperation.
May22,2012,21:54
dancfd
SeniorMember
Daniel
JoinDate:Jul2009
Location:Montreal,
C anada
Posts:151
RepPower:7
#13
HelloSarah,
IdonotthinkthatadjustTimeStepworksforsonicDyMFoammyexperiencehasshownthatregardless
ofwhatIsetmaxCoto,thetimestepwillreverttowhatIsetinthedeltaTfieldincontrolDict.Granted,I
amusingsonicFoamvicesonicDyMFoam,howevertheyprobablyhavethatlimitationincommon.
IsuggestthatyoumayhavetotryreducingyourdeltaTuntilyoucomputeaCothatiswhereyouwant
ittobe.Ifind~0.5tobethemaximumthatwillconverge.Pleaseposttheresults/letmeknowifyou
wereabletoresolveyourissue,sinceIamstillstrugglingwiththistoo.
Regards,
Dan
January9,2013,15:55
#14
zaynah04
dearMads,
SeniorMember
zaynahK.
JoinDate:Jun2012
Location:Mauritius
Posts:138
RepPower:4
ihaveverylowcourantnumb1e5,andmysolutiondoesnotacheiveconvergence..canyoupleasetell
mewhatmaybetheproblem?
iamusingincompresibleflowinlaminarregimewithverylowvelocity..
thanks
zaynah
http://www.cfdonline.com/Forums/openfoamsolving/69611howchooserightcourantnumber.html
5/8
3/31/2015
Howtochoosetherightcourantnumber?CFDOnlineDiscussionForums
January10,2013,04:10
MadsR
SeniorMember
MadsReck
JoinDate:Aug2009
Location:C openhagen,
Denmark
Posts:175
RepPower:8
#15
DearZaynah,
troubleshootingconvergenceproblemscanbeeasyorvery,veryhard,especiallythroughaforum
Youdon'trevealenoughinformationforanyonetohelpyououtIthink.IthinkthataCourantnumberof
1e5issurprisinglylow(actuallyIwouldbluntlycallit:waytoolow)butitcoulddependonsome
strange simulationthatyouaretryingtoperform.
Tellusmore,butmyintuitionsaysthatitisnotyourCourantnumberwhichistheproblem.Itseemsthat
youhavetriedtolowerthetimestepmuchtoachieveconvergence?Isitsomeexplosionsimulationor
what?
bestregards
Mads
zaynah04likesthis.
__________________
OnlinefreeairfoilmesherforOpenFOAMhere
January10,2013,07:23
Traib
NewMember
Traib
JoinDate:Sep2012
Posts:27
RepPower:4
#16
HiMads,
Userzaynah'shasfoundthesolutionwhichwasIthinkrelatedtotheproblemsetupaswewere
discussinginanotherthread.Ifyoudon'tmind,Ihaveaquestionregardingwhatyousaidabove.
Youmentionedrelativelylowercourantnumber/timestepsizerequiredforexplosionproblems?OrdoI
understanditdifferently?Iamworkingonexplosionsandmysimulationssometimesresultinverylow
courantnumbers(lowerupto0.01andtimestepsupto1e15s)whenadjustTimeStepisenabledwith
maxCotypicallyaround0.2.TheproblemthatIoftenfaceisthecourantnumbercalculatedusingthe
typicalvelocity,timestepandcellsize,whichisoforder1e8s,doesnotalwaysapplyinfactsometimes
thetimestepsizerequiredis10orhighertimesthancalculatedforstablecalculations.
Iamnotsuremyexplanationisclearenoughbutanyinformationwouldbehelpfulregardingthe
treatmentsrequiredinsuchproblems.
January10,2013,07:30
zaynah04
SeniorMember
zaynahK.
JoinDate:Jun2012
Location:Mauritius
Posts:138
RepPower:4
#17
HiMads,
iwillcomebacktoyoulaterwiththis..Iamcurrentlystucksomewhereelse..
Ihavesuccessfullyiteratedaround6caseandachievedconvergence...
Suddenlyforallthe6casesigetthissameerror!!
cananyonetellmewhatiswrong?
Quote:
>FOAMFATALIOERROR:
cannotfindfile
file:/home/zaynah/Desktop/system/controlDictatline0.
FromfunctionregIOobject::readStream()
infiledb/regIOobject/regIOobjectRead.Catline73.
FOAMexiting
January10,2013,11:10
http://www.cfdonline.com/Forums/openfoamsolving/69611howchooserightcourantnumber.html
#18
6/8
3/31/2015
MadsR
SeniorMember
MadsReck
JoinDate:Aug2009
Location:C openhagen,
Denmark
Posts:175
RepPower:8
Howtochoosetherightcourantnumber?CFDOnlineDiscussionForums
Traib,
IamnotsureIunderstandyourquestion.Idon'tthinkexplosions,persay,needslowCourantnumbers,
asitofcoursealsodependsonyourmesh,buttheysureneedslowtimesteps(relativetomore"normal"
simulations).
Iwouldexpect,beingcompletelyignorantofexplosionsimulations,however,thatyouwouldrunata
verylowminCourantnumberasIwouldexpectthatyourcellsarequitelargeincertain(most)areas
becauseofthedevelopmentofanexplosionplume(orwhatyoucallit)intothesurroundings...Iamjust
guessingherethough.
Mads
zaynah04likesthis.
__________________
OnlinefreeairfoilmesherforOpenFOAMhere
January10,2013,11:37
Traib
NewMember
Traib
JoinDate:Sep2012
Posts:27
RepPower:4
#19
ThanksforyourreplyMads.Yes,thecellsareofquitevariedsizes,largeratregionsfarfromcore
combustionregion.IjustrealizedIwasusingmaxtimestepasthelimitingparameterwithlowcourant
numbercalculatedusingsmallestmeshsize,insteadofusinganappropriatecourantnumbertocontrol
thetimestep,whichresultedinsignificantlydecreasedtimestepsizesindenselymeshedareaswhere
temperaturealsoincreasesignificantly.Thisstrangelyenoughseemstobethecauseoftheerrorand
withalimitoncourantnumbertimestepsizesareadjustedtoaboutthecalculatedvalues.IsupposeI
justhadtotrythisdifferentapproachforstableresults.
January10,2013,12:35
zaynah04
SeniorMember
zaynahK.
JoinDate:Jun2012
Location:Mauritius
Posts:138
RepPower:4
#20
DearMads,
letscomebacktothelowcourantnumber..)
Myvelocityis0.0001m/scourantis2.4e6.
iamsimulatingsomesimplecaseforcomparisonwithothersoftwares..Ihavetodecidewhichsoftware
isbestsuitedformyproject.
Ihavenotmodifythetimestep.
Quote:
Itseemsthatyouhavetriedtolowerthetimestepmuchtoachieveconvergence?
iwillbewaitingforyouranalysis..
Regards
zaynah.
ps:forgoodconvergencewhatmustbedisplayinterminal?imeanformetoknowthatthesolutionhas
converged??
Lasteditedbyzaynah04January11,2013at01:53.
PAGE1OF2 1 2 >
PreviousThread|NextThread
PostingRules
Youmaynotpostnewthreads
Youmaynotpostreplies
Youmaynotpostattachments
Youmaynotedityourposts
BBcodeisOn
SmiliesareOn
[IMG]codeisOn
http://www.cfdonline.com/Forums/openfoamsolving/69611howchooserightcourantnumber.html
7/8
3/31/2015
Howtochoosetherightcourantnumber?CFDOnlineDiscussionForums
HTMLcodeisOff
TrackbacksareOn
PingbacksareOn
RefbacksareOn
ForumRules
SimilarThreads
Thread
ThreadStarter
Forum
Replies
Last
Post
41
January
17,
2013
03:43
Mesh
Refinement
LuizEduardoBittencourtSampaio(Sampaio)
OpenFOAMMeshUtilities
DecomposePar
unequal
numberof
sharedfaces
maka
OpenFOAMPreProcessing
August
12,
2010
09:01
Unaligned
accesseson
IA64
andre
OpenFOAM
June
23,
2008
10:37
C ouldanybody
helpmesee
thiserrorand
givehelp
liugx212
OpenFOAMRunning,Solving&C FD
January
4,2006
19:07
Trimmedcell
andembedded
refinement
mesh
conversion
issues
michele
OpenFOAMOtherMeshers:IC EM,Star,Ansys,Pointwise,GridPro,Ansa,...
July15,
2005
04:15
AlltimesareGMT4.Thetimenowis09:40.
ContactUsCFDOnlineTop
CFDOnline
http://www.cfdonline.com/Forums/openfoamsolving/69611howchooserightcourantnumber.html
8/8