Skip to content

Commit

Permalink
make surface input to wing_skin
Browse files Browse the repository at this point in the history
  • Loading branch information
mjburton committed Oct 13, 2017
1 parent 7e92c2c commit 80f0691
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
4 changes: 1 addition & 3 deletions gpkitmodels/GP/aircraft/tail/horizontal_tail.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def setup(self, N=3, lam=0.8):
self.surf = AeroSurf(N=N)
self.surf.substitutions.update(subdict)

self.skin = WingSkin()
self.skin = WingSkin(self.surf)
self.skin.substitutions.update({"\\rho_{CFRP}": 0.049})
self.foam = WingInterior()
self.foam.substitutions.update({"\\bar{A}_{jh01}": 0.0548})
Expand All @@ -42,8 +42,6 @@ def setup(self, N=3, lam=0.8):
constraints = [
W/mfac >= sum([c["W"] for c in self.components]),
mh*(1+2.0/self.surf["AR"]) <= 2*np.pi,
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
Expand Down
4 changes: 1 addition & 3 deletions gpkitmodels/GP/aircraft/tail/vertical_tail.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def setup(self, N=3, lam=0.8):
self.surf = AeroSurf(N=N)
self.surf.substitutions.update(subdict)

self.skin = WingSkin()
self.skin = WingSkin(self.surf)
self.skin.substitutions.update({"\\rho_{CFRP}": 0.049})
self.foam = WingInterior()
self.foam.substitutions.update({"\\bar{A}_{jh01}": 0.0548})
Expand All @@ -37,8 +37,6 @@ def setup(self, N=3, lam=0.8):

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
Expand Down
4 changes: 1 addition & 3 deletions gpkitmodels/GP/aircraft/wing/wing.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,12 @@ def setup(self, N=5, lam=0.5, hollow=False):
self.surf = AeroSurf(N)
self.surf.substitutions.update(subdict)
self.spar = CapSpar(N, self.surf)
self.skin = WingSkin()
self.skin = WingSkin(self.surf)
self.components = [self.spar, self.skin]


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"]),
]

if not hollow:
Expand Down
5 changes: 3 additions & 2 deletions gpkitmodels/GP/aircraft/wing/wing_skin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

class WingSkin(Model):
"wing skin model"
def setup(self):
def setup(self, surface):

rhocfrp = Variable("\\rho_{CFRP}", 1.6, "g/cm^3", "density of CFRP")
W = Variable("W", "lbf", "wing skin weight")
Expand All @@ -13,7 +13,8 @@ def setup(self):
Jtbar = Variable("\\bar{J/t}", 0.01114, "1/mm",
"torsional moment of inertia")

constraints = [t >= tmin]
constraints = [W >= rhocfrp*surface["S"]*2*t*g,
t >= tmin]

self.loading = WingSkinL

Expand Down

0 comments on commit 80f0691

Please sign in to comment.