/
wing_core.py
41 lines (31 loc) · 972 Bytes
/
wing_core.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
" wing interior "
from gpkit import Model, parse_variables
from gpkitmodels.GP.materials import foamhd
from gpkitmodels import g
#pylint: disable=exec-used, no-member, undefined-variable
class WingCore(Model):
""" Wing Core Model
Variables
---------
W [lbf] wing core weight
Abar 0.0753449 [-] normalized cross section area
Upper Unbounded
---------------
W
Lower Unbounded
---------------
cave, b, surface.deta
LaTex Strings
-------------
rhocore \\rho_{\\mathrm{core}}
Abar \\bar{A}
"""
material = foamhd
def setup(self, surface):
self.surface = surface
exec parse_variables(WingCore.__doc__)
cave = self.cave = surface.cave
b = self.b = surface.b
deta = surface.deta
rho = self.material.rho
return [W >= 2*(g*rho*Abar*cave**2*b/2*deta).sum()]