% Natural convection between vertical plates in close proximity
function [h, NuS, RaS, Sopt] = VertPlateProxNatNuT(Ts,Tinf,L,mat,flag,S)
  switch flag
    case 'Sym'
      C1=576; 
    case 'Asym' 
      C1=144;
    otherwise
      error('Unknown flag, ''Sym'' or ''Asym'' required');
  end
  C2=2.87;
  RaL = Ra(Ts,Tinf,L,mat);                                   
  Sopt=(2*C1/C2)^(1/6)*L./RaL.^0.25; % optimal spacing       
  if ~exist('S') S=Sopt;
  end
  [RaS,Pr,kf] = Ra(Ts,Tinf,S,mat);                           
  NuS  = (C1./(RaS.*S./L).^2+C2./(RaS.*S./L).^0.5).^-0.5;    
  h    = NuS.*kf./S;                                         
end
