计算流体动力学核心方法与求解技术(ComputationalMethodsforFluidDynamics)摘要:本文为Ferziger与Peric所著《计算流体动力学数值方法》第三版,系统讲解CFD数值求解全套理论。全书从流体守恒控制方程切入,依次介绍有限差分、有限体积两类主流离散方法,推导一/二阶导数、各类插值格式;阐述高斯消元、TDMA、多重网格、共轭梯度等线性方程组求解算法,包含松弛、延迟修正、牛顿线性化等非线性处理手段。书中兼顾结构化/非结构化网格、动网格、湍流模拟、可压缩流等工程场景,配套一维对流扩散等验证算例,分析截断误差、迭代误差与收敛判定方法,兼顾理论推导与程序实现思路,是CFD离散算法与求解器开发经典教材。PrefaceComputationalfluiddynamics,commonlyknownbytheacronym'CFD’,isundergoingsignificantexpansionintermsofboththenumberofcoursesofferedatuniversitiesandthenumberofresearchersactiveinthefield.Thereareanumberofsoftwarepackagesavailablethatsolvefluidflowproblems;themarketisnotquiteaslargeastheoneforstructuralmechanicscodes,inwhichfiniteelementmethodsarewellestablished.ThelagcanbeexplainedbythefactthatCFDproblemsare,ingeneral,moredifficulttosolve.However,CFDcodesareslowlybeingacceptedasdesigntoolsbyindustrialusers.Atpresent,usersofCFDneedtobefairlyknowledgeable,whichrequireseducationofbothstudentsandworkingengineers.Thepresentbookisanattempttofillthisneed.Itisourbeliefthat,toworkinCFD,oneneedsasolidbackgroundinbothfluidmechanicsandnumericalanalysis;significanterrorshavebeenmadebypeoplelackingknowledgeinoneortheother.Wethereforeencouragethereadertoobtainaworkingknowledgeofthesesubjectsbeforeenteringintoastudyofthematerialinthisbook.Becausedifferentpeopleviewnumeri-calmethodsdifferently,andtomakethisworkmoreself-contained,wehaveincludedtwochaptersonbasicnumericalmethodsinthisbook.ThebookisbasedonmaterialofferedbytheauthorsincoursesatStanfordUniver-sity,theUniversityofErlangen-NürnbergandtheTechnicalUniversityofHamburg-Harburg.Itreflectstheauthors'experienceinbothwritingCFDcodesandusingthemtosolveengineeringproblems.Manyofthecodesusedintheexamples,fromthesimpleonesinvolvingrectangulargridstotheonesusingnon-orthogonalgridsandmultigridmethods,areavailabletointerestedreaders;seetheinformationonhowtoaccessthemviaInternetintheap-pendix.Thesecodesillustratethemethodsdescribedinthebook;theycanbeadaptedtothesolutionofmanyfluidmechanicalproblems.Studentsshouldtrytomodifythem(e.g.toimplementdifferentboundaryconditions,interpo-lationschemes,differentiationandintegrationapproximations,etc.).Thisisimportantasonedoesnotreallyknowamethoduntils/hehasprogrammedand/orrunit.Sinceoneoftheauthors(M.P.)hasjustrecentlydecidedtogiveuphispro-fessorpositiontoworkforaproviderofCFDtools,wehavealsoincludedintheInternetsiteaspecialversionofafull-featuredcommercialCFDpackagethatcanbeusedtosolvemanydifferentflowproblems.Thisisaccompaniedbyacollectionofpreparedandsolvedtestcasesthataresuitabletolearnhowtousesuchtoolsmosteffectively.Experiencewiththistoolwillbevalu-abletoanyonewhohasneverusedsuchtoolsbefore,asthemajorissuesarecommontomostofthem.Suggestionsarealsogivenforparametervariation,errorestimation,gridqualityassessment,andefficiencyimprovement.Thefinitevolumemethodisfavoredinthisbook,althoughfinitedifferencemethodsaredescribedinwhatwehopeissufficientdetail.Finiteelementmethodsarenotcoveredindetailasanumberofbooksonthatsubjectalreadyexist.Wehavetriedtodescribethebasicideasofeachtopicinsuchawaythattheycanbeunderstoodbythereader;wherepossible,wehaveavoidedlengthymathematicalanalysis.Usuallyageneraldescriptionofanideaormethodisfollowedbyamoredetaileddescription(includingthenecessaryequations)ofoneortwonumericalschemesrepresentativeofthebettermeth-odsofthetype;otherpossibleapproachesandextensionsarebrieflyde-scribed.Wehavetriedtoemphasizecommonelementsofmethodsratherthantheirdifferences.Thereisavastliteraturedevotedtonumericalmethodsforfluidmechan-ics.Evenifwerestrictourattentiontoincompressibleflows,itwouldbeimpossibletocovereverythinginasinglework.Doingsowouldcreatecon-fusionforthereader.Wehavethereforecoveredonlythemethodsthatwehavefoundvaluableandthatarecommonlyusedinindustryinthisbook.Referencestoothermethodsaregiven,however.Wehaveplacedconsiderableemphasisontheneedtoestimatenumericalerrors;almostallexamplesinthisbookareaccompaniedwitherroranalysis.Althoughitispossibleforaqualitativelyincorrectsolutionofaproblemtolookreasonable(itmayevenbeagoodsolutionofanotherproblem),theconsequencesofacceptingitmaybesevere.Ontheotherhand,sometimesarelativelypoorsolutioncanbeofvalueiftreatedwithcare.Industrialusersofcommercialcodesneedtolearntojudgethequalityoftheresultsbeforebelievingthem;wehopethatthisbookwillcontributetotheawarenessthatnumericalsolutionsarealwaysapproximate.Wehavetriedtocoveracross-sectionofmodernapproaches,includingdi-rectandlargeeddysimulationofturbulence,multigridmethodsandparallelcomputing,methodsformovinggridsandfreesurfaceflows,etc.Obviously,wecouldnotcoverallthesetopicsindetail,butwehopethattheinforma-tioncontainedhereinwillprovidethereaderwithageneralknowledgeofthesubject;thoseinterestedinamoredetailedstudyofaparticulartopicwillfindrecommendationsforfurtherreading.Whilewehaveinvestedeveryefforttoavoidtyping,spellingandothererrors,nodoubtsomeremaintobefoundbyreaders.Wewillappreciateyournotifyingusofanymistakesyoumightfind,aswellasyourcommentsandsuggestionsforimprovementoffutureeditionsofthebook.Forthatpurpose,theauthors'electronicmailaddressesaregivenbelow.Wealsohopethatcolleagueswhoseworkhasnotbeenreferencedwillforgiveus,sinceanyomissionsareunintentional.Wehavetothankallourpresentandformerstudents,colleagues,andfriends,whohelpedusinonewayoranothertofinishthiswork;thecompletelistofnamesistoolongtolisthere.NamesthatwecannotavoidmentioningincludeDrs.IsmetDemirdžic,SamirMuzaferija,ŽeljkoLilek,JosephOliger,GeneGolub,EberhardSchreck,VolkerSeidl,KishanShah,Fotina(Tina)KatapodesandDavidBriggs.ThehelpprovidedbythosepeoplewhocreatedandmadeavailableTEX,ITEX,Linux,Xfig,Ghostscriptandothertoolswhichmadeourjobeasierisalsogreatlyappreciated.Ourfamiliesgaveusatremendoussupportduringthisendeavor;ourspecialthanksgotoAnna,RobinsonandKerstinPericandEvaFerziger.ThiscollaborationbetweentwogeographicallydistantcolleagueswasmadepossiblebygrantsandfellowshipsfromtheAlexandervonHumboldtFoundationandtheDeutscheForschungsgemeinschaft(GermanNationalRe-searchOrganization).Withouttheirsupport,thisworkwouldneverhavecomeintoexistenceandwecannotexpresssufficientthankstothem.MilovanPericmilovan@cd.co.ukJoelH.Ferzigerferziger@leland.stanford.edu1.BasicConceptsofFluidFlow1.1IntroductionFluidsaresubstanceswhosemolecularstructureoffersnoresistancetoexter-nalshearforces:eventhesmallestforcecausesdeformationofafuidparticle.Althoughasignificantdistinctionexistsbetweenliquidsandgases,bothtypesoffuidsobeythesamelawsofmotion.Inmostcasesofinterest,afluidcanberegardedascontinuum,i.e.acontinuoussubstance.Fluidflowiscausedbytheactionofexternallyappliedforces.Commondrivingforcesincludepressuredifferences,gravity,shear,rotation,andsur-facetension.Theycanbeclassifiedassurfaceforces(e.g.theshearforceduetowindblowingabovetheoceanorpressureandshearforcescreatedbyamovementofarigidwallrelativetothefluid)andbodyforces(e.g.gravityandforcesinducedbyrotation).Whileallfuidsbehavesimilarlyunderactionofforces,theirmacroscopicpropertiesdifferconsiderably.Thesepropertiesmustbeknownifoneistostudyfuidmotion;themostimportantpropertiesofsimplefluidsarethedensityandviscosity.Others,suchasPrandtlnumber,specificheat,andsur-facetensionaffectfuidflowsonlyundercertainconditions,e.g.whentherearelargetemperaturedifferences.Fluidpropertiesarefunctionsofotherther-modynamicvariables(e.g.temperatureandpressure);althoughitispossibletoestimatesomeofthemfromstatisticalmechanicsorkinetictheory,theyareusuallyobtainedbylaboratorymeasurement.Fluidmechanicsisaverybroadfield.Asmalllibraryofbookswouldberequiredtocoverallofthetopicsthatcouldbeincludedinit.Inthisbookweshallbeinterestedmainlyinflowsofinteresttomechanicalengineersbuteventhatisaverybroadareasoweshalltrytoclassifythetypesofproblemsthatmaybeencountered.Amoremathematical,butlesscomplete,versionofthisschemewillbefoundinSect.1.8.Thespeedofaflowaffectsitspropertiesinanumberofways.Atlowenoughspeeds,theinertiaofthefuidmaybeignoredandwehavecreep-ingflow.Thisregimeisofimportanceinflowscontainingsmallparticles(suspensions),inflowsthroughporousmediaorinnarrowpassages(coatingtechniques,micro-devices).Asthespeedisincreased,inertiabecomesim-portantbuteachfluidparticlefollowsasmoothtrajectory;theflowisthensaidtobelaminar.Furtherincreasesinspeedmayleadtoinstabilitythateventuallyproducesamorerandomtypeofflowthatiscalledturbulent;theprocessoflaminar-turbulenttransitionisanimportantareainitsownright.Finally,theratiooftheflowspeedtothespeedofsoundinthefluid(theMachnumber)determineswhetherexchangebetweenkineticenergyofthemotionandinternaldegreesoffreedomneedstobeconsidered.ForsmallMachnumbers,Ma<0.3,theflowmaybeconsideredincompressible;other-wise,itiscompressible.IfMa<1,theflowiscalledsubsonic;whenMa>1,theflowissupersonicandshockwavesarepossible.Finally,forMa>5,thecompressionmaycreatehighenoughtemperaturestochangethechemicalnatureofthefuid;suchflowsarecalledhypersonic.Thesedistinctionsaffectthemathematicalnatureoftheproblemandthereforethesolutionmethod.NotethatwecalltheflowcompressibleorincompressibledependingontheMachnumber,eventhoughcompressibilityisapropertyofthefluid.ThisiscommonterminologysincetheflowofacompressiblefuidatlowMachnumberisessentiallyincompressible.Inmanyflows,theeffectsofviscosityareimportantonlynearwalls,sothattheflowinthelargestpartofthedomaincanbeconsideredasinviscid.Inthefuidswetreatinthisbook,Newton'slawofviscosityisagoodap-proximationanditwillbeusedexclusively.FluidsobeyingNewton'slawarecalledNewtonian;non-Newtonianfluidsareimportantforsomeengineeringapplicationsbutarenottreatedhere.Manyotherphenomenaaffectfluidflow.Theseincludetemperaturedif-ferenceswhichleadtoheattransferanddensitydifferenceswhichgiverisetobuoyancy.They,anddifferencesinconcentrationofsolutes,mayaffectflowssignificantlyor,evenbethesolecauseoftheflow.Phasechanges(boiling,condensation,meltingandfreezing),whentheyoccur,alwaysleadtoimpor-tantmodificationsoftheflowandgiverisetomulti-phaseflow.Variationofotherpropertiessuchasviscosity,surfacetensionetc.mayalsoplayimpor-tantroleindeterminingthenatureoftheflow.Withonlyafewexceptions,theseeffectswillnotbeconsideredinthisbook.Inthischapterthebasicequationsgoverningfuidflowandassociatedphenomenawillbepresentedinseveralforms:(i)acoordinate-freeform,whichcanbespecializedtovariouscoordinatesystems,(ii)anintegralformforafinitecontrolvolume,whichservesasstartingpointforanimportantclassofnumericalmethods,and(iii)adifferential(tensor)forminaCartesianreferenceframe,whichisthebasisforanotherimportantapproach.Thebasicconservationprinciplesandlawsusedtoderivetheseequationswillonlybebrieflysummarizedhere;moredetailedderivationscanbefoundinanumberofstandardtextsonfluidmechanics(e.g.Birdetal.,1962;Slattery,1972;White,1986).Itisassumedthatthereaderissomewhatfamiliarwiththephysicsoffluidflowandrelatedphenomena,soweshallconcentrateontechniquesforthenumericalsolutionofthegoverningequations.1.2ConservationPrinciplesConservationlawscanbederivedbyconsideringagivenquantityofmatterorcontrolmass(CM)anditsertensiveproperties,suchasmass,momentumandenergy.Thisapproachisusedtostudythedynamicsofsolidbodies,wheretheCM(sometimescalledthesystem)iseasilyidentified.Infuidflows,however,itisdifficulttofollowaparcelofmatter.Itismoreconvenienttodealwiththeflowwithinacertainspatialregionwecallacontrolvolume(CV),ratherthaninaparcelofmatterwhichquicklypassesthroughtheregionofinterest.ThismethodofanalysisiscalledthecontrolvolumeapproachWeshallbeconcernedprimarilywithtwoextensiveproperties,massandmomentum.Theconservationequationsfortheseandotherpropertieshavecommontermswhichwillbeconsideredfirst.Theconservationlawforanextensivepropertyrelatestherateofchangeoftheamountofthatpropertyinagivencontrolmasstoexternallydeter-minedeffects.Formass,whichisneithercreatednordestroyedintheflowsofengineeringinterest,theconservationequationcanbewritten:(1.1)Ontheotherhand,momentumcanbechangedbytheactionofforcesanditsconservationequationisNewton'ssecondlawofmotion:(1.2)wheretstandsfortime,mformass,vforthevelocity,andfforforcesactingonthecontrolmass.Weshalltransformtheselawsintoacontrolvolumeformthatwillbeusedthroughoutthisbook.Thefundamentalvariableswillbeintensiveratherthanextensiveproperties;theformerarepropertieswhichareindependentoftheamountofmatterconsidered.Examplesaredensityp(massperunitvolume)andvelocityv(momentumperunitmass).Ifφisanyconservedintensiveproperty(formassconservation,φ=1;formomentumconservation,φ=v;forconservationofascalar,φrepresentstheconservedpropertyperunitmass),thenthecorrespondingextensivepropertyΦcanbeexpressedas:(1.3)whereΩcMstandsforvolumeoccupiedbytheCM.Usingthisdefinition,thelefthandsideofeachconservationequationforacontrolvolumecanbewritten·1¹ThisequationisoftencalledcontrolvolumeequationortheReynolds'transport(1.4)whereΩcvistheCVvolume,ScvisthesurfaceenclosingCV,nistheunitvectororthogonaltoScvanddirectedoutwards,visthefluidvelocityandvbisthevelocitywithwhichtheCVsurfaceismoving.ForafixedCV,whichweshallbeconsideringmostofthetime,Ub=0andthefirstderivativeontherighthandsidebecomesalocal(partial)derivative.Thisequationstatesthattherateofchangeoftheamountofthepropertyinthecontrolmass,Φ,istherateofchangeofthepropertywithinthecontrolvolumeplusthenetfluxofitthroughtheCVboundaryduetofluidmotionrelativetoCVboundary.Thelasttermisusuallycalledtheconvective(orsometimes,advective)fluxofφthroughtheCVboundary.IftheCVmovessothatitsboundarycoincideswiththeboundaryofacontrolmass,thenu=Ubandthistermwillbezeroasrequired.Adetailedderivationofthisequationisgivenininmanytextbooksonfluiddynamics(e.g.inBirdetal.,1962;FoxandMcDonald,1982)andwillnotberepeatedhere.Themass,momentumandscalarconservationequationswillbepresentedinthenextthreesections.Forconvenience,afixedCVwillbeconsidered;ΩrepresentstheCVvolumeandSitssurface.1.3MassConservationTheintegralformofthemassconservation(continuity)equationfollowsdi-rectlyfromthecontrolvolumeequation,bysettingφ=1:(1.5)ByapplyingtheGauss'divergencetheoremtotheconvectionterm,wecantransformthesurfaceintegralintoavolumeintegral.Allowingthecontrolvolumetobecomeinfinitesimallysmallleadstoadifferentialcoordinate-freeformofthecontinuityequation:(1.6)Thisformcanbetransformedintoaformspecifictoagivencoordinatesystembyprovidingtheexpressionforthedivergenceoperatorinthatsystem.ExpressionsforcommoncoordinatesystemssuchastheCartesian,cylindricalandsphericalsystemscanbefoundinmanytextbooks(e.g.Birdetal.,1962);expressionsapplicabletogeneralnon-orthogonalcoordinatesystemsaregivene.g.inTruesdell(1977),Aris(1989),Sedov(1971).WepresentbelowtheCartesianforminbothtensorandexpandednotation.HereandthroughoutthisbookweshalladopttheEinsteinconventionthatwheneverthesameindexappearstwiceinanyterm,summationovertherangeofthatindexisimplied:(1.7)wherexi(i=1,2,3)or(x,y,z)aretheCartesiancoordinatesanduior(ux,uy,uz)aretheCartesiancomponentsofthevelocityvectorv.Thecon-servationequationsinCartesianformareoftenusedandthiswillbethecaseinthiswork.Differentialconservationequationsinnon-orthogonalcoordi-nateswillbepresentedinChap.8.原资料见附件免责声明:本页面/内容部分素材来源于互联网公开信息,旨在传递更多信息,不代表本平台立场。版权归原作者或机构所有,如涉及侵权,请通过平台联系我们,我们将在核实后第一时间处理。本平台对转载内容的真实性、准确性不作任何保证,用户需自行判断并承担使用风险。