Skip to content

Commit

Permalink
change to accomodate changes in loading definitions in library
Browse files Browse the repository at this point in the history
  • Loading branch information
mjburton committed Jan 23, 2018
1 parent 3c7532c commit f868a19
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
5 changes: 5 additions & 0 deletions gassolar/gas/flight_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,16 @@ def setup(self, Vwind, latitude=45, percent=90, altitude=15000, day=355):
mu = self.mu = Variable("\\mu", vis, "N*s/m**2", "dynamic viscosity")
h = Variable("h", altitude, "ft", "flight altitude")
href = Variable("h_{ref}", 15000, "ft", "reference altitude")
qne = self.qne = Variable("qne", "kg/s^2/m",
"never exceed dynamic pressure")
Vne = Variable("Vne", 40, "m/s", "never exceed velocity")
rhosl = Variable("rhosl", 1.225, "kg/m^3", "air density at sea level")

constraints = [V/mfac >= Vwind,
rho == rho,
mu == mu,
h == h,
qne == 0.5*rhosl*Vne**2,
href == href]

return constraints
20 changes: 12 additions & 8 deletions gassolar/gas/gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,10 @@ def setup(self, sp=False):
self.emp.substitutions[self.emp.htail.planform.tau] = 0.08
self.wing.substitutions[self.wing.planform.tau] = 0.115

loading = []
if not sp:
self.emp.substitutions[self.emp.htail.Vh] = 0.45
self.emp.substitutions[self.emp.htail.planform.AR] = 5.0
self.emp.substitutions[self.emp.htail.mh] = 0.1
else:
loading.append(TailBoomFlexibility(self.emp.htail,
self.emp.hbend,
self.wing))

constraints = [
Wzfw >= sum(summing_vars(components, "W")) + Wpay + Wavn,
Expand All @@ -66,7 +61,7 @@ def setup(self, sp=False):
self.wing.planform.tau*self.wing.planform.croot >= self.emp.tailboom.d0
]

return components, constraints, loading
return components, constraints

def flight_model(self, state):
return AircraftPerf(self, state)
Expand Down Expand Up @@ -175,8 +170,17 @@ def setup(self, latitude=38, percent=90, sp=False):
# mission = [climb1, cruise1, loiter1, cruise2]
mission = [climb1, loiter1]

loading = [JHO.wing.spar.loading(JHO.wing),
JHO.wing.spar.gustloading(JHO.wing)]
hbend = JHO.emp.tailboom.tailLoad(JHO.emp.tailboom, JHO.emp.htail,
loiter1.fs.fs)
vbend = JHO.emp.tailboom.tailLoad(JHO.emp.tailboom, JHO.emp.vtail,
loiter1.fs.fs)
loading = [JHO.wing.spar.loading(JHO.wing, loiter1.fs.fs),
JHO.wing.spar.gustloading(JHO.wing, loiter1.fs.fs),
hbend, vbend]

if sp:
loading.append(TailBoomFlexibility(JHO.emp.htail,
hbend, JHO.wing))

constraints = [
mtow >= climb1["W_{start}"][0],
Expand Down

0 comments on commit f868a19

Please sign in to comment.