REVIEW Lecture 17: Numercal Flud Mechacs Sprg 2015 Lecture 18 Ed of Fte Volume Methods Cartesa grds Hgher order (terpolato) schemes Soluto of the Naver-Stokes Equatos Dscretzato of the covectve ad vscous terms Dscretzato of the pressure term Coservato prcples Mometum ad Mass Eergy 2 2 Choce of Varable Arragemet o the Grd Collocated ad Staggered Calculato of the Pressure t v t. v 0 v.( vv v) ) p 2 v gg 2 2.. ( pe u p p ggr u gxe e e ) 3 3 x v v dv ( g g.. v dv 2 2 v. ) da p v. da (.. v ). da : v p. v CV CS CS CS CV Numercal Flud Mechacs PFJL Lecture 18, 1 S p e ds e.
TODAY (Lecture 18): Numercal Methods for the Naver-Stokes Equatos Soluto of the Naver-Stokes Equatos Dscretzato of the covectve ad vscous terms Dscretzato of the pressure term Coservato prcples Choce of Varable Arragemet o the Grd Calculato of the Pressure Pressure Correcto Methods A Smple Explct Scheme A Smple Implct Scheme Nolear solvers, Learzed solvers ad ADI solvers Implct Pressure Correcto Schemes for steady problems Outer ad Ier teratos Proecto Methods No-Icremetal ad Icremetal Schemes Fractoal Step Methods: Example usg Crak-Ncholso Numercal Flud Mechacs PFJL Lecture 18, 2
Refereces ad Readg Assgmets Chapter 7 o Icompressble Naver-Stokes equatos of J. H. Ferzger ad M. Perc, Computatoal Methods for Flud Dyamcs. Sprger, NY, 3 rd edto, 2002 Chapter 11 o Icompressble Naver-Stokes Equatos of T. Cebec, J. P. Shao, F. Kafyeke ad E. Lauredeau, Computatoal Flud Dyamcs for Egeers. Sprger, 2005. Chapter 17 o Icompressble Vscous Flows of Fletcher, Computatoal Techques for Flud Dyamcs. Sprger, 2003. Numercal Flud Mechacs PFJL Lecture 18, 3
Calculato of the Pressure The Naver-Stokes equatos do ot have a depedet equato for pressure But the pressure gradet cotrbutes to each of the three mometum equatos For compressble fluds, mass coservato becomes a kematc costrat o the velocty feld: we the have o dyamc equatos for both desty ad pressure For compressble fluds, mass coservato s a dyamc equato for desty Pressure ca the be computed from desty usg a equato of state For compressble flows (or low Mach umbers), desty s ot a state varable, hece ca t be solved for For compressble flows: Mometum equatos lead to the veloctes Cotuty equato should lead to the pressure, but t does ot cota pressure! How ca p be estmated? Numercal Flud Mechacs PFJL Lecture 18, 4
Naver-Stokes, compressble: Calculato of the Pressure Combe the two coservato eqs. to obta a equato for p Sce the cos. of mass has a dvergece form, take the dvergece of the mometum equato, usg cos. of mass: For costat vscosty ad desty: 2 v 2. p p...( vv v) ).. v.. gg..( vv v ) t Ths pressure equato s ellptc (Posso eq. oce velocty s kow) It ca be solved by methods we have see earler for ellptc equatos Importat Notes v t. v 0 v.( vv v) ) p 2 v gg p uu x x x x RHS: Terms sde dvergece (dervatves of mometum terms) must be approxmated a form cosstet wth that of mometum eqs. However, dvergece s that of cos. of mass. Laplaca operator comes from ) dvergece of cos. of mass ad ) gradet mometum eqs.: cosstecy must be mataed,.e. dvergece ad gradet dscrete operators Laplaca should be those of the cos. of mass ad of the mometum eqs., respectvely Best to derve pressure equato from dscretzed mometum/cotuty equatos Numercal Flud Mechacs PFJL Lecture 18, 5
Pressure-correcto Methods Frst solve the mometum equatos to obta the velocty feld for a kow pressure The solve the Posso equato to obta a updated/corrected pressure feld Aother way: modfy the cotuty equato so that t becomes hyperbolc (eve though t s ellptc) Artfcal Compressblty Methods Notes: The geeral pressure-correcto method s depedet of the dscretzato chose for the spatal dervatves theory ay dscretzato ca be used We keep desty the equatos (flows are assumed compressble, but small desty varatos are cosdered) Numercal Flud Mechacs PFJL Lecture 18, 6
A Smple Explct Tme Advacg Scheme Smple method to llustrate how the umercal Posso equato for the pressure s costructed ad the role t plays eforcg cotuty Specfcs of spatal dervatve scheme ot mportat, hece, we look at the equato dscretzed space, but ot tme. Use to deote dscrete spatal dervatves. x Ths gves: u ( u u ) ( u u ) p u p p + + H t x x x t x x x x Note: p preal gx Smplest approach: Forward Euler for tme tegrato, whch gves: 1 p u u t H x I geeral, the ew velocty feld we obta at tme +1 does ot satsfy the dscrete cotuty equato: u 1 0 x Numercal Flud Mechacs PFJL Lecture 18, 7
A Smple Explct Tme Advacg Scheme How ca we eforce cotuty at +1? Take the dscrete umercal dvergece of the NS eqs.: p x 1 u u t H 1 u u p x x x x t H The frst term s the dvergece of the ew velocty feld, whch we wat to be zero, so we set t to zero. Secod term s zero f cotuty was eforced at tme step Thrd term ca be zero or ot, but the two above codtos set t to zero All together, we obta: p H x x x Note that ths cludes the dvergece operator from the cotuty eq. (outsde) ad the pressure gradet from the mometum equato (sde) Pressure gradet could be explct () or mplct (+1) Numercal Flud Mechacs PFJL Lecture 18, 8
A Smple Explct Tme Advacg Scheme: Summary of the Algorthm Start wth velocty at tme t whch s dvergece free Compute RHS of pressure equato at tme t Solve the Posso equato for the pressure at tme t Compute the velocty feld at the ew tme step usg the mometum equato: It wll be dscretely dvergece free Cotue to ext tme step Numercal Flud Mechacs PFJL Lecture 18, 9
A Smple Implct Tme Advacg Scheme Some addtoal dffcultes arse whe a mplct method s used to solve the (compressble) NS equatos To llustrate, let s frst try the smplest: backward/mplct Euler Recall: Implct Euler: u ( uu ) p p + H t x x x x Dffcultes (specfcs for compressble case) 1) Set umercal dvergece of velocty feld at ew tme-step to be zero Take dvergece of mometum, assume velocty s dvergece-free at tme t ad demad zero dvergece at t +1. Ths leads to: 1 1 1 1 1 1 p ( uu ) p u u t H t + x x x x 1 1 1 1 1 1 ( ) u u p p uu t H x x x x x x x x x Problem: The RHS ca ot be computed utl veloctes are kow at t +1 (ad these veloctes ca ot be computed utl p +1 s avalable) Result: Posso ad mometum equatos have to be solved smultaeously Numercal Flud Mechacs PFJL Lecture 18, 10
A Smple Implct Tme Advacg Scheme, Cot d 2) Eve f p +1 kow, a large system of olear mometum equatos must be solved for the velocty feld: Three approaches for soluto: Frst approach: olear solvers Use veloctes at t for tal guess of u +1 (or use explct-scheme as frst guess) ad the employ a olear solver (Fxed-pot, Newto-Raphso or Secat methods) at each tme step Nolear solver s appled to the olear algebrac equatos 1 1 1 1 ( ) uu p u u t + x x x 1 1 1 1 ( ) uu p u u t + x x x 1 1 1 ( ) uu p x x x x x Numercal Flud Mechacs PFJL Lecture 18, 11
A Smple Implct Tme Advacg Scheme, Cot d Secod approach: learze the equatos about the result at t u u u 1 u u u u u u u u u u 1 1 We d expect the last term to be of 2 d order Δt, t ca thus be eglected (for a 2 d order tme, e.g. C-N scheme, t would stll be of same order as spatal dscretzato error, so ca stll be eglected). Hece, dog the same the other terms, the (compressble) mometum equatos are the approxmated by: 1 ( u u ) ( u u ) ( u u ) p p u u u t x x x x x x x Oe the solves for Δu ad Δp (usg the above mom. eq. ad ts Δp eq.) Ths learzato takes advatage of the fact that the olear term s oly quadratc However, a large coupled lear system (Δu & Δp) stll eeds to be verted. Drect soluto s ot recommeded: use a teratve scheme A thrd terestg soluto scheme: a Alterate Drecto Implct scheme Numercal Flud Mechacs PFJL Lecture 18, 12
Parabolc PDEs: Two spatal dmesos ADI scheme (Two Half steps tme) (from Lecture 14) t McGraw-Hll. All rghts reserved. Ths cotet s excluded from our Creatve Commos lcese. For more formato, see http://ocw.mt.edu/faruse. Source: Chapra, S., ad R. Caale. Numercal Methods for Egeers. McGraw-Hll, 2005. 1) From tme to +1/2: Approxmato of 2 d order x dervatve s explct, whle the y dervatve s mplct. Hece, tr-dagoal matrx to be solved: T T T 2T T T 2T T 1/ 2 1/ 2 1/ 2 1/ 2,, 2 1,, 1, 2, 1,, 1 2 2 c c O x y 2 2 t /2 x y 2) From tme +1/2 to +1: Approxmato of 2 d order x dervatve s mplct, whle the y dervatve s explct. Aother tr-dagoal matrx to be solved: T T T 2T T T 2T T ( ) 1 1/ 2 1 1 1 1/ 2 1/ 2 1/ 2,, 2 1,, 1, 2, 1,, 1 2 2 c c O x y 2 2 t /2 x y ( ) Numercal Flud Mechacs PFJL Lecture 18, 13
Parabolc PDEs: Two spatal dmesos ADI scheme (Two Half steps tme) (from Lecture 14) =1 =2 =3 =1 =2 =3 =3 =2 =1 y Frst drecto Secod drecto For Δx=Δy: x The ADI method appled alog the y drecto ad x drecto. Ths method oly yelds trdagoal equatos f appled alog the mplct dmeso. Image by MIT OpeCourseWare. After Chapra, S., ad R. Caale. Numercal Methods for Egeers. McGraw-Hll, 2005. 1) From tme to +1/2: (1 st tr-dagoal sys.) rt 2(1 r) T rt rt 2(1 r) T rt 1/ 2 1/ 2 1/ 2, 1,, 1 1,, 1, 2) From tme +1/2 to +1: (2 d tr-dagoal sys.) rt 2(1 r) T rt rt 2(1 r) T rt 1 1 1 1/ 2 1/ 2 1/ 2 1,, 1,, 1,, 1 Numercal Flud Mechacs PFJL Lecture 18, 14
A Smple Implct Tme Advacg Scheme, Cot d Alterate Drecto Implct method Splt the NS mometum equatos to a seres of 1D problems, e.g. each beg block tr-dagoal. The, ether: ADI olear: terate for the olear terms, or, ADI wth a local learzato: Δp ca frst be set to zero to obta a ew velocty u * whch does ot satsfy cotuty: Solve a Posso equato for the pressure correcto. Takg the dvergece of: gves, * ( u u ) ( u u ) ( u u ) p u u t x x x x x x 1 ( u u ) ( u u ) ( u u ) p p u u t x x x x x x x 1 * 1 p u u t x * 1 1 ( ) p u, from whch Δp ca be solved for. x x t x p u u t x 1 1 * Fally, update the velocty: 1 Numercal Flud Mechacs PFJL Lecture 18, 15
Methods for solvg (steady) NS problems: Implct Pressure-Correcto Methods Smple mplct approach based o learzato s most useful for usteady problems (wth lmted tme-steps) It s ot accurate for large (tme) steps (because the learzato would the lead to a large error) Thus, t should ot be used for steady problems (whch ofte use large tme-steps) Steady problems are ofte solved wth a mplct method (wth pseudo-tme), but wth large tme steps (o eed to reproduce the pseudo-tme hstory) The am s to rapdly coverge to the steady olear soluto May steady-state solvers are based o varatos of the mplct schemes They use a pressure (or pressure-correcto) equato to eforce cotuty at each pseudo-tme steps, also called outer terato Numercal Flud Mechacs PFJL Lecture 18, 16
Methods for solvg (steady) NS problems: Implct Pressure-Correcto Methods, Cot d For a fully mplct scheme, the steady state mometum equatos are: Wth the dscretzed matrx otato, the result s a olear algebrac system 1 1 1 1 ( uu ) p x x x u u 0 + 0 1 u A u b 1 1 u The b term the RHS cotas all terms that are explct ( u ) or lear u +1 or that are coeffcets fucto of other varables at t +1, e.g. temperature Pressure gradet s stll wrtte symbolc matrx dfferece form to dcate that ay spatal dervatves ca be used The algebrac system s olear. Aga, olear teratve solvers ca be used. For steady flows, the tolerace of the covergece of these olear-solver teratos does ot eed to be as strct as for a true tme-marchg scheme Note two types of successve teratos ca be employed wth pressure-correcto: Outer teratos: (over oe pseudo-tme step) use olear solvers whch update the 1 u 1 elemets of matrx A as well as u (uses o or approx. pressure term, the corrects t) Ier Iteratos: lear algebra to solve the learzed system wth fxed coeffcets 1 Numercal Flud Mechacs δp δx PFJL Lecture 18, 17
Methods for solvg (steady) NS problems: Implct Pressure-Correcto Methods, Cot d Outer terato m (pseudo-tme): olear solvers whch update the elemets m* of the matrx A u m* as well as u : best estmate of exact u wthout ay p-grad. m1 m1 m1 * * 1 * 1 * 1 m m* m 1 p * 1 * formally, m m m m p u δ u u δ m m* * u δp A u b m u A b m* A u u u AA δx δx δx m* The resultg veloctes u do ot satsfy cotuty (hece the *) sce the RHS s obtaed from p m-1 m* at the ed of the prevous outer terato eeds to correct u. m m m m The fal u u m eeds to satsfy: m δp δu A u b m ad 0 m 1 m 1 m x x u δ δ m u m1 u δp u A b m u A δx * m* m* 1 m* 1 m 0 u m1 u δp 1 m δuu m* u δp δ A A b m* u A δx δx x δ δx Ier terato: After solvg a Posso equato m* u for the pressure, the fal velocty s calculated usg the er terato (fxed coeffcet A) Fally, crease m to m+1 ad terate (outer, the er) A u b Ths scheme s a varato of prevous tme-marchg schemes. Ma dffereces: ) o tme-varato terms, ad, ) the terms RHS ca be explct or mplct outer terato. Numercal Flud Mechacs PFJL Lecture 18, 18 m m u m* δp δx m
Methods for solvg (steady) NS problems: Proecto Methods These schemes that frst costruct a velocty feld that does ot satsfy cotuty, but the correct t usg a pressure gradet are called proecto methods : The dvergece producg part of the velocty s proected out Oe of the most commo methods of ths type are the pressurecorrecto schemes m m* m m1 Substtute u u u' ad ' the prevous equatos p p p Varatos of these pressure-correcto methods clude: SIMPLE (Sem-Implct Method for Pressure-Lked Equatos) method: Neglects cotrbutos of u the pressure equato SIMPLEC: approxmate u the pressure equato as a fucto of p (better) SIMPLER ad PISO methods: terate to obta u There are may other varatos of these methods: all are based o outer ad er teratos utl covergece at m (+1) s acheved. Numercal Flud Mechacs PFJL Lecture 18, 19
Proecto Methods: Example Scheme 1 Guermod et al, CM-AME-2006 No-Icremetal (Chor, 1968): No pressure term used predctor mometum equato Correct pressure based o cotuty Update velocty usg corrected pressure mometum equato 1 1 1 1 * * u u t u 1 * 1 * ( uu) + ; (bc) x x D 1 1 p u u t 1 1 x p 1 * 1 p u ; 0 1 u x x t x D 0 x 1 p u u t x 1 Numercal Flud Mechacs Note: advecto term ca be treated: - mplctly for u* at +1 (eed to terate the), or, - explctly (evaluated wth u at ), as 2d FV code ad may others PFJL Lecture 18, 20
Proecto Methods: Example Scheme 2 Guermod et al, CM-AME-2006 Icremetal (Goda, 1979): Old pressure term used predctor mometum equato 1 Correct pressure based o cotuty: p p p' Update velocty usg pressure cremet mometum equato 1 1 1 1 * * u u t u 1 * 1 * ( uu) p + ; (bc) x x x D 1 1 1 p p u u t 1 1 x p p 1 * 1 p p u 1 ; 0 u x x t x D 0 x 1 u u t p x p Notes: - ths scheme assumes u =0 the pressure equato. It s as the SIMPLE method, but wthout the teratos - As for the o-cremetal scheme, the advecto term ca be explct or mplct Numercal Flud Mechacs PFJL Lecture 18, 21
Proecto Methods: Example Scheme 3 Guermod et al, CM-AME-2006 Rotatoal Icremetal (Tmmermas et al, 1996): Old pressure term used predctor mometum equato 1 1 Correct pressure based o cotuty: p p p ' p p f ( u ') Update velocty usg pressure cremet mometum equato 1 1 1 1 * * u u t u 1 * 1 * p 1 ( uu) p + ; (bc) x x x D 1 1 1 p u u t 1 1 x p 1 * 1 p u 1 ; 0 u x x t x D 0 x 1 p u u t x 1 * 1 p p u x Notes: - ths scheme accouts for u the pressure eq. - It ca be made to a SIMPLE-lke method, f teratos are added - Aga, the advecto term ca be explct or mplct. The rotatoal correcto to the left assumes explct advecto Numercal Flud Mechacs 1 u u x x PFJL Lecture 18, 22
MIT OpeCourseWare http://ocw.mt.edu Numercal Flud Mechacs Sprg 2015 For formato about ctg these materals or our Terms of Use, vst: http://ocw.mt.edu/terms.