Exemple #1
0
# The following line turns off unit checking. Make sure things are working before it is turned off
#
from os import environ as _environ; _environ["scalar_off"] = "off"


import numpy as npy
import pylab as pyl
from scalar.units import FT, SEC, LBF, MIN, IN
from Aircraft_Models.Adv2014Aircraft_AeroCats.MonoWing.Aircraft import Aircraft

pyl.figure(1)

#
# Get the design point
#
dsgnGR = Aircraft.Groundroll() / (FT)
dsgnCR = Aircraft.Rate_of_Climb(1.07*Aircraft.GetV_LO()) / (FT/MIN)
pyl.plot([dsgnCR],[dsgnGR],'ro', markersize = 8)

#
# Set up ranges
#
Vstl = npy.linspace(31,35,5)*FT/SEC
WT   = npy.linspace(30,34,5)*LBF
Vplt = Vstl / (FT/SEC)

lgnd = ['Design']
arealist = []

# Initialize data arrays
grndroll = npy.zeros((len(WT),len(Vstl)))
Exemple #2
0
from __future__ import division  # let 5/2 = 2.5 rather than 2
#from os import environ as _environ; _environ["scalar_off"] = "off"

from Aircraft_Models.Adv2014Aircraft_AeroCats.MonoWing.Aircraft import Aircraft
import pylab as pyl

Aircraft.PlotTailLoad(fig=2)
Aircraft.Draw()
pyl.show()
Exemple #3
0
from Aircraft_Models.Adv2014Aircraft_AeroCats.MonoWing.Aircraft import Aircraft

Vstl = npy.linspace(30, 34, 5) * FT / SEC
LLO = npy.linspace(31, 36, 6) * LBF
Vplt = Vstl / (FT / SEC)

Aircraft.VmaxPlt = 100 * FT / SEC

Wing = Aircraft.Wing

pyl.figure(1)
lgnd = []
for l in LLO:
    grndroll = []
    for v in Vstl:
        Wing.V_Stall = v
        Wing.Lift_LO = l
        Aircraft.TotalWeight = l

        grndroll.append(Aircraft.Groundroll() / FT)

    pyl.plot(Vplt, grndroll)
    lgnd.append('L_LO = %2.0f (lbf)' % (l / LBF))

pyl.axhline(y=190, color='r')
pyl.title('Groundroll vs. Stall Velocity')
pyl.xlabel('Stall Velocity (ft/s)')
pyl.ylabel('Groundroll (ft)')
pyl.legend(lgnd, loc='best')

pyl.show()
#from Aircraft_158 import Aircraft
#from Aircraft_160 import Aircraft

#from Aircraft_Models.Reg2013Aircraft_AeroCats.MonoWing.AircraftGE import Aircraft
#from Aircraft_144GE import Aircraft
#from Aircraft_148GE import Aircraft
#from Aircraft_150GE import Aircraft
#from Aircraft_152GE import Aircraft
#from Aircraft_154GE import Aircraft
#from Aircraft_155GE import Aircraft
#from Aircraft_156GE import Aircraft
#from Aircraft_158GE import Aircraft

#from Aircraft_Models.Reg2013Aircraft_AeroCats.TradeStudies.LowMoment.Aircraft import Aircraft

Aircraft.Draw(fig=2)
pyl.figure(1)

#
# Get the design point
#
dsgnGR = Aircraft.Groundroll() / (FT)
dsgnCR = Aircraft.Rate_of_Climb() / (FT / MIN)
pyl.plot([dsgnCR], [dsgnGR], 'ro', markersize=8)

#
# Set up ranges
#
S = npy.linspace(1800, 3200, 4) * IN**2
TotalWeight = npy.linspace(27, 30, 5) * LBF
#from os import environ as _environ; _environ["scalar_off"] = "off"

from Aerothon.ACControls import ACControls
from Aerothon.ACXFoil import ACXFoil
from Aerothon import AeroUtil
from scalar.units import SEC, ARCDEG, LBF, IN, FT, OZF
from scalar.units import AsUnit
import pylab as pyl
import numpy as npy
from Aircraft_Models.Adv2014Aircraft_AeroCats.MonoWing.Aircraft import Aircraft

Execute = True

Vs = npy.linspace(Aircraft.GetV_LO() / (FT / SEC),
                  Aircraft.Vmax() / (FT / SEC), 11) * FT / SEC
des = npy.linspace(5, 20, 3) * ARCDEG
alpha2d = 3 * ARCDEG

# Use the following to investigate the effects of changing geometry
#Aircraft.Wing.Aileron.Fc = 0.15
#Aircraft.Wing.Aileron.Fb = 0.334 #Need adjusted to make aileron 3% from tip
#Aircraft.Wing.Aileron.Ft = 0.1337

