from scalar.units import AsUnit
from Aerothon.ACControls import ACControls
from Aerothon import AeroUtil

# import aircraft... this is a pain of the file structure
dir_path = os.path.dirname(os.path.realpath(__file__))
parent=dir_path[:-18]
sys.path.append(parent)
from _aircraft_BAP import Aircraft

#=============================================================================#
# AILERON SIZING (w/Results & Visualization)
#=============================================================================#
Execute = True

Controls = ACControls(Aircraft)
Controls.RunDir = 'AVL/'
Controls.AddRun('Stab', 'AVLAircraft.avl', WriteAVLInput = Execute)
Controls.Stab.AddCommand('a a ' + str(Aircraft.Alpha_Zero_CM/ARCDEG) )
Controls.Stab.DumpStability('AVLDeriv.txt')
Controls.Stab.Exit()

if Execute:
    Controls.ExecuteAVL()
    
Controls.ReadAVLFiles()


Aircraft.Draw(fig=1)

예제 #2
0
# go back to the working directory

startTime = time.time()  # mark start of simulation

#==============================================================================#
# REVAMPED AEROTHON CLASSES
#==============================================================================#
#ACBatchRun

#==============================================================================#
# CONTROLS TABLE
#==============================================================================#
Execute = True

# Set-up AVL Controls Run
Controls = ACControls(Aircraft)

#Controls.StaticMargin = 0.10
Controls.RunDir = AVLDir  # because we redirected to the BAP directory
Controls.AddRun('Stab', 'AVLAircraft.avl', WriteAVLInput=Execute)
Controls.Stab.AddCommand('a a ' + str(Aircraft.Alpha_Zero_CM / ARCDEG))
Controls.Stab.DumpStability('AVLDeriv.txt')
Controls.Stab.Exit()

if Execute:
    Controls.ExecuteAVL()

Controls.ReadAVLFiles()

Deriv = Controls.Deriv[0]
예제 #3
0
from Aerothon.ACControls import ACControls
from Aircraft_Models.Adv2014Aircraft_AeroCats.Controls.StatcStability_PolarSlopes import Aircraft
from scalar.units import SEC, ARCDEG, FT, LBF
import pylab as pyl
import numpy as npy

Execute = True
#
# Do a trade study on horizontal tail volume coefficient
#
HTail = Aircraft.HTail
Controls = ACControls(Aircraft)

#
# This is the directory where the AVL related files will be written.
# This directory must exist for AVL to execute properly
#
Controls.RunDir = 'AVLHT/'

#airfoil = ('NACA2412','NACA2612','NACA2712','NACA2812','NACA2912','e423')
#VCs = (0.345,0.32,0.31,0.295,0.31,0.25)
#VCs = [HTail.VC]*len(airfoil)

airfoil = ('NACA3412', 'NACA4412', 'NACA5412', 'NACA6313', 'NACA6413',
           'NACA6513')

VCs = {}
VCs['NACA3412'] = 0.22
VCs['NACA4412'] = 0.215
VCs['NACA5412'] = 0.211
VCs['NACA6313'] = 0.218
예제 #4
0
from Aerothon.ACControls import ACControls
from Aircraft_Models.Adv2014Aircraft_AeroCats.Controls.StatcStability_PolarSlopes import Aircraft
from scalar.units import IN, LBF, ARCDEG, SEC
from scalar.units import AsUnit
import pylab as pyl
import numpy as npy
import cmath as math

Execute = True

#
# Set-up AVL Controls Run
#
Controls = ACControls(Aircraft)

DWF = npy.linspace(1.3, 1.7, 10)
Xnp = []
Cm = []
iht = []

HTail = Aircraft.HTail

Aircraft.Refresh()
Aircraft.Draw(2)
Aircraft.PlotCMPolars(
    3, (-10 * ARCDEG, -5 * ARCDEG, 0 * ARCDEG, +5 * ARCDEG, +10 * ARCDEG),
    XcgOffsets=(+0.05, -0.05))

SetDWF = HTail.DWF

print "DWF, iht : ", SetDWF, AsUnit(Aircraft.HTail.i, 'deg')
from Aerothon.ACControls import ACControls
from Aircraft import Aircraft
from scalar.units import IN, LBF, SLUG, FT, ARCDEG, SEC
from scalar.units import AsUnit
import pylab as pyl
import numpy as npy

#
# Set-up AVL Controls Run
#
Controls = ACControls(Aircraft)
Controls.RunDir = 'AVLControls/'
Controls.AddRun('Stab', 'AVLAircraft.avl', WriteAVLInput = True)
Controls.Stab.DumpStability('AVLDeriv.txt')
Controls.Stab.Exit()

Controls.ExecuteAVL()

Controls.ReadAVLFiles()

Controls.Ixx = 0.314*SLUG*FT**2
Controls.Iyy = 0.414*SLUG*FT**2
Controls.Izz = 0.570*SLUG*FT**2

Controls.Weight = 7.4*LBF

Deriv = Controls.Deriv[0]

Deriv.StabilityTable(fig=1)

print "\n Aircraft MOI: ",Aircraft.MOI()