/
wing_skin.py
51 lines (41 loc) · 1.35 KB
/
wing_skin.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
42
43
44
45
46
47
48
49
50
" wing skin "
from gpkit import Model, Variable, parse_variables
from gpkitmodels.GP.materials import cfrpfabric
from gpkitmodels import g
class WingSkin(Model):
""" Wing Skin model
Variables
---------
W [lbf] wing skin weight
t [in] wing skin thickness
Jtbar 0.01114 [1/mm] torsional moment of inertia
Cmw 0.121 [-] negative wing moment coeff
rhosl 1.225 [kg/m^3] sea level air density
Vne 45 [m/s] never exceed vehicle speed
Upper Unbounded
---------------
W, croot
Lower Unbounded
---------------
S
LaTex Strings
-------------
W W_{\\mathrm{skin}}
t t_{\\mathrm{skin}}
Jtbar \\bar{J/t}
Cmw C_{m_w}
rhosl \\rho_{\\mathrm{SL}}
Vne V_{\\mathrm{NE}}
"""
material = cfrpfabric
def setup(self, surface):
exec parse_variables(WingSkin.__doc__)
croot = self.croot = surface.croot
S = self.S = surface.S
rho = self.material.rho
tau = self.material.tau
tmin = self.material.tmin
return [W >= rho*surface.S*2*t*g,
t >= tmin,
tau >= 1/Jtbar/croot**2/t*Cmw*S*rhosl*Vne**2
]