Skip to content

Commit

Permalink
initial attempt to breakdown surface and wing model
Browse files Browse the repository at this point in the history
  • Loading branch information
mjburton committed Oct 12, 2017
1 parent 3e26eb5 commit b6a9610
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions gpkitmodels/GP/aircraft/wing/wing.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,23 @@
import os

class Wing(Model):
def setup(self, N=5, lam=0.5, spar="CapSpar", hollow=False):

W = Variable("W", "lbf", "wing weight")

self.surf = AeroSurf(N=N, lam=lam, spar=spar, hollow=hollow)

constraints = [W == self.surf.topvar("W")]

self.spar = self.surf.spar
self.wingskin = self.surf.wingskin

self.flight_model = WingAero
self.loading = WingLoading

return constraints, self.surf

class AeroSurf(Model):
"The thing that creates the lift"
def setup(self, N=5, lam=0.5, spar="CapSpar", hollow=False):

Expand Down Expand Up @@ -57,12 +74,6 @@ def setup(self, N=5, lam=0.5, spar="CapSpar", hollow=False):

return self.components, constraints

def flight_model(self, state):
return WingAero(self, state)

def loading(self, Wcent, Wwing=None, V=None, CL=None):
return WingLoading(self, Wcent, Wwing, V, CL)

class WingLoading(Model):
"wing loading cases"
def setup(self, wing, Wcent, Wwing=None, V=None, CL=None):
Expand Down

0 comments on commit b6a9610

Please sign in to comment.