% Conduction resistance between isothermal surfaces, as given by first three entries of Table 3-1 
function [Rcond, Vol] = Cond1D(wall)
  id=wall{1};
  k=wall{2};
  r=wall{end};
  if id~='Rec'
    r(find(r==0))=max(r)/1e6; % zero replaced with small number
  end
  if id=='Rec'
    A=wall{3};
    L=diff(r);
    Rcond=L./k./A;
    Phi(1)=1/2;
    Vol=A.*L;
  elseif id=='Cyl'
    L=wall{3};
    Rcond=log(r(2)./r(1))/2/pi./k./L;
    Phi(1)=1/2./log(r(2)./r(1))-r(1).^2./(r(2).^2-r(1).^2);
    Vol=pi*L*(r(2).^2-r(1).^2);
  elseif id=='Sph'
    Rcond=(1./r(1)-1./r(2))./k/(4*pi);
    Phi(1)=1-r(2)*(r(1)/2+r(2))/((r(1)+r(2))^2-r(1)*r(2));
    Vol=4/3*pi*(r(2).^3-r(1).^3);
  else
    error('wall id must = ''Rec'', ''Cyl'' or ''Sph''');
  end
  Phi(2)=1-Phi(1);
  Vol=Vol*Phi;
end
