1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

2D Transient Heat Transfer

  1. Apr 15, 2012 #1
    Im trying to write a matlab code for 2d transient heat transfer. The problem is a titanium block in the shape of a rectangle is staring at a specified temperature and is being exposed to a much hotter surrounding temperature. The dimensions, coefficients of heat transfer, and temperatures are all given. We are suppose to write a code for the temperature of the block as a function of time. I understand the basics of the problem, but Im having trouble understanding how to relate the boundary conditions to the initial temperature. We worked a problem similar, but the boundary conditions were that the walls were held at a specified temperature. With this problem though, the wall temperatures are a function of time. I started writing the code below and setup the temperatures of the nodes on the wall and at the corners using nodal finite-difference equations from our textbook. My main question is even though i setup the temperature of the walls of the block, Im not sure how to relate it to the initial temperature and making it a function of time. I know the next step will be to write the equations for the interior nodes, but I want to get the temperature of the nodes on the wall first. I also attached the problem statement in case my description isnt clear. Thanks for your time.


    %Dimensions of the block
    L=1.2;
    H=1;

    %Heat Transfer Coeffcients
    h=150;

    %Distance between nodes
    dx=.005;

    %Number of nodes in each direction
    m=L/dx+1;
    n=H/dx+1;

    %Given Temperatures
    To=278;
    Tinf=533;

    %Biot number equation
    Bi=(h*dx)/k;


    for j=2:n-1
    %Left Wall
    T(1,j)=((2*T(i+1,j)+T(i,j+1)+T(i,j-1))+2*Bi*Tinf)/(2*(Bi+2));
    %Right Wall
    T(m,j)=((2*T(i-1,j)+T(i,j+1)+T(i,j-1))+2*Bi*Tinf)/(2*(Bi+2));
    end

    for i=2:m-1
    %Bottom Wall
    T(i,1)=((2*T(i,j+1)+T(i-1,j)+T(i+1,j))+2*Bi*Tinf)/(2*(Bi+2));
    %Top Wall
    T(i,n)=((2*T(i,j-1)+T(i-1,j)+T(i+1,j))+2*Bi*Tinf)/(2*(Bi+2));
    end

    %Bottom Left Corner
    T(1,1)=((T(i,j+1)+T(i+1,j))+2*Bi*Tinf)/(2*(Bi+1));
    %Bottom Right Corner
    T(m,1)=((T(i,j+1)+T(i-1,j))+2*Bi*Tinf)/(2*(Bi+1));
    %Top Left Corner
    T(1,n)=((T(i,j-1)+T(i+1,j))+2*Bi*Tinf)/(2*(Bi+1));
    %Top Right Corner
    T(m,n)=((T(i,j-1)+T(i-1,j))+2*Bi*Tinf)/(2*(Bi+1));
     

    Attached Files:

  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?



Similar Discussions: 2D Transient Heat Transfer
  1. Heat Transfer (Replies: 0)

  2. Heat Transfer (Replies: 0)

  3. Heat Transfer in 1D (Replies: 0)

Loading...