Computational Fluid Dynamics-First

  • Upload
    ahky7

  • View
    232

  • Download
    0

Embed Size (px)

Citation preview

  • 8/13/2019 Computational Fluid Dynamics-First

    1/67

    Computational Fluid Dynamics

    Fluent Modeling CourseFirst: An Introduction to CFD

    Lecturer: Ehsan.A.Saadati

    Sharif Uniersity of !echnology

    "#$ %roup&!ehran: Second Edition Fall '(()

    ehsan.saadati*gmail.com

    ###.petrodanesh.ir

  • 8/13/2019 Computational Fluid Dynamics-First

    2/67

    Contents

    +. Mathematical Modeling

    +. %oerningE,uations'. !he %eneral Scalar !ransport E,uation

    '. -umerical Methods

    . Mesh !erminology and !ypes

    . Discretiation Methods

    .

    Solution of Discretied E,uations. Accuracy/ Consistency/ Sta0ility and Conergence

  • 8/13/2019 Computational Fluid Dynamics-First

    3/67

    Contents

    1. Fluid Flo#+. Discretiation of the Momentum E,uation

    '. Discretiation of the Continuity E,uation

    1. !he SIM2LE Algorithm

    3. !he SIM2LE4 Algorithm

    5. !he SIM2LEC Algorithm

    6. Direct s. Iteratie Methods

    7. Multigrid Methods

    3. Solution 4esiduls

  • 8/13/2019 Computational Fluid Dynamics-First

    4/67

    Mathematical Modeling

    %oerningE,uations

    !he Momentum E,uation 8 Considered in 9&Direction

    !he Energy E,uation

  • 8/13/2019 Computational Fluid Dynamics-First

    5/67

    Mathematical Modeling

    The differential momentum equation for a Newtonian fluid with constant

    density and viscosity

    +

    +

    +

    =

    +

    +

    +

    2

    2

    2

    2

    2

    2

    z

    u

    y

    u

    x

    u

    x

    p

    z

    uw

    y

    uv

    x

    uu

    t

    u

    +

    +

    +

    =

    +

    +

    +

    2

    2

    2

    2

    2

    2

    z

    v

    y

    v

    x

    v

    y

    p

    z

    vw

    y

    vv

    x

    vu

    t

    v

    ( ) ( ) ( )0=

    +

    +

    +

    z

    w

    y

    v

    x

    u

    t

    +

    +

    +

    =

    +

    +

    +

    2

    2

    2

    2

    2

    2

    z

    w

    y

    w

    x

    w

    z

    p

    z

    ww

    y

    wv

    x

    wu

    t

    w

    Convection Piezometric pressure gradient Viscous termsLocal acceleration

    Continuity Equation ( ) ( ) ( )

    0=

    +

    +

    z

    w

    y

    v

    x

    u

  • 8/13/2019 Computational Fluid Dynamics-First

    6/67

    www!petrodanesh!com

    Mathematical Modeling

    %oerningE,uations

    !he Species E,uation

    The equation for the conservation of mass for a chemical specie i may "e written in

    terms of its mass fraction# Yi# where Yi is defined as the mass of species i per mass ofmi$ture! %f &lic'(s law is assumed valid# the governing conservation equation is

    Giis the diffusion coefficient for Yiin the mi$ture and Riis the rate of

    formation of Yithrough chemical reactions!

  • 8/13/2019 Computational Fluid Dynamics-First

    7/67

    www!petrodanesh!com

    Mathematical Classification of

    2artial Differential E,uations

    Elliptic2artial Differential E,uations

    Let us consider steady heat conduction in a *ne+

    ,imensional sla"# as shown in &igure! The governing equation

    and "oundary conditions are given "y

    This simple pro"lem illustrates important properties of elliptic

    P,Es! These are-

    .+The temperature at any pointx in the domain is influencedby the temperatures on both boundaries.

    /+%n the a"sence of source terms# T(x)is "ounded "y the

    temperatures on the "oundaries! %t cannot "e either higher or

    lower than the "oundary temperatures!

  • 8/13/2019 Computational Fluid Dynamics-First

    8/67

    www!petrodanesh!com

    Mathematical Classification of

    2artial Differential E,uations

    ;yper0olic2artial Differential E,uations

    consider the one+dimensional flow of a fluid in a channel# as shown in &igure! The velocity of the

    fluid# 1# is a constant2 also 13! &or t35# the fluid upstream of the channel entrance is held at

    temperature T! The properties 6 and Cp are constant and '5! The governing equations and "oundary

    conditions are given "y-

  • 8/13/2019 Computational Fluid Dynamics-First

    9/67

    www!petrodanesh!com

    Mathematical Classification of

    2artial Differential E,uationsThe solution to this pro"lem is-

    The solution is essentially a step in T, traveling in the positive x direction with a velocity U, as

    shown in igure!

    8e should note the following a"out the solution-

    .! The upstream boundary condition (x"9 affects the solution in the domain! Conditions

    downstream of the domain do not affect the solution in the domain!

    /! The inlet "oundary condition propagates with a finite speed# U.

    :! The inlet "oundary condition is not felt at pointx until t" x#U

  • 8/13/2019 Computational Fluid Dynamics-First

    10/67

    www!petrodanesh!com

    Mathematical Classification of

    2artial Differential E,uations

    !emperature

  • 8/13/2019 Computational Fluid Dynamics-First

    11/67

    www!petrodanesh!com

    Mathematical Classification of

    2artial Differential E,uations

    2ara0olic2artial Differential E,uations

    Consider unsteady conduction in the sla" in &igure! %f k,

    and Cpare constant, $nergy Equation may "e written in terms

    of the temperature Tas!

    %t is clear from this pro"lem that the varia"le tbehaves

    very differently from the variablex. The variation in tadmits

    only one%way influences, whereas the variablexadmits two%

    way influences. tis sometimes referred to as the marching or

    parabolic direction.

  • 8/13/2019 Computational Fluid Dynamics-First

    12/67

    www!petrodanesh!com

    Mathematical Classification of

    2artial Differential E,uations

    Some More Specification a0out 2ara0olicE,uations Are:

    .+ The "oundary temperature T& influences the temperature T(x,t) at every point in

    the domain# =ust as with elliptic P,E>s!

    /+ *nly initial conditions are re'uired (i.e., conditions at t"9! No final conditions are

    required# for e$ample conditions at tinfinite! 8e do not need to 'now the future to solve

    this pro"lem?

    4+ The initial conditions only affect future temperatures, not past temperatures.

    + The initial conditions influence the temperature at every point in the domain for all

    future times! The amount of influence decreases with time, and may affect different

    spatial points to different degrees!)+ @ steady state is reached for t infinite ,Aere# the solution "ecomes

    independent of Ti(x,&).%t also recovers its elliptic spatial "ehavior!

    0+ The temperature is "ounded "y its initial and "oundary conditions in the a"sence

    of source terms!

  • 8/13/2019 Computational Fluid Dynamics-First

    13/67

    www!petrodanesh!com

    Mathematical Classification of

    2artial Differential E,uations

    =ehaior of the Scalar !ransport E,uation:

    The general scalar transport equation we derived earlier Bmentioned "elow9 has much

    in common with the partial differential equations we have seen here!

    The elliptic diffusion equation is recovered if we assume steady state and there is noflow!

    The same pro"lem solved for unsteady state e$hi"its para"olic "ehavior!

    The convection side of the scalar transport equation e$hi"its hyper"olic "ehavior!

    %n most engineering situations# the equation e$hi"its mi$ed "ehavior# with the

    diffusion terms tending to "ring in elliptic influences# and the unsteady and convection

    terms "ringing in para"olic or hyper"olic influences!

  • 8/13/2019 Computational Fluid Dynamics-First

    14/67

    www!petrodanesh!com

    Mesh !erminology and !ypes

    The physical domain is discretized "y meshing or gridding it! The fundamental unit of

    the mesh is the cell Bsometimes called the element9! @ssociated with each cell is the

    cell centroid. cell is surrounded "y faces, which meet at nodes or vertices. n three

    dimensions, the face is a surface surrounded "y edges. %n two dimensions# faces

    and edges are the same!

  • 8/13/2019 Computational Fluid Dynamics-First

    15/67

    www!petrodanesh!com

    Mesh !erminology and !ypes

    -ode&=ased and Cell&=ased Schemes

    Numerical methods which store their primary un'nowns at the node or verte$

    locations are called node%based or vertex%based schemes. Those which store them

    at the cell centroid# or associate them with the cell# are called cell%based schemes.

    inite element methods are typically node+"ased schemes# and many finite volume

    methods are cell+"ased! &or structured and "loc'+structured meshes composed of

    quadrilaterals or he$ahedra# the num"er of cells is appro$imately equal to thenum"er of nodes# and the spatial resolution of "oth storage schemes is similar for

    the same mesh! &or other cell shapes# there may "e quite a "ig difference in the

    num"er of nodes and cells in the mesh! &or triangles# for e$ample# there are twice as

    many cells as nodes# on average! This fact must "e ta'en into account in deciding

    whether a given mesh provides adequate resolution for a given pro"lem! &rom the

    point of view of developing numerical methods# "oth schemes have advantages and

    disadvantages# and the choice will depend!

  • 8/13/2019 Computational Fluid Dynamics-First

    16/67

    www!petrodanesh!com

    Mesh !erminology and !ypes

    4egular and =ody&fitted Meshes

    %n many cases# our interest lies in analyzing domains which are regular in shape-

    rectangles# cu"es# cylinders# spheres! These shapes can "e meshed "y regular

    grids# as shown in &igure! The grid lines are orthogonal to each other# and conform

    to the "oundaries of the domain! These meshes are also sometimes called

    orthogonal meshes!

    a-egular and

  • 8/13/2019 Computational Fluid Dynamics-First

    17/67

    www!petrodanesh!com

    Mesh !erminology and !ypes

    &or many practical pro"lems# however# the domains of interest are irregularly shaped

    and regular meshes may not suffice! @n e$ample is shown ! Aere# grid lines are not

    necessarily orthogonal to each other# and curve to conform to the irregular geometry!

    %f regular grids are used in these geometries# stair stepping occurs at domain

    "oundaries# as shown! 8hen the physics at the "oundary are important indetermining the solution# e!g!# in flows dominated "y wall shear# such an

    appro$imation of the "oundary may not "e accepta"le!

  • 8/13/2019 Computational Fluid Dynamics-First

    18/67

    www!petrodanesh!com

    Mesh !erminology and !ypes

    Structured/ =loc> Structured/ and Unstructured Meshes

    The meshes shown in &igure aare e$amples of structured meshes. *ere, every

    interior verte$ in the domain is connected to the same num"er of neigh"or vertices!

    &igure 0shows a "loc'+structured mesh! Aere# the mesh is divided into "loc's# and

    the mesh within each "loc' is structured! Aowever# the arrangement of the "loc's

    themselves is not necessarily structured!

    &igure a

    &igure "

  • 8/13/2019 Computational Fluid Dynamics-First

    19/67

    www!petrodanesh!com

    Mesh !erminology and !ypes

    Structured %rid Created 0y an Elliptic %enerator for a -ACA Airfoil

  • 8/13/2019 Computational Fluid Dynamics-First

    20/67

    www!petrodanesh!com

    Mesh !erminology and !ypes

    Structured/ =loc> Structured/ and Unstructured Meshes

    &igure c shows an unstructured mesh! Aere# each verte$ is connected to an ar"itrary

    num"er of neigh"or vertices! 1nstructured meshes impose fewer topological

    restrictions on the user# and as a result# ma'e it easier to mesh very comple$

    geometries!

    &igure c

  • 8/13/2019 Computational Fluid Dynamics-First

    21/67

    www!petrodanesh!com

    Mesh !erminology and !ypes

  • 8/13/2019 Computational Fluid Dynamics-First

    22/67

    www!petrodanesh!com

    Mesh !erminology and !ypes

    Conformal and -on&Conformal Meshes

    @n e$ample of a non+conformal mesh is shown in &igure d! Aere# the vertices of a

    cell or element may fall on the faces of neigh"oring cells or elements! %n contrast# the

    meshes in &igures a# 0and care conformal meshes!

    &igure d

  • 8/13/2019 Computational Fluid Dynamics-First

    23/67

    www!petrodanesh!com

    Mesh !erminology and !ypes

    Cell

  • 8/13/2019 Computational Fluid Dynamics-First

    24/67

    www!petrodanesh!com

    Mesh !erminology and !ypes

    Cell Shapes Deshes may "e constructed using a variety of cell shapes! The most widely used are

    quadrilaterals and he$ahedra! Dethods for generating good+quality structured

    meshes for quadrilaterals and he$ahedra have e$isted for some time now! Though

    mesh structure imposes restrictions# structured quadrilaterals and he$ahedra are

    well+suited for flows with a dominant direction# such as "oundary+layer flows! Dore

    recently# as computational fluid dynamics is "ecoming more widely used foranalyzing industrial flows# unstructured meshes are "ecoming necessary to handle

    comple$ geometries! Aere# triangles and tetrahedral are increasingly "eing used#

    and mesh generation techniques for their generation are rapidly reaching maturity!

    @nother recent trend is the use of hy"rid meshes! &or e$ample# prisms are used in

    "oundary layers# transitioning to tetrahedral in the free+stream!

  • 8/13/2019 Computational Fluid Dynamics-First

    25/67

    www!petrodanesh!com

    @re

  • 8/13/2019 Computational Fluid Dynamics-First

    26/67

  • 8/13/2019 Computational Fluid Dynamics-First

    27/67

    www!petrodanesh!com

    @re

  • 8/13/2019 Computational Fluid Dynamics-First

    28/67

    www!petrodanesh!com

    Discretiation Methods

    Finite Difference Methods The finite difference method is "ased on the Taylor series e$pansion

    a"out a point#x

    ( )xxuu

    x

    x

    ux

    x

    uuu

    i

    ii

    ii

    +

    +

    +

    +=

    +

    +

    asdefinediswhere

    H.O.T.2

    1

    2

    2

    2

    1

    ( )xxuu

    x

    x

    ux

    x

    uuu

    i

    ii

    ii

    +

    +

    =

    asdefinediswhere

    H.O.T.2

    1

    2

    2

    2

    1

  • 8/13/2019 Computational Fluid Dynamics-First

    29/67

    www!petrodanesh!com

    Discretiation Methods

    Finite Difference Methods

    &inite difference methods appro$imate the derivatives in the governing differential

    equation using truncated Taylor series e$pansions!

    y including the diffusion coefficient and dropping terms of *BDI/9

    &inite difference methods do not e$plicitly e$ploit the conservation principle in deriving

    discrete equations! Though they yield discrete equations that loo' similar to other

    methods for simple cases# they are not guaranteed to do so in more complicated cases#

    for e$ample on unstructured meshes!

  • 8/13/2019 Computational Fluid Dynamics-First

    30/67

    www!petrodanesh!com

    Discretiation Methods

    Finite Element Methods

    8e consider again the one+dimensional diffusion equation! There are different 'inds of finite

    element methods! Let us loo' at a popular variant# the Faler'infinite element method! Let F "e

    an appro$imation to F!

  • 8/13/2019 Computational Fluid Dynamics-First

    31/67

    www!petrodanesh!com

    Discretiation Methods

    Thus# we require

    The weight functions +i are typically local in that they are non%ero over element i, "ut are

    zero everywhere else in the domain! &urther# we assume a shape function for F# i!e!#

    assume how Fvaries "etween nodes! Typically this variation is also local! &or e$ample we

    may assume that Fassumes a piece+wise linear profile "etween points . and / and

    "etween points / and : in &igure /!.! The Faler'in finite element method requires that

    the weight and shape functions "e the same! Performing the integration in Equation /!..

    results in a set of alge"raic equations in the nodal values of F which may "e solved "y a

    variety of methods! 8e should note here that "ecause the Faler'in finite element methodonly requires the residual to "e zero in some weighted sense# it does not enforce the

    conservation principle in its original form! 8e now turn to a method which employs

    conservation as a tool for developing discrete equations!

  • 8/13/2019 Computational Fluid Dynamics-First

    32/67

    www!petrodanesh!com

    Discretiation Methods

    Finite

  • 8/13/2019 Computational Fluid Dynamics-First

    33/67

    www!petrodanesh!com

    Discretiation Methods Finite

  • 8/13/2019 Computational Fluid Dynamics-First

    34/67

    www!petrodanesh!com

    Discretiation Methods Finite

  • 8/13/2019 Computational Fluid Dynamics-First

    35/67

    www!petrodanesh!com

    Discretiation Methods Finite

  • 8/13/2019 Computational Fluid Dynamics-First

    36/67

    www!petrodanesh!com

    Solution of Discretiation E,uations

  • 8/13/2019 Computational Fluid Dynamics-First

    37/67

    www!petrodanesh!com

    Solution of Discretiation E,uations?hat are pro0lems of direct solution method@

    @ solution for fis guaranteed if A&+ can "e found! Aowever# the operation count for the inversion of an N$N matri$ is of *BN/9! Consequently# inversion is almost never employed in practical pro"lems!

    Dore efficient methods for linear systems are availa"le! &or the discretization methods of interest here# A is sparse# and for structured meshes it is "anded!

    ,irect methods are not widely used in computational fluid dynamics "ecause of large computational and storage requirements! Dost industrial C&, pro"lems today involve hundreds of thousands of cells# with +. un'nowns per cell even for simple pro"lems! Thus

    the matri$ A is usually very large# and most direct methods "ecome impractical for these large pro"lems! &urthermore# the matri$ A is usually nonlinear# so that the direct method must "e em"edded within an iterative loop to update nonlinearities in A. Thus# the direct

    method is applied over and over again# ma'ing it all the more time+consuming!

  • 8/13/2019 Computational Fluid Dynamics-First

    38/67

    www!petrodanesh!com

    Solution of Discretiation E,uations

    Iteratie Methods %terative methods are the most widely used solution methods in computational fluid dynamics! These methods employ a guess+and+correctphilosophy which progressively improves the guessed solution "y repeated application

    of the discrete equations!

    Let us consider an e$tremely simple iterative method# the Fauss+

  • 8/13/2019 Computational Fluid Dynamics-First

    39/67

    www!petrodanesh!com

    Solution of Discretiation E,uations The neigh"or values# f$and f+ are re'uired for the update of f2. These are assumed 'nown at prevailing values! Thus# points which have already "een visited will have recently updated values of f and those that have not will have old values!

    :!

  • 8/13/2019 Computational Fluid Dynamics-First

    40/67

    www!petrodanesh!com

    Accuracy @ccuracy refers to the correctness of a numerical solution when compared to an e$act solution! %t is more useful to tal' of the truncation error of a discretiation method. The truncation error associated with the diffusion term using the finite difference method is 6((DI9 /9 as shown "y Equation! This simply says that if

    diffusion term is represented by the right hand side# the terms that are neglected are of 6((DI9 /9!

    Thus# if we refine the mesh# we e$pect the truncation error to decrease as ((DI9 /9! %f we dou"le the $+direction mesh# we e$pect the truncation error to decrease "y a factor of four! The truncation error of a discretization scheme is the largest truncation error of each of the individual terms in the equation "eingdiscretized! The order of a discretiation method is n if its truncation error is 6((DI9 n9!

    Dethods of very high order may yield inaccurate results on a given mesh! Aowever# we are guaranteed that the error will decrease more rapidly with mesh refinement than with a discretization method of lower order!

  • 8/13/2019 Computational Fluid Dynamics-First

    41/67

    www!petrodanesh!com

    Conergence

    8e distinguish "etween two popular usages of the term convergence! 8e may say that an iterative method has converged to a solution# or that we have o"tained convergence using a particular method! y this we mean that our iterative method has successfullyo"tained a solution to our discrete alge"raic equation set ! 8e may also spea' of convergence to mesh independence! y this# we mean the process of mesh refinement# and its use in o"taining solutions that are essentially invariant with further refinement!

  • 8/13/2019 Computational Fluid Dynamics-First

    42/67

    www!petrodanesh!com

    Discretiation of the Momentum E,uation

    Consider the two+dimensional rectangular domain shown in "elow &igure! Let us

    assume for the moment that the velocity vector < and the pressure p are stored at

    the cell centroids! Let us also assume steady state! The momentum equations in the

    x and y directions may be written as!

  • 8/13/2019 Computational Fluid Dynamics-First

    43/67

    www!petrodanesh!com

    Discretiation of the Momentum E,uation

    8e see that Equations )!. and )!/ have the same form as the general scalar transport equation#

    and as such we 'now how to discretize most of the terms in the equation! Each momentumequation contains a pressure gradient term# which we have written separately# as well as a

    source term B4u or 4v) which contains the body force term# as well as remnants of the stress

    tensor term! Let us consider the pressure gradient term! %n deriving discrete equations# we

    integrate the governing equations over the cell volume! This results in the integration of the

    pressure gradient over the control volume! @pplying the gradient theorem# we get

    @ssuming that the pressure at the face centroid represents the mean value on the face# we write

  • 8/13/2019 Computational Fluid Dynamics-First

    44/67

    www!petrodanesh!com

    Discretiation of the Momentum E,uation

    Completing the discretization# the discrete u+ and v+momentum equations may "e

    written as

    Fiven a pressure field# we thus 'now how to discretize the momentum equations!

    Aowever# the pressure field must "e computed# and the e$tra equation we need for its

    computation is the continuity equation! Let us e$amine its discretization ne$t!

  • 8/13/2019 Computational Fluid Dynamics-First

    45/67

    www!petrodanesh!com

    Discretiation of the Continuity E,uation

    &or steady flow# the continuity equation# which ta'es the form-

    %ntegrating over the cell 2 and applying the divergence theorem, we get

    @ssuming that the 6

  • 8/13/2019 Computational Fluid Dynamics-First

    46/67

    www!petrodanesh!com

    Determining Density and 2ressure

    &or practical C&, pro"lems# sequential iterative solution procedures are frequently adopted

    "ecause of low storage requirements and reasona"le convergence rate! Aowever there is a difficultyassociated with the sequential solution of the continuity and momentum equations for incompressi"le

    flows! %n order to solve a set of discrete equations iteratively# it is necessary to associate the discrete

    set with a particular varia"le! &or e$ample# we use the discrete energy equation to solve for the

    temperature!

  • 8/13/2019 Computational Fluid Dynamics-First

    47/67

    www!petrodanesh!com

    Determining Density and 2ressure

    Density =ased for Compressi0le Flo#s

    2ressure =ased for Incompressi0le flo#s

    There are a num"er of methods in the literatures which use the density as a primary

    varia"le rather than pressure! This practice is especially popular in the compressi"le flow

    community! &or compressi"le flows# pressure and density are related through an equation of

    state! %t is possi"le to find the density using the continuity equation# and to deduce the pressure

    from it for use in the momentum equations!

  • 8/13/2019 Computational Fluid Dynamics-First

    48/67

    www!petrodanesh!com

    Determining Density and 2ressure

    Direct Solution is "ut of 4ich

    Se,uential Iteratie Method ?ill =e Used

    %t is important to realize that the necessity for pressure+ and density+"ased

    schemes is directly tied to our decision to solve our governing equations sequentially

    and iteratively! %t is this choice that forces us to associate each governing differential

    equation with a solution varia"le! %f we were to use a direct method# and solve for thediscrete velocities and pressure using a domain+wide matri$ of size :1x:1, (three

    variables % u#v#p + over N cells9# no such association is necessary! Aowever# even with

    the power of today>s computers# direct solutions of this type are still out of reach for most

    pro"lems of practical interest! *ther methods# including local direct solutions at each

    cell# coupled to an iterative sweep# have "een proposed "ut are not pursued here!

  • 8/13/2019 Computational Fluid Dynamics-First

    49/67

    www!petrodanesh!com

    !he SIM2LE Algorithm

    The SIMPLEBSemi+Implicit Method for 2ressure Lin'ed Equations9 algorithm and

    its variants are a set of pressure+"ased methods widely used in the incompressi"le flow

    community! The primary idea "ehind

  • 8/13/2019 Computational Fluid Dynamics-First

    50/67

    www!petrodanesh!com

    !he SIM2LE Algorithm

    %f we su"tract equation of momentum which using initial pressures from the momentum

    equation uses real pressure valuesBsatisfies continuity equation9 we can drive an

    equation for relation "etween pressure correction and velocities correction values!

  • 8/13/2019 Computational Fluid Dynamics-First

    51/67

    www!petrodanesh!com

    !he SIM2LE Algorithm

    8e now ma'e an important simplification! 8e appro$imate resultant Equations as

  • 8/13/2019 Computational Fluid Dynamics-First

    52/67

    www!petrodanesh!com

    !he SIM2LE Algorithm

  • 8/13/2019 Computational Fluid Dynamics-First

    53/67

    www!petrodanesh!com

    !he SIM2LE Algorithm

    earranging the last equation we ta'e "elow one for pressure correction which can

    "e solved iteratively

  • 8/13/2019 Computational Fluid Dynamics-First

    54/67

    www!petrodanesh!com

    !he SIM2LE4 Algorithm

    The SIMPLERalgorithm has "een shown to perform "etter than SIMPLE! This is primarily "ecause the

  • 8/13/2019 Computational Fluid Dynamics-First

    55/67

    www!petrodanesh!com

    !he SIM2LEC Algorithm

    The

  • 8/13/2019 Computational Fluid Dynamics-First

    56/67

    www!petrodanesh!com

    Direct s. Iteratie Methods

    Linear solution methods can "roadly "e classified into two categories# direct or iterative! ,irectmethods# such as Fauss elimination# L1 decomposition etc!# typically do not ta'e advantage of matri$

    sparsity and involve a fi$ed num"er of operations to o"tain the final solution which is determined to

    machine accuracy! They also do not ta'e advantage of any initial guess of the solution! Fiven the

    characteristics of the linear systems outlined a"ove# it is easy to see why they are rarely used in C&,

    applications! %terative methods on the other hand# can easily "e formulated to ta'e advantage of the

    matri$ sparsity!

  • 8/13/2019 Computational Fluid Dynamics-First

    57/67

    www!petrodanesh!com

    Multigrid

    8e saw "efore that the reason for slow convergence of Gauss-Seidelmethod is

    that it is only effective at removing high frequency errors! 8e also o"served that low

    frequency modes appear more oscillatory on coarser grids and then the Fauss+

  • 8/13/2019 Computational Fluid Dynamics-First

    58/67

    www!petrodanesh!com

    Multigrid

    8e 'now that in general the accuracy of the solution depends on the discretization2therefore we would require that our final solution "e determined only "y the finest

    gridthat we are employing! This means that the coarse grids can only provide us

    with corrections or guesses to the fine grid solution and as the fine grid residuals

    approach zero

    *ne strategy for involving coarse levels might "e to solve the original differential

    equation on a coarse grid! *nce we have a converged solution on this coarse grid#

    we could interpolate it to a finer grid! *f course# the interpolated solution will not in

    general satisfy the discrete equations at the fine level "ut it would pro"a"ly "e a

    "etter appro$imation than an ar"itrary initial guess! 8e can repeat the process

    recursively on even finer grids till we reach the desired grid!

  • 8/13/2019 Computational Fluid Dynamics-First

    59/67

    www!petrodanesh!com

    Multigrid

    Coarse %rid Correction

    @ more useful strategy# 'nown as coarse grid correction is based on the error e'uationecall that the error esatisfiesthesamesetof equations as our solutionif we replace the source vector "y the residual-

    we can already see that the strategy outlined a"ove has the desired properties! &irst of all# note that if the fine

    grid solution is e$act# the residual will "e zero and thus the solution of the coarse level equation will also "e zero!

    Thus we are guaranteed that the final solution is only determined "y the finest level discretization! %n addition#

    since we start with a zero initial guess for the coarse level error# we will achieve convergence right away and not

    waste any time on further coarse level iterations! @nother useful characteristic of this approach is that we use

    coarse level to only estimate fine level errors! Thus any appro$imations we ma'e in the coarse level pro"lem only

    effect the convergence rate and not the final finest grid solution!

  • 8/13/2019 Computational Fluid Dynamics-First

    60/67

    www!petrodanesh!com

    Multigrid

  • 8/13/2019 Computational Fluid Dynamics-First

    61/67

    www!petrodanesh!com

    Solution 4esiduals

  • 8/13/2019 Computational Fluid Dynamics-First

    62/67

    www!petrodanesh!com

    Solution 4esiduals

  • 8/13/2019 Computational Fluid Dynamics-First

    63/67

    www!petrodanesh!com

    Solution 4esiduals

    @t the end of each solver iteration# the residual sum for each of the conserved varia"les is computed and stored! *n a

    computer with infinite precision# these residuals will go to zero as the solution converges! *n an actual computer# theresiduals decay to some small value Bround+off9 and then stop changing Blevel out9! &or single+precision computations

    Bthe default for wor'stations and most computers9# residuals can drop as many as si$ orders of magnitude "efore hitting

    round+off! ,ou"le+precision residuals can drop up to twelve orders of magnitude!

    Definition of 4esiduals for the 2ressure&=ased Soler

    @fter discretization# the conservation equation for a general varia"le at a cell P can "e written as

    Aere aP is the center coefficient# an" are the influence coefficients for the neigh"oring cells# and " is the contri"ution of

    the constant part of the source term

  • 8/13/2019 Computational Fluid Dynamics-First

    64/67

    www!petrodanesh!com

    Solution 4esiduals

    This is referred to as the Mun+scaled residual! %t may "e written as

    This Mscaled residual is defined as

    The scaled residual is a more appropriate indicator of convergence for most pro"lems

  • 8/13/2019 Computational Fluid Dynamics-First

    65/67

    www!petrodanesh!com

    Solution 4esiduals

    The pressure+"ased solver(s scaled residual for the continuity equation is defined as

    The denominator is the largest a"solute value of the continuity residual in the first five iterations!

    %t is sometimes useful to determine how much a residual has decreased during calculations as an

    additional measure of convergence! &or this purpose# &L1ENT allows you to normalize the residual

    Beither scaled or un+scaled9 "y dividing "y the ma$imum residual value after D iterations# where D is set

    "y you in the esidual Donitors panel in the Iterationsfield under -ormaliation!

  • 8/13/2019 Computational Fluid Dynamics-First

    66/67

    www!petrodanesh!com

    4eferences

    Purdue 1niversity+ C&, oo'let

    &luent )!: ,ocumentation

  • 8/13/2019 Computational Fluid Dynamics-First

    67/67

    !he End

    y- Ehsan