The Finite Volume Method Finite Volume...¢  Chapter 4 M. Darwish (darwish@aub.edu.lb)...

download The Finite Volume Method Finite Volume...¢  Chapter 4 M. Darwish (darwish@aub.edu.lb) American University

of 13

  • date post

    19-Apr-2020
  • Category

    Documents

  • view

    13
  • download

    0

Embed Size (px)

Transcript of The Finite Volume Method Finite Volume...¢  Chapter 4 M. Darwish (darwish@aub.edu.lb)...

  • Chapter 4 M. Darwish (darwish@aub.edu.lb)

    American University of Beirut MECH 663

    The Finite Volume Method

  • The General Scalar Equation

    ∂ ρφ( ) ∂t

    transient term   

    + ∇. ρuφ( ) convective term     

    = ∇ ⋅ Γ∇φ( ) diffusion term     

    + Qφ φ( ) source term   

    Time derivative

    Source term

    Control Volume CV

    Advection

    Diffusion

    The scalar equation is a balance equation written in differential form

  • Balance Form

    ∂ ρφ( ) ∂t

    dV V ∫ + ρuφ( ) ⋅ dS

    ∂V ∫ = Γ∇φ( ) ⋅ dS

    ∂V ∫ + Q φ( )dV

    V ∫

    Time derivative

    Source term

    Control Volume CV

    Advection

    Diffusion

    ∂V

    V

    ∂ ρφ( ) ∂t

    dV VP

    ∫ + J ⋅ dS f ∫

    ⎝ ⎜ ⎜

    ⎠ ⎟ ⎟

    f = nb VP( ) ∑ = Qφ φ( )dVP

    VP

    To recover the balance form we integrate over some CV

    ∂ ρφ( ) ∂t

    dV V ∫ + ρuφ( ) ⋅ dS

    f ∫

    ⎝ ⎜ ⎜

    ⎠ ⎟ ⎟

    f = nb V( ) ∑ − Γ∇φ( ) ⋅ dS

    f ∫

    ⎝ ⎜ ⎜

    ⎠ ⎟ ⎟

    f = nb V( ) ∑ = Q φ( )dV

    V ∫

    J = JC + JD

    = ρuφ( ) − Γ∇φ( )P Sf1f1

    Sf2

    f2

    f3 f4

    Sf4

    Sf3

    discrete CV

  • Flux Integration

    ρuφ( ) ⋅ dS f ∫

    ⎝ ⎜ ⎜

    ⎠ ⎟ ⎟

    f = nb VP( ) ∑ − Γ∇φ( ) ⋅ dS

    f ∫

    ⎝ ⎜ ⎜

    ⎠ ⎟ ⎟

    f = nb VP( ) ∑

    P

    N f

    P

    N f

    P

    N f

    1 point gauss integration

    2 point gauss integration

    3 point gauss integration

    J ⋅ dS f ∫ = J ⋅S( )ip

    ip( f ) ∑

    = Jip ⋅ wipS f ip( f ) ∑

    ρuφ( ) f ⋅S f

    ρuφ( )1 f( ) ⋅ w1 f( )S f + ρuφ( )2 f( ) ⋅ w2 f( )S f

  • Volume Integration

    P

    1 point gauss integration

    4 point gauss integration

    9 point gauss integration

    P P

    Q φ( )dVP VP

    ∂ ρφ( ) ∂t

    dV VP

    = QipVip( ) ip(P ) ∑

    QPVP

    Q1 P( )V1 P( ) + Q2 P( )V2 P( ) + Q3 P( )V3 P( ) + Q4 P( )V4 P( )

  • Semi-Discretized Equation

    wip ρuφ( )ip ⋅S f( ) ip~ ip( f ) ∑

    f = nb VP( ) ∑ − wip Γ∇φ( )ip ⋅S f( )

    ip~ ip( f ) ∑

    f ~ faces VP( ) ∑ = wipQipΩP

    ip~ ip VP( ) ∑

    P N1

    N4

    N3

    N2

    J1

    J2

    J3

    J4

  • ρuφ −Γ∇φ( )b ⋅Sb

    BC: Flux Specified

    b nt

    P

    Sb

    e

    dPb

    qb,specified

    −Γ∇φ( )b ⋅nb Specified Flux       

    = qb,specified

    ub = 0

    = −Γ∇φ( )b ⋅nbSb

    = qb,specified Sb

    Wall

  • BC: Value Specified

    b

    n

    t P

    Sb

    Φb,specified

    Inlet

    φb = φb,specified

    ρu( )b known

    Jb ⋅Sb = ρuφ( )b ⋅Sb

    No Diffusion

    = ρbub ⋅Sb( )φb,specified

    = Fbφb,specified

  • Spatial Variation

    φ(x) = φP + x − xP( ) ⋅ ∇φ( )P + 12 x − xP( ) 2 : ∇∇φ( )P

    + 13! x − xP( ) 3 :: ∇∇∇φ( )P + …

    + 1n! x − xP( ) n::: n (∇∇∇

    n    φ)P + …

    φ(x) = φP + x − xP( ) ⋅ ∇φ( )P + O Δx 2( ) ΦP

    Φ(x)

    ∇ΦP xP

    x

    ∇∇ΦP

  • Mean Value Theorem

    φ P = 1 ΩP

    φ( )dΩ ΩP

    = 1 ΩP

    φP + x − xP( ) ⋅ ∇φ( )P + O Δx 2( )[ ]dΩ

    ΩP

    = φP 1 ΩP

    dΩ ΩP

    ∫ + 1ΩP x − xP( )dΩ

    ΩP

    ∫ ⋅ ∇φ( )P + 1 ΩP

    O Δx 2( )dΩ ΩP

    = φP + O Δx 2( )

    ΦP

  • Problem 3.4 Consider one-dimensional diffusion in the calculation domain shown in the figure below with ∆x =1 for all control volumes. Assume that the source term Q=50x, and that Γ is constant with a value Γ=1. Let the boundary values of f be Φ0=100 and Φ4=500 a Write the discrete equations for each of the cells 1, 2 and 3. Solve the discrete equation set using Gauss-Seidel iteration and report the resulting cell- centroid values Compute the diffusion flux at each of the cell faces f0, f12, f23 and f4 using the same discretization approximations made in obtaining the discrete equations Show that the conservation principle is satisfied on each discrete cell and on the whole domain Find the exact solution to this problem. Find the percentage error in the computed solution at each cell centroid

    21 3

    (δx) (δx)

    (∆x)

    (δx)/2 (δx)/2

    (∆x)(∆x)

    Φ0=100 0 4

    Φ4=500

  • Problem 3.5 Consider the computational domain in the figure below. Using the conservation of mass principle compute the mass flux at faces f12, f23 and f4.

    Write the steady state transport equation for a scalar, Φ, being advected through the domain with no diffusion and no source term a. Write the discrete equations for cells 1, 2 and 3 (Use the upwind profile), b. If we assume that (dΦ/dx)4 = 0 compute the value of Φ4. c. If (∆x=1) and (∆y=0.5) compute the values of Φ1, Φ2, Φ3 and Φ4.

    21 3

    (δx) (δx)

    (∆x)

    (δx)/2 (δx)/2

    (∆x)

    (∆x)

    0 4 (∆y)

    (3∆y)

  • Problem 3.6 Consider the computational domain shown below. Write the diffusion equation for this domain for Γ=1 and Q=0 Write discrete equations for cells 1,2 and 3 Can you find a unique solution for Φ1, Φ2 and Φ3. Explain ?

    21 3

    (δx) (δx)

    (∆x)

    (δx)/2 (δx)/2

    (∆x)(∆x)

    0 4