% Natural convection in a vertical enclosure
function [hcirc, NuS, RaS] = VertPlateEnclNuT(T1,T2,H,S,mat)
  [RaS,Pr,kf] = Ra(T1,T2,S,mat);                          
  if H/S < 2
    if H/S < 1         warning='VertPlateEnclNuT: H/S < 1'    
    end
    if max(RaS.*Pr./(0.2+Pr)) > 1e3
       warning = 'VertPlateEnclNuT: RaS*Pr/(0.2+Pr) > 1e3' 
    end
    NuS = 0.36*(Pr.*RaS./(0.2+Pr)).^0.29;                 
  elseif H/S < 10
    if max(RaS) > 1e10 warning='VertPlateEnclNuT: RaS > 1e10' 
    end
    NuS = 0.44*(Pr.*RaS./(0.2+Pr)).^0.28.*(H./S).^-0.25;  
  else
    % published limit of Pr>=1 has been changed to 0.6 below
    if Pr < 0.6        warning = 'VertPlateEnclNuT: Pr < 0.6' 
    end
    if H/S > 40        warning = 'VertPlateEnclNuT: H/S > 40' 
    end
    NuS = 0.84*RaS.^0.25*Pr.^0.012.*(H./S).^-0.3;         
  end
  hcirc   = NuS.*kf/S;                                        
end