#This are the ratios of the servo arm to the control horn arm. The control arm length is the distance to the hinge.
# ArmRatio = (Servo Arm)/(Control Arm)
# Servo Arm Lengths:   Aile: 0.8" , Elev: 0.4" , Rudder: 0.4"
# Control Arm Lengths: Aile: 1.5", Elev: 1.4", Rudder: 1.5"
Aileron_ArmRatio = 0.53
Elevator_ArmRatio = 0.29
Rudder_ArmRatio = 0.27
#
# This file demonstrates how to plot wing loading and bending stress of the main spar.
# Most numbers are fictitious and are for demonstrative purposes only (i.e they are made up).
#
from __future__ import division  # let 5/2 = 2.5 rather than 2
from scalar.units import IN, FT, PSI, LBF, MPa, KG, M, gacc
from scalar.units import AsUnit
from Aircraft_Models.Adv2014Aircraft_AeroCats.MonoWing.Aircraft import Aircraft
import pylab as pyl
import numpy as npy

#
# The velocity which loads will be computed
#
Vmax = Aircraft.GetV_LO() * .85

global fignum
fignum = 1


def PlotLiftSurfLoad(Surface, GLoad=1.0):
    #
    # Plots loads and bending stresses on a lifting surface
    #
    # Inputs:
    #    Surface - A lifting surface with a wing weight calculation
    #    SparFc  - Spar chordwise location in fraction of the chord
    #    SparT   - The thickness of the main spar
    #    MaxBendStress - Optional maximum allowed bending stress of the spar
    #    GLoad   - Generic GLoad multiplier
Exemple #7
0
import numpy as npy
import pylab as pyl
from scalar.units import FT, SEC, LBF, MIN, IN, ARCDEG
from Aircraft_Models.Adv2014Aircraft_AeroCats.MonoWing.Aircraft import Aircraft
#from Aircraft_Models.Reg2012Aircraft_AeroCats.MonoWing.Aircraft import Aircraft
#from Aircraft_Models.Reg2012Aircraft_AeroCats.TradeStudies.WeightTrade.Aircraft_40 import Aircraft
#from Aircraft_Models.Reg2012Aircraft_AeroCats.TradeStudies.WeightTrade.Aircraft_42 import Aircraft
#from Aircraft_Models.Reg2012Aircraft_AeroCats.TradeStudies.WeightTrade.Aircraft_44 import Aircraft
#from Aircraft_Models.Reg2012Aircraft_AeroCats.TradeStudies.WeightTrade.Aircraft_46 import Aircraft
#from Aircraft_Models.Reg2012Aircraft_AeroCats.TradeStudies.WeightTrade.Aircraft_48 import Aircraft
#from Aircraft_Models.Reg2012Aircraft_AeroCats.TradeStudies.WeightTrade.Aircraft_50 import Aircraft
#from Aircraft_Models.Reg2012Aircraft_AeroCats.TradeStudies.WeightTrade.Aircraft_52 import Aircraft
#from Aircraft_Models.Reg2012Aircraft_AeroCats.TradeStudies.WeightTrade.Aircraft_55 import Aircraft
#from Aircraft_Models.Reg2012Aircraft_AeroCats.TradeStudies.LowMoment.Aircraft import Aircraft

Aircraft.Draw(fig=4)
fig_wing = 1
fig_htail = 2
fig_vtail = 3

CD = [0, 0, 0]

Aircraft.Wing.o_eff = None
#
# Get the design point
#
dsgnGR = Aircraft.Groundroll() / (FT)

V = Aircraft.GetV_LO() + 0.1 * FT / SEC
a2dw = Aircraft.AlphaTrim(V)
a2dw = 0 * ARCDEG
Exemple #8
0
from __future__ import division # let 5/2 = 2.5 rather than 2

#
# The following line turns off unit checking. Make sure things are working before it is turned off
#
from os import environ as _environ; _environ["scalar_off"] = "off"


import numpy as npy
import pylab as pyl
from scalar.units import FT, SEC, LBF, MIN, IN, ARCDEG
from Aircraft_Models.Adv2014Aircraft_AeroCats.MonoWing.Aircraft import Aircraft


Aircraft.Draw(fig=2)
pyl.figure(1)

#
# Get the design point
#
dsgnPL = Aircraft.PayloadWeight() / (LBF)
dsgnCR = Aircraft.Rate_of_Climb() / (FT/MIN)
pyl.plot([dsgnCR],[dsgnPL],'ro', markersize = 8)

#
# Set up ranges
#
S    = npy.linspace(1800,3400,4)*IN**2
TotalWeight = npy.linspace(27,30,5)*LBF

lgnd = ['Design W = %2.2f (lbf)' % (Aircraft.TotalWeight / LBF)]
from __future__ import division  # let 5/2 = 2.5 rather than 2

