clc; warning("off"); printf("\n\n example4.5 - pg105"); // given syms r; ro=0.5; //[inch] - outside radius ro=0.0127; //[m] - outside radius in m Tg=2*10^7; //[J/m^3*sec] - heat generated by electric current Tw=30; //[degC] - outside surface temperature km=17.3; //[W/m*K] - mean conductivity // using the formula T=Tw+(Tg/4*km)*(ro^2-r^2) T=Tw+(Tg/(4*km))*(ro^2-r^2); disp(T,"T="); printf("\n where r is in meters and T is in degC"); function y=t(r) y=Tw+(Tg/(4*km))*(ro^2-r^2); endfunction printf("\n\n at the centre line (r=0),the maximum temperature is %fdegC.At the outside ,the temperature reduces to the boundary condition value of %fdegC.The distribution i parabolic between these 2 limits",t(0),t(0.0127));