REM ********************************************************** REM * * 100 REM * acsize.QB * REM * NICOLAI'S A/C SIZING METHOD * REM * Chapter 5 of Fundamentals of Aircraft Design * REM * code by W.H. MASON; SEPT. 22, 1984 (APPLE ][) * REM * Department of Aerospace and Ocean Engineering * REM * Virginia Tech, Blacksburg, VA, 24062 * REM * contact: mason@aoe.vt.edu * REM * see also: http://www.aoe.vt.edu/ * REM * * REM * originally coded on a TI-59 and TI CC-40 (1982) * REM * * REM * modified to run on a Mac :Sept. 1, 1989 * REM * modified to QuickBASIC for a Mac:Sept. 6, 1990 * REM * comments for GA users added: Sept.11, 1991 * REM * large aircraft example tested: August 31, 1992 * REM * last mods: July 1993 * REM * * REM * Output is sent to both the screen and * REM * a file called size.out * REM * * REM * This program follows Nicolai's example exactly, * REM * with one exception: a supersonic leg has been added, * REM * denoted W5PW5 & W6PW6 * REM ********************************************************** REM ********************************************************** REM * WARNING: THIS VERSION ASSUMES JET ENGINE PROPULSION * REM ********************************************************** CALL TEXTFONT(4) :REM for the Mac, sets a monospace screen font OPEN "size.out" FOR OUTPUT AS #1 PRINT "NICOLAI'S AIRCRAFT SIZING ALGORITHM" PRINT PRINT "coded by W.H. Mason, AOE, Virginia Tech, http://www.aoe.vt.edu/" PRINT PRINT #1, "NICOLAI'S AIRCRAFT SIZING ALGORITHM" PRINT #1, PRINT #1, " programmed in QuickBASIC by W.H. Mason" PRINT #1, " Department of Aerospace and Ocean Engineering" PRINT #1, " Virginia Tech, http://www.aoe.vt.edu/" REM ****** all input is defined between statements 230 and 800 **** 200 REM A/C TYPE, STATISTICAL CURVE FIT CONSTANTS REM FOR Required EMPTY WEIGHT = KS*A*TOGW^B REM constants A B config REM 1.605 .916 Fighter, T//W > .9 and/or W/S < 70 REM 0.911 .947 Fighter, T/W < 0.9, W/S > 70 and REM Transport and Civil Aircraft 230 A = .911:B = .947: REM CONSTANTS FOR general aviation and transport aircraft REM A/C WEIGHT DATA 300 WFIXED = 600&: REM Fixed weight, in pounds (INCLUDES WEIGHT OF THINGS THAT ARE DROPPED!) Wbombs = 0&: REM BOMBS and AMMO, in pounds WcomFuel = 0: REM Combat fuel, in pounds WresFuel = .05: REM Reserve fuel, as a fraction of TOGW WtrapFuel = .01: REM trapped fuel, as a fraction of TOGW W2W1 = 1!: REM W2/W1; the engine start and takeoff fraction W3W2 = 1!: REM W3/W2; climb and accel to cruise conditions fraction W5W4 = 1!: REM W5/W4; Accel to high speed PRINT PRINT "Defined input for this case:":PRINT PRINT USING "Weight constants: A = #.###, B = #.###";A;B PRINT USING "WFIXED = ######.# Wbombs =#####.#";WFIXED;Wbombs PRINT USING "WcomFuel = ######.#";WcomFuel PRINT USING "WresFuel = #####.## WtrapFuel = ###.##";WresFuel;WtrapFuel PRINT USING "Engine Start and takeoff fraction, W2/W1 = #.####";W2W1 PRINT USING "Initial Climb and Accel fraction, W3/W2 = #.####";W3W2 PRINT USING "Accel to high speed wt. fraction, W5/W4 = #.####";W5W4 PRINT #1, PRINT #1,"Defined input for this case:":PRINT #1, PRINT #1, USING "Weight constants: A = #.###, B = #.###";A;B PRINT #1, USING "WFIXED = ######.# Wbombs =#####.#";WFIXED;Wbombs PRINT #1, USING "WcomFuel = ######.#";WcomFuel PRINT #1, USING "WresFuel = #####.## WtrapFuel = ###.##";WresFuel;WtrapFuel PRINT #1, USING "Engine Start and takeoff fraction, W2/W1 = #.####";W2W1 PRINT #1, USING "Climb and Accel weight fraction, W3/W2 = #.####";W3W2 PRINT #1, USING "Accel to high speed wt. fraction, W5/W4 = #.####";W5W4 REM AERO & FLIGHT CONDITION DATA REM SUBSONIC CONDITIONS 400 AR = 24: REM AIRCRAFT ASPECT RATIO Msub = .65: REM SUBSONIC CRUISE MACH NUMBER Qsub = 320: REM DYNAMIC PRESSURE AT SUBSONIC CRUISE, PSF Asub = 995: REM SPEED OF SOUND AT SUBSONIC CRUISE, FPS Cd0sub = .01: REM SUBSONIC CD0 Esub = .9: REM SUBSONIC OSWALD E REM SUPERSONIC CONDITIONS 450 Msup = 2.4: REM SUPERSONIC CRUISE MACH NUMBER Qsup = 608.8: REM DYNAMIC PRESSURE AT SUPERSONIC CRUISE, PSF Asup = 968: REM SPEED OF SOUND AT SUPERSONIC CRUISE, FPS LDsup = 9.9: REM L/D AT SUPERSONIC CRUISE CONDITION PRINT : PRINT "Flight conditions: subsonic supersonic" PRINT USING " cruise Mach number ##.### ##.###";Msub;Msup PRINT USING " dynamic pressure(psf) ####.# ####.#";Qsub;Qsup PRINT USING " speed of sound (ft/sec) ####.# ####.#";Asub;Asup PRINT PRINT USING "Aero data: Aspect Ratio = ##.###";AR PRINT USING " CD0 subsonic = .####";Cd0sub PRINT USING " Subsonic Oswald E = #.###";Esub PRINT PRINT USING " Supersonic L/D = ##.###";LDsup PRINT #1,:PRINT #1, "Flight conditions: subsonic supersonic" PRINT #1, USING " cruise Mach number ##.### ##.###";Msub;Msup PRINT #1, USING " dynamic pressure(psf) ####.# ####.#";Qsub;Qsup PRINT #1, USING " speed of sound (ft/sec) ####.# ####.#";Asub;Asup PRINT #1, PRINT #1, USING "Aero data: Aspect Ratio = ##.###";AR PRINT #1, USING " CD0 subsonic = .####";Cd0sub PRINT #1, USING " Subsonic Oswald E = #.###";Esub PRINT #1, PRINT #1, USING " Supersonic L/D = ##.###";LDsup REM STRUCTURAL DETAILS 500 KS = .85: REM COMPOSITE STRUCTURAL FACTOR PRINT: PRINT USING "Structures: technology factor = #.###";KS PRINT #1, :PRINT #1, USING "Structures: technology factor = #.###";KS REM ENGINE DATA 600 SFCsub = .5: REM SUBSONIC CRUISE SFC SFCsup = 1.3: REM SUPERSONIC CRUISE SFC SFCltr = .55: REM LOITER SFC PRINT PRINT "Engine data: subsonic supersonic loiter" PRINT USING " sfc #.### #.### #.###";SFCsub;SFCsup;SFCltr PRINT #1, PRINT #1, "Engine data: subsonic supersonic loiter" PRINT #1, USING " sfc #.### #.### #.###";SFCsub;SFCsup;SFCltr REM MISSION SPECIFICATION REM NOTE: range is twice the mission radius 700 Rsub = 3000: REM subsonic mission radius, nautical miles Rsup = 0: REM supersonic mission radius, nautical miles LtrTime = 1440: REM loiter time, in minutes PRINT : PRINT "Mission Specification:": PRINT USING " Subsonic mission radius (nautical miles) = ####.#";Rsub PRINT USING " Supersonic mission radius, nm = ####.#";Rsup PRINT USING " Loiter time (minutes) = ###.";LtrTime PRINT #1,:PRINT #1, "Mission Specification:": PRINT #1, USING " Subsonic mission radius (nautical miles) = ####.#";Rsub PRINT #1, USING " Supersonic mission radius, nm = ####.#";Rsup PRINT #1, USING " Loiter time (minutes) = ###.#";LtrTime REM ****** input definition complete, computations begin **************** PRINT:PRINT "RESULTS (based on the ability to cruise at the L/D given below):" PRINT #1,:PRINT #1, "RESULTS (based on the ability to cruise at the L/D given below):" 800 PI = 3.141592654# Vsub = Asub * Msub Vsup = Asup * Msup K = 1 / (PI * AR * Esub) LDmaxSub = .5 / SQR (Cd0sub * K) LDcruiseSub = SQR (8 / 9) * LDmaxSub: REM for jet transports, mod as required CLcruise = SQR (Cd0sub / K / 2):REM not used in this code, use to find Swing PRINT PRINT USING " subsonic L/D max = ##.###, cruise L/D = ##.###";LDmaxSub,LDcruiseSub PRINT #1, PRINT #1, USING " subsonic L/D max = ##.###, cruise L/D = ##.###";LDmaxSub,LDcruiseSub PRINT PRINT USING " supersonic L/D (cruise) = ##.###";LDsup PRINT #1, PRINT #1, USING " supersonic L/D (cruise) = ##.###";LDsup REM: define fuel fractions that don't depend on TOGW REM: range uses Brequet range eqn. for jets - modify for prop aircraft REM: fuel fraction for subsonic cruise out (cruise back is the same) W4W3 = EXP (-(Rsub * 6080 * SFCsub) / (LDcruiseSub * 3600 * Vsub)) W7W6P = W4W3 REM: fuel fraction for supersonic cruise out (cruise back is the same) W5PW5 = EXP (-(Rsup * 6080 * SFCsup) / (LDsup * 3600 * Vsup)) W6PW6 = W5PW5 REM: fuel fraction for loiter W8W7 = EXP (-(SFCltr * LtrTime) / (60 * LDmaxSub)) WoutboundRat = W5PW5 * W5W4 * W4W3 * W3W2 * W2W1 WreturnRat = W8W7 * W7W6P * W6PW6 REM INITIALIZE ITERATION PARAMETERS TOGW = 10000&:imax = 350:i = 0: PRINT : REM TOGW here is the first guess PRINT:PRINT "begin solution iteration" PRINT #1,:PRINT #1,"begin solution iteration" REM BEGIN ITERATION LOOP REM WEmptyReqd is the empty weight required based on previous similar aircraft 1000 WEmptyReqd = KS * A * TOGW^B DeltaCmbtRat = (WcomFuel + Wbombs)/TOGW W8W1 = WreturnRat*(WoutboundRat - DeltaCmbtRat) Wfuel = (1! + WtrapFuel + WresFuel) * (TOGW - TOGW * W8W1 - Wbombs) REM: WEmptyAvail is available empty weight for this mission WEmptyAvail = TOGW - Wfuel - WFIXED IF ABS (WEmptyAvail - WEmptyReqd) < .1 THEN GOTO 2000 REM SELECT A NEW VALUE OF TOGW AND REPEAT REM the coefficient in DL is an over-relaxation factor, REM reduce IF necessary TO converge solution DL = .5 * (WEmptyReqd - WEmptyAvail) TOGW = TOGW + DL REM: to keep from endless loop, check to see if imax reached i = i + 1: PRINT #1, "*";: PRINT "*";:IF (INT(i/50)*50) = i THEN PRINT:PRINT #1, IF i < imax THEN GOTO 1000 IF i = imax THEN PRINT #1,:PRINT #1, "solution did not converge" IF i = imax THEN PRINT: PRINT "solution did not converge":GOTO 2010 REM RESULTS 2000 PRINT : PRINT "SOLUTION CONVERGED in ";i;" iterations" PRINT : PRINT "WEmptyAvail-WEmptyReqd = ";WEmptyAvail - WEmptyReqd PRINT #1,: PRINT #1, "SOLUTION CONVERGED in ";i;" iterations" PRINT #1,: PRINT #1, " WEmptyAvail - WEmptyReqd = ";WEmptyAvail - WEmptyReqd 2010 PRINT : PRINT USING "Outbound subsonic cruise weight fraction, W4/W3 = #.####";W4W3 PRINT USING "Return subsonic cruise weight fraction, W7P/W6P = #.####";W7W6P PRINT USING "Outbound supersonic cruise weight fraction, W5P/W5 = #.####";W5PW5 PRINT USING "Return supersonic cruise weight fraction, W6P/W6 = #.####";W6PW6 PRINT USING "Loiter weight fraction, W8/W7 = #.####";W8W7 PRINT USING "Overall landing to takeoff weight fraction, W8/W1 = #.####";W8W1 PRINT USING "WcomFuel = #######.#";WcomFuel PRINT USING "Wfuel = #######.#";Wfuel PRINT USING "WEMPTY = #######.#";WEmptyReqd PRINT USING "TOGW = #######.#";TOGW PRINT:PRINT "end of case":PRINT PRINT #1,: PRINT #1, USING "Outbound subsonic cruise weight fraction, W4/W3 = #.####";W4W3 PRINT #1, USING "Return subsonic cruise weight fraction, W7P/W6P = #.####";W7W6P PRINT #1, USING "Outbound supersonic cruise weight fraction, W5P/W5 = #.####";W5PW5 PRINT #1, USING "Return supersonic cruise weight fraction, W6P/W6 = #.####";W6PW6 PRINT #1, USING "Loiter weight fraction, W8/W7 = #.####";W8W7 PRINT #1, USING "Overall landing to takeoff weight fraction, W8/W1 = #.####";W8W1 PRINT #1, USING " WcomFuel = #######.#";WcomFuel PRINT #1, USING " Wfuel = #######.#";Wfuel PRINT #1, USING " WEMPTY = #######.#";WEmptyReqd PRINT #1, USING " TOGW = #######.#";TOGW PRINT #1,:PRINT #1, " end of case" 5000 END