Skip to content

Commit

Permalink
Now with localsolve.
Browse files Browse the repository at this point in the history
  • Loading branch information
1ozturkbe committed Sep 6, 2019
1 parent ba130a8 commit bebd56a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion turbofan/combustor.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def setup(self, combustor, engine, state, mixing = True):

# making f+1 GP compatible --> needed for convergence
SignomialEquality(fp1,f+1),
# Tight([fp1 >= f+1]),
# Tight([fp1 <= f+1]),
# Relaxation of this SE makes problem hit iteration limit
])

Expand Down
7 changes: 4 additions & 3 deletions turbofan/engine_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,8 @@ def setup(self, thrust, engine, state, BLI):

#constrain the new BPR
alpha == mFan / mCore,
SignomialEquality(alphap1, alpha + 1),
# SignomialEquality(alphap1, alpha + 1),
Tight([alphap1 <= alpha + 1]),
alpha <= self.thrust['\\alpha_{max}'],

#SIGNOMIAL
Expand Down Expand Up @@ -738,7 +739,7 @@ def test():

substitutions = get_cfm56_subs()
m = Model((10*engine.engineP.thrustP['TSFC'][0]+engine.engineP.thrustP['TSFC'][1]), [engine, mission], substitutions)
sol = m.penalty_ccp_solve(verbosity = 2)
sol = m.localsolve(verbosity = 2)

if __name__ == "__main__":
"""
Expand Down Expand Up @@ -786,7 +787,7 @@ def test():

#update substitutions and solve
m.substitutions.update(substitutions)
sol = m.penalty_ccp_solve(verbosity=2, x0=x0)
sol = m.localsolve(verbosity=2, mutategp=False) #x0=x0)
sol.savetxt()

#print out various percent differences in TSFC and engine areas
Expand Down

0 comments on commit bebd56a

Please sign in to comment.