%% make_infile.m % Input file name and run iteration. Preprocessing intensity is determined % based on run iteration. Output XFOIL run script to a file. % Run: % 1 - default settings % 2 - increase iteration count to 300 % 3 - repanel foil to 200 and increase iteration count to 300 % 4 - enter geometric design, and reshape any high angle corners and % increase iteration count to 300 % 5 - enter full inverse design routine, smooth pressure profile, and % increase iteration count to 300 function make_infile(fname,num,cpu) alpha=[0 60 .5]; cid = fopen(['cpu',num2str(cpu),'.input'],'w'); fprintf(cid,'y\r'); fprintf(cid,'load airfoils\\%s\r',fname); if num==3 panel = 200; fprintf(cid,'ppar\rn\r%f\r\r\r',panel); end if num==4 fprintf(cid,'gdes\r\r\r\rexec\r'); end if num==5 fprintf(cid,'mdes\rsmoo\rexec\r\r'); fprintf(cid,'gdes\rexec\r\r'); end fprintf(cid,'oper\r'); if num>=2 iter = 300; fprintf(cid,'iter\r%f\r',iter); end fprintf(cid,'visc\r'); fprintf(cid,'pacc\rcomplete\\%s.polar\r\r',fname(1:length(fname)-4)); fprintf(cid,'aseq\r%f\r%f\r%f\r',alpha); fprintf(cid,'\rquit\r'); fclose(cid);