Skip to content

Commit

Permalink
set up optimization w/values from lecture
Browse files Browse the repository at this point in the history
  • Loading branch information
FernCarrera committed May 24, 2019
1 parent 02311b2 commit a88e6d6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Binary file modified Model/Propulsion/__pycache__/power_comp.cpython-36.pyc
Binary file not shown.
6 changes: 3 additions & 3 deletions Model/Propulsion/power_comp.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from openmdao.api import ExplicitComponent

n = 1 # variable accounting for failed motor and e extra power

class PowerComp(ExplicitComponent):





def setup(self):
Expand All @@ -30,7 +30,7 @@ def compute(self, inputs, outputs):


S = 3.14*(r**2)
T = W/8 # thrust required per motor
T = n*W/8 # thrust required per motor
ct = T/( rho *S* (tip_speed**2) )
cp = ( 1.15*( (ct**(3/2)) /(2**.5) ) + (1/8)*0.1*cd0 )
PI = T * ((T/(2*S*rho))**.5)
Expand Down
4 changes: 2 additions & 2 deletions solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
prob.driver.options['disp'] = True

model.add_design_var('r',lower=0.5,upper=1.5)
model.add_design_var('We/W0',lower=0.50,upper=0.80)
model.add_constraint('weight.W0',lower = 2000,upper=2500)
model.add_design_var('We/W0',lower=0.30,upper=0.70) # 30% - 70%, from lecture
model.add_constraint('weight.W0',lower = 1500,upper=2500)
model.add_constraint('FOM.FM',equals=0.80)
model.add_objective('FOM.PH')

Expand Down

0 comments on commit a88e6d6

Please sign in to comment.