%% xfoil_error.m % Input the polar filename. Check to see if polar output converged out to % wing stall. If not, run foil again with a higher intensity. function xfoil_error(fname,cpu,run) kill('cmd.exe'); [alfa,cl,cd,cm] = parse_polar(fname); if length(alfa) == 0 delete(['complete\',fname]); foil = fname(1:length(fname)-6); if run < 5 write_qf([foil,'.dat'],foil,run+1); eval(['!echo ',foil,' - running level ',num2str(run+1),' >> error.log']); end if run == 5 eval(['!echo ',foil,' - airfoil failed convergence >> error.log']); end end