From 64a05f360589fd8b228128689b74bf0a35ab280d Mon Sep 17 00:00:00 2001 From: Fern Carrera Date: Mon, 3 Jun 2019 14:45:58 -0700 Subject: [PATCH] Final design --- .../__pycache__/cruise_comp.cpython-37.pyc | Bin 1394 -> 1654 bytes Model/Propulsion/cruise_comp.py | 14 ++++++- .../weight_buildup_comp.cpython-37.pyc | Bin 2085 -> 2128 bytes Model/Weight/weight_buildup_comp.py | 5 ++- .../__pycache__/cost_buildup.cpython-37.pyc | Bin 1603 -> 1616 bytes .../__pycache__/tooling_cost.cpython-37.pyc | Bin 1447 -> 1447 bytes .../costanalysis/cost_buildup.py | 6 +-- .../costanalysis/tooling_cost.py | 6 +-- n2.html | 2 +- solver.py | 39 +++++++++++++----- 10 files changed, 51 insertions(+), 21 deletions(-) diff --git a/Model/Propulsion/__pycache__/cruise_comp.cpython-37.pyc b/Model/Propulsion/__pycache__/cruise_comp.cpython-37.pyc index bf71d95b64c6b01e3203c3251acdf7b7791eaa24..839fb1c23a063fbd6f83372c865bde014435ed87 100644 GIT binary patch delta 803 zcmZutJ&)5s5Z&3elaM&hCwKWkr?f#RX{b_leN-&w8LhXkf1e&_H+G|U zjTkb7DVu=TCyqa*VlU>HWGof2KVcq@YHry+LToytZgdOSP zco8MtyoXFMFOgE#fAoTnhx$`0}L=KqSS++Y^qV(J|NV-}0_;1+dih`&%(p*H{k delta 504 zcmY*VJx>Bb5Z&3mJMe(x!w5)FV`50KuroFU64BTg3hf9TOB4l;+=n5?*l0^Zwy{$y zOMivG!Q^6LVId_J*3LjAVJGu4GrRA--TjUJnAUzQW-?qakCVomKC-e0Ti8h^p~JdR z2Vj!d`4N*sYWGZPEw~ePA@x&MG{!_MLXbQh^gHcl+pF5$zTIo}yph|4!RWnQ0cpyJ z6hjW|hCP9dKBMBaip?u)R$Xuz$4JQJP@pSAhm^X86ZHW*s=#ZIRz7d!meA8pkuzAr z0t`fxLQQx+ZsCT8S;cg}n97SQ^&mRNR4=XSnmnfWIuU{>!dM`jVdDC%w7;=+$OGRc zoO8QqIV;!&M!VPdJvRv1zDI>aCXT5#^wn*W3E*<3nWp&^GBge~@lSlOmBYqeSGRh` zOh5v{6kNUPrM)Z>3Uk&X-=W(X#3jG52q&kLT2WJ*#`3PSMm#z*vs@$x;ZoO@ey3H2 Je}yR5#2<>VVC?_^ diff --git a/Model/Propulsion/cruise_comp.py b/Model/Propulsion/cruise_comp.py index fe6d099..ffecdeb 100644 --- a/Model/Propulsion/cruise_comp.py +++ b/Model/Propulsion/cruise_comp.py @@ -1,4 +1,5 @@ from openmdao.api import ExplicitComponent +import numpy as np rho = 1.225 #density, [kg/m**3] @@ -13,12 +14,15 @@ def setup(self): self.add_input('AR',desc='Aspect Ratio') self.add_input('S',desc='Refernce Area') self.add_input('V',desc='Airspeed') + self.add_input('r',desc='prop radius') #self.add_input('cd0',desc='zero lift drag') self.add_output('P_C',desc='Power required for cruise') self.add_output('cl') self.add_output('cd') self.add_output('cd0') + self.add_output('B') + self.add_output('clear',desc = 'radius clearance') self.declare_partials(of='*', wrt='*', method='cs') @@ -34,10 +38,18 @@ def compute(self,inputs,outputs): Swet = (10**c)*(inputs['W']*2.2046)**d f = (10**a)*Swet**b cd0 = f/(inputs['S']*10.7639) + cd0 = cd0.real k = 1/(3.14*0.8*inputs['AR']) # e = 0.8 cd = cd0 + k*cl**2 outputs['cl'] = cl outputs['cd'] = cd outputs['cd0'] = cd0 #outputs['P_C'] = (( (2*(W**3)*(inputs['Cd']**2))/(inputs['S']*rho*(inputs['Cl']**3)) )**.5)/1000 - outputs['P_C'] = (( (2*(W**3)*(cd**2))/(inputs['S']*rho*(cl**3) ))**.5)/1000 \ No newline at end of file + outputs['P_C'] = (( (2*(W**3)*(cd**2))/(inputs['S']*rho*(cl**3) ))**.5)/1000 + S = inputs['S'] + AR = inputs['AR'] + B = ((S/2)*AR)**0.5 + r_prop = inputs['r'] + clear = (B/2 - 3*r_prop)/(B/2) + outputs['clear'] = clear + outputs['B'] = B \ No newline at end of file diff --git a/Model/Weight/__pycache__/weight_buildup_comp.cpython-37.pyc b/Model/Weight/__pycache__/weight_buildup_comp.cpython-37.pyc index 4fd7a2652561dc15cbcaa8d85e9934cd739ea3bd..ece79dce2d8efeb4292fec83005bf1367b598cb2 100644 GIT binary patch delta 625 zcmYjOO>fgc5Z!g$I!$cHiS2y3DK4}?2qk>C(7>TL1h*cL5SPFURgoyjdyxI3O-gz4xM&VWvR0KWa>94zK^&tErUmSeD zH5Bj>pfq))P~xFPNN)|%w8XW8IvTSs#J1?iW+eCg?bi!0clUPkaWNU2_wt@hP1TuH zB5N;0CzR%uvo1fI56;bfMV1|bS|W5vI3ippTth=gs;28|4sj-Q1Bs52>I6*{q7{oo zs1n+oeROO_SItw*n5!ys#G=JIMNb7-`j0=t*h3!gTca4uO!zp;f+misilQ;F!h9L4 znZR+2ae@q6IH@A^xwk-d8>f_q0oMsmbDj;bMv61G)*TG(NVR}Y;k@NH^dc^( z8ZNTP#U;)eE^}^R-DYf%u!k%BPgmPQFJaU4-L-f`HAt{O+_ZCfDy(3HH)azu!*D09i`ah zxy@AtV-%wCA3x5yhhvN>n(3A`4A5dh700PaC1Wtb13pgV0w-;bQ^s%vla$~z_l}sl zhBkSa;yS}L_q$hU(?40qH>2dxBAu6{MGc@;63bQ+{cN zX672f6o^gCHQXt@&CDsBKyw6BIKj5FqzC|cAQ?WWTE58@Os;}ponVzhAl*Ro&M~RF za@TN30Nn}H!CS)$v>9T)a0&;iPf~EH1DPZ^*@9VLM944Q7z~&l(m{d3z#!!?xtLi| z0mNir_+wwh2&7&z0g3c9FnDHP1mbO8&z#T5C@@)`^*p~2kgv&li#4w_x1h3!WAa~C jaea_jkpL;|KDJS%3rwBM%b*%ym+% delta 415 zcmcb>bC`$MiIMvyQ_EP(qXS7HeKOpenMDAO Partition Tree and N2 diagram.