#
# The following line turns off unit checking. Make sure things are working before it is turned off
#
from os import environ as _environ
_environ["scalar_off"] = "off"

import numpy as npy
import pylab as pyl
from scalar.units import FT, SEC, LBF, MIN, IN, ARCDEG
from Aircraft_Models.Adv2014Aircraft_AeroCats.MonoWing.Aircraft import Aircraft

Aircraft.Draw(fig=2)

pyl.figure(1)
# Climb Rate (x) and Groundroll (y)
# Get the design point
#
dsgnGR = Aircraft.Groundroll() / (FT)
dsgnCR = Aircraft.Rate_of_Climb() / (FT / MIN)
pyl.plot([dsgnCR], [dsgnGR], 'ro', markersize=8)

pyl.figure(3)
# Lift-Off Speed (x) and Aircraft Weight
# Plot the current design point
#
dsgnVLO = Aircraft.GetV_LO() / (FT / SEC)
dsgnWE = Aircraft.EmptyWeight / (LBF)
pyl.plot([dsgnVLO], [dsgnWE], 'ro', markersize=8)
#
from __future__ import division  # let 5/2 = 2.5 rather than 2

from os import environ as _environ
_environ["scalar_off"] = "off"

import numpy as npy
import pylab as pyl
from scalar.units import LBF
from Aircraft_Models.Adv2014Aircraft_AeroCats.MonoWing.Aircraft import Aircraft

#WeightRange = npy.linspace(35,40,2)*LBF

WeightRange = [Aircraft.TotalWeight]

Aircraft.PlotVNDiagram(2, WeightRange)
Aircraft.Draw(1)

pyl.show()
#VTail.Rudder.Fc = 0.5
#VTail.Rudder.Weight = 0.05*LBF * 2 # * 2 For symmetric vertical tail
#VTail.Rudder.SgnDup    = -1.0
#VTail.Rudder.Servo.Fc  = 0.3
#VTail.Rudder.Servo.Fbc = 0.1
#VTail.Rudder.Servo.Weight = 5*GRAM*gacc
#VTail.Rudder.Servo.Weight = 0.58 * OZF
#VTail.Rudder.Servo.Torque = 42*IN*OZM
#Set the sweep about the rudder hinge
#VTail.SweepFc = 1.0 - VTail.Rudder.Fc

if __name__ == '__main__':
    #    print 'Aircraft   V_LO     : ', AsUnit( Aircraft.GetV_LO(), 'ft/s')
    #    print 'Wing       V_LO     : ',  AsUnit( Aircraft.Wing.GetV_LO(), 'ft/s')
    #    print 'Wing       Area     : ',  AsUnit( Aircraft.Wing.S, 'in**2')
    print 'Ground Roll Distance: ', AsUnit(Aircraft.Groundroll(), 'ft')
    #    print 'HTail      Area     : ',    AsUnit( Aircraft.HTail.S, 'in**2')
    #    print 'HTail      VC       : ',     AsUnit( Aircraft.HTail.VC)
    #    print 'HTail      Span       : ',     AsUnit( Aircraft.HTail.b, 'in')
    #
    Aircraft.WriteAVLAircraft('AVL\AVLAircraft100.avl')
    #
    Aircraft.Draw()
    #
    #    Aircraft.PlotPolarsSlopes(fig=2)
    #    Aircraft.PlotCMPolars(3, (-10*ARCDEG, -5*ARCDEG, 0*ARCDEG, +5*ARCDEG, +10 * ARCDEG), XcgOffsets=(+0.02, -0.02))
    #    HTail.Draw2DAirfoilPolars(fig=4)
    #    Aircraft.PlotCLCMComponents(fig = 5, del_es = (-10*ARCDEG, -5*ARCDEG, 0*ARCDEG, +5*ARCDEG, +10 * ARCDEG))
    #
    pyl.show()
Exemple #12
0
from __future__ import division  # let 5/2 = 2.5 rather than 2
import numpy as npy
import pylab as pyl
from scalar.units import LBF
from Aircraft_Models.Adv2014Aircraft_AeroCats.MonoWing.Aircraft import Aircraft

#Get maximum score of lift two pounds more than predicted
#Aircraft.TotalWeight = Aircraft.TotalWeight - 2*LBF

TW = Aircraft.TotalWeight
EW = Aircraft.EmptyWeight
h = Aircraft.Wing.Alt_LO

Aircraft.PlotWeightPrediction(TeamName="U.C.A.L.D.",
                              TeamNumber=216,
                              fig=1,
                              TotalWeight=27 * LBF,
                              EmptyWeight=8.0 * LBF,
                              h=h,
                              ShowDesign=False)

pyl.show()