Transcription of Numerical Methods in Heat, Mass, and Momentum Transfer
1 DraftNotesME608 NumericalMethodsinHeat,Mass, ,BlockStructured, ,Consistency, .. ,heattransfer,andotherrelatedphysicalphe nomena, ,themomentumequationsexpresstheconservat ionoflinearmomentum; , Momentum ,energy, , ,themomentumequationexpressestheprincipl eofconservationoflinearmomentumintermsof themomentumperunitmass, , ,whichmaybemomentumperunitmass,ortheener gyperunitmass, x y isgovernedbyaconservationprinciplethatst atesAccumulationof inthecontrolvolumeovertime tNetinfluxof intocontrolvolumeNetgenerationof insidecontrolvolume( )9 Jxx+x yx J :ControlVolumeTheaccumulationof inthecontrolvolumeovertime tisgivenby t t t( )Here, isthedensityofthefluid, isthevolumeofthecontrolvolume( x y z) insidethecontrolvolumeovertime tisgivenbyS t( )whereSisthegenerationof ,thenetinfluxof comingintothecontrolvolumethroughfacex,a ndJx xthefluxleavingthefacex intothecontrolvolumeovertime tisJxJx x y z tJyJy y x z tJzJz z x y t( )Wehavenotyetsaidwhatphysicalmechanismsc ausetheinfluxof.
2 Forphysicalphenomenaofinteresttous, istransportedbytwoprimarymechanisms:diff usionduetomolecularcollision, ,thediffusionfluxmaybewrittenasJdiffusio nx x( )TheconvectivefluxmaybewrittenasJconvect ionx u ( )10 Here, u xxJx x u xx x( )where ,anddividingby t t t tJxJx x xJyJy y yJzJz z zS( )Takingthelimit x y z t0,weget t Jx x Jy y Jz zS( ) t x u y v z w x x y y z zSor,invectornotation t V S( ) ,wecan,inprinciple, ,whichmaybeenergyperunitmass(J/kg),ormom entumperunitmass(m/s) ,isthegenerationof wereenergyperunitmass, ,intheabsenceofgen-eration,thedivergence ofthefluxiszero: J0( )whereJ= , t V S( ) ,theconser-vativeformisadirectstatementa bouttheconservationof intermsofthephysicalfluxes(convectionand diffusion).
3 , ,heatandmasstransfer,aswellasothertransp ortequations,mayberepresentedbytheconser vativeform, . , , ,theenergyequationmaybewrittenintermsoft hespecificenthalpyhas h t Vh k TSh( ) ,dhCpdT( ) h t Vh kCp hSh( ) ,with h, u t Vu u p xSu( )Here,Sucontainsthosepartsofthestressten sornotappearingdirectlyinthediffusionter m,and p ,with u, andS p ,Yi, slawisassumedvalid,thegoverningconservat ionequationis Yi t VYi i YiRi( ) ,with Yi, i, ,heatandmasstransfercanbecastintoasingle generalformwhichweshallcallthegeneralsca lartransportequation: t V S( )Ifnumericalmethodscanbedevisedtosolveth isequation,wewillhaveaframeworkwithinwhi chtosolvetheequationsforflow,heat, (PDE)governingthespatialandtemporalvaria tionof.
4 Iftheproperties and ,orthegenerationtermS arefunctionsof , , xxb xyc yyd xe yf g0( )Thecoefficientsa,b,c,d,e,fandgarefuncti onsofthecoordinates(x,y),butnotof ( ) , , xk T x0( )withT0T0 TLTL( )Forconstantk,thesolutionisgivenbyTxT0 TLT0Lx( ) , , andCpareconstant, T t 2T x2( )where k ( )Usingaseparationofvariablestechnique,we maywritethesolutiontothisproblemasTxtT0 n1 Bnsinn xLe n2 2L2t( )whereBn2LL0 TixT0sinn xLdxn123( ) (x,t)ateverypointinthedomain,justaswithe llipticPDE ( ,conditionsatt0).Nofinalconditionsarereq uired,forexampleconditionsatt .Wedonotneedtoknowthefuturetosolvethispr oblem! , , .Here, , ,forexample, , ,U,isaconstant; , : t CpT x CpUT0( )withTx0 TiTx0tT0( ) ( )ortoputitanotherwayTxtTifortxUT0fortxU( )ThesolutionisessentiallyastepinTtraveli nginthepositivexdirectionwithavelocityU, (x0) , ( ) ,theequationexhibitsmixedbehavior,withth ediffusiontermstendingtobringinelliptici nfluences, , :ConvectionofaStepProfileTxT0 Tix1x2t = x /U1t = x /U2t =.
5 TemperatureVariationwithTime18 Thoughitispossibletodevisenumericalmetho dswhichexploittheparticularna-tureoftheg eneralscalartransportequationincertainli mitingcases, ,wewillhavetodealwithcoupledsetsofequati ons, , , ,convection, ,parabolicandhyperbolicequations, , ,weexaminenumericalmethodsforsolvingthis typeofequation, ,consistency, asafunctionoftheindependentvariables(xyz t).Thenumericalsolution,ontheotherhand,a imstoprovideuswithvaluesof ,thoughwemayalsoseethemreferredtoasnodes orcellcentroids, , wewillberequiredtoassumehow , ,weprescribehow variesinthelocalneighborhoodsurroundinga gridpoint, , :AnExampleofaMeshvaluesof .Itisthesevaluesof ,letussaythattheaccuracyofthenumericalso lution, ,itsclosenesstotheexactsolution,dependso nlyonthediscretizationprocess,andnotonth emethodsemployedtosolvethediscreteset( ,thepathtosolution).
6 Thepathtosolutiondetermineswhetherweares uccessfulinobtainingasolution, (Forsomenon-linearproblems, ,weshallnotpursuethislineofinvestigation here.)Sincewewishtogetananswertotheorigi naldifferentialequation, , , (Vertex) (Weshallusethetermsmeshandgridinterchang eablyinthisbook). (sometimescalledtheelement). , , , ,ourinterestliesinanalyzingdomainswhicha reregularinshape:rect-angles,cubes,cylin ders, , (a).Thegridlinesareorthogonaltoeachother , ,however, (b).Here,gridlinesarenotnecessarilyortho gonaltoeachother, ,stairsteppingoccursatdomainboundaries, , ,inflowsdominatedbywallshear, ,BlockStructured, , ,themeshisdividedintoblocks,andthe23(b)( a) , , ,andasaresult, , , , ,structuredquadrilateralsandhexahedraare well-suitedforflowswithadominantdirectio n, ,ascom-putationalfluiddynamicsisbecoming morewidelyusedforanalyzingindustrialflow s, ,tri-anglesandtetrahedraareincreasinglyb eingused, , :Non-ConformalMesh27(e)(f)(c)(a)(b)(d) :CellShapes.
7 (a)Triangle,(b)Tetrahedron,(c)Quadrilate ral,(d)Hexahe-dron,(e)Prism,and(f) ,prismsareusedinboundarylayers, , ,orassociatethemwiththecell, , ,thenumberofcellsisapproximatelyequaltot henumberofnodes, , ,forexample,therearetwiceasmanycellsasno des, ,bothschemeshaveadvantagesanddisadvantag es,andthechoicewilldepend28 FlowBoundary ,wehavealludedtothediscretizationmethod, : d2 dx2S0( ) ,wewrite 1 2 xd dx2 x22d2 dx22O x3( )and 3 2 xd dx2 x22d2 dx22O x3( )ThetermO x3indicatesthatthetermsthatfollowhaveade pendenceon dx2 3 12 xO x2( )Byaddingthetwoequationstogether,wecanwr ited2 dx22 1 32 2 x2O x2( )29 xx :One-DimensionalMeshByincludingthediffus ioncoefficientanddroppingtermsofO x2orsmaller,wecanwrite d2 dx22 1 32 2 x2( )ThesourcetermSisevaluatedatthepoint2usi ngS2S 2( ) x2 2 x2 1 x2 3S2( ) ,weobtainansetofalgebraicequationsinthed iscretevaluesof.
8 ,theyarenotguaranteedtodosoinmorecomplic atedcases, , , beanapproximationto .Since isonlyanapproxima-tion, ,sothatthereisaresidualR:d2 dx2SR( )Wewishtofinda suchthatdomainWRdx0( )Wisaweightfunction, ,i12N,whereNisthenumberofgridpoints, ,werequiredomainWiRdx0i12N( )TheweightfunctionsWiaretypicallylocalin thattheyarenon-zerooverelementi, ,weassumeashapefunctionfor , ,assumehow , (sometimescalledthecontrolvolumemethod)d ividesthedomainintoafinitenumberofnon-ov erlappingcellsorcontrolvolumesoverwhichc onservationof , :ddx d dxS0( )Consideraone-dimensionalmesh, atcellcentroids,denotedbyW, d dxdxewSdx0( )sothat d dxe d dxwewSdx0( ) , xw xeWPEew :ArrangementofControlVolumesWenowmakeapr ofileassumption, ,wemakeanassumptionabouthow varieslinearlybetweencellcentroids,wemay write e E P xe w P W xwS x0( ) ,weobtainaP PaE EaW Wb( )whereaE e xeaW w xwaPaEaWbS x( ) ,yieldingasetofalgebraicequations,asbefo re; , , maybeinaccurate, d.
9 Theseequationsmaybelinear( )ortheymaybenon-linear( ).Thesolutiontechniquesareindependentoft hediscretizationmethod, ,weareguaranteedthatthereisonlyonesoluti on,andifoursolutionmethodgivesusasolutio n, ( ) ,wedonothavethisguarantee,andtheanswerwe getmaydependonfactorsliketheinitialguess , , ,wemaywritetheresult-ingsystemofalgebrai cequationsasA B( )whereAisthecoefficientmatrix, 1 2 Tisavectorconsistingofthediscretevalueso f , ,whereby iscomputedfrom A1B( )Asolutionfor , , ,Aissparse, ,forexample,forpurediffusion, ,thetri-diagonalmatrixalgorithm(TDMA), , , ,thematrixAisusuallynon-linear, ,thedirectmethodisappliedoverandoveragai n, , using PaE EaW WbaP( )Theneighborvalues, Eand Warerequiredfortheupdateof ,pointswhichhavealreadybeenvis-itedwillh averecentlyupdatedvaluesof ,forexample,requirethatthemaximumchangei nthegrid-pointvaluesof belessthan01%.
10 Ifthecriterionismet, , , ( ) ; ,aE,aWandbcanbecomputedontheflyifdesired ,sincetheentirecoefficientmatrixforthedo mainisnotrequiredwhenupdatingthevalueof , ,theymaybeupdatedusingprevailingvaluesof , , ,Consistency,StabilityandConvergenceInth issection, , x2, ,thetermsthatareneglectedareofO ,ifwerefinethemesh,weexpectthetruncation errortodecreaseas , , , , (Forunsteadyproblems,bothspatialandtempo raltruncationerrorsmustbeconsidered).Wea reguaranteedthisifthetruncationerrorisso mepowerofthemeshspacing x(or t).Sometimeswemaycomeacrossschemes35wher ethetruncationerrorofthemethodisO x ,consistencyisnotguar-anteedunless xisdecreasedfasterthan , ,forexample, , ,wewillusenumericalmethodswhichcomputeth esolutionatdiscreteinstantsoftime, ,forexample(assumingthatasteadystateexis ts).