Skip to content

Commit 4724e22

Browse files
committed
Ran idaesx build pre for the complimentary methanol notebooks
1 parent 0bbf302 commit 4724e22

File tree

4 files changed

+1340
-6438
lines changed

4 files changed

+1340
-6438
lines changed

idaes_examples/notebooks/docs/flowsheets/methanol_synthesis.ipynb

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,21 @@
653653
"\n",
654654
"print()\n",
655655
"print(\"Solving optimization problem...\")\n",
656+
"\n",
657+
"# Pass 1: smoothed VLE transition\n",
658+
"eps_nominal = value(m.fs.F101.control_volume.properties_in[0.0].eps_2_Vap_Liq)\n",
659+
"m.fs.F101.control_volume.properties_in[0.0].eps_2_Vap_Liq.set_value(eps_nominal * 2.5)\n",
660+
"m.fs.F101.control_volume.properties_out[0.0].eps_2_Vap_Liq.set_value(eps_nominal * 2.5)\n",
661+
"\n",
656662
"opt_res = solver.solve(m, tee=True)\n",
663+
"assert opt_res.solver.termination_condition == TerminationCondition.optimal\n",
664+
"\n",
665+
"# Pass 2: restore default smoothness\n",
666+
"m.fs.F101.control_volume.properties_in[0.0].eps_2_Vap_Liq.set_value(eps_nominal)\n",
667+
"m.fs.F101.control_volume.properties_out[0.0].eps_2_Vap_Liq.set_value(eps_nominal)\n",
668+
"\n",
669+
"opt_res = solver.solve(m, tee=True)\n",
670+
"assert opt_res.solver.termination_condition == TerminationCondition.optimal\n",
657671
"\n",
658672
"print(\"Optimal solution process results:\")\n",
659673
"report(m)"
@@ -677,8 +691,6 @@
677691
"outputs": [],
678692
"source": [
679693
"# testing model results\n",
680-
"assert opt_res.solver.termination_condition == TerminationCondition.optimal\n",
681-
"\n",
682694
"assert value(m.fs.R101.rate_reaction_extent[0, \"R1\"]) == pytest.approx(\n",
683695
" 311.3070, rel=1e-5\n",
684696
")\n",

0 commit comments

Comments
 (0)