-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
mjburton
committed
Oct 12, 2017
1 parent
9158380
commit e4f9ebd
Showing
3 changed files
with
43 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,48 @@ | ||
" vertical tail " | ||
import numpy as np | ||
from gpkit import Model, Variable | ||
from tail_aero import TailAero | ||
from gpkitmodels.GP.aircraft.wing.wing import AeroSurf | ||
from gpkitmodels.GP.aircraft.wing.constant_taper_chord import c_bar | ||
from gpkitmodels.GP.aircraft.wing.wing_interior import WingInterior | ||
from gpkitmodels.GP.aircraft.wing.wing_skin import WingSkin | ||
|
||
class VerticalTail(Model): | ||
"vertical tail model" | ||
def setup(self, lam=0.7): | ||
|
||
W = Variable("W", "lbf", "one vertical tail weight") | ||
Sv = Variable("S", "ft**2", "total vertical tail surface area") | ||
Vv = Variable("V_v", 0.05, "-", "vertical tail volume coefficient") | ||
ARv = Variable("AR_v", "-", "vertical tail aspect ratio") | ||
bv = Variable("b", "ft", "one vertical tail span") | ||
rhofoam = Variable("\\rho_{foam}", 1.5, "lbf/ft^3", | ||
"Density of formular 250") | ||
rhoskin = Variable("\\rho_{skin}", 0.049, "g/cm**2", | ||
"vertical tail skin density") | ||
Abar = Variable("\\bar{A}_{NACA0008}", 0.0548, "-", | ||
"cross sectional area of NACA 0008") | ||
g = Variable("g", 9.81, "m/s^2", "Gravitational acceleration") | ||
lv = Variable("l_v", "ft", "horizontal tail moment arm") | ||
ctv = Variable("c_{t_v}", "ft", "vertical tail tip chord") | ||
crv = Variable("c_{r_v}", "ft", "vertical tail root chord") | ||
lamv = Variable("\\lambda", lam, "-", "vertical tail taper ratio") | ||
lamvfac = Variable("\\lambda_v/(\\lambda_v+1)", lam/(lam+1), "-", | ||
"vertical tail taper ratio factor") | ||
CLvtmax = Variable("C_{L_{max}}", 1.1, "-", | ||
"maximum CL of vertical tail") | ||
def setup(self, N=3, lam=0.8): | ||
|
||
Vv = Variable("V_v", "-", "vertical tail volume coefficient") | ||
W = Variable("W", "lbf", "vertical tail weight") | ||
lv = Variable("l_v", "ft", "vertical tail moment arm") | ||
mfac = Variable("m_{fac}", 1.1, "-", "vertical tail margin factor") | ||
tau = Variable("\\tau", 0.08, "-", "vertical tail thickness ratio") | ||
|
||
constraints = [bv**2 == ARv*Sv, | ||
W/mfac >= rhofoam*Sv**2/bv*Abar + g*rhoskin*Sv, | ||
ctv == 2*Sv/bv*lamvfac, | ||
crv == ctv/lam, | ||
lamv == lamv | ||
] | ||
cb, eta, deta, cbarmac = c_bar(lam, N) | ||
subdict = {"\\lambda": lam, "\\bar{c}": cb, "\\eta": eta, | ||
"\\bar{c}_{ave}": (cb[1:]+cb[:-1])/2, "\\tau": 0.08, | ||
"\\bar{c}_{MAC}": cbarmac, "d\\eta": deta, "C_{L_{max}}": 1.5} | ||
|
||
self.surf = AeroSurf(N=N) | ||
self.surf.substitutions.update(subdict) | ||
|
||
self.skin = WingSkin() | ||
self.skin.substitutions.update({"\\rho_{CFRP}": 0.049}) | ||
self.foam = WingInterior() | ||
self.foam.substitutions.update({"\\bar{A}_{jh01}": 0.0548}) | ||
self.foam.substitutions.update({"\\rho_{foam}": 0.024}) | ||
|
||
self.components = [self.skin, self.foam] | ||
|
||
constraints = [ | ||
W/mfac >= sum([c["W"] for c in self.components]), | ||
self.skin["W"] >= (self.skin["\\rho_{CFRP}"]*self.surf["S"]*2 | ||
* self.skin["t"]*self.skin["g"]), | ||
self.foam["W"] >= 2*( | ||
self.foam["g"]*self.foam["\\rho_{foam}"] | ||
*self.foam["\\bar{A}_{jh01}"]*self.surf["c_{ave}"]**2 | ||
* (self.surf["b"]/2)*self.surf["d\\eta"]).sum() | ||
] | ||
|
||
return constraints | ||
return constraints, self.surf, self.components | ||
|
||
def flight_model(self, state): | ||
return TailAero(self, state) |