CFD Lecture 2007

download CFD Lecture 2007

of 52

Transcript of CFD Lecture 2007

  • 8/16/2019 CFD Lecture 2007

    1/52

    Introduction toComputational FluidDynamics (CFD) Tao Xing and Fred Stern

    IIHR—Hydroscience & Engineering

    C !a"#ell Stanley Hydraulics $a%oratory

     Te 'niersity o Io#a

    *+,-./ Intermediate !ecanics o Fluids

    ttp,00cssengineeringuio#aedu01me2-./0

    Sept 34 5//3

  • 8/16/2019 CFD Lecture 2007

    2/52

    2

    6utline

    - 7at4 #y and #ere o CFD85 !odeling

    9 :umerical metods

    ; Types o CFD codes

    * CFD Educational Interace

    . CFD

  • 8/16/2019 CFD Lecture 2007

    3/52

    3

    7at is CFD8= CFD is te simulation o >uids engineering systems

    using modeling (matematical pysical pro%lemormulation) and numerical metods (discreti?ationmetods4 solers4 numerical parameters4 and gridgenerations4 etc)

    = Historically only @nalytical Fluid Dynamics (@FD) andE"perimental Fluid Dynamics (EFD)

    = CFD made possi%le %y te adent o digital computerand adancing #it improements o computerresources

      (*// >ops4 -A;3

    5/ tera>ops4 5//9)

  • 8/16/2019 CFD Lecture 2007

    4/52

    4

    7y use CFD8

    = @nalysis and Design- SimulationB%ased design instead o %uild & test!ore cost eectie and more rapid tan EFDCFD proides igBdelity data%ase or diagnosing >o#

    eld

    5 Simulation o pysical >uid penomena tat are

    diGcult or e"perimentsFull scale simulations (eg4 sips and airplanes)Enironmental eects (#ind4 #eater4 etc)Ha?ards (eg4 e"plosions4 radiation4 pollution)

  • 8/16/2019 CFD Lecture 2007

    5/52

    5

    7ere is CFD used8

    = 7ere is CFDused8

    = Aerospace

    = Automotive

    = Biomedical = Cemical

  • 8/16/2019 CFD Lecture 2007

    6/52

    6

    7ere is CFD used8

    Polymerization reactor vessel - prediction

    of flow separation and residence time

    effects.

    Streamlines for workstation

    ventilation

    = 7ere is CFD used8= @erospacee

    = @utomotie

    = Kiomedical

    =  ChemicalProcessing

    =  HVAC

    =  Hydraulics

    = !arine

    = 6il & Jas

    =

  • 8/16/2019 CFD Lecture 2007

    7/527

    7ere is CFD used8

    = 7ere is CFD used8= @erospace

    = @utomotie

    = Kiomedical

    = Cemical

  • 8/16/2019 CFD Lecture 2007

    8/528

    !odeling= !odeling is te matematical pysics

    pro%lem ormulation in terms o a continuousinitial %oundary alue pro%lem (IK

  • 8/16/2019 CFD Lecture 2007

    9/529

    o e ng geome ry andomain)

    = Simple geometries can %e easily created %y e#

    geometric parameters (eg circular pipe)= Comple" geometries must %e created %y te partial

    dierential eLuations or importing te data%ase ote geometry(eg airoil) into commercial sot#are

    = Domain, si?e and sape 

    =  Typical approaces= Jeometry appro"imation

    = C@D0C@E integration, use o industry standards suc as

  • 8/16/2019 CFD Lecture 2007

    10/5210

    !odeling (coordinates)

    x

    y

    z

    x

    y

    z

    x

    y

    z

    (r,θ,z)z

    r θ

    (r,θ,φ)

    r θ

    φ(x,y,z)

    Cartesian Cylindrical Spherical

    General C!r"ilinear C##rdinates General #rth#$#nal

    C##rdinates

  • 8/16/2019 CFD Lecture 2007

    11/5211

     eLuations)

    = :aierBStoOes eLuations (9D in Cartesian coordinates)

    +∂

    +∂

    +∂

    −=∂

    +∂

    +∂

    +∂

    ∂2

    2

    2

    2

    2

    2%

     z 

    u

     y

    u

     x

    u

     x

     p

     z 

    u

    w y

    u

    v x

    u

    ut 

    u µ  ρ  ρ  ρ  ρ 

    ∂+

    ∂+

    ∂+

    ∂−=

    ∂+

    ∂+

    ∂+

    ∂2

    2

    2

    2

    2

    2%

     z 

    v

     y

    v

     x

    v

     y

     p

     z 

    vw

     y

    vv

     x

    vu

    v µ  ρ  ρ  ρ  ρ 

    ( ) ( ) ( )0=∂

    ∂+∂

    ∂+∂

    ∂+∂

     z 

    w

     y

    v

     x

    u

     ρ  ρ  ρ  ρ 

     RT  p   ρ =

     L

    v   p p

     Dt 

     DR

     Dt 

     R D R

     ρ 

    −=+

      2

    2

    2

    )(2

    3

    C#n"ecti#n &iez#'etric press!re $radient isc#!s ter's#cal accelerati#n

    C#ntin!ity e*!ati#n

    +*!ati#n # state

    -aylei$h +*!ati#n

    ∂+

    ∂+

    ∂+

    ∂−=

    ∂+

    ∂+

    ∂+

    ∂2

    2

    2

    2

    2

    2%

     z 

    w

     y

    w

     x

    w

     z 

     p

     z 

    w

    w y

    w

    v x

    w

    ut 

    w

     µ  ρ  ρ  ρ  ρ 

  • 8/16/2019 CFD Lecture 2007

    12/5212

    !odeling (>o# conditions)= Kased on te pysics o te >uids penomena4

    CFD can %e distinguised into dierentcategories using dierent criteria

    = iscous s iniscid (Re)=  E"ternal >o# or internal >o# (#all %ounded or not)

    = Tur%ulent s laminar (Re)=  Incompressi%le s compressi%le (!a)

    =  SingleB s multiBpase (Ca)

    =  Termal0density eects (o# (Fr) and surace tension (7e)=  Cemical reactions and com%ustion (

  • 8/16/2019 CFD Lecture 2007

    13/5213

    !odeling (initial conditions)= Initial conditions (ICS4 steady0unsteady

    >o#s)

    = ICs sould not aect nal results and onlyaect conergence pat4 ie num%er oiterations (steady) or time steps

    (unsteady) need to reac conergedsolutions

    = !ore reasona%le guess can speed up teconergence

    = For complicated unsteady >o# pro%lems4CFD codes are usually run in te steadymode or a e# iterations or getting a%etter initial conditions

  • 8/16/2019 CFD Lecture 2007

    14/5214

    o e ng oun aryconditions)

    =Koundary conditions, :oBslip or slipBree

    on #alls4 periodic4 inlet (elocity inlet4 mass >o#rate4 constant pressure4 etc)4 outlet (constantpressure4 elocity conectie4 numerical %eac4 ?eroBgradient)4 and nonBre>ecting (or compressi%le >o#s4suc as acoustics)4 etc

     .#/slip alls !0,"0

    "0, dpdr0,d!dr0

    nlet ,!c,"0 !tlet, pc

    Periodic "oundary condition in

    span!ise direction o# an air#oil#

    xxisy''etric

  • 8/16/2019 CFD Lecture 2007

    15/5215

     models)

    = CFD codes typically designed or soling

    certain >uid  penomenon %y applying dierent models

    = iscous s iniscid (Re)= Tur%ulent s laminar (Re4 Tur%ulent models)

    =  Incompressi%le s compressi%le (!a4 eLuation ostate)

    = SingleB s multiBpase (Ca4 caitation model4 t#oB>uid

      model)

    = Termal0density eects and energy eLuation  (o# (Fr4 leelBset & surace tracOingmodel) and

      surace tension (7e4 %u%%le dynamic model)= Cemical reactions and com%ustion (Cemical

    ! d li (T % l d

  • 8/16/2019 CFD Lecture 2007

    16/5216

    !odeling (Tur%ulence and ree suracemodels)

    = Turbulent models,= D:S, most accurately sole :S eLuations4 %ut too e"pensie

      or tur%ulent >o#s

    = R@:S, predict mean >o# structures4 eGcient inside K$ %ute"cessie

      diusion in te separated region

     $ES, accurate in separation region and unaorda%le orresoling K$

    = DES, R@:S inside K$4 $ES in separated regions= Free-surface models,= SuraceBtracOing metod, mes moing to capture reesurace4

      limited to small and medium #ae slopes

    = Single0t#o pase leelBset metod, mes "ed and leelBset

      unction used to capture te gas0liLuid interace4 capa%le o 

    =  Tur%ulent >o#s at ig Re usually inole %ot large and small

    scale  ortical structures and ery tin tur%ulent %oundary layer (K$) nearte #all

  • 8/16/2019 CFD Lecture 2007

    17/5217

    E"amples o modeling (Tur%ulence andree surace models)

    $%, -e105, s#/s!race # criteri#n (04) #rt!r:!lent l# ar#!nd .C12 ith an$le # attac; 60

    de$rees

    'A, -e105, c#nt#!r # "#rticity #r t!r:!lentl# ar#!nd .C12 ith an$le # attac; 60 de$rees

    'A,

  • 8/16/2019 CFD Lecture 2007

    18/52

    18

    :umerical metods

    =  Te continuous Initial Koundary alue

  • 8/16/2019 CFD Lecture 2007

    19/52

    19

    Discreti?ation metods

    = Finite dierence metods (straigtor#ard to apply4usually or regular grid) and nite olumes and niteelement metods (usually or irregular meses)

    = Eac type o metods a%oe yields te samesolution i te grid is ne enoug Ho#eer4 somemetods are more suita%le to some cases tanoters

    = Finite dierence metods or spatial deriaties #itdierent order o accuracies can %e deried using

     Taylor e"pansions4 suc as 5nd order up#ind sceme4central dierences scemes4 etc

    = Higer order numerical metods usually predictiger order o accuracy or CFD4 %ut more liOelyunsta%le due to less numerical dissipation

    =  Temporal deriaties can %e integrated eiter %y tee"plicit metod (Euler4 RungeButta4 etc) or implicit metod (eg KeamB7arming metod)

    scre ?a on me o s

  • 8/16/2019 CFD Lecture 2007

    20/52

    20

    scre ?a on me o s(ContQd)

    = E"plicit metods can %e easily applied %ut yieldconditionally sta%le Finite Dierent ELuations (FDEs)4#ic are restricted %y te time step Implicitmetods are unconditionally sta%le4 %ut need eortson eGciency

    = 'sually4 igerBorder temporal discreti?ation is used#en te spatial discreti?ation is also o iger order

    = Sta%ility, @ discreti?ation metod is said to %e sta%lei it does not magniy te errors tat appear in tecourse o numerical solution process

    =

  • 8/16/2019 CFD Lecture 2007

    21/52

    21

     (e"ample)

    0=∂∂

    +∂∂

     y

    v

     x

    u

    2

    2

     y

    u

    e

     p

     x y

    uv x

    uu ∂

    ∂+  

       

    ∂∂

    −=∂∂

    +∂∂

     µ 

    = 5D incompressi%le laminar >o# %oundary layer

    '0'1

    /1

    y

    x

    '>>'>>?1

    (,'/1)

    (,')

    (,'?1)

    (/1,')

    1l 

    l l mm m

    uuu u u

     x x

    −∂ = − ∂ ∆

    1

    l l l mm m

    vuv u u

     y y  +

    ∂ = − ∂ ∆

    1

    l l l mm m

    vu u

     y  − = − ∆

    @A Si$n( )B0l mv

    mvA Si$n( )D0

    2

    1 12 22l l l m m m

    uu u u

     y y

     µ  µ    + −

    ∂ = − + ∂ ∆

    2nd #rder central dierence

    ie, the#retical #rder # acc!racy

     &;est 2

    1st #rder !pind sche'e, ie, the#retical #rder # acc!racy &;est 1

  • 8/16/2019 CFD Lecture 2007

    22/52

    22

     (e"ample)

    1 12 2 2

    1

    2

    1

    l l l l l l l  m m mm m m m

     FDu v v yv u FD u BD u

     x y y y y y BD

     y

     µ µ µ + −

    −   ∆+ − + + + −   ∆ ∆ ∆ ∆ ∆ ∆   ∆

    1( )

    l l l mm m

    uu p e

     x x

    −   ∂= −∆ ∂

    2 3 1

    4( )11 1 2 3 1 4     l l l l l  m m m m m B u B u B u B u p e x−

    − + ∂+ + = − ∂1

    4 1

    12 3 1

    1 2 3

    1 2 3

    1 2 1

    4

    0 0 0 0 0 0

    0 0 0 0 0

    0 0 0 0 0

    0 0 0 0 0 0

    l    l mm l 

    mm

    mm

     p B u

     B B x eu

     B B B

     B B B

     B B   u   p B u

     x e

    ∂   − ÷∂       ••

        × =• • • •   ••     ••       ∂    − ÷∂  

    olve it using

    homas algorithm

    o "e sta"le* Matri+ has to "e

    $iagonally dominant,

    Solers and numerical

  • 8/16/2019 CFD Lecture 2007

    23/52

    23

    Solers and numericalparameters

    =  Solvers include, tridiagonal4 pentadiagonal solers4

  • 8/16/2019 CFD Lecture 2007

    24/52

    24

    umer ca me o s grgeneration)

    = Jrids can eiter %e structured(e"aedral) or unstructured

    (tetraedral) Depends upon type odiscreti?ation sceme and application

    = Sceme Finite dierences, structured Finite olume or nite element,

    structured or unstructured

    = @pplication Tin %oundary layers %est resoled

    #it iglyBstretced structuredgrids

    'nstructured grids useul orcomple" geometries

    'nstructured grids permitautomatic adaptie renement%ased on te pressure gradient4 orregions interested (F$'E:T)

    str!ct!red

    !nstr!ct!red

  • 8/16/2019 CFD Lecture 2007

    25/52

    25

    :umerical metods (gridtransormation)

     y

     x# #

    &hysical d#'ain C#'p!tati#nal d#'ain

     x x

     f f f f f 

     x x x

    ξ η 

    ξ η ξ η ξ η  

    ∂ ∂ ∂ ∂ ∂ ∂ ∂

    = + = +∂ ∂ ∂ ∂ ∂ ∂ ∂

     y y

     f f f f f 

     y y y

    ξ η ξ η 

    ξ η ξ η  

    ∂ ∂ ∂ ∂ ∂ ∂ ∂= + = +

    ∂ ∂ ∂ ∂ ∂ ∂ ∂

    Erans#r'ati#n :eteen physical (x,y,z)and c#'p!tati#nal (ξ,η,ζ) d#'ains,i'p#rtant #r :#dy/itted $rids Ehe partial

    deri"ati"es at these t# d#'ains ha"e the

    relati#nship (2A as an exa'ple)

    η 

    ξ 

    Erans#r'

    Hi ti d t

  • 8/16/2019 CFD Lecture 2007

    26/52

    26

    Hig perormance computing and postBprocessing

    = CFD computations (eg 9D unsteady >o#s) areusually ery e"pensie #ic reLuires parallel ig

    perormance supercomputers (eg IK! .A/) #itte use o multiB%locO tecniLue= @s reLuired %y te multiB%locO tecniLue4 CFD codes

    need to %e deeloped using te !assage

  • 8/16/2019 CFD Lecture 2007

    27/52

    27

     Types o CFD codes= Commercial CFD code, F$'E:T4 StarB

    CD4 CFDRC4 CFX0@E@4 etc= Researc CFD code, CFDSHI

  • 8/16/2019 CFD Lecture 2007

    28/52

    28

    CFD Educational Interace

    -a"./ Pipe 0lo! -a" 1/ Air#oil 0lo! -a"2/ $i##user -a"3/ Ahmed car

    1 Aeiniti#n # FC@A &r#cess2 #!ndary c#nditi#ns3 terati"e err#r 4 Grid err#r 5 Ae"el#pin$ len$th # la'inar

    and t!r:!lent pipe l#s6 eriicati#n !sin$ @A7 alidati#n !sin$ +@A

    1 #!ndary c#nditi#ns2 +ect # #rder # acc!racy

    #n "eriicati#n res!lts3 +ect # $rid $enerati#n

    t#p#l#$y, FC and F>eshes

    4 +ect # an$le #   attac;t!r:!lent '#dels #n

    l# ield5 eriicati#n and alidati#n

    !sin$ +@A

    1 >eshin$ and iterati"ec#n"er$ence

    2 #!ndary layerseparati#n

    3 xial "el#city pr#ile4 Strea'lines5 +ect # t!r:!lence

    '#dels6 +ect # expansi#n  an$le and c#'paris#n  ith +S, +@A, and

      -.S

    1 >eshin$ and iterati"e  c#n"er$ence2 #!ndary layer separati#n3 xial "el#city pr#ile4 Strea'lines5 +ect # slant an$le and  c#'paris#n ith +S,

    +@A, and -.S

  • 8/16/2019 CFD Lecture 2007

    29/52

    29

    CFD process= uid interactions or%u%%ly >o#s4 study o #ae induced massiely separated>o#s or reeBsurace4 etc

    = Depend on te specic purpose and >o# conditions o tepro%lem4 dierent CFD codes can %e cosen or dierentapplications (aerospace4 marines4 com%ustion4 multiB

    pase >o#s4 etc)= 6nce purposes and CFD codes cosen4 CFD process is

    te steps to set up te IK< pro%lem and run te code,

      - Jeometry  5

  • 8/16/2019 CFD Lecture 2007

    30/52

    30

    CFD #del

    #!ndary

    C#nditi#ns

    nitial

    C#nditi#ns

    C#n"er$ent

    i'it

    C#nt#!rs

    &recisi#ns

    (sin$le

    d#!:le)

     .!'erical

    Sche'e

    ect#rs

    Strea'lineseriicati#n

    Geometry

    Select

    Ge#'etry

    Ge#'etry

    &ara'eters

    Physics Mesh olve Post4

    Processing

    C#'pressi:le

    .@@

    @l#

     pr#perties

    Hnstr!ct!red

    (a!t#'atic

    'an!al)

    Steady

    Hnsteady

    @#rces -ep#rt(litdra$, shear

    stress, etc)

    IJ &l#t

    A#'ain

    Shape and

    Size

    =eat Eranser

    .@@

    Str!ct!red

    (a!t#'atic

    'an!al)

    terati#ns

    Steps

    alidati#n

    'eports

  • 8/16/2019 CFD Lecture 2007

    31/52

    31

    Jeometry= Selection o an appropriate coordinate

    = Determine te domain si?e and sape

    = @ny simplications needed8

    = 7at Oinds o sapes needed to %e used to%est resole te geometry8 (lines4 circular4oals4 etc)

    = For commercial code4 geometry is usuallycreated using commercial sot#are (eiterseparated rom te commercial code itsel4 liOe

    Jam%it4 or com%ined togeter4 liOe Flo#$a%)

    = For researc code4 commercial sot#are (egJridgen) is used

  • 8/16/2019 CFD Lecture 2007

    32/52

    32

    uid properties  - Flow conditions, iniscid4 iscous4 laminar4

    or  tur%ulent4 etc  5 Fluid properties, density4 iscosity4 and

    termal conductiity4 etc

    9 Flo# conditions and properties usuallypresented in dimensional orm in industrialcommercial CFD sot#are4 #ereas in nonBdimensional aria%les or researc codes

    = Selection o models, dierent models usually

    "ed %y codes4 options or user to coose= Initial and Koundary Conditions, not "ed%y codes4 user needs speciy tem or dierentapplications

  • 8/16/2019 CFD Lecture 2007

    33/52

    33

    !es= !eses sould %e #ell designed to resole

    important >o# eatures #ic are dependentupon >o# condition parameters (eg4 Re)4 suc aste grid renement inside te #all %oundary layer

    = !es can %e generated %y eiter commercial

    codes (Jridgen4 Jam%it4 etc) or researc code(using alge%raic s

  • 8/16/2019 CFD Lecture 2007

    34/52

    34

    Sole

    = Setup appropriate numerical parameters= Coose appropriate Solers

    = Solution procedure (eg incompressi%le >o#s)

      Sole te momentum4 pressure o# eld Luantities4 sucas elocity4 tur%ulence intensity4 pressureand integral Luantities (lit4 drag orces)

  • 8/16/2019 CFD Lecture 2007

    35/52

    35

    Reports= Reports saed te time istory o te

    residuals o te elocity4 pressure andtemperature4 etc

    = Report te integral Luantities4 suc as totalpressure drop4 riction actor (pipe >o#)4

    lit and drag coeGcients (airoil >o#)4 etc= X plots could present te centerlineelocity0pressure distri%ution4 rictionactor distri%ution (pipe >o#)4 pressurecoeGcient distri%ution (airoil >o#)

    = @FD or EFD data can %e imported and puton top o te X plots or alidation

  • 8/16/2019 CFD Lecture 2007

    36/52

    36

  • 8/16/2019 CFD Lecture 2007

    37/52

    < i ('@ i i )

  • 8/16/2019 CFD Lecture 2007

    38/52

    38

  • 8/16/2019 CFD Lecture 2007

    39/52

    39

    ixed #scillat#ryc#n"er$ent

    terati#n hist#ry #r series 60 (a) S#l!ti#n chan$e (:) 'a$niied "ie # t#tal

    resistance #"er last t# peri#ds # #scillati#n (scillat#ry iterati"e c#n"er$ence)

    (:)(a)

    )(2

    1

     LU  I 

      S S U    −=

  • 8/16/2019 CFD Lecture 2007

    40/52

    40

  • 8/16/2019 CFD Lecture 2007

    41/52

    41

  • 8/16/2019 CFD Lecture 2007

    42/52

    42

  • 8/16/2019 CFD Lecture 2007

    43/52

    43

    = @symptotic Range, For suGciently small ∆"O4te solutions are in te asymptotic rangesuc tat igerBorder terms are negligi%leand te assumption tat and are

    independent o ∆"O is alid= 7en @symptotic Range reaced4 #ill %eclose to te teoretical alue 4 and tecorrection actor

    #ill %e close to -=  To aciee te asymptotic range or practical

    geometry and conditions is usually notpossi%le and mY9 is undesira%le rom a

    resources point o ie#

  • 8/16/2019 CFD Lecture 2007

    44/52

    44

  • 8/16/2019 CFD Lecture 2007

    45/52

    45

  • 8/16/2019 CFD Lecture 2007

    46/52

    46

    E"ample o CFD o#s (Re-;9) around ClarOy airoil

    #it angle o attacO . degree is simulated= C sape domain is applied=  Te radius o te domain Rc and do#nstream

    lengt $o sould %e specied in suc a #ay tatte domain si?e #ill not aect te simulationresults

    E"ample o CFD

  • 8/16/2019 CFD Lecture 2007

    47/52

    47

    E"ample o CFD

  • 8/16/2019 CFD Lecture 2007

    48/52

    E l CFD < (S l )

  • 8/16/2019 CFD Lecture 2007

    49/52

    49

    E"ample o CFD

  • 8/16/2019 CFD Lecture 2007

    50/52

    50

     (Reports)

    processing)

  • 8/16/2019 CFD Lecture 2007

    51/52

    51

    processing)

  • 8/16/2019 CFD Lecture 2007

    52/52