%
%   CONDUCTING_ROD_1A.M   fzero function file for use with CONDUCTING_ROD_1.M
%
%   This file simply evaluates a function of the form F(T).  It is used by
%   the fzero routine to find the value T such that F(T) = 0.  The function
%   actually represents the steady state energy balance for a circular conducting 
%   rod that is heated internally via ohmic heating and that loses energy by both 
%   convective and radiation heat transfer.  The analysis is done for a unit length 
%   of rod or wire.
%
      function F = conducting_rod_1a(T)
      global D emiss R_L sig h Tinf Tsur Isq
      A = pi*D;                              % surface area per unit length
      gen = Isq*R_L;                         % energy generation rate
      conv = h*A*(T - Tinf);                 % loss rate by convection
      rad = emiss*sig*A*(T^4 - Tsur^4);      % loss rate via radiation
      F =  (gen - conv - rad);               % SS energy balance eqn 
%
%   end of function