Skip to content

Commit

Permalink
delete unncessary args; loading model
Browse files Browse the repository at this point in the history
  • Loading branch information
mjburton committed Nov 10, 2017
1 parent 9f6d0cf commit fd78b66
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 32 deletions.
9 changes: 2 additions & 7 deletions gpkitmodels/GP/aircraft/wing/gustloading.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class GustL(SparLoading):
new_qbarFun = None
new_SbarFun = None

def setup(self, static, Wcent=None, Wwing=None, V=None, CL=None):
def setup(self, static):

self.load = SparLoading.setup(self, static, Wcent=Wcent)
self.load = SparLoading.setup(self, static)
vgust = Variable("V_{gust}", 10, "m/s", "gust velocity")
Ww = Variable("W_w", "lbf", "wing weight")
v = Variable("V", "m/s", "speed")
Expand All @@ -40,9 +40,4 @@ def setup(self, static, Wcent=None, Wwing=None, V=None, CL=None):
1 + 2*pi*agust/cl*(1+Ww/self.W)),
]

if Wcent:
constraints.extend([V == v,
CL == cl,
Ww == Wwing])

return self.load, constraints
14 changes: 1 addition & 13 deletions gpkitmodels/GP/aircraft/wing/sparloading.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,6 @@

#pylint: disable=invalid-name

class ChordSparL(Model):
" place holder so dependent repos don't break "
def setup(self, static, Wcent):

sploading = SparLoading(static, Wcent)

return sploading


class SparLoading(Model):
"spar loading model"

Expand All @@ -22,7 +13,7 @@ def new_qbarFun(self, c):
barc = self.static["\\bar{c}"]
return [f(c) for f in self.static.substitutions[barc]]

def setup(self, static, Wcent=None):
def setup(self, static):

self.static = static
Nmax = Variable("N_{max}", 5, "-", "max loading")
Expand Down Expand Up @@ -52,7 +43,4 @@ def setup(self, static, Wcent=None):
/ self.static["\\tau"])
]

if Wcent:
constraints.extend([self.W == Wcent])

return self.beam, constraints
12 changes: 0 additions & 12 deletions gpkitmodels/GP/aircraft/wing/wing.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,6 @@ def setup(self, N):
croot == S/b*cbar[0],
cmac == croot*cbarmac]

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

loading = [wing.skin.loading(wing)]
loading.append(wing.spar.loading(wing, Wcent))
if Wwing:
loading.append(wing.spar.gustloading(wing, Wcent, Wwing, V, CL))

return loading

class WingAero(Model):
"wing aerodynamic model with profile and induced drag"
def setup(self, static, state):
Expand Down Expand Up @@ -108,7 +97,6 @@ class Wing(Model):
sparModel = CapSpar
fillModel = WingInterior
flight_model = WingAero
loading = WingLoading

def setup(self, N=5, lam=0.5):
# TODO: phase out lam in later version
Expand Down

0 comments on commit fd78b66

Please sign in to comment.