1. Limited time only! Sign up for a free 30min personal 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!

Homework Help: Heat Transfer: Finite Difference method using MATLAB

  1. Apr 26, 2009 #1
    1. The problem statement, all variables and given/known data

    I have uploaded the problem statement and corresponding programs.

    Reader is the problem statement
    Reader1 is another file that is suppose to help

    2. Relevant equations

    I'm just having trouble getting started. I can do the analytical part on paper, but I don't know how to implement this in MATLAB.

    In the program for problem 1:

    What is the 'A' and 'C' matrix?

    I can get some values on paper, but, for example, what is A(i, i+1)? I realize this this the temperature to the left of the node I am interested in, but do I type in some sort of equation?

    Similarly for A(i,i), A(i, i-1), C(n)...

    Is C(1) = -200 from my solution?

    It seems I have to do what is says in the reader1 file, but I dont know how to use it

    3. The attempt at a solution

    For #1a:

    T(x) = C1x + C2
    Boundary Conditions: T(0) = 500
    T(L = 1m) = 300

    Thus T(x) = 500 - 200x

    q = -kA(dT/dx) = 37200 Watts, where k = 186 W/m.k

    energy balance for internal nodes: q1 + q2 +qV = 0

    q1 = kA[ (T_i-1) - T_i]
    q2 = kA[(T_i+1) - T_i]
    qV = dx = internal heat generation assuming dy=dz = infinite

    Finite Diff. eqn: (T_i-1) - (2T_i) + (T_i+1) = 0

    For the left boundary node:

    q_left side = 0 b/c T = 500k is constant?

    therefore q_right side + qV = 0

    q_right side = kA[(T_i+1) - T_i] and qV is the same from before

    Right Boundary Node:

    q_left side = kA[(T_i-1) - T_i] and qV stays the same

    How is this implemented in MATLAB?

    For #1b:

    Boundary Conditions: T(0) = 500
    -kA(dT/dx) @ x=1m = hA(Ts -T_inf) [Convective BC]

    Assuming C1 is the same from part a (is this correct?): T_inf = 462.8 K

    Attached Files:

    Last edited: Apr 26, 2009
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted