'
' 6/29/97  Version 71
'
'Requires QuickBasic and DOS "MORE".
'Generates ACCEL.DAT ascii file on hard disk in the directory from which
'this program is run.
'All sea level so far.
'
'In general ducted fans are twenty percent less efficient than propellors.
'The same program will work for propellors.
'
DEFDBL A-Z
OPEN "ACCEL5.DAT" FOR OUTPUT AS #1
CLS
FOR x = 1 TO 5: PRINT : NEXT
PRINT #1,
PRINT "                       AIRCRAFT SIMULATION V71"
PRINT #1, "                       AIRCRAFT SIMULATION V71"
PRINT "                     Copyright June 1997 Paul Lamar"
PRINT #1, "                     Copyright June 1997 Paul Lamar"
PRINT "                     paul-lamar-la@worldnet.att.net"
PRINT #1, "                     paul-lamar-la@worldnet.att.net"
PRINT ""
PRINT #1, ""
'
PRINT "             Generates a file called ACCEL.DAT on this sub-directory."
FOR x = 1 TO 5: PRINT : NEXT
INPUT "Press Enter to continue"; z$

CLS

FOR x = 1 TO 5: PRINT : NEXT

INPUT "                    Gross Weight "; Wt
INPUT " Flate plate area with gear down "; FlatPlate
INPUT "   Flate plate area with gear up "; GearUpFP
INPUT "                   Static Thrust "; StaticThrust
INPUT "           Lapse Rate for thrust "; LapseRate
INPUT "                       Wing span "; Span
INPUT "                       Wing area "; WingArea

PRINT
'PRINT #1,
PRINT
'PRINT #1,
'Edit these numbers for your aircraft and propulsion system.

IF Wt = 0 THEN Wt = 1500
'Gross weight.
PRINT "                                      Gross weight "; Wt
PRINT #1, "                                      Gross weight "; Wt

IF FlatePlate = 0 THEN FlatPlate = 4
'Equivalent square feet with gear down.
PRINT "             Equivalent square feet with gear down. "; FlatPlate
PRINT #1, "             Equivalent square feet with gear down. "; FlatPlate

IF GearUpFP = 0 THEN GearUpFP = 2
'Equivalent flat plate in square feet with gear up.
PRINT " Equivalent flat plate in square feet with gear up. "; GearUpFP
PRINT #1, " Equivalent flat plate in square feet with gear up. "; GearUpFP

IF StaticThrust = 0 THEN StaticThrust = 500
'Initial static thrust in pounds.
PRINT "                   Initial static thrust in pounds. "; StaticThrust
PRINT #1, "                   Initial static thrust in pounds. "; StaticThrust

IF LapseRate = 0 THEN LapseRate = 1
'Pounds per mph that thrust is reduced.
PRINT "             Pounds per mph that thrust is reduced. "; USING "#.##"; LapseRate
PRINT #1, "             Pounds per mph that thrust is reduced. "; USING "#.##"; LapseRate

IF Span = 0 THEN Span = 24
PRINT "                                          Wing span "; Span
PRINT #1, "                                          Wing span "; Span

IF WingArea = 0 THEN WingArea = 150
PRINT "                                          Wing Area "; WingArea
PRINT #1, "                                          Wing Area "; WingArea

FOR x = 1 TO 5: PRINT : NEXT
PRINT #1,
PRINT #1,

INPUT "Press Enter to continue"; z$

'Don't change any of this.
pi = 3.1416
DeltaTime = .01        'Time increment in seconds. Smaller is better.
Velocity = .01         'Initial velocity in  FPS. Do not change.
LiftOffCoef = 1.2      'Cl at which rotation is initiated
ClimbCoef = 1.19       'Cl at which climb can be initiated.
Flag = 1               'Used by program. Do not change

Thrust = StaticThrust  'Initialise thrust to static thrust.
AverageCord = WingArea / Span
Aspect = Span / AverageCord        'Aspect ratio

CLS


PRINT #1, "Time   Net     Accel   Velocity   Distance    Cl     HP Out   Excess   Climb "
PRINT #1, "Sec    Thrust  FPS^2    MPH        Feet       Req.   Total  HP Avail.  Pot. FPM"

