Skip to content

Commit

Permalink
modify loading to fit parsing structure
Browse files Browse the repository at this point in the history
  • Loading branch information
mjburton committed Nov 13, 2017
1 parent 6c1bbc7 commit 3db4ec4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
3 changes: 2 additions & 1 deletion gpkitmodels/GP/aircraft/tail/tail_tests.py
Expand Up @@ -9,7 +9,8 @@ def test_htail():

ht = HorizontalTail()
fs = FlightState()
ht.substitutions.update({ht.topvar("W"): 5, "m_h": 0.01, "AR": 4})
ht.substitutions.update({ht.topvar("W"): 5, "m_h": 0.01, "AR": 4,
"V_h": 0.5})
perf = ht.flight_model(ht, fs)

m = Model(perf["C_d"], [ht, perf])
Expand Down
2 changes: 1 addition & 1 deletion gpkitmodels/GP/aircraft/wing/gustloading.py
Expand Up @@ -36,7 +36,7 @@ def setup(self, static):
constraints = [
# fit for arctan from 0 to 1, RMS = 0.044
FitCS(df, agust, [cosminus1*vgust/v]),
self.beam["\\bar{q}"] >= self.static["\\bar{c}"]*(
self.beam["\\bar{q}"] >= self.static.planform.cbar*(
1 + 2*pi*agust/cl*(1+Ww/self.W)),
]

Expand Down
11 changes: 6 additions & 5 deletions gpkitmodels/GP/aircraft/wing/sparloading.py
Expand Up @@ -32,15 +32,16 @@ def setup(self, static):

constraints = [
# dimensionalize moment of inertia and young's modulus
self.beam["dx"] == self.static["d\\eta"],
self.beam["dx"] == self.static.planform.deta,
self.beam["\\bar{EI}"] <= (8*self.static["E"]*self.static["I"]/Nmax
/ self.W/self.static["b"]**2),
Mr == (self.beam["\\bar{M}"][:-1]*self.W*Nmax*self.static["b"]/4),
/ self.W/self.static.planform.b**2),
Mr == (self.beam["\\bar{M}"][:-1]*self.W*Nmax
* self.static.planform.b/4),
sigmacfrp >= Mr/self.static["S_y"],
self.beam["\\bar{\\delta}"][-1] <= kappa,
taucfrp >= (self.beam["\\bar{S}"][-1]*self.W*Nmax/4
/ self.static["t_{shear}"]/self.static["c_{ave}"]
/ self.static["\\tau"])
/ self.static["t_{shear}"]/self.static.planform.cave
/ self.static.planform.tau)
]

return self.beam, constraints
3 changes: 2 additions & 1 deletion gpkitmodels/GP/aircraft/wing/wing_test.py
Expand Up @@ -32,7 +32,8 @@ def wing_test():
loading[1]["c_l"] == perf["C_L"],
loading[1]["W_w"] == W.topvar("W"),
W, fs, perf, loading])
m.solve("mosek")
s = m.solve("mosek")
print s("b")

if __name__ == "__main__":
wing_test()

0 comments on commit 3db4ec4

Please sign in to comment.