Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I\'m trying to solve a set of equation for a one dimensional transient conductio

ID: 1859692 • Letter: I

Question

I'm trying to solve a set of equation for a one dimensional transient conduction heat transfer problem at steady state. I have entered the equations into matlab and the output results in NaN. I don't understand what I'm doing incorrectly with the matlab or with the equations. The equations will output the correct values for all of the temperatures if I manually input the expected values for the last three temperatures (This leads me to believe that my equations are correct). Any help in getting these equations solved or corrected and then solved would be greatly appreciated (doesn't neccessarily have to be in matlab). The code is posted below:


clc

clear all

deltax=0.008;

kAL=237;

kCu=401;

h=60;

Tsur=20;

Ax=3.1416*(0.005/2)^2;

As=2*3.1416*(0.005/2)*0.008;

T1=100;

T21=150;

syms T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 T15 T16 T17 T18 T19 T20

eq1=(kCu*Ax*(T1-T2)/deltax)+(kCu*Ax*(T3-T2)/deltax)+(h*As*(Tsur-T2))==0;

eq2=(kCu*Ax*(T2-T3)/deltax)+(kCu*Ax*(T4-T3)/deltax)+(h*As*(Tsur-T3))==0;

eq3=(kCu*Ax*(T3-T4)/deltax)+(kCu*Ax*(T5-T4)/deltax)+(h*As*(Tsur-T4))==0;

eq4=(kCu*Ax*(T4-T5)/deltax)+(kCu*Ax*(T6-T5)/deltax)+(h*As*(Tsur-T5))==0;

eq5=(kCu*Ax*(T5-T6)/deltax)+(kCu*Ax*(T7-T6)/deltax)+(h*As*(Tsur-T6))==0;

eq6=(kCu*Ax*(T6-T7)/deltax)+(kCu*Ax*(T8-T7)/deltax)+(h*As*(Tsur-T7))==0;

eq7=(kCu*Ax*(T7-T8)/deltax)+(kCu*Ax*(T9-T8)/deltax)+(h*As*(Tsur-T8))==0;

eq8=(kCu*Ax*(T8-T9)/deltax)+(kCu*Ax*(T10-T9)/deltax)+(h*As*(Tsur-T9))==0;

eq9=(kCu*Ax*(T9-T10)/deltax)+(kCu*Ax*(T11-T10)/deltax)+(h*As*(Tsur-T10))==0;

eq10=(kCu*Ax*(T10-T11)/deltax)+(kCu*Ax*(T12-T11)/deltax)+(h*As*(Tsur-T11))==0;

eq11=(kCu*Ax*(T11-T12)/deltax)+(kAL*Ax*(T13-T12)/deltax)+(h*As*(Tsur-T12))==0;

eq12=(kAL*Ax*(T12-T13)/deltax)+(kAL*Ax*(T14-T13)/deltax)+(h*As*(Tsur-T13))==0;

eq13=(kAL*Ax*(T13-T14)/deltax)+(kAL*Ax*(T15-T14)/deltax)+(h*As*(Tsur-T14))==0;

eq14=(kAL*Ax*(T14-T15)/deltax)+(kAL*Ax*(T16-T15)/deltax)+(h*As*(Tsur-T15))==0;

eq15=(kAL*Ax*(T15-T16)/deltax)+(kAL*Ax*(T17-T16)/deltax)+(h*As*(Tsur-T16))==0;

eq16=(kAL*Ax*(T16-T17)/deltax)+(kAL*Ax*(T18-T17)/deltax)+(h*As*(Tsur-T17))==0;

eq17=(kAL*Ax*(T17-T18)/deltax)+(kAL*Ax*(T19-T18)/deltax)+(h*As*(Tsur-T18))==0;

eq18=(kAL*Ax*(T18-T19)/deltax)+(kAL*Ax*(T20-T19)/deltax)+(h*As*(Tsur-T19))==0;

eq19=(kAL*Ax*(T19-T20)/deltax)+(kAL*Ax*(T21-T20)/deltax)+(h*As*(Tsur-T20))==0;

S=solve(eq1, eq2, eq3, eq4, eq5, eq6, eq7, eq8, eq9, eq10,eq11, eq12, eq13, eq14, eq15, eq16, eq17, eq18, eq19)

T2_=eval((S.T2))

T3_=eval(S.T3)

T4_=eval(S.T4)

T5_=eval(S.T5)

T6_=eval(S.T6)

T7_=eval(S.T7)

T8_=eval(S.T8)

T9_=eval(S.T9)

T10_=eval(S.T10)

T11_=eval(S.T11)

T12_=eval(S.T12)

T13_=eval(S.T13)

T14_=eval(S.T14)

T15_=eval(S.T15)

T16_=eval(S.T16)

T17_=eval(S.T17)

T18_=eval(S.T18)

T19_=eval(S.T19)

T20_=eval(S.T20)

Explanation / Answer

u want a different code or debugging ur code?