Skip to content

Commit

Permalink
cruise_comp updated cl & cd
Browse files Browse the repository at this point in the history
  • Loading branch information
FernCarrera committed May 30, 2019
1 parent ee49ca7 commit 9984a02
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions Model/Propulsion/cruise_comp.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def setup(self):
def compute(self,inputs,outputs):
W = inputs['W']*9.81
# add Cl & Cd if airfoil code doesnt work
#cl = 2*W/(rho*(inputs['V']**2)*inputs['S'])
#k = 1/(3.14*0.8*inputs['AR']) # e = 0.8
#cd = inputs['cd0'] + k*cl**2
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
cl = 2*W/(rho*(inputs['V']**2)*inputs['S'])
k = 1/(3.14*0.8*inputs['AR']) # e = 0.8
cd = inputs['cd0'] + k*cl**2
#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
20 changes: 10 additions & 10 deletions solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
ivc.add_output('cd0',val=0.0197)
ivc.add_output('rho',val=1.225)

ivc.add_output('V') # [m/s],~230[mph]
ivc.add_output('V')
ivc.add_output('Cd',val=0.03)
ivc.add_output('Cl',val=0.32)
ivc.add_output('S',val=13.2)
Expand All @@ -38,22 +38,22 @@
model.add_subsystem('FOM',PowerComp())
model.add_subsystem('range',RangeComp())
model.add_subsystem('cruiseP',CruiseComp()) # cruise power
model.add_subsystem('T_W',ThrustWeightComp())
#model.add_subsystem('T_W',ThrustWeightComp())

# conencting to gross_weights comp
model.connect('Wb','weight.Wb')
model.connect('Wp','weight.Wp')
model.connect('We/W0','weight.We/W0')

# connecting to thrustWeightComp
model.connect('G','T_W.G')
model.connect('n','T_W.n')
model.connect('e','T_W.e')
model.connect('AR','T_W.AR')
model.connect('cd0','T_W.cd0')
model.connect('rho','T_W.rho')
model.connect('W_S','T_W.W_S')
model.connect('V','T_W.Vc')
#model.connect('G','T_W.G')
#model.connect('n','T_W.n')
#model.connect('e','T_W.e')
#model.connect('AR','T_W.AR')
#model.connect('cd0','T_W.cd0')
#model.connect('rho','T_W.rho')
#model.connect('W_S','T_W.W_S')
#model.connect('V','T_W.Vc')

# connecting to Props comp
model.connect('weight.W0','FOM.W')
Expand Down

0 comments on commit 9984a02

Please sign in to comment.