'Cl Req. is the lift coefficient required to = the weight of the aircraft.
'HP Out Total    is the actual HP out of the tail pipe in terms of Lb Ft/Sec.
'HP Ex. Avail.   is the excess HP available for climbing.
'Climb Pot. FPM  is the rate of climb available at that speed and time.

FOR Time1 = DeltaTime TO 2000 STEP DeltaTime      'seconds

MPH = Velocity * .682
IF MPH > 75 THEN FlatPlate = GearUpFP       'Gear up point.
IF MPH \ 5 = Flag THEN GOSUB TimetoPrint    'Print the output
DynPress = (MPH ^ 2 * .0026)                'Standard day.
Cl = Wt / (DynPress * WingArea)             'Cl required to = weight.
IF Cl > 999 THEN Cl = 999 ELSE Cl = Cl      'Cosmetic fix only.
IF Cl < LiftOffCoef THEN GOSUB CalcDrag     'After rotate calc induced drag.
IF Cl < ClimbCoef THEN GOSUB CalcClimb      'Calc climb potential.

Thrust = StaticThrust - (MPH * LapseRate)
NetThrust = Thrust - (DynPress * FlatPlate) - InducedDrag

Accel = (NetThrust / Wt) * 32                'In FPS^2
IF Accel < .005 THEN GOTO EndIt              'Top speed so exit the loop.
Velocity = Velocity + Accel * DeltaTime
Distance = Distance + (Velocity * DeltaTime)

HP = (Velocity * NetThrust) / 550         'Net HP after drag avail for climb.
THP = Thrust * Velocity / 550             'Thrust HP out the tail pipe.

NEXT Time1
EndIt:
PRINT #1,
CLOSE
CLS


SHELL "MORE < ACCEL5.DAT"      'Look at the data file on the disk.
FOR x = 1 TO 10: PRINT : NEXT
PRINT "                         Have a nice day!"
PRINT
PRINT "                     paul-lamar-la@worldnet.att.net"
SYSTEM

CalcDrag:                      'Calculate the induced drag component.
InducedDrag = (((Cl ^ 2 / (pi * Aspect)) * WingArea) * DynPress)
RETURN

CalcClimb:                     'Calculate the climb potential.
FootLbMin = HP * 33000
Climb = FootLbMin / Wt
RETURN

TimetoPrint:
PRINT Flag;
'READ Thrust                      'Not used unless empirical data is avail.
Flag = Flag + 1
PRINT #1, USING "###.##"; Time1;
PRINT #1, USING "   ###"; NetThrust;
PRINT #1, USING "   ##.##"; Accel;
PRINT #1, USING "     ###"; MPH;
PRINT #1, USING "    ######"; Distance;
PRINT #1, USING "    #####.##"; Cl;
PRINT #1, USING "   #####"; THP;
PRINT #1, USING "   #####"; HP;
PRINT #1, USING "   ####"; Climb
RETURN

'Not used when lapse rate is available.

'   Edit this for characteristics of the propulsion system.
'   Fixed pitch, variable pitch, twist, ducted fan, etc..
'     Thrust data in pounds at 5 MPH increments.
'MPH   5   10   15   20   25   30   35   40   45   50
DATA  100, 101, 102, 103, 104, 105, 106, 107, 108, 109

'MPH  55  60   65   70   75   80   85   90   95   100
DATA 110, 115, 120, 125, 130, 135, 140, 145, 150, 155

'MPH 105  110  115  120  125  130  135  140  145  150
DATA 160, 165, 170, 175, 180, 190, 195, 200, 205, 210

'MPH 155  160  165  170  175  180  185  190  195  200
DATA 215, 220, 220, 220, 220, 220, 220, 220, 220, 220

'MPH 205  210  215  220  225  230  235  240  245  250
DATA 220, 220, 220, 220, 220, 220, 220, 220, 220, 220

'MPH 255  260  265  270  275  280  285  290 295  300
DATA 220, 220, 220, 220, 220, 200, 100, 50,  25,  0

