-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix tail flex model to use theta from bending model
- Loading branch information
mjburton
committed
Dec 13, 2017
1 parent
761babf
commit f08b57d
Showing
4 changed files
with
49 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,48 @@ | ||
" tail boom flexibility " | ||
import numpy as np | ||
from gpkit import Model, Variable, SignomialsEnabled | ||
from numpy import pi | ||
from gpkit import Model, parse_variables, SignomialsEnabled | ||
|
||
class TailBoomFlexibility(Model): | ||
"tail boom flexibility model" | ||
def setup(self, htail, tailboom, wing, state): | ||
""" Tail Boom Flexibility Model | ||
Fne = Variable("F_{NE}", "-", "tail boom flexibility factor") | ||
deda = Variable("d\\epsilon/d\\alpha", "-", "wing downwash derivative") | ||
SMcorr = Variable("SM_{corr}", 0.55, "-", "corrected static margin") | ||
Variables | ||
--------- | ||
Fne [-] tail boom flexibility factor | ||
deda [-] wing downwash derivative | ||
SMcorr 0.55 [-] corrected static margin | ||
sph1 [-] flexibility helper variable 1 | ||
sph2 [-] flexibility helper variable 2 | ||
# signomial helper variables | ||
sph1 = Variable("sph1", "-", "first term involving $V_h$") | ||
sph2 = Variable("sph2", "-", "second term involving $V_h$") | ||
LaTex Strings | ||
------------- | ||
Fne F_{\mathrm{NE}} | ||
deda d\\epsilon/d\\alpha | ||
SMcorr SM_{\\mathrm{corr}} | ||
""" | ||
def setup(self, htail, hbending, wing): | ||
exec parse_variables(TailBoomFlexibility.__doc__) | ||
|
||
mh = htail.mh | ||
mw = wing.mw | ||
Vh = htail.Vh | ||
th = hbending.th | ||
CLhmin = htail.CLhmin | ||
CLwmax = wing.planform.CLmax | ||
Sw = wing.planform.S | ||
bw = wing.planform.b | ||
lh = htail.lh | ||
CM = wing.planform.CM | ||
|
||
constraints = [ | ||
Fne >= (1 + htail.mh*0.5*state.Vne**2*state.rhosl | ||
* htail["S"]*htail.lh**2/tailboom.E | ||
/ tailboom.I0*tailboom.kfac), | ||
sph1*(wing["m_w"]*Fne/htail.mh/htail.Vh) + deda <= 1, | ||
sph2 <= htail.Vh*htail.CLhmin/wing.planform.CLmax, | ||
Fne >= 1 + mh*th, | ||
sph1*(mw*Fne/mh/Vh) + deda <= 1, | ||
sph2 <= Vh*CLhmin/CLwmax, | ||
# (sph1 + sph2).mono_lower_bound({"sph1": .48, "sph2": .52}) >= ( | ||
# SMcorr + wing["C_M"]/wing["C_{L_{max}}"]), | ||
deda >= wing["m_w"]*wing["S"]/wing["b"]/4/np.pi/htail.lh] | ||
deda >= mw*Sw/bw/4/pi/lh] | ||
|
||
with SignomialsEnabled(): | ||
constraints.extend([sph1 + sph2 >= SMcorr + wing.planform.CM/wing.planform.CLmax]) | ||
constraints.extend([sph1 + sph2 >= SMcorr + CM/CLwmax]) | ||
|
||
return constraints |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters