Skip to content

Commit 4509c0e

Browse files
committed
Added an initial solving step for the methanol flowsheet for the optimization portion to user a more relaxes and smoother transition. This is due to newly added bounds for _teq
1 parent 817a0a0 commit 4509c0e

2 files changed

Lines changed: 2385 additions & 718 deletions

File tree

idaes_examples/notebooks/docs/flowsheets/methanol_flowsheet_w_recycle.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -916,8 +916,22 @@ def main(m):
916916

917917
print()
918918
print("Solving optimization problem...")
919+
920+
# Pass 1: smoothed VLE transition
921+
eps_nominal = value(m.fs.F101.control_volume.properties_in[0.0].eps_2_Vap_Liq)
922+
m.fs.F101.control_volume.properties_in[0.0].eps_2_Vap_Liq.set_value(eps_nominal * 2.5)
923+
m.fs.F101.control_volume.properties_out[0.0].eps_2_Vap_Liq.set_value(eps_nominal * 2.5)
924+
919925
opt_res = solver.solve(m, tee=True)
920926
assert opt_res.solver.termination_condition == TerminationCondition.optimal
927+
928+
# Pass 2: restore default smoothness
929+
m.fs.F101.control_volume.properties_in[0.0].eps_2_Vap_Liq.set_value(eps_nominal)
930+
m.fs.F101.control_volume.properties_out[0.0].eps_2_Vap_Liq.set_value(eps_nominal)
931+
932+
opt_res = solver.solve(m, tee=True)
933+
assert opt_res.solver.termination_condition == TerminationCondition.optimal
934+
921935
print("Optimal solution process results:")
922936
report(m)
923937

0 commit comments

Comments
 (0)