Top Banner
Computational Physics Project I started off by first deriving the algorithm needed for the 1Dimensional heat equation., which came from the Taylor expansion of This is a forward difference time algorithm since its increasing while the spatial part is a central difference, since it both increases and decreases. The K /Cp is a constant called thermal diffusivity and from now on will be eta (η). The algorithm yielded from the Taylor Series expansion is T[i][j+1] = T[i][j] + η(T[i+1][j]+T[i1][j] –2T[i][j]) We can then use to determine a solution to the heat equation. The first code is for a 1 dimensional bar, the graph has the thermal diffusivity of that material.
13

Computational Physics Project write up.pdf

Apr 11, 2016

Download

Documents

Efrain Anaya
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Computational Physics Project write up.pdf

Computational  Physics  Project        

  I  started  off  by  first  deriving  the  algorithm  needed  for  the  1-­‐Dimensional  heat  equation.,  which  came  from  the  Taylor  expansion  of    

 

 This  is  a    forward  difference  time  algorithm  since  its  increasing  while  the  spatial  part  is  a  central  difference,  since  it  both  increases  and  decreases.  

     The  K  /Cp  is  a  constant  called  thermal  diffusivity  and  from  now  on  will  be  eta  (η).        The  algorithm  yielded  from  the  Taylor  Series  expansion  is  T[i][j+1]  =  T[i][j]  +  η(T[i+1][j]+T[i-­‐1][j]  –2T[i][j])      We  can  then  use  to  determine  a  solution  to  the  heat  equation.              The  first  code  is  for  a  1  dimensional  bar,  the  graph  has  the  thermal  diffusivity  of  that  material.    

Page 2: Computational Physics Project write up.pdf

 

Page 3: Computational Physics Project write up.pdf

                     The  next  code  was  for  a  sinusoidal  distribution.,  and  I  chose  the  b.c’s  accordingly.                        

Page 4: Computational Physics Project write up.pdf

 

       

Page 5: Computational Physics Project write up.pdf

   The  next  code  was  for  two  bars  in  contact  with  each  other.          

Page 6: Computational Physics Project write up.pdf

   

Page 7: Computational Physics Project write up.pdf

     

Page 8: Computational Physics Project write up.pdf

 

Page 9: Computational Physics Project write up.pdf

   Finally  this  was  Newtons  law  of  cooling  combined  with  the  heat  equation.    I  chose  the  environment  temperature  to  be  70  degrees,  and  the  heat  source  to  be  100  degrees,  this  then  leaves  the(  Te  –  To  )to  be  30  degrees.    I  then  chose  an  arbitrary  “h”  value  for  the  equations.                    Two  dimensional  heat  equation:    

   You  can  expand  this  equation  with  the  Taylor  expansion  as  well,  but  this  equation  doesn’t  have  any  thermal  diffusivity  as  you  can  cancel  it  out,  (since  time  =0).    This  then  becomes  a  heated  plate  equation.    

Page 10: Computational Physics Project write up.pdf

   

Page 11: Computational Physics Project write up.pdf

       For  an  external  source  of  heat  centered  on  the  plate,  and  the  boundaries  being  zero.      

   Here  the  time  derivative  is  zero,  leaving  the  Laplacian,  and  an  external  heat  source.          

Page 12: Computational Physics Project write up.pdf

 

Page 13: Computational Physics Project write up.pdf