komputasi sistem fisis 4

5

Click here to load reader

Upload: nadya-amalia

Post on 08-Jul-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/19/2019 Komputasi Sistem Fisis 4

    1/5

    1

    Homework 4

    Name : Nadya Amalia

    Student ID : 20213042

    Subject : Computational Physical Systems (FI5005)

    Lecturer : Dr.rer.nat. Linus Ampang Pasasa

    HEAT-CONDUCTION PROBLEMS

    A thin rod insulated at all points except al its ends. Heat-conduction equation:

    ߙ

    ଶݑ

    (,ݔ (ݐ

    ߲ݔ

    2  −

     ߲ݑ

    (,ݔ (ݐ

    ߲ݐ

    = 0

    length of the thin rod,   = 10 cm

    final time, = 12 s

    space step, ∆ݔ =  ℎ = 2 cm

    time step, ݐ∆ =  = 0.1 s

    boundary conditions: ,(0ݑ  ° ) = 100ݐ and , )ݑ 0) = 50 ° 

    initial condition: ݑ(ݔ, ݅݊ݏ = (0 (ݔߨ)

    thermal conductivity, ߙ = 0.835 cm2/s

    using implicit finite-difference method and crank-nicolson method.

    SOLUTION

    Implicit Finite-Difference Method 

    Heat-conduction equation:

    ߙ

    ଶ߲ݔ

    2 =

    ߲ݐ

    The heat-conduction equation requires approximation for the second derivative in space and

    the first derivative in time. In implicit finite-difference method, the spatial derivative is

    approximated at an advanced time level  + 1 by a centered finite-difference approximation

    2

    ߲ݔ

    2 ≅  +1

    +1− 2

    +1+ 

    −1+1

    )2ݔ∆)

    Similarly, a forward finite-difference approximation is used to approximate the tie derivative

    ߲ݐ

    ≅ 

    +1−

    (ݐ∆)

    Thus,

    ߙ

    ାଵାଵ  − 2 ାଵ  + ିଵାଵ)2ݔ∆)

      = ାଵ  − (ݐ∆)

    which can be expressed as

  • 8/19/2019 Komputasi Sistem Fisis 4

    2/5

    2

    ܶߣ− ିଵାଵ  + (1 + (ߣ2 ାଵ  − ܶߣ ାଵାଵ  =  where

    ߣ ݐ∆ߙ = ଶൗݔ∆For the thin rod at  =  ) = ):−ߣܶ ିଵଶ   (ߣ2 + 1) + ଶ  − ܶߣ ାଵଶ   =  ଵBoundary conditions: =  and + = Initial condition: 

    () = Difference equation for the first interior node ( = 2), =  :ܶߣ− ଶିଵଶ   (ߣ2 + 1) + ଶଶ  − ܶߣ ଶାଵଶ   =  ଶଵ(1 + 2

    ߣ

    ) ଶଶ  − ܶߣ ଷଶ ݅݊ݏ =  (ߨ2) ߣ100 +For the first interior node ( = 3), =

     :

    ܶߣ− ଷିଵଶ   (ߣ2 + 1) + ଷଶ  − ܶߣ ଷାଵଶ   =  ଷଵܶߣ− 2

    ଶ + (1 + 2ߣ) ଷଶ  − ܶߣ ସଶ ݅݊ݏ =  (ߨ4)For the first interior node ( = 4), =  :ܶߣ− ସିଵଶ   (ߣ2 + 1) + ସଶ  − ܶߣ ସାଵଶ   =  ସଵܶߣ− ଷଶ + (1 + 2ߣ) ସଶ  − ܶߣ ହଶ ݅݊ݏ =  (ߨ6)Similarly, for last interior node ( = 5) , = ૡ cm:ܶߣ−

    ହିଵଶ   + (1 + 2

    ߣ

    )

    ହଶ − ܶߣ

    ହାଵଶ   =

     

    ହଵ

    ܶߣ− ସଶ + (1 + 2ߣ) ହଶ ݅݊ݏ =  We obtain the following systemߣ) + 50ߨ8) of the equations:

    (ߣ2 + 1)   ߣ − 0 0

    ߣ− (ߣ2 + 1)   ߣ − 0

    0   ߣ − (ߣ2 + 1)   ߣ −

    0 0   ߣ − (ߣ2 + 1)   ⎦ ⎣

    22

    32

    42

    52⎦

    = ൦ݏ݅݊ ݅݊ݏߣ) + 100ߨ2) (ߨ4)݅݊ݏ

    (ߨ6)

    ݅݊ݏ

    (ߨ8) ߣ50 +

    ൪For the thin rod at  = . ) = ):

    ܶߣ−

    ିଵଷ   (ߣ2 + 1) +

    ଷ − ܶߣ

    ାଵଷ   = 

    Boundary conditions:  =  and + = Initial condition: 

    () = Difference equation for the first interior node ( = 2), =  :ܶߣ− ଶିଵଷ   (ߣ2 + 1) + ଶଷ  − ܶߣ ଶାଵଷ   =  ଶଶ(ߣ2 + 1) ଶଷ  − ܶߣ ଷଷ  =  ଶଶ + ߣ(100)For the first interior node ( = 3), =  :ܶߣ− ଷିଵଷ   (ߣ2 + 1) + ଷଷ  − ܶߣ ଷାଵଷ   =  ଷଶ−

    ܶߣ

    2ଷ + (

    ߣ2 + 1)

    ଷଷ −

    ܶߣ ସଷ  =  ଷଶFor the first interior node ( = 4), =  :

  • 8/19/2019 Komputasi Sistem Fisis 4

    3/5

    3

    ܶߣ− ସିଵଷ   (ߣ2 + 1) + ସଷ  − ܶߣ ସାଵଷ   =  ସଶܶߣ− ଷଷ + (1 + 2ߣ) ସଷ  − ܶߣ ହଷ  =  ସଶSimilarly, for last interior node ( = 5) , = ૡ cm:ܶߣ−

    ହିଵଷ  + (1 + 2

    ߣ

    )

    ହଷ − ܶߣ

    ହାଵଷ  =

     

    ହଶ−ߣܶ ସଷ + (1 + 2ߣ) ହଷ  =  ହଶ + 50ߣWe obtain the following system of the equations:

    (1 + 2ߣ

    )   ߣ − 0 0

    ߣ− (ߣ2 + 1)   ߣ − 0

    0   ߣ − (ߣ2 + 1)   ߣ −

    0 0   ߣ − (ߣ2 + 1)   ⎦ ⎣

    23

    33

    43

    53⎦

    =

    22 ߣ100 +

    32

    42

    52 + 50

    ߣ ⎦

    Simultaneous equations can be solved for the temperatures at  ݐ for = 3, 4, 5, … ,Crank-Nicolson Method 

    The Crank-Nicolson methos provides an alternative implicit scheme in second-order accurate

    in both space and time. To provide this accuracy, difference aproximation are developed at the

    midpoint of the time increment. To do this, th etemporal first derivative can be approximated

    at ݐ+1 2/

    by

    ߲ݐ

    ≅ 

    +1− 2

    (ݐ∆)

    The second derivatice in space can be determined at the mid point by averaging the difference

    aproximation at the beginning (ݐ ) and at the end (ݐ +1) of the time increment ଶ߲ݔ

    ଶ ≅  12 ቈ +1 − 2 +  )2ݔ∆)1−   + +1+1 − 2 +1 +  )2ݔ∆)1+1−   which can be expressed as

    ܶߣ− ିଵାଵ (ߣ + 1)2 +  ାଵ  − ܶߣ ାଵାଵ  = ܶߣ−  ିଵ   + (ߣ + 1)2  − ܶߣ ାଵwhere

    ߣ ݐ∆ߙ = ݔ∆

    ଶൗNumber of space steps, =  ℎൗ   = 5,   = 1, 2, … ,Number of time steps, =  ൗ   = 120,   = 1, 2, … ,

    ߣ

    =ݐ∆ߙଶݔ∆

    For the thin rod at  =  ) = ):ܶߣ− ିଵଶ   (ߣ + 1)2 + ଶ  − ܶߣ ାଵଶ   = ܶߣ−  ିଵଵ   (ߣ + 1)2 + ଵ  − ܶߣ ାଵଵ

    Boundary conditions: =

     and + =

     Initial condition:  ) )Difference equation for the first interior node) =  = 2), =  :

  • 8/19/2019 Komputasi Sistem Fisis 4

    4/5

    4

    ܶߣ− ଶିଵଶ   (ߣ + 1)2 + ଶଶ  − ܶߣ ଶାଵଶ   = ܶߣ−  ଶିଵଵ   + 2(1 + (ߣ ଶଵ  − ܶߣ ଶାଵଵ(ߣ + 1)2 ଶଶ  − ܶߣ 3ଶ ݅݊ݏ(ߣ + 1)2 =  (ߨ2) − ݅݊ݏߣ (ߨ4) ߣ100 +For the first interior node ( = 3), =  :ܶߣ−

    ଷିଵଶ  + 2(1 +

    ߣ 

    )

    ଷଶ − ܶߣ

    ଷାଵଶ  = ܶߣ− 

    ଷିଵଵ  + 2(1 +

    ߣ

    )

    ଷଵ − ܶߣ

    ଷାଵଵ−ߣܶ ଶଶ + 2(1 + (ߣ ଷଶ  − ܶߣ ସଶ  = ݅݊ݏߣ−  + ) + 2(1ߨ2) ݅݊ݏ(ߣ (ߨ4) − ݅݊ݏߣ (ߨ6)For the first interior node ( = 4), =  :ܶߣ− ସିଵଶ   (ߣ + 1)2 + ସଶ  − ܶߣ ସାଵଶ   = ܶߣ−  ସିଵଵ   + 2(1 + (ߣ ସଵ  − ܶߣ ସାଵଵܶߣ− 3

    ଶ + 2(1 + (ߣ ସଶ  − ܶߣ ହଶ  = ݅݊ݏߣ−  + ) + 2(1ߨ4) ݅݊ݏ(ߣ (ߨ6) − ݅݊ݏߣ (ߨ8)Similarly, for last interior node ( = 5) , = ૡ cm:ܶߣ− ହିଵଶ   (ߣ + 1)2 + ହଶ  − ܶߣ ହାଵଶ   = ܶߣ−  ହିଵଵ   + 2(1 + (ߣ ହଵ  − ܶߣ ହାଵଵܶߣ− ସଶ + 2(1 + (ߣ ହଶ  = ݅݊ݏߣ−  ) + 2(1ߨ6) ݅݊ݏ(ߣ + (ߨ8) ߣ50 +We obtain the following system of the equations:

    (ߣ + 1)2   ߣ − 0 0

    ߣ− (ߣ + 1)2   ߣ − 0

    0   ߣ − (ߣ + 1)2   − ߣ

    0 0   ߣ − ⎣ ⎦(ߣ + 1)2

    22

    32

    42

    52⎦

    = ൦   ݅݊ݏ(ߣ + 1)2 (ߨ2) ݅݊ݏߣ −  ݅݊ݏߣ−ߣ) + 100ߨ4) ݅݊ݏ(ߣ + ) + 2(1ߨ2) ݅݊ݏߣ − (ߨ4) (ߨ6)݅݊ݏߣ− ݅݊ݏ(ߣ + ) + 2(1ߨ4) ݅݊ݏߣ − (ߨ6) (ߨ8)

    ݅݊ݏߣ− (ߨ6) ݅݊ݏ(ߣ + 1)2 + ߣ) + 50ߨ8)

    ൪For the thin rod at  = . ) = ):

    ܶߣ− ିଵଷ   (ߣ + 1)2 + ଷ  − ܶߣ ାଵଷ   = ܶߣ−  ିଵଶ   (ߣ + 1)2 + ଶ  − ܶߣ ାଵଶBoundary conditions: 

    =

     and

    +

    =

     Initial condition:  ) )Difference equation for the first interior node) =  = 2), =  :ܶߣ− ଶିଵଷ   (ߣ + 1)2 + ଶଷ  − ܶߣ ଶାଵଷ   = ܶߣ−  ଶିଵଶ   + 2(1 + (ߣ ଶଶ  − ܶߣ ଶାଵଶ(ߣ + 1)2 ଶଷ  − ܶߣ ଷଷ (ߣ + 1)2 =  ଶଶ  − ܶߣ ଷଶ + 100ߣFor the first interior node ( = 3), =  :ܶߣ− ଷିଵଷ   (ߣ + 1)2 + ଷଷ  − ܶߣ ଷାଵଷ   = ܶߣ−  ଷିଵଶ   + 2(1 + (ߣ ଷଶ  − ܶߣ ଷାଵଶܶߣ− ଶଷ + 2(1 + (ߣ ଷଷ  − ܶߣ ସଷ  = ܶߣ−  ଶଶ + 2(1 + ߣ) ଷଶ  − ܶߣ ସଶFor the first interior node ( = 4), =

     :

    ܶߣ− ସିଵଷ   (ߣ + 1)2 + ସଷ  − ܶߣ ସାଵଷ   = ܶߣ−  ସିଵଶ   + 2(1 + (ߣ ସଶ  − ܶߣ ସାଵଶܶߣ− ଷଷ + 2(1 + (ߣ ସଷ  − ܶߣ ହଷ  = ܶߣ−  ଷଶ + 2(1 + ߣ) ସଶ  − ܶߣ ହଶSimilarly, for last interior node ( = 5) , = ૡ cm:ܶߣ− ହିଵଷ   (ߣ + 1)2 + ହଷ  − ܶߣ ହାଵଷ   = ܶߣ−  ହିଵଶ   + 2(1 + (ߣ ହଶ  − ܶߣ ହାଵଶܶߣ− 4

    ଷ + 2(1 +ߣ

    ) ହଷ  = ܶߣ−  ସଶ + 2(1 + (ߣ ହଶ + 50ߣWe obtain the following system of the equations:

  • 8/19/2019 Komputasi Sistem Fisis 4

    5/5

    5

    (ߣ + 1)2   − ߣ 0 0

    ߣ− (ߣ + 1)2   − ߣ 0

    0   ߣ − (ߣ + 1)2   ߣ −

    0 0   ߣ − ⎣ ⎦(ߣ + 1)2

    23

    33

    43

    53⎦

    =

    2(1 +ߣ 

    ) 22ܶߣ − 3

    2 + 100ߣ

    ܶߣ− 22 (ߣ + 1)2 + 3

    2ܶߣ − 4

    2

    ܶߣ− 32 (ߣ + 1)2 + 4

    2ܶߣ − 5

    2

    ܶߣ− 42 + 2(1 +

    ߣ 

    ) 52 + 50

    ⎦ߣ

    Simultaneous equations can be solved for the temperatures at  ݐ for = 3, 4, 5, … ,