计算流体力学(CFD)文档――6. Time-dependent methods

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

CFD6–1DavidApsley6.TIME-DEPENDENTMETHODSSPRING20116.1Thetime-dependentscalar-transportequation6.2One-stepmethods6.3Multi-stepmethods6.4Usesoftime-marchinginCFDSummaryExamples6.1TheTime-DependentScalar-TransportEquationThetime-dependentscalar-transportequationforanarbitrarycontrolvolumeissourcefluxnetamountt=+)(dd(1)where:amounttotalquantityinacell=mass×concentration=Vϕ;fluxistherateoftransportthroughtheboundary.InSection4itwasshownhowthefluxandsourcetermscouldbediscretisedasPFFFPPbaasourcefluxnet-ϕ-ϕ=-∑(2)InthisSectionthetimederivativewillalsobediscretised.Wefirstexaminenumericalmethodsforthefirst-orderdifferentialequationFt=ϕdd,0)0(ϕ=ϕ(3)whereFisanarbitraryfunctionoftandϕ.ThenweextendthemethodstoCFD.Initial-valueproblemsoftheform(3)aresolvedbytime-marching.Therearetwomaintypesofmethod:•one-stepmethods:usethevaluefromtheprevioustimelevelonly;•multi-stepmethods:usevaluesfromseveralprevioustimes.tϕϕϕoldnewttoldnewΔϕΔttϕt(n+1)ϕ(n+1)ϕ(n)ϕ(n-1)ϕ(n-2)t(n)t(n-1)t(n-2)CFD6–2DavidApsley6.2One-StepMethodsForthefirst-orderdifferentialequationFt=ϕdd(3)theone-stepproblemis:givenϕattimet(n)…computeϕattimet(n+1)Thefollowingnotationisused:•identifyeverythingatt(n)byasuperscript“old”–thisiswhatwecurrentlyknow;•identifyeverythingatt(n+1)byasuperscript“new”–thisiswhatweseek.Byintegrationof(3),orfromthefigureabove,tFav=ϕ(4)ortFavoldnew+ϕ=ϕ(5)Theseareexact.However,sincetheaveragederivative,Fav,isn’tknownuntilthesolutionϕisknown,itmustbeestimated.6.2.1SimpleEstimateofDerivativeThisisthecommonestclassoftime-steppingschemeingeneral-purposeCFD.Therearethreeobviousmethodsofmakingasingleestimateoftheaveragederivative.ForwardDifferencing(EulerMethod)TakeFavasthederivativeatthestartofthetime-step:BackwardDifferencing(BackwardEuler)TakeFavasthederivativeattheendofthetime-step:CentredDifferencing(Crank-Nicolson)TakeFavastheaverageofderivativesatthebeginningandend.tFoldoldnew+ϕ=ϕtFnewoldnew+ϕ=ϕtFFnewoldoldnew)(21++ϕ=ϕtϕϕϕoldnewttoldnewtϕϕϕoldnewttoldnewtϕϕϕoldnewttoldnewΔt12Δt12For:•Easytoimplementbecauseexplicit(theRHSisknown).For:•InCFD,notime-steprestrictions;For:•Second-orderaccurateint.Against:•Onlyfirst-orderint;•InCFD,stabilityimposestime-steprestrictions.Against:•onlyfirst-orderint;•implicit(although,inCFD,nomoresothansteadycase).Against:•Implicit;•InCFD,stabilityimposestime-steprestrictions.tϕϕϕoldnewttoldnewΔϕΔtCFD6–3DavidApsleyClassroomExample1Thefollowingdifferentialequationistobesolvedontheinterval[0,1]:1)0(,dd=ϕϕ-=ϕttSolvethisnumerically,withastepsizet=0.2using:(a)forwarddifferencing;(b)backwarddifferencing;(c)Crank-Nicolson.Solvetheequationanalyticallyandcomparewiththenumericalapproximations.ClassroomExample2Solve,numerically,theequation33ddϕ-=ϕtt,1)0(=ϕintheinterval0≤t≤1usingatimestept=0.25by:(a)theforwarddifferencing(fully-explicit)method;(b)thebackward-differencing(fully-implicit)method;(c)theCrank-Nicolson(semi-implicit)method.Notethat,sincetheequationisnon-linear,theimplicitmethods(parts(b)and(c))willrequireiterationateverytimestep.CFD6–4DavidApsley6.2.2OtherMethodsForequationsoftheformFt=ϕdd,improvedsolutionsmaybeobtainedbymakingsuccessiveestimatesoftheaveragegradient.Importantexamplesinclude:ModifiedEulerMethod(2functionevaluations;similartoCrank-Nicolson,butexplicit))(),(),(2121121ϕ+ϕ=ϕ+ϕ+ϕ=ϕϕ=ϕttFttFtoldoldoldoldRunge-Kutta(4functionevaluations))22(),(),(),(),(432161342122132112121ϕ+ϕ+ϕ+ϕ=ϕ+ϕ+ϕ=ϕ+ϕ+ϕ=ϕ+ϕ+ϕ=ϕϕ=ϕttFtttFtttFttFtoldoldoldoldoldoldoldoldMoredetailsofthese–andotheradvancedmethods–canbefoundinthecoursenotesforthe“ComputationalMechanics”unit.Forscalarϕ,suchmethodsarepopular.Runge-Kuttaisprobablythemostwidely-usedmethodinengineering.However,inCFD,ϕandFrepresentvectorsofnodalvalues,andcalculatingthederivativeF(evaluatingfluxandsourceterms)isveryexpensive.ThemajorityofCFDcalculationsareperformedwiththesimplermethodsof6.2.1.Exercise.UsingMicrosoftExcel(orothercomputationaltoolofyourchoice)solvetheClassroomExamplesfromtheprevioussubsectionusingModified-EulerorRunge-Kuttamethods.6.2.3One-StepMethodsinCFDGeneralscalar-transportequation:0)(dd=-+ϕsourcefluxnetVtP(6)Forone-stepmethodsthetimederivativeisalwaysdiscretisedastVVVtoldPnewPP)()()(ddϕ-ϕ→ϕ(7)FluxandsourcetermscouldbediscretisedatanyparticulartimelevelasPFFPPbaasourcefluxnet-ϕ-ϕ=-∑(8)Differenttime-marchingschemesarisefromthetimelevelatwhich(8)isevaluated.CFD6–5DavidApsleyForwardDifferencing[]0)()(=-ϕ-ϕ+ϕ-ϕ∑oldPFFPPoldPnewPbaatVVRearranging,anddroppingany“new”superscriptsastacitlyunderstood:oldFFPPPPabatVtVϕ++ϕ-=ϕ∑)((9)Assessment.•Explicit;nosimultaneousequationstobesolved.•Timesteprestrictions;forstabilityapositivecoefficientofoldpϕrequires0≥-PatV.BackwardDifferencing[]0)()(=-ϕ-ϕ+ϕ-ϕ∑newPFFPPoldPnewPbaatVVRearranging,anddroppingany“new”superscripts:oldPPFFPPtVbaatV)()(ϕ+=ϕ-ϕ+∑(10)Assessment.•Straightforwardtoimplement;amountstoasimplechangeofcoefficients:oldPPPPtVbbtVaa)(+→+→(11)•Notimesteprestrictions.Crank-Nicolson[][]0)()(2121=-ϕ-ϕ+-ϕ-ϕ+ϕ-ϕ∑∑newPFFPPoldPFFPPoldPnewPbaabaatVVRearranging,anddroppingany“new”superscripts:oldFFPPPPFFPPabatVbaatVϕ++

1 / 10
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功