diff --git a/idaes_examples/notebooks/active/power_gen/ngcc/data_pfds/st_soec_base.svg b/idaes_examples/notebooks/active/power_gen/ngcc/data_pfds/st_soec_base.svg
deleted file mode 100644
index 4c16fab6..00000000
--- a/idaes_examples/notebooks/active/power_gen/ngcc/data_pfds/st_soec_base.svg
+++ /dev/null
@@ -1,465 +0,0 @@
-
\ No newline at end of file
diff --git a/idaes_examples/notebooks/active/power_gen/ngcc/ngcc.ipynb b/idaes_examples/notebooks/active/power_gen/ngcc/ngcc.ipynb
deleted file mode 100644
index 7a640f1f..00000000
--- a/idaes_examples/notebooks/active/power_gen/ngcc/ngcc.ipynb
+++ /dev/null
@@ -1,344 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "tags": [
- "header",
- "hide-cell"
- ]
- },
- "outputs": [],
- "source": [
- "###############################################################################\n",
- "# The Institute for the Design of Advanced Energy Systems Integrated Platform\n",
- "# Framework (IDAES IP) was produced under the DOE Institute for the\n",
- "# Design of Advanced Energy Systems (IDAES).\n",
- "#\n",
- "# Copyright (c) 2018-2023 by the software owners: The Regents of the\n",
- "# University of California, through Lawrence Berkeley National Laboratory,\n",
- "# National Technology & Engineering Solutions of Sandia, LLC, Carnegie Mellon\n",
- "# University, West Virginia University Research Corporation, et al.\n",
- "# All rights reserved. Please see the files COPYRIGHT.md and LICENSE.md\n",
- "# for full copyright and license information.\n",
- "###############################################################################"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# NGCC Baseline and Turndown\n",
- "Maintainer: John Eslick \n",
- "Author: John Eslick \n",
- "Updated: 2023-06-01 \n",
- "\n",
- "This notebook runs a series of net electric power outputs from 650 MW to 160 MW (about 100% to 25%) for an NGCC with 97% CO2 capture. The NGCC model is based on the NETL report \"Cost and Performance Baseline for Fossil Energy Plants Volume 1: Bituminous Coal and Natural Gas to Electricity.\" Sept 2019, Case B31B (https://www.netl.doe.gov/projects/files/CostAndPerformanceBaselineForFossilEnergyPlantsVol1BitumCoalAndNGtoElectBBRRev4-1_092419.pdf)."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Imports\n",
- "\n",
- "Import the modules that will be used."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {},
- "outputs": [],
- "source": [
- "import os\n",
- "import numpy as np\n",
- "import pandas as pd\n",
- "from IPython.core.display import SVG\n",
- "import pyomo.environ as pyo\n",
- "import idaes\n",
- "from idaes.core.solvers import use_idaes_solver_configuration_defaults\n",
- "import idaes.core.util.scaling as iscale\n",
- "import idaes.core.util as iutil\n",
- "from idaes_examples.mod.power_gen import ngcc\n",
- "import pytest\n",
- "import logging\n",
- "\n",
- "logging.getLogger(\"pyomo\").setLevel(logging.ERROR)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Make Output Directories\n",
- "\n",
- "This notebook can produce a large number of output files. To make it easier to manage, some subdirectories are used to organize output. This ensures that the directories exist."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 3,
- "metadata": {},
- "outputs": [],
- "source": [
- "def make_directory(path):\n",
- " \"\"\"Make a directory if it doesn't exist\"\"\"\n",
- " try:\n",
- " os.mkdir(path)\n",
- " except FileExistsError:\n",
- " pass\n",
- "\n",
- "\n",
- "make_directory(\"data\")\n",
- "make_directory(\"data_pfds\")\n",
- "make_directory(\"data_tabulated\")"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Global Solver Settings\n",
- "\n",
- "Use the IDAES configuration system for solver settings. These will apply to all Ipopt instances created, including the ones created in initialization methods."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {},
- "outputs": [],
- "source": [
- "use_idaes_solver_configuration_defaults()\n",
- "idaes.cfg.ipopt.options.nlp_scaling_method = \"user-scaling\"\n",
- "idaes.cfg.ipopt.options.linear_solver = \"ma57\"\n",
- "idaes.cfg.ipopt.options.OF_ma57_automatic_scaling = \"yes\"\n",
- "idaes.cfg.ipopt.options.ma57_pivtol = 1e-5\n",
- "idaes.cfg.ipopt.options.ma57_pivtolmax = 0.1\n",
- "solver = pyo.SolverFactory(\"ipopt\")"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Create the NGCC model\n",
- "\n",
- "Create the NGCC model and initialize it or read the saved initialization if available. The base initialized NGCC model is configured to match the baseline report with 90% capture using a Cansolv system."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 5,
- "metadata": {},
- "outputs": [],
- "source": [
- "m = pyo.ConcreteModel()\n",
- "m.fs = ngcc.NgccFlowsheet(dynamic=False)\n",
- "iscale.calculate_scaling_factors(m)\n",
- "m.fs.initialize(\n",
- " load_from=\"ngcc_init.json.gz\",\n",
- " save_to=\"ngcc_init.json.gz\",\n",
- ")\n",
- "res = solver.solve(m, tee=True)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Show PFDs with baseline results\n",
- "\n",
- "This displays PFDs in the notebook, and saves them to files. The full NGCC model is too big to show well in a single PFD, so it is broken into the three main sections, gas turbine, heat recovery steam generator (HRSG), and steam turbine."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 6,
- "metadata": {},
- "outputs": [],
- "source": [
- "def display_pfd():\n",
- " print(\"\\n\\nGas Turbine Section\\n\")\n",
- " display(SVG(m.fs.gt.write_pfd()))\n",
- " print(\"\\n\\nHRSG Section\\n\")\n",
- " display(SVG(m.fs.hrsg.write_pfd()))\n",
- " print(\"\\n\\nSteam Turbine Section\\n\")\n",
- " display(SVG(m.fs.st.write_pfd()))\n",
- "\n",
- "\n",
- "display_pfd()\n",
- "\n",
- "m.fs.gt.write_pfd(fname=\"data_pfds/gt_baseline.svg\")\n",
- "m.fs.hrsg.write_pfd(fname=\"data_pfds/hrsg_baseline.svg\")\n",
- "m.fs.st.write_pfd(fname=\"data_pfds/st_baseline.svg\")"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Test key model outputs against NETL baseline"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 7,
- "metadata": {},
- "outputs": [],
- "source": [
- "# Assert results approximately agree with baseline report\n",
- "assert pyo.value(m.fs.net_power_mw[0]) == pytest.approx(646)\n",
- "assert pyo.value(m.fs.gross_power[0]) == pytest.approx(-690e6, rel=0.001)\n",
- "assert pyo.value(100 * m.fs.lhv_efficiency[0]) == pytest.approx(52.8, abs=0.1)\n",
- "assert pyo.value(\n",
- " m.fs.total_variable_cost_rate[0] / m.fs.net_power_mw[0]\n",
- ") == pytest.approx(37.2799, rel=0.01)\n",
- "assert pyo.value(m.fs.fuel_cost_rate[0] / m.fs.net_power_mw[0]) == pytest.approx(\n",
- " 31.6462, rel=0.01\n",
- ")\n",
- "assert pyo.value(\n",
- " m.fs.other_variable_cost_rate[0] / m.fs.net_power_mw[0]\n",
- ") == pytest.approx(5.63373, rel=0.01)\n",
- "assert pyo.value(m.fs.gt.gt_power[0]) == pytest.approx(-477e6, rel=0.001)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 8,
- "metadata": {},
- "outputs": [],
- "source": [
- "from matplotlib import pyplot as plt\n",
- "\n",
- "\n",
- "variables = [\"net_power\", \"gross_power\", \"gt_power\"]\n",
- "netl_baseline = [646, 690, 477]\n",
- "idaes_prediction = [\n",
- " pyo.value(m.fs.net_power_mw[0]),\n",
- " -pyo.value(m.fs.gross_power[0]) * 1e-6,\n",
- " -pyo.value(m.fs.gt.gt_power[0]) * 1e-6,\n",
- "]\n",
- "\n",
- "label_location = np.arange(len(variables))\n",
- "\n",
- "width = 0.4\n",
- "\n",
- "fig, ax = plt.subplots()\n",
- "netl_data = ax.bar(variables, netl_baseline, label=\"NETL Baseline\")\n",
- "idaes_sim = ax.bar(\n",
- " label_location + (width / 2), idaes_prediction, width, label=\"IDAES Prediction\"\n",
- ")\n",
- "\n",
- "ax.set_ylabel(\"Power (MW)\")\n",
- "ax.set_xticks(label_location)\n",
- "ax.set_xticklabels(variables)\n",
- "ax.legend()"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Run turndown cases 5 MW interval\n",
- "\n",
- "Here we set the CO2 capture rate to 97% and set the specific reboiler duty to PZ advanced solvent system. The minimum power is 160 MW net, which corresponds to a bit under 25%. This is roughly the minimum load for the NGCC modeled. Results are tabulated for tags in the tags_output tag group in a Pandas data frame. \n",
- "\n",
- "To run the series, change run_series to True. Running the turndown series takes a while, unless previous saved results are available. "
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 9,
- "metadata": {},
- "outputs": [],
- "source": [
- "run_series = False\n",
- "if run_series:\n",
- " idaes.cfg.ipopt.options.tol = 1e-6\n",
- " idaes.cfg.ipopt.options.max_iter = 50\n",
- " solver = pyo.SolverFactory(\"ipopt\")\n",
- "\n",
- " m.fs.cap_specific_reboiler_duty.fix(2.4e6)\n",
- " m.fs.cap_fraction.fix(0.97)\n",
- " powers = np.linspace(650, 160, int((650 - 160) / 5) + 1)\n",
- " powers = list(powers)\n",
- " powers.insert(1, 646)\n",
- "\n",
- " df = pd.DataFrame(columns=m.fs.tags_output.table_heading())\n",
- "\n",
- " for p in powers:\n",
- " print(\"Simulation for net power = \", p)\n",
- " fname = f\"data/ngcc_{int(p)}.json.gz\"\n",
- " if os.path.exists(fname):\n",
- " iutil.from_json(m, fname=fname, wts=iutil.StoreSpec(suffix=False))\n",
- " else:\n",
- " m.fs.net_power_mw.fix(p)\n",
- " res = solver.solve(m, tee=False, symbolic_solver_labels=True)\n",
- " if not pyo.check_optimal_termination(res):\n",
- " break\n",
- " iutil.to_json(m, fname=fname)\n",
- " df.loc[m.fs.tags_output[\"net_power\"].value] = m.fs.tags_output.table_row(\n",
- " numeric=True\n",
- " )\n",
- " if abs(p - 650) < 0.1:\n",
- " m.fs.gt.streams_dataframe().to_csv(\n",
- " \"data_tabulated/ngcc_stream_650mw_gt.csv\"\n",
- " )\n",
- " m.fs.st.steam_streams_dataframe().to_csv(\n",
- " \"data_tabulated/ngcc_stream_650mw_st.csv\"\n",
- " )\n",
- " m.fs.hrsg.steam_streams_dataframe().to_csv(\n",
- " \"data_tabulated/ngcc_stream_650mw_hrsg_steam.csv\"\n",
- " )\n",
- " m.fs.hrsg.flue_gas_streams_dataframe().to_csv(\n",
- " \"data_tabulated/ngcc_stream_650mw_hrsg_gas.csv\"\n",
- " )\n",
- " df.to_csv(\"data_tabulated/ngcc.csv\")\n",
- "\n",
- " # Display the results from the run stored in a pandas dataframe\n",
- " pd.set_option(\"display.max_rows\", None)\n",
- " pd.set_option(\"display.max_columns\", None)\n",
- " display(df)\n",
- "\n",
- " # Plot results\n",
- " plt.plot(df[\"net_power (MW)\"], df[\"lhv_efficiency (%)\"])\n",
- " plt.grid()\n",
- " plt.xlabel(\"Net Power (MW)\")\n",
- " plt.ylabel(\"LHV Efficiency (%)\")\n",
- " plt.title(\"Net Power vs. Efficiency\")\n",
- " plt.show()"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": []
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 3 (ipykernel)",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.10.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 5
-}
diff --git a/idaes_examples/notebooks/active/power_gen/ngcc/ngcc_init.json.gz b/idaes_examples/notebooks/active/power_gen/ngcc/ngcc_init.json.gz
deleted file mode 100644
index d27944ab..00000000
Binary files a/idaes_examples/notebooks/active/power_gen/ngcc/ngcc_init.json.gz and /dev/null differ
diff --git a/idaes_examples/notebooks/active/power_gen/ngcc/ngcc_test.ipynb b/idaes_examples/notebooks/active/power_gen/ngcc/ngcc_test.ipynb
deleted file mode 100644
index 900511dc..00000000
--- a/idaes_examples/notebooks/active/power_gen/ngcc/ngcc_test.ipynb
+++ /dev/null
@@ -1,344 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "tags": [
- "header",
- "hide-cell"
- ]
- },
- "outputs": [],
- "source": [
- "###############################################################################\n",
- "# The Institute for the Design of Advanced Energy Systems Integrated Platform\n",
- "# Framework (IDAES IP) was produced under the DOE Institute for the\n",
- "# Design of Advanced Energy Systems (IDAES).\n",
- "#\n",
- "# Copyright (c) 2018-2023 by the software owners: The Regents of the\n",
- "# University of California, through Lawrence Berkeley National Laboratory,\n",
- "# National Technology & Engineering Solutions of Sandia, LLC, Carnegie Mellon\n",
- "# University, West Virginia University Research Corporation, et al.\n",
- "# All rights reserved. Please see the files COPYRIGHT.md and LICENSE.md\n",
- "# for full copyright and license information.\n",
- "###############################################################################"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# NGCC Baseline and Turndown\n",
- "Maintainer: John Eslick \n",
- "Author: John Eslick \n",
- "Updated: 2023-06-01 \n",
- "\n",
- "This notebook runs a series of net electric power outputs from 650 MW to 160 MW (about 100% to 25%) for an NGCC with 97% CO2 capture. The NGCC model is based on the NETL report \"Cost and Performance Baseline for Fossil Energy Plants Volume 1: Bituminous Coal and Natural Gas to Electricity.\" Sept 2019, Case B31B (https://www.netl.doe.gov/projects/files/CostAndPerformanceBaselineForFossilEnergyPlantsVol1BitumCoalAndNGtoElectBBRRev4-1_092419.pdf)."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Imports\n",
- "\n",
- "Import the modules that will be used."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {},
- "outputs": [],
- "source": [
- "import os\n",
- "import numpy as np\n",
- "import pandas as pd\n",
- "from IPython.core.display import SVG\n",
- "import pyomo.environ as pyo\n",
- "import idaes\n",
- "from idaes.core.solvers import use_idaes_solver_configuration_defaults\n",
- "import idaes.core.util.scaling as iscale\n",
- "import idaes.core.util as iutil\n",
- "from idaes_examples.mod.power_gen import ngcc\n",
- "import pytest\n",
- "import logging\n",
- "\n",
- "logging.getLogger(\"pyomo\").setLevel(logging.ERROR)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Make Output Directories\n",
- "\n",
- "This notebook can produce a large number of output files. To make it easier to manage, some subdirectories are used to organize output. This ensures that the directories exist."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 3,
- "metadata": {},
- "outputs": [],
- "source": [
- "def make_directory(path):\n",
- " \"\"\"Make a directory if it doesn't exist\"\"\"\n",
- " try:\n",
- " os.mkdir(path)\n",
- " except FileExistsError:\n",
- " pass\n",
- "\n",
- "\n",
- "make_directory(\"data\")\n",
- "make_directory(\"data_pfds\")\n",
- "make_directory(\"data_tabulated\")"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Global Solver Settings\n",
- "\n",
- "Use the IDAES configuration system for solver settings. These will apply to all Ipopt instances created, including the ones created in initialization methods."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {},
- "outputs": [],
- "source": [
- "use_idaes_solver_configuration_defaults()\n",
- "idaes.cfg.ipopt.options.nlp_scaling_method = \"user-scaling\"\n",
- "idaes.cfg.ipopt.options.linear_solver = \"ma57\"\n",
- "idaes.cfg.ipopt.options.OF_ma57_automatic_scaling = \"yes\"\n",
- "idaes.cfg.ipopt.options.ma57_pivtol = 1e-5\n",
- "idaes.cfg.ipopt.options.ma57_pivtolmax = 0.1\n",
- "solver = pyo.SolverFactory(\"ipopt\")"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Create the NGCC model\n",
- "\n",
- "Create the NGCC model and initialize it or read the saved initialization if available. The base initialized NGCC model is configured to match the baseline report with 90% capture using a Cansolv system."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 5,
- "metadata": {},
- "outputs": [],
- "source": [
- "m = pyo.ConcreteModel()\n",
- "m.fs = ngcc.NgccFlowsheet(dynamic=False)\n",
- "iscale.calculate_scaling_factors(m)\n",
- "m.fs.initialize(\n",
- " load_from=\"ngcc_init.json.gz\",\n",
- " save_to=\"ngcc_init.json.gz\",\n",
- ")\n",
- "res = solver.solve(m, tee=True)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Show PFDs with baseline results\n",
- "\n",
- "This displays PFDs in the notebook, and saves them to files. The full NGCC model is too big to show well in a single PFD, so it is broken into the three main sections, gas turbine, heat recovery steam generator (HRSG), and steam turbine."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 6,
- "metadata": {},
- "outputs": [],
- "source": [
- "def display_pfd():\n",
- " print(\"\\n\\nGas Turbine Section\\n\")\n",
- " display(SVG(m.fs.gt.write_pfd()))\n",
- " print(\"\\n\\nHRSG Section\\n\")\n",
- " display(SVG(m.fs.hrsg.write_pfd()))\n",
- " print(\"\\n\\nSteam Turbine Section\\n\")\n",
- " display(SVG(m.fs.st.write_pfd()))\n",
- "\n",
- "\n",
- "display_pfd()\n",
- "\n",
- "m.fs.gt.write_pfd(fname=\"data_pfds/gt_baseline.svg\")\n",
- "m.fs.hrsg.write_pfd(fname=\"data_pfds/hrsg_baseline.svg\")\n",
- "m.fs.st.write_pfd(fname=\"data_pfds/st_baseline.svg\")"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Test key model outputs against NETL baseline"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 7,
- "metadata": {},
- "outputs": [],
- "source": [
- "# Assert results approximately agree with baseline reoprt\n",
- "assert pyo.value(m.fs.net_power_mw[0]) == pytest.approx(646)\n",
- "assert pyo.value(m.fs.gross_power[0]) == pytest.approx(-690e6, rel=0.001)\n",
- "assert pyo.value(100 * m.fs.lhv_efficiency[0]) == pytest.approx(52.8, abs=0.1)\n",
- "assert pyo.value(\n",
- " m.fs.total_variable_cost_rate[0] / m.fs.net_power_mw[0]\n",
- ") == pytest.approx(37.2799, rel=0.01)\n",
- "assert pyo.value(m.fs.fuel_cost_rate[0] / m.fs.net_power_mw[0]) == pytest.approx(\n",
- " 31.6462, rel=0.01\n",
- ")\n",
- "assert pyo.value(\n",
- " m.fs.other_variable_cost_rate[0] / m.fs.net_power_mw[0]\n",
- ") == pytest.approx(5.63373, rel=0.01)\n",
- "assert pyo.value(m.fs.gt.gt_power[0]) == pytest.approx(-477e6, rel=0.001)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 8,
- "metadata": {},
- "outputs": [],
- "source": [
- "from matplotlib import pyplot as plt\n",
- "\n",
- "\n",
- "variables = [\"net_power\", \"gross_power\", \"gt_power\"]\n",
- "netl_baseline = [646, 690, 477]\n",
- "idaes_prediction = [\n",
- " pyo.value(m.fs.net_power_mw[0]),\n",
- " -pyo.value(m.fs.gross_power[0]) * 1e-6,\n",
- " -pyo.value(m.fs.gt.gt_power[0]) * 1e-6,\n",
- "]\n",
- "\n",
- "label_location = np.arange(len(variables))\n",
- "\n",
- "width = 0.4\n",
- "\n",
- "fig, ax = plt.subplots()\n",
- "netl_data = ax.bar(variables, netl_baseline, label=\"NETL Baseline\")\n",
- "idaes_sim = ax.bar(\n",
- " label_location + (width / 2), idaes_prediction, width, label=\"IDAES Prediction\"\n",
- ")\n",
- "\n",
- "ax.set_ylabel(\"Power (MW)\")\n",
- "ax.set_xticks(label_location)\n",
- "ax.set_xticklabels(variables)\n",
- "ax.legend()"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Run turndown cases 5 MW interval\n",
- "\n",
- "Here we set the CO2 capture rate to 97% and set the specific reboiler duty to PZ advanced solvent system. The minimum power is 160 MW net, which corresponds to a bit under 25%. This is roughly the minimum load for the NGCC modeled. Results are tabulated for tags in the tags_output tag group in a Pandas data frame. \n",
- "\n",
- "To run the series, change run_series to True. Running the turndown series takes a while, unless previous saved results are available. "
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 9,
- "metadata": {},
- "outputs": [],
- "source": [
- "run_series = False\n",
- "if run_series:\n",
- " idaes.cfg.ipopt.options.tol = 1e-6\n",
- " idaes.cfg.ipopt.options.max_iter = 50\n",
- " solver = pyo.SolverFactory(\"ipopt\")\n",
- "\n",
- " m.fs.cap_specific_reboiler_duty.fix(2.4e6)\n",
- " m.fs.cap_fraction.fix(0.97)\n",
- " powers = np.linspace(650, 160, int((650 - 160) / 5) + 1)\n",
- " powers = list(powers)\n",
- " powers.insert(1, 646)\n",
- "\n",
- " df = pd.DataFrame(columns=m.fs.tags_output.table_heading())\n",
- "\n",
- " for p in powers:\n",
- " print(\"Simulation for net power = \", p)\n",
- " fname = f\"data/ngcc_{int(p)}.json.gz\"\n",
- " if os.path.exists(fname):\n",
- " iutil.from_json(m, fname=fname, wts=iutil.StoreSpec(suffix=False))\n",
- " else:\n",
- " m.fs.net_power_mw.fix(p)\n",
- " res = solver.solve(m, tee=False, symbolic_solver_labels=True)\n",
- " if not pyo.check_optimal_termination(res):\n",
- " break\n",
- " iutil.to_json(m, fname=fname)\n",
- " df.loc[m.fs.tags_output[\"net_power\"].value] = m.fs.tags_output.table_row(\n",
- " numeric=True\n",
- " )\n",
- " if abs(p - 650) < 0.1:\n",
- " m.fs.gt.streams_dataframe().to_csv(\n",
- " \"data_tabulated/ngcc_stream_650mw_gt.csv\"\n",
- " )\n",
- " m.fs.st.steam_streams_dataframe().to_csv(\n",
- " \"data_tabulated/ngcc_stream_650mw_st.csv\"\n",
- " )\n",
- " m.fs.hrsg.steam_streams_dataframe().to_csv(\n",
- " \"data_tabulated/ngcc_stream_650mw_hrsg_steam.csv\"\n",
- " )\n",
- " m.fs.hrsg.flue_gas_streams_dataframe().to_csv(\n",
- " \"data_tabulated/ngcc_stream_650mw_hrsg_gas.csv\"\n",
- " )\n",
- " df.to_csv(\"data_tabulated/ngcc.csv\")\n",
- "\n",
- " # Display the results from the run stored in a pandas dataframe\n",
- " pd.set_option(\"display.max_rows\", None)\n",
- " pd.set_option(\"display.max_columns\", None)\n",
- " display(df)\n",
- "\n",
- " # Plot results\n",
- " plt.plot(df[\"net_power (MW)\"], df[\"lhv_efficiency (%)\"])\n",
- " plt.grid()\n",
- " plt.xlabel(\"Net Power (MW)\")\n",
- " plt.ylabel(\"LHV Efficiency (%)\")\n",
- " plt.title(\"Net Power vs. Efficiency\")\n",
- " plt.show()"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": []
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 3 (ipykernel)",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.10.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 3
-}
diff --git a/idaes_examples/notebooks/active/power_gen/ngcc/ngcc_usr.ipynb b/idaes_examples/notebooks/active/power_gen/ngcc/ngcc_usr.ipynb
deleted file mode 100644
index 900511dc..00000000
--- a/idaes_examples/notebooks/active/power_gen/ngcc/ngcc_usr.ipynb
+++ /dev/null
@@ -1,344 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {
- "tags": [
- "header",
- "hide-cell"
- ]
- },
- "outputs": [],
- "source": [
- "###############################################################################\n",
- "# The Institute for the Design of Advanced Energy Systems Integrated Platform\n",
- "# Framework (IDAES IP) was produced under the DOE Institute for the\n",
- "# Design of Advanced Energy Systems (IDAES).\n",
- "#\n",
- "# Copyright (c) 2018-2023 by the software owners: The Regents of the\n",
- "# University of California, through Lawrence Berkeley National Laboratory,\n",
- "# National Technology & Engineering Solutions of Sandia, LLC, Carnegie Mellon\n",
- "# University, West Virginia University Research Corporation, et al.\n",
- "# All rights reserved. Please see the files COPYRIGHT.md and LICENSE.md\n",
- "# for full copyright and license information.\n",
- "###############################################################################"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# NGCC Baseline and Turndown\n",
- "Maintainer: John Eslick \n",
- "Author: John Eslick \n",
- "Updated: 2023-06-01 \n",
- "\n",
- "This notebook runs a series of net electric power outputs from 650 MW to 160 MW (about 100% to 25%) for an NGCC with 97% CO2 capture. The NGCC model is based on the NETL report \"Cost and Performance Baseline for Fossil Energy Plants Volume 1: Bituminous Coal and Natural Gas to Electricity.\" Sept 2019, Case B31B (https://www.netl.doe.gov/projects/files/CostAndPerformanceBaselineForFossilEnergyPlantsVol1BitumCoalAndNGtoElectBBRRev4-1_092419.pdf)."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Imports\n",
- "\n",
- "Import the modules that will be used."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {},
- "outputs": [],
- "source": [
- "import os\n",
- "import numpy as np\n",
- "import pandas as pd\n",
- "from IPython.core.display import SVG\n",
- "import pyomo.environ as pyo\n",
- "import idaes\n",
- "from idaes.core.solvers import use_idaes_solver_configuration_defaults\n",
- "import idaes.core.util.scaling as iscale\n",
- "import idaes.core.util as iutil\n",
- "from idaes_examples.mod.power_gen import ngcc\n",
- "import pytest\n",
- "import logging\n",
- "\n",
- "logging.getLogger(\"pyomo\").setLevel(logging.ERROR)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Make Output Directories\n",
- "\n",
- "This notebook can produce a large number of output files. To make it easier to manage, some subdirectories are used to organize output. This ensures that the directories exist."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 3,
- "metadata": {},
- "outputs": [],
- "source": [
- "def make_directory(path):\n",
- " \"\"\"Make a directory if it doesn't exist\"\"\"\n",
- " try:\n",
- " os.mkdir(path)\n",
- " except FileExistsError:\n",
- " pass\n",
- "\n",
- "\n",
- "make_directory(\"data\")\n",
- "make_directory(\"data_pfds\")\n",
- "make_directory(\"data_tabulated\")"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Global Solver Settings\n",
- "\n",
- "Use the IDAES configuration system for solver settings. These will apply to all Ipopt instances created, including the ones created in initialization methods."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 4,
- "metadata": {},
- "outputs": [],
- "source": [
- "use_idaes_solver_configuration_defaults()\n",
- "idaes.cfg.ipopt.options.nlp_scaling_method = \"user-scaling\"\n",
- "idaes.cfg.ipopt.options.linear_solver = \"ma57\"\n",
- "idaes.cfg.ipopt.options.OF_ma57_automatic_scaling = \"yes\"\n",
- "idaes.cfg.ipopt.options.ma57_pivtol = 1e-5\n",
- "idaes.cfg.ipopt.options.ma57_pivtolmax = 0.1\n",
- "solver = pyo.SolverFactory(\"ipopt\")"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Create the NGCC model\n",
- "\n",
- "Create the NGCC model and initialize it or read the saved initialization if available. The base initialized NGCC model is configured to match the baseline report with 90% capture using a Cansolv system."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 5,
- "metadata": {},
- "outputs": [],
- "source": [
- "m = pyo.ConcreteModel()\n",
- "m.fs = ngcc.NgccFlowsheet(dynamic=False)\n",
- "iscale.calculate_scaling_factors(m)\n",
- "m.fs.initialize(\n",
- " load_from=\"ngcc_init.json.gz\",\n",
- " save_to=\"ngcc_init.json.gz\",\n",
- ")\n",
- "res = solver.solve(m, tee=True)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Show PFDs with baseline results\n",
- "\n",
- "This displays PFDs in the notebook, and saves them to files. The full NGCC model is too big to show well in a single PFD, so it is broken into the three main sections, gas turbine, heat recovery steam generator (HRSG), and steam turbine."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 6,
- "metadata": {},
- "outputs": [],
- "source": [
- "def display_pfd():\n",
- " print(\"\\n\\nGas Turbine Section\\n\")\n",
- " display(SVG(m.fs.gt.write_pfd()))\n",
- " print(\"\\n\\nHRSG Section\\n\")\n",
- " display(SVG(m.fs.hrsg.write_pfd()))\n",
- " print(\"\\n\\nSteam Turbine Section\\n\")\n",
- " display(SVG(m.fs.st.write_pfd()))\n",
- "\n",
- "\n",
- "display_pfd()\n",
- "\n",
- "m.fs.gt.write_pfd(fname=\"data_pfds/gt_baseline.svg\")\n",
- "m.fs.hrsg.write_pfd(fname=\"data_pfds/hrsg_baseline.svg\")\n",
- "m.fs.st.write_pfd(fname=\"data_pfds/st_baseline.svg\")"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Test key model outputs against NETL baseline"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 7,
- "metadata": {},
- "outputs": [],
- "source": [
- "# Assert results approximately agree with baseline reoprt\n",
- "assert pyo.value(m.fs.net_power_mw[0]) == pytest.approx(646)\n",
- "assert pyo.value(m.fs.gross_power[0]) == pytest.approx(-690e6, rel=0.001)\n",
- "assert pyo.value(100 * m.fs.lhv_efficiency[0]) == pytest.approx(52.8, abs=0.1)\n",
- "assert pyo.value(\n",
- " m.fs.total_variable_cost_rate[0] / m.fs.net_power_mw[0]\n",
- ") == pytest.approx(37.2799, rel=0.01)\n",
- "assert pyo.value(m.fs.fuel_cost_rate[0] / m.fs.net_power_mw[0]) == pytest.approx(\n",
- " 31.6462, rel=0.01\n",
- ")\n",
- "assert pyo.value(\n",
- " m.fs.other_variable_cost_rate[0] / m.fs.net_power_mw[0]\n",
- ") == pytest.approx(5.63373, rel=0.01)\n",
- "assert pyo.value(m.fs.gt.gt_power[0]) == pytest.approx(-477e6, rel=0.001)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 8,
- "metadata": {},
- "outputs": [],
- "source": [
- "from matplotlib import pyplot as plt\n",
- "\n",
- "\n",
- "variables = [\"net_power\", \"gross_power\", \"gt_power\"]\n",
- "netl_baseline = [646, 690, 477]\n",
- "idaes_prediction = [\n",
- " pyo.value(m.fs.net_power_mw[0]),\n",
- " -pyo.value(m.fs.gross_power[0]) * 1e-6,\n",
- " -pyo.value(m.fs.gt.gt_power[0]) * 1e-6,\n",
- "]\n",
- "\n",
- "label_location = np.arange(len(variables))\n",
- "\n",
- "width = 0.4\n",
- "\n",
- "fig, ax = plt.subplots()\n",
- "netl_data = ax.bar(variables, netl_baseline, label=\"NETL Baseline\")\n",
- "idaes_sim = ax.bar(\n",
- " label_location + (width / 2), idaes_prediction, width, label=\"IDAES Prediction\"\n",
- ")\n",
- "\n",
- "ax.set_ylabel(\"Power (MW)\")\n",
- "ax.set_xticks(label_location)\n",
- "ax.set_xticklabels(variables)\n",
- "ax.legend()"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Run turndown cases 5 MW interval\n",
- "\n",
- "Here we set the CO2 capture rate to 97% and set the specific reboiler duty to PZ advanced solvent system. The minimum power is 160 MW net, which corresponds to a bit under 25%. This is roughly the minimum load for the NGCC modeled. Results are tabulated for tags in the tags_output tag group in a Pandas data frame. \n",
- "\n",
- "To run the series, change run_series to True. Running the turndown series takes a while, unless previous saved results are available. "
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 9,
- "metadata": {},
- "outputs": [],
- "source": [
- "run_series = False\n",
- "if run_series:\n",
- " idaes.cfg.ipopt.options.tol = 1e-6\n",
- " idaes.cfg.ipopt.options.max_iter = 50\n",
- " solver = pyo.SolverFactory(\"ipopt\")\n",
- "\n",
- " m.fs.cap_specific_reboiler_duty.fix(2.4e6)\n",
- " m.fs.cap_fraction.fix(0.97)\n",
- " powers = np.linspace(650, 160, int((650 - 160) / 5) + 1)\n",
- " powers = list(powers)\n",
- " powers.insert(1, 646)\n",
- "\n",
- " df = pd.DataFrame(columns=m.fs.tags_output.table_heading())\n",
- "\n",
- " for p in powers:\n",
- " print(\"Simulation for net power = \", p)\n",
- " fname = f\"data/ngcc_{int(p)}.json.gz\"\n",
- " if os.path.exists(fname):\n",
- " iutil.from_json(m, fname=fname, wts=iutil.StoreSpec(suffix=False))\n",
- " else:\n",
- " m.fs.net_power_mw.fix(p)\n",
- " res = solver.solve(m, tee=False, symbolic_solver_labels=True)\n",
- " if not pyo.check_optimal_termination(res):\n",
- " break\n",
- " iutil.to_json(m, fname=fname)\n",
- " df.loc[m.fs.tags_output[\"net_power\"].value] = m.fs.tags_output.table_row(\n",
- " numeric=True\n",
- " )\n",
- " if abs(p - 650) < 0.1:\n",
- " m.fs.gt.streams_dataframe().to_csv(\n",
- " \"data_tabulated/ngcc_stream_650mw_gt.csv\"\n",
- " )\n",
- " m.fs.st.steam_streams_dataframe().to_csv(\n",
- " \"data_tabulated/ngcc_stream_650mw_st.csv\"\n",
- " )\n",
- " m.fs.hrsg.steam_streams_dataframe().to_csv(\n",
- " \"data_tabulated/ngcc_stream_650mw_hrsg_steam.csv\"\n",
- " )\n",
- " m.fs.hrsg.flue_gas_streams_dataframe().to_csv(\n",
- " \"data_tabulated/ngcc_stream_650mw_hrsg_gas.csv\"\n",
- " )\n",
- " df.to_csv(\"data_tabulated/ngcc.csv\")\n",
- "\n",
- " # Display the results from the run stored in a pandas dataframe\n",
- " pd.set_option(\"display.max_rows\", None)\n",
- " pd.set_option(\"display.max_columns\", None)\n",
- " display(df)\n",
- "\n",
- " # Plot results\n",
- " plt.plot(df[\"net_power (MW)\"], df[\"lhv_efficiency (%)\"])\n",
- " plt.grid()\n",
- " plt.xlabel(\"Net Power (MW)\")\n",
- " plt.ylabel(\"LHV Efficiency (%)\")\n",
- " plt.title(\"Net Power vs. Efficiency\")\n",
- " plt.show()"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": []
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 3 (ipykernel)",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.10.9"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 3
-}
diff --git a/idaes_examples/notebooks/docs/flowsheets/power_gen/ngcc/data_pfds/gt_baseline.svg b/idaes_examples/notebooks/docs/flowsheets/power_gen/ngcc/data_pfds/gt_baseline.svg
deleted file mode 100644
index 96e95124..00000000
--- a/idaes_examples/notebooks/docs/flowsheets/power_gen/ngcc/data_pfds/gt_baseline.svg
+++ /dev/null
@@ -1,662 +0,0 @@
-
\ No newline at end of file
diff --git a/idaes_examples/notebooks/docs/flowsheets/power_gen/ngcc/data_pfds/hrsg_baseline.svg b/idaes_examples/notebooks/docs/flowsheets/power_gen/ngcc/data_pfds/hrsg_baseline.svg
deleted file mode 100644
index 0e5d826c..00000000
--- a/idaes_examples/notebooks/docs/flowsheets/power_gen/ngcc/data_pfds/hrsg_baseline.svg
+++ /dev/null
@@ -1,1332 +0,0 @@
-
\ No newline at end of file
diff --git a/idaes_examples/notebooks/docs/flowsheets/power_gen/ngcc/data_pfds/st_baseline.svg b/idaes_examples/notebooks/docs/flowsheets/power_gen/ngcc/data_pfds/st_baseline.svg
deleted file mode 100644
index f92b54ec..00000000
--- a/idaes_examples/notebooks/docs/flowsheets/power_gen/ngcc/data_pfds/st_baseline.svg
+++ /dev/null
@@ -1,465 +0,0 @@
-
\ No newline at end of file
diff --git a/idaes_examples/notebooks/docs/flowsheets/trial.ipynb b/idaes_examples/notebooks/docs/flowsheets/trial.ipynb
deleted file mode 100644
index 39290616..00000000
--- a/idaes_examples/notebooks/docs/flowsheets/trial.ipynb
+++ /dev/null
@@ -1,1278 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "code",
- "execution_count": 1,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "WARNING: Params with units must be mutable. Converting Param\n",
- "'fs.BTHM_params.pressure_crit' to mutable.\n",
- "WARNING: Params with units must be mutable. Converting Param\n",
- "'fs.BTHM_params.temperature_crit' to mutable.\n",
- "WARNING: Params with units must be mutable. Converting Param\n",
- "'fs.BTHM_params.mw_comp' to mutable.\n",
- "WARNING: Params with units must be mutable. Converting Param\n",
- "'fs.BTHM_params.dens_liq_param_1' to mutable.\n",
- "WARNING: Params with units must be mutable. Converting Param\n",
- "'fs.BTHM_params.dens_liq_param_2' to mutable.\n",
- "WARNING: Params with units must be mutable. Converting Param\n",
- "'fs.BTHM_params.dens_liq_param_3' to mutable.\n",
- "WARNING: Params with units must be mutable. Converting Param\n",
- "'fs.BTHM_params.dens_liq_param_4' to mutable.\n",
- "WARNING: Params with units must be mutable. Converting Param\n",
- "'fs.BTHM_params.temperature_boil' to mutable.\n",
- "WARNING: Params with units must be mutable. Converting Param\n",
- "'fs.BTHM_params.cp_ig_1' to mutable.\n",
- "WARNING: Params with units must be mutable. Converting Param\n",
- "'fs.BTHM_params.cp_ig_2' to mutable.\n",
- "WARNING: Params with units must be mutable. Converting Param\n",
- "'fs.BTHM_params.cp_ig_3' to mutable.\n",
- "WARNING: Params with units must be mutable. Converting Param\n",
- "'fs.BTHM_params.cp_ig_4' to mutable.\n",
- "WARNING: Params with units must be mutable. Converting Param\n",
- "'fs.BTHM_params.cp_ig_5' to mutable.\n",
- "WARNING: Params with units must be mutable. Converting Param\n",
- "'fs.BTHM_params.pressure_sat_coeff_A' to mutable.\n",
- "WARNING: Params with units must be mutable. Converting Param\n",
- "'fs.BTHM_params.pressure_sat_coeff_B' to mutable.\n",
- "WARNING: Params with units must be mutable. Converting Param\n",
- "'fs.BTHM_params.pressure_sat_coeff_C' to mutable.\n",
- "WARNING: Params with units must be mutable. Converting Param\n",
- "'fs.BTHM_params.dh_vap' to mutable.\n",
- "WARNING: Params with units must be mutable. Converting Param\n",
- "'fs.BT_params.pressure_critical' to mutable.\n",
- "WARNING: Params with units must be mutable. Converting Param\n",
- "'fs.BT_params.temperature_critical' to mutable.\n",
- "WARNING: Params with units must be mutable. Converting Param\n",
- "'fs.BT_params.mw_comp' to mutable.\n",
- "WARNING: Params with units must be mutable. Converting Param\n",
- "'fs.BT_params.dh_form' to mutable.\n",
- "WARNING: Params with units must be mutable. Converting Param\n",
- "'fs.BT_params.ds_form' to mutable.\n"
- ]
- }
- ],
- "source": [
- "from pyomo.environ import (\n",
- " Constraint,\n",
- " Var,\n",
- " ConcreteModel,\n",
- " Expression,\n",
- " Objective,\n",
- " TransformationFactory,\n",
- " value,\n",
- ")\n",
- "# Todo: Import the above mentioned tools from pyomo.network\n",
- "from pyomo.network import Arc, SequentialDecomposition\n",
- "from idaes.core import FlowsheetBlock\n",
- "\n",
- "from idaes.models.unit_models import (\n",
- " PressureChanger,\n",
- " Mixer,\n",
- " Separator as Splitter,\n",
- " Heater,\n",
- " CSTR,\n",
- " Flash,\n",
- " Translator,\n",
- ")\n",
- "\n",
- "from idaes.models_extra.column_models import TrayColumn\n",
- "from idaes.models_extra.column_models.condenser import CondenserType, TemperatureSpec\n",
- "# Utility tools to put together the flowsheet and calculate the degrees of freedom\n",
- "from idaes.models.unit_models.pressure_changer import ThermodynamicAssumption\n",
- "from idaes.core.util.model_statistics import degrees_of_freedom\n",
- "from idaes.core.util.initialization import propagate_state\n",
- "from idaes.core.solvers import get_solver\n",
- "import idaes.core.util.scaling as iscale\n",
- "\n",
- "# Import idaes logger to set output levels\n",
- "import idaes.logger as idaeslog\n",
- "\n",
- "from idaes_examples.mod.hda import hda_reaction as reaction_props\n",
- "from idaes.models.properties.activity_coeff_models.BTX_activity_coeff_VLE import (\n",
- " BTXParameterBlock,\n",
- ")\n",
- "\n",
- "from idaes_examples.mod.hda.hda_ideal_VLE import HDAParameterBlock\n",
- "# Create a Pyomo Concrete Model to contain the problem\n",
- "m = ConcreteModel()\n",
- "\n",
- "# Add a steady state flowsheet block to the model\n",
- "m.fs = FlowsheetBlock(dynamic=False)\n",
- "# Property package for benzene, toluene, hydrogen, methane mixture\n",
- "m.fs.BTHM_params = HDAParameterBlock()\n",
- "\n",
- "# Property package for the benzene-toluene mixture\n",
- "m.fs.BT_params = BTXParameterBlock(\n",
- " valid_phase=(\"Liq\", \"Vap\"), activity_coeff_model=\"Ideal\"\n",
- ")\n",
- "\n",
- "# Reaction package for the HDA reaction\n",
- "m.fs.reaction_params = reaction_props.HDAReactionParameterBlock(\n",
- " property_package=m.fs.BTHM_params\n",
- ")\n",
- "# Adding the mixer M101 to the flowsheet\n",
- "m.fs.M101 = Mixer(\n",
- " property_package=m.fs.BTHM_params,\n",
- " inlet_list=[\"toluene_feed\", \"hydrogen_feed\", \"vapor_recycle\"],\n",
- ")\n",
- "\n",
- "# Adding the heater H101 to the flowsheet\n",
- "m.fs.H101 = Heater(property_package=m.fs.BTHM_params, has_phase_equilibrium=True)\n",
- "# Todo: Add reactor with the specifications above\n",
- "m.fs.R101 = CSTR(\n",
- " property_package=m.fs.BTHM_params,\n",
- " reaction_package=m.fs.reaction_params,\n",
- " has_heat_of_reaction=True,\n",
- " has_heat_transfer=True,\n",
- ")\n",
- "\n",
- "# Adding the flash tank F101 to the flowsheet\n",
- "m.fs.F101 = Flash(\n",
- " property_package=m.fs.BTHM_params, has_heat_transfer=True, has_pressure_change=True\n",
- ")\n",
- "\n",
- "# Adding the splitter S101 to the flowsheet\n",
- "m.fs.S101 = Splitter(\n",
- " property_package=m.fs.BTHM_params, outlet_list=[\"purge\", \"recycle\"]\n",
- ")\n",
- "\n",
- "# Adding the compressor C101 to the flowsheet\n",
- "m.fs.C101 = PressureChanger(\n",
- " property_package=m.fs.BTHM_params,\n",
- " compressor=True,\n",
- " thermodynamic_assumption=ThermodynamicAssumption.isothermal,\n",
- ")\n",
- "# Add translator block to convert between property packages\n",
- "m.fs.translator = Translator(\n",
- " inlet_property_package=m.fs.BTHM_params, outlet_property_package=m.fs.BT_params\n",
- ")\n",
- "# Add constraint: Total flow = benzene flow + toluene flow (molar)\n",
- "m.fs.translator.eq_total_flow = Constraint(\n",
- " expr=m.fs.translator.outlet.flow_mol[0]\n",
- " == m.fs.translator.inlet.flow_mol_phase_comp[0, \"Liq\", \"benzene\"]\n",
- " + m.fs.translator.inlet.flow_mol_phase_comp[0, \"Liq\", \"toluene\"]\n",
- ")\n",
- "\n",
- "# Add constraint: Outlet temperature = Inlet temperature\n",
- "m.fs.translator.eq_temperature = Constraint(\n",
- " expr=m.fs.translator.outlet.temperature[0] == m.fs.translator.inlet.temperature[0]\n",
- ")\n",
- "\n",
- "# Todo: Add constraint: Outlet pressure = Inlet pressure\n",
- "m.fs.translator.eq_pressure = Constraint(\n",
- " expr=m.fs.translator.outlet.pressure[0] == m.fs.translator.inlet.pressure[0]\n",
- ")\n",
- "\n",
- "# Remaining constraints on the translator block\n",
- "\n",
- "# Add constraint: Benzene mole fraction definition\n",
- "m.fs.translator.eq_mole_frac_benzene = Constraint(\n",
- " expr=m.fs.translator.outlet.mole_frac_comp[0, \"benzene\"]\n",
- " == m.fs.translator.inlet.flow_mol_phase_comp[0, \"Liq\", \"benzene\"]\n",
- " / (\n",
- " m.fs.translator.inlet.flow_mol_phase_comp[0, \"Liq\", \"benzene\"]\n",
- " + m.fs.translator.inlet.flow_mol_phase_comp[0, \"Liq\", \"toluene\"]\n",
- " + m.fs.translator.inlet.flow_mol_phase_comp[0, \"Liq\", \"hydrogen\"]\n",
- " + m.fs.translator.inlet.flow_mol_phase_comp[0, \"Liq\", \"methane\"]\n",
- " )\n",
- ")\n",
- "\n",
- "# Add constraint: Toluene mole fraction definition\n",
- "m.fs.translator.eq_mole_frac_toluene = Constraint(\n",
- " expr=m.fs.translator.outlet.mole_frac_comp[0, \"toluene\"]\n",
- " == m.fs.translator.inlet.flow_mol_phase_comp[0, \"Liq\", \"toluene\"]\n",
- " / (\n",
- " m.fs.translator.inlet.flow_mol_phase_comp[0, \"Liq\", \"benzene\"]\n",
- " + m.fs.translator.inlet.flow_mol_phase_comp[0, \"Liq\", \"toluene\"]\n",
- " + m.fs.translator.inlet.flow_mol_phase_comp[0, \"Liq\", \"hydrogen\"]\n",
- " + m.fs.translator.inlet.flow_mol_phase_comp[0, \"Liq\", \"methane\"]\n",
- " )\n",
- ")\n",
- "# Todo: Add the Heater H102 to the flowsheet\n",
- "m.fs.H102 = Heater(\n",
- " property_package=m.fs.BT_params,\n",
- " has_pressure_change=True,\n",
- " has_phase_equilibrium=True,\n",
- ")\n",
- "\n",
- "m.fs.s03 = Arc(source=m.fs.M101.outlet, destination=m.fs.H101.inlet)\n",
- "\n",
- "# Todo: Connect the H101 outlet to R101 inlet\n",
- "m.fs.s04 = Arc(source=m.fs.H101.outlet, destination=m.fs.R101.inlet)\n",
- "m.fs.s05 = Arc(source=m.fs.R101.outlet, destination=m.fs.F101.inlet)\n",
- "m.fs.s06 = Arc(source=m.fs.F101.vap_outlet, destination=m.fs.S101.inlet)\n",
- "m.fs.s08 = Arc(source=m.fs.S101.recycle, destination=m.fs.C101.inlet)\n",
- "m.fs.s09 = Arc(source=m.fs.C101.outlet, destination=m.fs.M101.vapor_recycle)\n",
- "m.fs.s10a = Arc(source=m.fs.F101.liq_outlet, destination=m.fs.translator.inlet)\n",
- "m.fs.s10b = Arc(source=m.fs.translator.outlet, destination=m.fs.H102.inlet)\n",
- "\n",
- "TransformationFactory(\"network.expand_arcs\").apply_to(m)\n",
- "\n",
- "# Define the conversion variables using 'Var'\n",
- "m.fs.R101.conversion = Var(initialize=0.75, bounds=(0, 1))\n",
- "\n",
- "# Append the constraint to the model\n",
- "m.fs.R101.conv_constraint = Constraint(\n",
- " expr=m.fs.R101.conversion * m.fs.R101.inlet.flow_mol_phase_comp[0, \"Vap\", \"toluene\"]\n",
- " == (\n",
- " m.fs.R101.inlet.flow_mol_phase_comp[0, \"Vap\", \"toluene\"]\n",
- " - m.fs.R101.outlet.flow_mol_phase_comp[0, \"Vap\", \"toluene\"]\n",
- " )\n",
- ")\n",
- "\n",
- "m.fs.M101.toluene_feed.flow_mol_phase_comp[0, \"Vap\", \"benzene\"].fix(1e-5)\n",
- "m.fs.M101.toluene_feed.flow_mol_phase_comp[0, \"Vap\", \"toluene\"].fix(1e-5)\n",
- "m.fs.M101.toluene_feed.flow_mol_phase_comp[0, \"Vap\", \"hydrogen\"].fix(1e-5)\n",
- "m.fs.M101.toluene_feed.flow_mol_phase_comp[0, \"Vap\", \"methane\"].fix(1e-5)\n",
- "m.fs.M101.toluene_feed.flow_mol_phase_comp[0, \"Liq\", \"benzene\"].fix(1e-5)\n",
- "m.fs.M101.toluene_feed.flow_mol_phase_comp[0, \"Liq\", \"toluene\"].fix(0.30)\n",
- "m.fs.M101.toluene_feed.flow_mol_phase_comp[0, \"Liq\", \"hydrogen\"].fix(1e-5)\n",
- "m.fs.M101.toluene_feed.flow_mol_phase_comp[0, \"Liq\", \"methane\"].fix(1e-5)\n",
- "m.fs.M101.toluene_feed.temperature.fix(303.2)\n",
- "m.fs.M101.toluene_feed.pressure.fix(350000)\n",
- "\n",
- "m.fs.M101.hydrogen_feed.flow_mol_phase_comp[0, \"Vap\", \"benzene\"].fix(1e-5)\n",
- "m.fs.M101.hydrogen_feed.flow_mol_phase_comp[0, \"Vap\", \"toluene\"].fix(1e-5)\n",
- "m.fs.M101.hydrogen_feed.flow_mol_phase_comp[0, \"Vap\", \"hydrogen\"].fix(0.30)\n",
- "m.fs.M101.hydrogen_feed.flow_mol_phase_comp[0, \"Vap\", \"methane\"].fix(0.02)\n",
- "m.fs.M101.hydrogen_feed.flow_mol_phase_comp[0, \"Liq\", \"benzene\"].fix(1e-5)\n",
- "m.fs.M101.hydrogen_feed.flow_mol_phase_comp[0, \"Liq\", \"toluene\"].fix(1e-5)\n",
- "m.fs.M101.hydrogen_feed.flow_mol_phase_comp[0, \"Liq\", \"hydrogen\"].fix(1e-5)\n",
- "m.fs.M101.hydrogen_feed.flow_mol_phase_comp[0, \"Liq\", \"methane\"].fix(1e-5)\n",
- "m.fs.M101.hydrogen_feed.temperature.fix(303.2)\n",
- "m.fs.M101.hydrogen_feed.pressure.fix(350000)\n",
- "\n",
- "# Fix the temperature of the outlet from the heater H101\n",
- "m.fs.H101.outlet.temperature.fix(600)\n",
- "\n",
- "# Todo: Fix the 'conversion' of the reactor R101\n",
- "m.fs.R101.conversion.fix(0.75)\n",
- "\n",
- "# Todo: Fix the 'heat_duty' of the reactor R101\n",
- "m.fs.R101.heat_duty.fix(0)\n",
- "\n",
- "# Fix the temperature of the vapor outlet from F101\n",
- "m.fs.F101.vap_outlet.temperature.fix(325.0)\n",
- "\n",
- "# Fix the pressure drop in the flash F101\n",
- "m.fs.F101.deltaP.fix(0)\n",
- "\n",
- "# Fix the split fraction of the 'purge' stream from S101\n",
- "m.fs.S101.split_fraction[0, \"purge\"].fix(0.2)\n",
- "\n",
- "# Fix the pressure of the outlet from the compressor C101\n",
- "m.fs.C101.outlet.pressure.fix(350000)\n",
- "\n",
- "# Fix the temperature of the outlet from the heater H102\n",
- "m.fs.H102.outlet.temperature.fix(375)\n",
- "\n",
- "# Fix the pressure drop in the heater H102\n",
- "m.fs.H102.deltaP.fix(-200000)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 20,
- "metadata": {},
- "outputs": [],
- "source": [
- "# Set scaling factors for heat duty, reaction extent and volume\n",
- "iscale.set_scaling_factor(m.fs.H101.control_volume.heat, 1e-2)\n",
- "iscale.set_scaling_factor(m.fs.R101.control_volume.heat, 1e-2)\n",
- "iscale.set_scaling_factor(m.fs.R101.control_volume.rate_reaction_extent, 1)\n",
- "iscale.set_scaling_factor(m.fs.R101.control_volume.volume, 1)\n",
- "iscale.set_scaling_factor(m.fs.F101.control_volume.heat, 1e-2)\n",
- "iscale.set_scaling_factor(m.fs.H102.control_volume.heat, 1e-2)\n",
- "\n",
- "# iscale.set_scaling_factor(m.fs.F101.control_volume.properties_out[0.0].pressure_sat['hydrogen'], 8.234E+07)\n",
- "# iscale.set_scaling_factor(m.fs.H101.control_volume.properties_out[0.0].pressure_sat['hydrogen'], 8.592E+07)\n",
- "iscale.set_scaling_factor(m.fs.R101.control_volume.properties_out[0.0].temperature, 5.811E-05)\n",
- "iscale.set_scaling_factor(m.fs.F101.control_volume.properties_in[0.0].temperature, 5.811E-05)\n",
- "iscale.set_scaling_factor(m.fs.C101.ratioP[0.0],3.500E-05)\n",
- "iscale.set_scaling_factor(m.fs.F101.control_volume.properties_out[0.0].pressure_sat['methane'], 3.343E06)\n",
- " \n",
- "# iscale.calculate_scaling_factors(m.fs.H101)\n",
- "# iscale.calculate_scaling_factors(m.fs.R101)\n",
- "# iscale.calculate_scaling_factors(m.fs.F101)\n",
- "# iscale.calculate_scaling_factors(m.fs.H102)\n",
- "# iscale.calculate_scaling_factors(m.fs.S101)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 21,
- "metadata": {},
- "outputs": [],
- "source": [
- "seq = SequentialDecomposition()\n",
- "seq.options.select_tear_method = \"heuristic\"\n",
- "seq.options.tear_method = \"Wegstein\"\n",
- "seq.options.iterLim = 3\n",
- "\n",
- "# Using the SD tool\n",
- "G = seq.create_graph(m)\n",
- "heuristic_tear_set = seq.tear_set_arcs(G, method=\"heuristic\")\n",
- "order = seq.calculation_order(G)\n",
- "\n",
- "tear_guesses = {\n",
- " \"flow_mol_phase_comp\": {\n",
- " (0, \"Vap\", \"benzene\"): 1e-5,\n",
- " (0, \"Vap\", \"toluene\"): 1e-5,\n",
- " (0, \"Vap\", \"hydrogen\"): 0.30,\n",
- " (0, \"Vap\", \"methane\"): 0.02,\n",
- " (0, \"Liq\", \"benzene\"): 1e-5,\n",
- " (0, \"Liq\", \"toluene\"): 0.30,\n",
- " (0, \"Liq\", \"hydrogen\"): 1e-5,\n",
- " (0, \"Liq\", \"methane\"): 1e-5,\n",
- " },\n",
- " \"temperature\": {0: 303},\n",
- " \"pressure\": {0: 350000},\n",
- "}\n",
- "\n",
- "# Pass the tear_guess to the SD tool\n",
- "seq.set_guesses_for(m.fs.H101.inlet, tear_guesses)\n",
- "\n",
- "from idaes.core.initialization.block_triangularization import BlockTriangularizationInitializer\n",
- "initializer = BlockTriangularizationInitializer(constraint_tolerance=1e-4)\n",
- "def function(unit):\n",
- " print(unit.name)\n",
- " if isinstance(unit, Heater): # Heaters have their own initialization method\n",
- " unit.initialize(outlvl=idaeslog.INFO)\n",
- " else:\n",
- " status = initializer.initialize(unit, output_level=idaeslog.INFO)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 60,
- "metadata": {},
- "outputs": [],
- "source": [
- "seq = SequentialDecomposition()\n",
- "seq.options.select_tear_method = \"heuristic\"\n",
- "seq.options.tear_method = \"Wegstein\"\n",
- "seq.options.iterLim = 3\n",
- "\n",
- "# Using the SD tool\n",
- "G = seq.create_graph(m)\n",
- "heuristic_tear_set = seq.tear_set_arcs(G, method=\"heuristic\")\n",
- "order = seq.calculation_order(G)\n",
- "\n",
- "tear_guesses = {\n",
- " \"flow_mol_phase_comp\": {\n",
- " (0, \"Vap\", \"benzene\"): 1e-5,\n",
- " (0, \"Vap\", \"toluene\"): 1e-5,\n",
- " (0, \"Vap\", \"hydrogen\"): 0.30,\n",
- " (0, \"Vap\", \"methane\"): 0.02,\n",
- " (0, \"Liq\", \"benzene\"): 1e-5,\n",
- " (0, \"Liq\", \"toluene\"): 0.30,\n",
- " (0, \"Liq\", \"hydrogen\"): 1e-5,\n",
- " (0, \"Liq\", \"methane\"): 1e-5,\n",
- " },\n",
- " \"temperature\": {0: 303},\n",
- " \"pressure\": {0: 350000},\n",
- "}\n",
- "\n",
- "# Pass the tear_guess to the SD tool\n",
- "seq.set_guesses_for(m.fs.H101.inlet, tear_guesses)\n",
- "\n",
- "def function(unit):\n",
- " print(unit.name)\n",
- " try:\n",
- " print(unit.default_initializer())\n",
- " initializer = unit.default_initializer()\n",
- " initializer.initialize(unit, output_level=idaeslog.INFO)\n",
- " except:\n",
- " print(f'{unit} did not initialize well')\n",
- " print(initializer.initialize(unit, output_level=idaeslog.INFO))\n",
- " # if isinstance(unit, Heater): # Heaters have their own initialization method\n",
- " # unit.initialize(outlvl=idaeslog.INFO)\n",
- " # else:\n",
- " # status = initializer.initialize(unit, output_level=idaeslog.INFO)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 61,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "fs.H101\n",
- "\n",
- "fs.H101 did not initialize well\n"
- ]
- },
- {
- "ename": "NotImplementedError",
- "evalue": "",
- "output_type": "error",
- "traceback": [
- "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
- "\u001b[1;31mNotImplementedError\u001b[0m Traceback (most recent call last)",
- "Cell \u001b[1;32mIn[60], line 34\u001b[0m, in \u001b[0;36mfunction\u001b[1;34m(unit)\u001b[0m\n\u001b[0;32m 33\u001b[0m initializer \u001b[38;5;241m=\u001b[39m unit\u001b[38;5;241m.\u001b[39mdefault_initializer()\n\u001b[1;32m---> 34\u001b[0m \u001b[43minitializer\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43minitialize\u001b[49m\u001b[43m(\u001b[49m\u001b[43munit\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43moutput_level\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43midaeslog\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mINFO\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 35\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m:\n",
- "File \u001b[1;32mc:\\users\\javal\\desktop\\internship\\idaes-pse\\idaes\\core\\initialization\\initializer_base.py:192\u001b[0m, in \u001b[0;36mInitializerBase.initialize\u001b[1;34m(self, model, initial_guesses, json_file, output_level, exclude_unused_vars)\u001b[0m\n\u001b[0;32m 188\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m 189\u001b[0m \u001b[38;5;66;03m# Base method does not have a return (NotImplementedError),\u001b[39;00m\n\u001b[0;32m 190\u001b[0m \u001b[38;5;66;03m# but we expect this to be overloaded, disable pylint warning\u001b[39;00m\n\u001b[0;32m 191\u001b[0m \u001b[38;5;66;03m# pylint: disable=E1111\u001b[39;00m\n\u001b[1;32m--> 192\u001b[0m results \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43minitialization_routine\u001b[49m\u001b[43m(\u001b[49m\u001b[43mmodel\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 193\u001b[0m \u001b[38;5;66;03m# 6. finally: Restore model state\u001b[39;00m\n\u001b[0;32m 194\u001b[0m \u001b[38;5;28;01mfinally\u001b[39;00m:\n",
- "File \u001b[1;32mc:\\users\\javal\\desktop\\internship\\idaes-pse\\idaes\\core\\initialization\\general_hierarchical.py:70\u001b[0m, in \u001b[0;36mSingleControlVolumeUnitInitializer.initialization_routine\u001b[1;34m(self, model, plugin_initializer_args, copy_inlet_state)\u001b[0m\n\u001b[0;32m 69\u001b[0m \u001b[38;5;66;03m# The default initialization_routine is sufficient\u001b[39;00m\n\u001b[1;32m---> 70\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43msuper\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43minitialization_routine\u001b[49m\u001b[43m(\u001b[49m\n\u001b[0;32m 71\u001b[0m \u001b[43m \u001b[49m\u001b[43mmodel\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mmodel\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 72\u001b[0m \u001b[43m \u001b[49m\u001b[43mplugin_initializer_args\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mplugin_initializer_args\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 73\u001b[0m \u001b[43m \u001b[49m\u001b[43mcopy_inlet_state\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcopy_inlet_state\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 74\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n",
- "File \u001b[1;32mc:\\users\\javal\\desktop\\internship\\idaes-pse\\idaes\\core\\initialization\\initializer_base.py:676\u001b[0m, in \u001b[0;36mModularInitializerBase.initialization_routine\u001b[1;34m(self, model, plugin_initializer_args, **kwargs)\u001b[0m\n\u001b[0;32m 675\u001b[0m \u001b[38;5;66;03m# Initialize model and sub-models\u001b[39;00m\n\u001b[1;32m--> 676\u001b[0m results \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39minitialize_submodels(\n\u001b[0;32m 677\u001b[0m model, plugin_initializer_args, sub_initializers, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs\n\u001b[0;32m 678\u001b[0m )\n\u001b[0;32m 679\u001b[0m _log\u001b[38;5;241m.\u001b[39minfo_high(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mStep 2: sub-model initialization complete.\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n",
- "File \u001b[1;32mc:\\users\\javal\\desktop\\internship\\idaes-pse\\idaes\\core\\initialization\\initializer_base.py:745\u001b[0m, in \u001b[0;36mModularInitializerBase.initialize_submodels\u001b[1;34m(self, model, plugin_initializer_args, sub_initializers, **kwargs)\u001b[0m\n\u001b[0;32m 744\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m sm \u001b[38;5;129;01mis\u001b[39;00m model:\n\u001b[1;32m--> 745\u001b[0m results \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39minitialize_main_model(model, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)\n\u001b[0;32m 746\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n",
- "File \u001b[1;32mc:\\users\\javal\\desktop\\internship\\idaes-pse\\idaes\\core\\initialization\\general_hierarchical.py:100\u001b[0m, in \u001b[0;36mSingleControlVolumeUnitInitializer.initialize_main_model\u001b[1;34m(self, model, copy_inlet_state)\u001b[0m\n\u001b[0;32m 98\u001b[0m _log \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mget_logger(model)\n\u001b[1;32m--> 100\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43minitialize_control_volume\u001b[49m\u001b[43m(\u001b[49m\u001b[43mmodel\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcontrol_volume\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mcopy_inlet_state\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 102\u001b[0m \u001b[38;5;66;03m# Solve main model\u001b[39;00m\n",
- "File \u001b[1;32mc:\\users\\javal\\desktop\\internship\\idaes-pse\\idaes\\core\\initialization\\general_hierarchical.py:138\u001b[0m, in \u001b[0;36mSingleControlVolumeUnitInitializer.initialize_control_volume\u001b[1;34m(self, control_volume, copy_inlet_state)\u001b[0m\n\u001b[0;32m 136\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mhasattr\u001b[39m(control_volume, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mproperties_in\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[0;32m 137\u001b[0m \u001b[38;5;66;03m# 0-D control volume\u001b[39;00m\n\u001b[1;32m--> 138\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_init_props_0D\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcontrol_volume\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mcopy_inlet_state\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 139\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m 140\u001b[0m \u001b[38;5;66;03m# 1-D control volume\u001b[39;00m\n",
- "File \u001b[1;32mc:\\users\\javal\\desktop\\internship\\idaes-pse\\idaes\\core\\initialization\\general_hierarchical.py:155\u001b[0m, in \u001b[0;36mSingleControlVolumeUnitInitializer._init_props_0D\u001b[1;34m(self, control_volume, copy_inlet_state)\u001b[0m\n\u001b[0;32m 154\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m prop_init \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m--> 155\u001b[0m \u001b[43mprop_init\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43minitialize\u001b[49m\u001b[43m(\u001b[49m\n\u001b[0;32m 156\u001b[0m \u001b[43m \u001b[49m\u001b[43mmodel\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcontrol_volume\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mproperties_in\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 157\u001b[0m \u001b[43m \u001b[49m\u001b[43moutput_level\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget_output_level\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 158\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 160\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m copy_inlet_state:\n\u001b[0;32m 161\u001b[0m \u001b[38;5;66;03m# Just in case the user set a different initializer for the outlet\u001b[39;00m\n",
- "File \u001b[1;32mc:\\users\\javal\\desktop\\internship\\idaes-pse\\idaes\\core\\initialization\\initializer_base.py:182\u001b[0m, in \u001b[0;36mInitializerBase.initialize\u001b[1;34m(self, model, initial_guesses, json_file, output_level, exclude_unused_vars)\u001b[0m\n\u001b[0;32m 181\u001b[0m \u001b[38;5;66;03m# 3. Fix states to make square\u001b[39;00m\n\u001b[1;32m--> 182\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfix_initialization_states\u001b[49m\u001b[43m(\u001b[49m\u001b[43mmodel\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 184\u001b[0m \u001b[38;5;66;03m# 4. Prechecks\u001b[39;00m\n",
- "File \u001b[1;32mc:\\users\\javal\\desktop\\internship\\idaes-pse\\idaes\\core\\initialization\\initializer_base.py:279\u001b[0m, in \u001b[0;36mInitializerBase.fix_initialization_states\u001b[1;34m(self, model)\u001b[0m\n\u001b[0;32m 278\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m--> 279\u001b[0m \u001b[43mmodel\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfix_initialization_states\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 280\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mAttributeError\u001b[39;00m:\n",
- "File \u001b[1;32mc:\\users\\javal\\desktop\\internship\\idaes-pse\\idaes\\core\\base\\property_base.py:314\u001b[0m, in \u001b[0;36mStateBlock.fix_initialization_states\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 308\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 309\u001b[0m \u001b[38;5;124;03mFixes state variables for state blocks.\u001b[39;00m\n\u001b[0;32m 310\u001b[0m \n\u001b[0;32m 311\u001b[0m \u001b[38;5;124;03mReturns:\u001b[39;00m\n\u001b[0;32m 312\u001b[0m \u001b[38;5;124;03m None\u001b[39;00m\n\u001b[0;32m 313\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m--> 314\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mNotImplementedError\u001b[39;00m\n",
- "\u001b[1;31mNotImplementedError\u001b[0m: ",
- "\nDuring handling of the above exception, another exception occurred:\n",
- "\u001b[1;31mNotImplementedError\u001b[0m Traceback (most recent call last)",
- "Cell \u001b[1;32mIn[61], line 1\u001b[0m\n\u001b[1;32m----> 1\u001b[0m \u001b[43mseq\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mrun\u001b[49m\u001b[43m(\u001b[49m\u001b[43mm\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mfunction\u001b[49m\u001b[43m)\u001b[49m\n",
- "File \u001b[1;32mc:\\Users\\javal\\anaconda3\\envs\\idaes-pse\\lib\\site-packages\\pyomo\\network\\decomposition.py:296\u001b[0m, in \u001b[0;36mSequentialDecomposition.run\u001b[1;34m(self, model, function)\u001b[0m\n\u001b[0;32m 293\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mcache\u001b[38;5;241m.\u001b[39mclear()\n\u001b[0;32m 295\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m--> 296\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_run_impl\u001b[49m\u001b[43m(\u001b[49m\u001b[43mmodel\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mfunction\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 297\u001b[0m \u001b[38;5;28;01mfinally\u001b[39;00m:\n\u001b[0;32m 298\u001b[0m \u001b[38;5;66;03m# Cleanup\u001b[39;00m\n\u001b[0;32m 299\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mcache\u001b[38;5;241m.\u001b[39mclear()\n",
- "File \u001b[1;32mc:\\Users\\javal\\anaconda3\\envs\\idaes-pse\\lib\\site-packages\\pyomo\\network\\decomposition.py:317\u001b[0m, in \u001b[0;36mSequentialDecomposition._run_impl\u001b[1;34m(self, model, function)\u001b[0m\n\u001b[0;32m 315\u001b[0m logger\u001b[38;5;241m.\u001b[39minfo(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mStarting first pass run of network\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[0;32m 316\u001b[0m order \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mcalculation_order(G)\n\u001b[1;32m--> 317\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mrun_order\u001b[49m\u001b[43m(\u001b[49m\u001b[43mG\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43morder\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mfunction\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mtset\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43muse_guesses\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[0;32m 319\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39moptions[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124msolve_tears\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;129;01mor\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28mlen\u001b[39m(tset):\n\u001b[0;32m 320\u001b[0m \u001b[38;5;66;03m# Not solving tears, we're done\u001b[39;00m\n\u001b[0;32m 321\u001b[0m end \u001b[38;5;241m=\u001b[39m time\u001b[38;5;241m.\u001b[39mtime()\n",
- "File \u001b[1;32mc:\\Users\\javal\\anaconda3\\envs\\idaes-pse\\lib\\site-packages\\pyomo\\network\\decomposition.py:407\u001b[0m, in \u001b[0;36mSequentialDecomposition.run_order\u001b[1;34m(self, G, order, function, ignore, use_guesses)\u001b[0m\n\u001b[0;32m 404\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mload_guesses(guesses, port, fixed_ins)\n\u001b[0;32m 405\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mload_values(port, default, fixed_ins, use_guesses)\n\u001b[1;32m--> 407\u001b[0m \u001b[43mfunction\u001b[49m\u001b[43m(\u001b[49m\u001b[43munit\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 409\u001b[0m \u001b[38;5;66;03m# free the inputs that were not already fixed\u001b[39;00m\n\u001b[0;32m 410\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m var \u001b[38;5;129;01min\u001b[39;00m fixed_ins:\n",
- "Cell \u001b[1;32mIn[60], line 37\u001b[0m, in \u001b[0;36mfunction\u001b[1;34m(unit)\u001b[0m\n\u001b[0;32m 35\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m:\n\u001b[0;32m 36\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00munit\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m did not initialize well\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[1;32m---> 37\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[43minitializer\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43minitialize\u001b[49m\u001b[43m(\u001b[49m\u001b[43munit\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43moutput_level\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43midaeslog\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mINFO\u001b[49m\u001b[43m)\u001b[49m)\n",
- "File \u001b[1;32mc:\\users\\javal\\desktop\\internship\\idaes-pse\\idaes\\core\\initialization\\initializer_base.py:192\u001b[0m, in \u001b[0;36mInitializerBase.initialize\u001b[1;34m(self, model, initial_guesses, json_file, output_level, exclude_unused_vars)\u001b[0m\n\u001b[0;32m 187\u001b[0m \u001b[38;5;66;03m# 5. try: Call specified initialization routine\u001b[39;00m\n\u001b[0;32m 188\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m 189\u001b[0m \u001b[38;5;66;03m# Base method does not have a return (NotImplementedError),\u001b[39;00m\n\u001b[0;32m 190\u001b[0m \u001b[38;5;66;03m# but we expect this to be overloaded, disable pylint warning\u001b[39;00m\n\u001b[0;32m 191\u001b[0m \u001b[38;5;66;03m# pylint: disable=E1111\u001b[39;00m\n\u001b[1;32m--> 192\u001b[0m results \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43minitialization_routine\u001b[49m\u001b[43m(\u001b[49m\u001b[43mmodel\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 193\u001b[0m \u001b[38;5;66;03m# 6. finally: Restore model state\u001b[39;00m\n\u001b[0;32m 194\u001b[0m \u001b[38;5;28;01mfinally\u001b[39;00m:\n\u001b[0;32m 195\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mrestore_model_state(model)\n",
- "File \u001b[1;32mc:\\users\\javal\\desktop\\internship\\idaes-pse\\idaes\\core\\initialization\\general_hierarchical.py:70\u001b[0m, in \u001b[0;36mSingleControlVolumeUnitInitializer.initialization_routine\u001b[1;34m(self, model, plugin_initializer_args, copy_inlet_state)\u001b[0m\n\u001b[0;32m 55\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 56\u001b[0m \u001b[38;5;124;03mCommon initialization routine for models with one control volume.\u001b[39;00m\n\u001b[0;32m 57\u001b[0m \n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 67\u001b[0m \u001b[38;5;124;03m Pyomo solver results object\u001b[39;00m\n\u001b[0;32m 68\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 69\u001b[0m \u001b[38;5;66;03m# The default initialization_routine is sufficient\u001b[39;00m\n\u001b[1;32m---> 70\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43msuper\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43minitialization_routine\u001b[49m\u001b[43m(\u001b[49m\n\u001b[0;32m 71\u001b[0m \u001b[43m \u001b[49m\u001b[43mmodel\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mmodel\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 72\u001b[0m \u001b[43m \u001b[49m\u001b[43mplugin_initializer_args\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mplugin_initializer_args\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 73\u001b[0m \u001b[43m \u001b[49m\u001b[43mcopy_inlet_state\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcopy_inlet_state\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 74\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n",
- "File \u001b[1;32mc:\\users\\javal\\desktop\\internship\\idaes-pse\\idaes\\core\\initialization\\initializer_base.py:676\u001b[0m, in \u001b[0;36mModularInitializerBase.initialization_routine\u001b[1;34m(self, model, plugin_initializer_args, **kwargs)\u001b[0m\n\u001b[0;32m 673\u001b[0m _log\u001b[38;5;241m.\u001b[39minfo_high(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mStep 1: preparation complete.\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[0;32m 675\u001b[0m \u001b[38;5;66;03m# Initialize model and sub-models\u001b[39;00m\n\u001b[1;32m--> 676\u001b[0m results \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39minitialize_submodels(\n\u001b[0;32m 677\u001b[0m model, plugin_initializer_args, sub_initializers, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs\n\u001b[0;32m 678\u001b[0m )\n\u001b[0;32m 679\u001b[0m _log\u001b[38;5;241m.\u001b[39minfo_high(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mStep 2: sub-model initialization complete.\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[0;32m 681\u001b[0m \u001b[38;5;66;03m# Solve full model including plug-ins\u001b[39;00m\n",
- "File \u001b[1;32mc:\\users\\javal\\desktop\\internship\\idaes-pse\\idaes\\core\\initialization\\initializer_base.py:745\u001b[0m, in \u001b[0;36mModularInitializerBase.initialize_submodels\u001b[1;34m(self, model, plugin_initializer_args, sub_initializers, **kwargs)\u001b[0m\n\u001b[0;32m 743\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m sm \u001b[38;5;129;01min\u001b[39;00m model\u001b[38;5;241m.\u001b[39minitialization_order:\n\u001b[0;32m 744\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m sm \u001b[38;5;129;01mis\u001b[39;00m model:\n\u001b[1;32m--> 745\u001b[0m results \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39minitialize_main_model(model, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)\n\u001b[0;32m 746\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m 747\u001b[0m sub_initializers[sm]\u001b[38;5;241m.\u001b[39mplugin_initialize(\n\u001b[0;32m 748\u001b[0m sm, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mplugin_initializer_args[sm]\n\u001b[0;32m 749\u001b[0m )\n",
- "File \u001b[1;32mc:\\users\\javal\\desktop\\internship\\idaes-pse\\idaes\\core\\initialization\\general_hierarchical.py:100\u001b[0m, in \u001b[0;36mSingleControlVolumeUnitInitializer.initialize_main_model\u001b[1;34m(self, model, copy_inlet_state)\u001b[0m\n\u001b[0;32m 97\u001b[0m \u001b[38;5;66;03m# Get logger\u001b[39;00m\n\u001b[0;32m 98\u001b[0m _log \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mget_logger(model)\n\u001b[1;32m--> 100\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43minitialize_control_volume\u001b[49m\u001b[43m(\u001b[49m\u001b[43mmodel\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mcontrol_volume\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mcopy_inlet_state\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 102\u001b[0m \u001b[38;5;66;03m# Solve main model\u001b[39;00m\n\u001b[0;32m 103\u001b[0m solve_log \u001b[38;5;241m=\u001b[39m idaeslog\u001b[38;5;241m.\u001b[39mgetSolveLogger(\n\u001b[0;32m 104\u001b[0m model\u001b[38;5;241m.\u001b[39mname, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mget_output_level(), tag\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124munit\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m 105\u001b[0m )\n",
- "File \u001b[1;32mc:\\users\\javal\\desktop\\internship\\idaes-pse\\idaes\\core\\initialization\\general_hierarchical.py:138\u001b[0m, in \u001b[0;36mSingleControlVolumeUnitInitializer.initialize_control_volume\u001b[1;34m(self, control_volume, copy_inlet_state)\u001b[0m\n\u001b[0;32m 135\u001b[0m \u001b[38;5;66;03m# Initialize properties\u001b[39;00m\n\u001b[0;32m 136\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mhasattr\u001b[39m(control_volume, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mproperties_in\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n\u001b[0;32m 137\u001b[0m \u001b[38;5;66;03m# 0-D control volume\u001b[39;00m\n\u001b[1;32m--> 138\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_init_props_0D\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcontrol_volume\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mcopy_inlet_state\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 139\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m 140\u001b[0m \u001b[38;5;66;03m# 1-D control volume\u001b[39;00m\n\u001b[0;32m 141\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_init_props_1D(control_volume)\n",
- "File \u001b[1;32mc:\\users\\javal\\desktop\\internship\\idaes-pse\\idaes\\core\\initialization\\general_hierarchical.py:155\u001b[0m, in \u001b[0;36mSingleControlVolumeUnitInitializer._init_props_0D\u001b[1;34m(self, control_volume, copy_inlet_state)\u001b[0m\n\u001b[0;32m 152\u001b[0m prop_init \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mget_submodel_initializer(control_volume\u001b[38;5;241m.\u001b[39mproperties_in)\n\u001b[0;32m 154\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m prop_init \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m--> 155\u001b[0m \u001b[43mprop_init\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43minitialize\u001b[49m\u001b[43m(\u001b[49m\n\u001b[0;32m 156\u001b[0m \u001b[43m \u001b[49m\u001b[43mmodel\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mcontrol_volume\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mproperties_in\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 157\u001b[0m \u001b[43m \u001b[49m\u001b[43moutput_level\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget_output_level\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[0;32m 158\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 160\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m copy_inlet_state:\n\u001b[0;32m 161\u001b[0m \u001b[38;5;66;03m# Just in case the user set a different initializer for the outlet\u001b[39;00m\n\u001b[0;32m 162\u001b[0m prop_init \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mget_submodel_initializer(control_volume\u001b[38;5;241m.\u001b[39mproperties_out)\n",
- "File \u001b[1;32mc:\\users\\javal\\desktop\\internship\\idaes-pse\\idaes\\core\\initialization\\initializer_base.py:182\u001b[0m, in \u001b[0;36mInitializerBase.initialize\u001b[1;34m(self, model, initial_guesses, json_file, output_level, exclude_unused_vars)\u001b[0m\n\u001b[0;32m 177\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mload_initial_guesses(\n\u001b[0;32m 178\u001b[0m model, initial_guesses\u001b[38;5;241m=\u001b[39minitial_guesses, json_file\u001b[38;5;241m=\u001b[39mjson_file\n\u001b[0;32m 179\u001b[0m )\n\u001b[0;32m 181\u001b[0m \u001b[38;5;66;03m# 3. Fix states to make square\u001b[39;00m\n\u001b[1;32m--> 182\u001b[0m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfix_initialization_states\u001b[49m\u001b[43m(\u001b[49m\u001b[43mmodel\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 184\u001b[0m \u001b[38;5;66;03m# 4. Prechecks\u001b[39;00m\n\u001b[0;32m 185\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mprecheck(model)\n",
- "File \u001b[1;32mc:\\users\\javal\\desktop\\internship\\idaes-pse\\idaes\\core\\initialization\\initializer_base.py:279\u001b[0m, in \u001b[0;36mInitializerBase.fix_initialization_states\u001b[1;34m(self, model)\u001b[0m\n\u001b[0;32m 268\u001b[0m \u001b[38;5;250m\u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 269\u001b[0m \u001b[38;5;124;03mCall to model.fix_initialization_states method. Method will pass if\u001b[39;00m\n\u001b[0;32m 270\u001b[0m \u001b[38;5;124;03mfix_initialization_states not found.\u001b[39;00m\n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 276\u001b[0m \u001b[38;5;124;03m None\u001b[39;00m\n\u001b[0;32m 277\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 278\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m--> 279\u001b[0m \u001b[43mmodel\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfix_initialization_states\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 280\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mAttributeError\u001b[39;00m:\n\u001b[0;32m 281\u001b[0m _log\u001b[38;5;241m.\u001b[39minfo_high(\n\u001b[0;32m 282\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mModel \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mmodel\u001b[38;5;241m.\u001b[39mname\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m does not have a fix_initialization_states method - attempting to continue.\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m 283\u001b[0m )\n",
- "File \u001b[1;32mc:\\users\\javal\\desktop\\internship\\idaes-pse\\idaes\\core\\base\\property_base.py:314\u001b[0m, in \u001b[0;36mStateBlock.fix_initialization_states\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 307\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mfix_initialization_states\u001b[39m(\u001b[38;5;28mself\u001b[39m):\n\u001b[0;32m 308\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[0;32m 309\u001b[0m \u001b[38;5;124;03m Fixes state variables for state blocks.\u001b[39;00m\n\u001b[0;32m 310\u001b[0m \n\u001b[0;32m 311\u001b[0m \u001b[38;5;124;03m Returns:\u001b[39;00m\n\u001b[0;32m 312\u001b[0m \u001b[38;5;124;03m None\u001b[39;00m\n\u001b[0;32m 313\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[1;32m--> 314\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mNotImplementedError\u001b[39;00m\n",
- "\u001b[1;31mNotImplementedError\u001b[0m: "
- ]
- }
- ],
- "source": [
- "seq.run(m, function)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 23,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "WARNING: model contains export suffix 'scaling_factor' that contains 1\n",
- "component keys that are not exported as part of the NL file. Skipping.\n",
- "====================================================================================\n",
- "Model Statistics\n",
- "\n",
- " Jacobian Condition Number: 2.551E+23\n",
- "\n",
- "------------------------------------------------------------------------------------\n",
- "4 WARNINGS\n",
- "\n",
- " WARNING: 11 Constraints with large residuals (>1.0E-05)\n",
- " WARNING: 4 Variables at or outside bounds (tol=0.0E+00)\n",
- " WARNING: 28 Variables with extreme Jacobian values (<1.0E-08 or >1.0E+08)\n",
- " WARNING: 9 Constraints with extreme Jacobian values (<1.0E-08 or >1.0E+08)\n",
- "\n",
- "------------------------------------------------------------------------------------\n",
- "6 Cautions\n",
- "\n",
- " Caution: 68 Variables with value close to their bounds (abs=1.0E-04, rel=1.0E-04)\n",
- " Caution: 67 Variables with value close to zero (tol=1.0E-08)\n",
- " Caution: 138 Variables with extreme value (<1.0E-04 or >1.0E+04)\n",
- " Caution: 99 Variables with extreme Jacobian values (<1.0E-04 or >1.0E+04)\n",
- " Caution: 63 Constraints with extreme Jacobian values (<1.0E-04 or >1.0E+04)\n",
- " Caution: 232 extreme Jacobian Entries (<1.0E-04 or >1.0E+04)\n",
- "\n",
- "------------------------------------------------------------------------------------\n",
- "Suggested next steps:\n",
- "\n",
- " display_constraints_with_large_residuals()\n",
- " display_variables_at_or_outside_bounds()\n",
- " display_variables_with_extreme_jacobians()\n",
- " display_constraints_with_extreme_jacobians()\n",
- "\n",
- "====================================================================================\n"
- ]
- }
- ],
- "source": [
- "from idaes.core.util import DiagnosticsToolbox\n",
- "dt=DiagnosticsToolbox(m)\n",
- "dt.report_numerical_issues()"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 24,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "WARNING: model contains export suffix 'scaling_factor' that contains 1\n",
- "component keys that are not exported as part of the NL file. Skipping.\n",
- "====================================================================================\n",
- "The following variable(s) are associated with extreme Jacobian values (<1.0E-04 or>1.0E+04):\n",
- "\n",
- " fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene]: 1.477E+11\n",
- " fs.R101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane]: 1.267E+11\n",
- " fs.R101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen]: 1.267E+11\n",
- " fs.F101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,methane]: 1.267E+11\n",
- " fs.F101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,hydrogen]: 1.267E+11\n",
- " fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane]: 8.886E+10\n",
- " fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen]: 8.886E+10\n",
- " fs.C101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,toluene]: 7.163E+10\n",
- " fs.M101.vapor_recycle_state[0.0].flow_mol_phase_comp[Liq,toluene]: 7.162E+10\n",
- " fs.C101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene]: 7.162E+10\n",
- " fs.R101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,methane]: 6.625E+10\n",
- " fs.R101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,hydrogen]: 6.625E+10\n",
- " fs.C101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,methane]: 6.275E+10\n",
- " fs.C101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,hydrogen]: 6.275E+10\n",
- " fs.M101.vapor_recycle_state[0.0].flow_mol_phase_comp[Liq,methane]: 6.274E+10\n",
- " fs.M101.vapor_recycle_state[0.0].flow_mol_phase_comp[Liq,hydrogen]: 6.274E+10\n",
- " fs.C101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane]: 6.274E+10\n",
- " fs.C101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen]: 6.274E+10\n",
- " fs.C101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,benzene]: 5.386E+10\n",
- " fs.M101.vapor_recycle_state[0.0].flow_mol_phase_comp[Liq,benzene]: 5.386E+10\n",
- " fs.C101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene]: 5.386E+10\n",
- " fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene]: 2.289E+10\n",
- " fs.R101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene]: 1.320E+10\n",
- " fs.F101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,benzene]: 1.320E+10\n",
- " fs.R101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,benzene]: 7.777E+09\n",
- " fs.R101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene]: 3.638E+09\n",
- " fs.F101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,toluene]: 3.638E+09\n",
- " fs.R101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,toluene]: 1.205E+09\n",
- " fs.F101.control_volume.properties_out[0.0].pressure_sat[hydrogen]: 8.234E-07\n",
- " fs.H101.control_volume.properties_out[0.0].pressure_sat[hydrogen]: 8.592E-07\n",
- " fs.R101.control_volume.properties_out[0.0].temperature: 5.811E+05\n",
- " fs.F101.control_volume.properties_in[0.0].temperature: 5.811E+05\n",
- " fs.H102.control_volume.properties_in[0.0].mole_frac_phase_comp[Liq,benzene]: 4.130E+05\n",
- " fs.translator.properties_out[0.0].mole_frac_phase_comp[Liq,benzene]: 4.096E+05\n",
- " fs.translator.properties_out[0.0].mole_frac_comp[benzene]: 4.096E+05\n",
- " fs.H102.control_volume.properties_in[0.0].mole_frac_comp[benzene]: 4.096E+05\n",
- " fs.R101.control_volume.properties_in[0.0].temperature: 3.964E+05\n",
- " fs.H101.control_volume.properties_out[0.0].pressure_sat[methane]: 2.624E-06\n",
- " fs.H102.control_volume.properties_in[0.0].mole_frac_phase_comp[Vap,benzene]: 3.602E+05\n",
- " fs.H102.control_volume.properties_in[0.0].mole_frac_phase_comp[Vap,toluene]: 3.540E+05\n",
- " fs.translator.properties_out[0.0].mole_frac_phase_comp[Vap,benzene]: 3.500E+05\n",
- " fs.translator.properties_out[0.0].mole_frac_phase_comp[Vap,toluene]: 3.500E+05\n",
- " fs.C101.ratioP[0.0]: 3.500E+05\n",
- " fs.F101.control_volume.properties_out[0.0].pressure_sat[methane]: 3.343E-06\n",
- " fs.C101.control_volume.properties_in[0.0].temperature: 2.171E+05\n",
- " fs.C101.control_volume.properties_out[0.0].temperature: 2.171E+05\n",
- " fs.M101.vapor_recycle_state[0.0].temperature: 2.171E+05\n",
- " fs.M101.mixed_state[0.0].temperature: 2.129E+05\n",
- " fs.H101.control_volume.properties_in[0.0].temperature: 2.129E+05\n",
- " fs.H102.control_volume.properties_out[0.0].mole_frac_phase_comp[Liq,benzene]: 1.981E+05\n",
- " fs.F101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene]: 1.981E+05\n",
- " fs.H102.control_volume.properties_in[0.0].mole_frac_phase_comp[Liq,toluene]: 1.867E+05\n",
- " fs.translator.properties_out[0.0].mole_frac_phase_comp[Liq,toluene]: 1.860E+05\n",
- " fs.translator.properties_out[0.0].mole_frac_comp[toluene]: 1.860E+05\n",
- " fs.H102.control_volume.properties_in[0.0].mole_frac_comp[toluene]: 1.860E+05\n",
- " fs.F101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene]: 1.822E+05\n",
- " fs.H102.control_volume.properties_out[0.0].mole_frac_comp[benzene]: 1.779E+05\n",
- " fs.H102.control_volume.properties_out[0.0].mole_frac_phase_comp[Vap,benzene]: 1.750E+05\n",
- " fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene]: 1.675E+05\n",
- " fs.H102.control_volume.properties_out[0.0].mole_frac_phase_comp[Vap,toluene]: 1.613E+05\n",
- " fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene]: 1.510E+05\n",
- " fs.F101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene]: 1.171E+05\n",
- " fs.F101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane]: 1.123E+05\n",
- " fs.F101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen]: 1.123E+05\n",
- " fs.R101.control_volume.rate_reaction_extent[0.0,R1]: 1.080E+05\n",
- " fs.H102.control_volume.properties_out[0.0].flow_mol_phase[Vap]: 8.447E+04\n",
- " fs.H102.control_volume.properties_out[0.0].mole_frac_phase_comp[Liq,toluene]: 8.206E+04\n",
- " fs.H102.control_volume.properties_in[0.0].flow_mol_phase[Vap]: 8.067E+04\n",
- " fs.H102.control_volume.properties_out[0.0].mole_frac_comp[toluene]: 7.317E+04\n",
- " fs.R101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene]: 5.596E+04\n",
- " fs.F101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,toluene]: 5.596E+04\n",
- " fs.R101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene]: 4.923E+04\n",
- " fs.F101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,benzene]: 4.923E+04\n",
- " fs.H102.control_volume.properties_out[0.0].flow_mol_phase[Liq]: 4.781E+04\n",
- " fs.H102.control_volume.properties_in[0.0].flow_mol_phase[Liq]: 4.302E+04\n",
- " fs.R101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen]: 4.069E+04\n",
- " fs.F101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,hydrogen]: 4.069E+04\n",
- " fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen]: 3.961E+04\n",
- " fs.R101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane]: 3.957E+04\n",
- " fs.F101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,methane]: 3.957E+04\n",
- " fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane]: 3.919E+04\n",
- " fs.R101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,toluene]: 3.884E+04\n",
- " fs.F101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene]: 3.594E+04\n",
- " fs.R101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,benzene]: 3.429E+04\n",
- " fs.R101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,hydrogen]: 2.774E+04\n",
- " fs.R101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,methane]: 2.714E+04\n",
- " fs.M101.vapor_recycle_state[0.0].flow_mol_phase_comp[Vap,toluene]: 2.646E+04\n",
- " fs.C101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,toluene]: 2.646E+04\n",
- " fs.C101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene]: 2.646E+04\n",
- " fs.M101.vapor_recycle_state[0.0].flow_mol_phase_comp[Vap,benzene]: 2.297E+04\n",
- " fs.C101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,benzene]: 2.297E+04\n",
- " fs.C101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene]: 2.297E+04\n",
- " fs.M101.mixed_state[0.0].flow_mol_phase_comp[Vap,toluene]: 2.144E+04\n",
- " fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,toluene]: 2.143E+04\n",
- " fs.M101.mixed_state[0.0].flow_mol_phase_comp[Vap,benzene]: 1.873E+04\n",
- " fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,benzene]: 1.872E+04\n",
- " fs.F101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen]: 1.747E+04\n",
- " fs.F101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane]: 1.745E+04\n",
- " fs.R101.control_volume.reactions[0.0].k_rxn: 1.343E+04\n",
- "\n",
- "====================================================================================\n"
- ]
- }
- ],
- "source": [
- "dt.display_variables_with_extreme_jacobians()"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 7,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "{Member of equilibrium_constraint} : Size=4, Index=fs.BTHM_params.component_list, Active=True\n",
- " Key : Lower : Body : Upper : Active\n",
- " benzene : 0.0 : (fs.H101.control_volume.properties_out[0.0].pressure_sat[benzene]*(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene]/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen]))) - ((fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene]/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen]))*fs.H101.control_volume.properties_out[0.0].pressure) : 0.0 : True\n"
- ]
- }
- ],
- "source": [
- "m.fs.H101.control_volume.properties_out[0.0].equilibrium_constraint['benzene'].pprint()"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 38,
- "metadata": {},
- "outputs": [
- {
- "data": {
- "text/plain": [
- "-0.0011934341309824958"
- ]
- },
- "execution_count": 38,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "(m.fs.H101.control_volume.properties_out[0.0].pressure_sat['benzene'].value*(m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Liq','benzene'].value/(m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Liq','benzene'].value + m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Liq','toluene'].value + m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Liq','methane'].value + m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Liq','hydrogen'].value))) - ((m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Vap','benzene'].value/(m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Vap','benzene'].value + m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Vap','toluene'].value + m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Vap','methane'].value + m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Vap','hydrogen'].value))*m.fs.H101.control_volume.properties_out[0.0].pressure.value)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 44,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "2.0007997438714495e-05\n",
- "1e-12\n",
- "2.0007997438714495e-05\n",
- "1e-12\n",
- "2.0007997438714495e-05\n",
- "1.3034935871152319e-07\n",
- "0.30001000799734406\n",
- "8.414878009343252e-07\n"
- ]
- }
- ],
- "source": [
- "print(m.fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp['Liq','hydrogen'].value)\n",
- "print(m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Liq','hydrogen'].value)\n",
- "print(m.fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp['Liq','methane'].value)\n",
- "print(m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Liq','methane'].value)\n",
- "print(m.fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp['Liq','benzene'].value)\n",
- "print(m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Liq','benzene'].value)\n",
- "print(m.fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp['Liq','toluene'].value)\n",
- "print(m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Liq','toluene'].value)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 49,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "0.562139567854012\n"
- ]
- }
- ],
- "source": [
- "print(m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Vap','hydrogen'].value)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 47,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "temperature : State temperature\n",
- " Size=1, Index=None, Units=K\n",
- " Key : Lower : Value : Upper : Fixed : Stale : Domain\n",
- " None : 298 : 314.07480065353843 : 1000 : False : True : NonNegativeReals\n"
- ]
- }
- ],
- "source": [
- "m.fs.H101.control_volume.properties_in[0.0].temperature.pprint()"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": [
- "(m.fs.H101.control_volume.properties_out[0.0].pressure_sat['benzene'].value*(m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Liq','benzene'].value/(m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Liq','benzene'].value + m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Liq','toluene'].value + m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Liq','methane'].value + m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Liq','hydrogen'].value))) - ((m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Vap','benzene'].value/(m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Vap','benzene'].value + m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Vap','toluene'].value + m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Vap','methane'].value + m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Vap','hydrogen'].value))*m.fs.H101.control_volume.properties_out[0.0].pressure.value)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 36,
- "metadata": {},
- "outputs": [
- {
- "data": {
- "text/plain": [
- "0.0"
- ]
- },
- "execution_count": 36,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "1000.0*m.fs.H101.control_volume.properties_out[0.0].enth_mol_phase_comp['Liq','hydrogen'].value - (m.fs.BTHM_params.cp_ig_5['Liq','hydrogen'].value/5*(m.fs.H101.control_volume.properties_out[0.0].temperature.value**5 - m.fs.BTHM_params.temperature_ref.value**5) + m.fs.BTHM_params.cp_ig_4['Liq','hydrogen'].value/4*(m.fs.H101.control_volume.properties_out[0.0].temperature.value**4 - m.fs.BTHM_params.temperature_ref.value**4) + m.fs.BTHM_params.cp_ig_3['Liq','hydrogen'].value/3*(m.fs.H101.control_volume.properties_out[0.0].temperature.value**3 - m.fs.BTHM_params.temperature_ref.value**3) + m.fs.BTHM_params.cp_ig_2['Liq','hydrogen'].value/2*(m.fs.H101.control_volume.properties_out[0.0].temperature.value**2 - m.fs.BTHM_params.temperature_ref.value**2) + m.fs.BTHM_params.cp_ig_1['Liq','hydrogen'].value*(m.fs.H101.control_volume.properties_out[0.0].temperature.value - m.fs.BTHM_params.temperature_ref.value))"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 8,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "s03_expanded : Size=1, Index=None, Active=True\n",
- " 3 Constraint Declarations\n",
- " flow_mol_phase_comp_equality : Size=8, Index=fs._time*fs.BTHM_params.phase_list*fs.BTHM_params.component_list, Active=True\n",
- " Key : Lower : Body : Upper : Active\n",
- " (0.0, 'Liq', 'benzene') : 0.0 : fs.M101.mixed_state[0.0].flow_mol_phase_comp[Liq,benzene] - fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,benzene] : 0.0 : True\n",
- " (0.0, 'Liq', 'hydrogen') : 0.0 : fs.M101.mixed_state[0.0].flow_mol_phase_comp[Liq,hydrogen] - fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,hydrogen] : 0.0 : True\n",
- " (0.0, 'Liq', 'methane') : 0.0 : fs.M101.mixed_state[0.0].flow_mol_phase_comp[Liq,methane] - fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,methane] : 0.0 : True\n",
- " (0.0, 'Liq', 'toluene') : 0.0 : fs.M101.mixed_state[0.0].flow_mol_phase_comp[Liq,toluene] - fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,toluene] : 0.0 : True\n",
- " (0.0, 'Vap', 'benzene') : 0.0 : fs.M101.mixed_state[0.0].flow_mol_phase_comp[Vap,benzene] - fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,benzene] : 0.0 : True\n",
- " (0.0, 'Vap', 'hydrogen') : 0.0 : fs.M101.mixed_state[0.0].flow_mol_phase_comp[Vap,hydrogen] - fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,hydrogen] : 0.0 : True\n",
- " (0.0, 'Vap', 'methane') : 0.0 : fs.M101.mixed_state[0.0].flow_mol_phase_comp[Vap,methane] - fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,methane] : 0.0 : True\n",
- " (0.0, 'Vap', 'toluene') : 0.0 : fs.M101.mixed_state[0.0].flow_mol_phase_comp[Vap,toluene] - fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,toluene] : 0.0 : True\n",
- " pressure_equality : Size=1, Index=fs._time, Active=True\n",
- " Key : Lower : Body : Upper : Active\n",
- " 0.0 : 0.0 : fs.M101.mixed_state[0.0].pressure - fs.H101.control_volume.properties_in[0.0].pressure : 0.0 : True\n",
- " temperature_equality : Size=1, Index=fs._time, Active=True\n",
- " Key : Lower : Body : Upper : Active\n",
- " 0.0 : 0.0 : fs.M101.mixed_state[0.0].temperature - fs.H101.control_volume.properties_in[0.0].temperature : 0.0 : True\n",
- "\n",
- " 3 Declarations: flow_mol_phase_comp_equality pressure_equality temperature_equality\n"
- ]
- }
- ],
- "source": [
- "m.fs.s03_expanded.pprint()"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 9,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "temperature : State temperature\n",
- " Size=1, Index=None, Units=K\n",
- " Key : Lower : Value : Upper : Fixed : Stale : Domain\n",
- " None : 298 : 314.0955643806385 : 1000 : False : True : NonNegativeReals\n"
- ]
- }
- ],
- "source": [
- "m.fs.M101.mixed_state[0.0].temperature.pprint()"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 10,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "temperature : State temperature\n",
- " Size=1, Index=None, Units=K\n",
- " Key : Lower : Value : Upper : Fixed : Stale : Domain\n",
- " None : 298 : 314.0747969291496 : 1000 : False : True : NonNegativeReals\n"
- ]
- }
- ],
- "source": [
- "m.fs.H101.control_volume.properties_in[0.0].temperature.pprint()"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 11,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "temperature : State temperature\n",
- " Size=1, Index=None, Units=K\n",
- " Key : Lower : Value : Upper : Fixed : Stale : Domain\n",
- " None : 298 : 600 : 1000 : True : True : NonNegativeReals\n"
- ]
- }
- ],
- "source": [
- "m.fs.H101.control_volume.properties_out[0.0].temperature.pprint()"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 12,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "control_volume : Size=1, Index=None, Active=True\n",
- " 2 Var Declarations\n",
- " heat : Heat transferred into control volume\n",
- " Size=1, Index=fs._time, Units=kg*m**2/s**3\n",
- " Key : Lower : Value : Upper : Fixed : Stale : Domain\n",
- " 0.0 : None : 47334.81195332139 : None : False : True : Reals\n",
- " phase_equilibrium_generation : Amount of generation in control volume by phase equilibria\n",
- " Size=4, Index=fs._time*fs.BTHM_params.phase_equilibrium_idx, Units=mol/s\n",
- " Key : Lower : Value : Upper : Fixed : Stale : Domain\n",
- " (0.0, 1) : None : 1.9877650660161695e-05 : None : False : True : Reals\n",
- " (0.0, 2) : None : 0.3000091665124016 : None : False : True : Reals\n",
- " (0.0, 3) : None : 2.0007999028186373e-05 : None : False : True : Reals\n",
- " (0.0, 4) : None : 2.0007999028186373e-05 : None : False : True : Reals\n",
- "\n",
- " 3 Constraint Declarations\n",
- " enthalpy_balances : Energy balances\n",
- " Size=1, Index=fs._time, Active=True\n",
- " Key : Lower : Body : Upper : Active\n",
- " 0.0 : 0.0 : ((fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,hydrogen])*fs.H101.control_volume.properties_in[0.0].enth_mol_phase[Liq]) + ((fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,hydrogen])*fs.H101.control_volume.properties_in[0.0].enth_mol_phase[Vap]) - (((fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen])*fs.H101.control_volume.properties_out[0.0].enth_mol_phase[Liq]) + ((fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen])*fs.H101.control_volume.properties_out[0.0].enth_mol_phase[Vap])) + fs.H101.control_volume.heat[0.0] : 0.0 : True\n",
- " material_balances : Material balances\n",
- " Size=8, Index=fs._time*fs.BTHM_params._phase_component_set, Active=True\n",
- " Key : Lower : Body : Upper : Active\n",
- " (0.0, 'Liq', 'benzene') : 0.0 : fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,benzene] - fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene] + (- fs.H101.control_volume.phase_equilibrium_generation[0.0,1] + 0*fs.H101.control_volume.phase_equilibrium_generation[0.0,2] + 0*fs.H101.control_volume.phase_equilibrium_generation[0.0,3] + 0*fs.H101.control_volume.phase_equilibrium_generation[0.0,4]) : 0.0 : True\n",
- " (0.0, 'Liq', 'hydrogen') : 0.0 : fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,hydrogen] - fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen] + (0*fs.H101.control_volume.phase_equilibrium_generation[0.0,1] + 0*fs.H101.control_volume.phase_equilibrium_generation[0.0,2] - fs.H101.control_volume.phase_equilibrium_generation[0.0,3] + 0*fs.H101.control_volume.phase_equilibrium_generation[0.0,4]) : 0.0 : True\n",
- " (0.0, 'Liq', 'methane') : 0.0 : fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,methane] - fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane] + (0*fs.H101.control_volume.phase_equilibrium_generation[0.0,1] + 0*fs.H101.control_volume.phase_equilibrium_generation[0.0,2] + 0*fs.H101.control_volume.phase_equilibrium_generation[0.0,3] - fs.H101.control_volume.phase_equilibrium_generation[0.0,4]) : 0.0 : True\n",
- " (0.0, 'Liq', 'toluene') : 0.0 : fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,toluene] - fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene] + (0*fs.H101.control_volume.phase_equilibrium_generation[0.0,1] - fs.H101.control_volume.phase_equilibrium_generation[0.0,2] + 0*fs.H101.control_volume.phase_equilibrium_generation[0.0,3] + 0*fs.H101.control_volume.phase_equilibrium_generation[0.0,4]) : 0.0 : True\n",
- " (0.0, 'Vap', 'benzene') : 0.0 : fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,benzene] - fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene] + (fs.H101.control_volume.phase_equilibrium_generation[0.0,1] + 0*fs.H101.control_volume.phase_equilibrium_generation[0.0,2] + 0*fs.H101.control_volume.phase_equilibrium_generation[0.0,3] + 0*fs.H101.control_volume.phase_equilibrium_generation[0.0,4]) : 0.0 : True\n",
- " (0.0, 'Vap', 'hydrogen') : 0.0 : fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,hydrogen] - fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen] + (0*fs.H101.control_volume.phase_equilibrium_generation[0.0,1] + 0*fs.H101.control_volume.phase_equilibrium_generation[0.0,2] + fs.H101.control_volume.phase_equilibrium_generation[0.0,3] + 0*fs.H101.control_volume.phase_equilibrium_generation[0.0,4]) : 0.0 : True\n",
- " (0.0, 'Vap', 'methane') : 0.0 : fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,methane] - fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane] + (0*fs.H101.control_volume.phase_equilibrium_generation[0.0,1] + 0*fs.H101.control_volume.phase_equilibrium_generation[0.0,2] + 0*fs.H101.control_volume.phase_equilibrium_generation[0.0,3] + fs.H101.control_volume.phase_equilibrium_generation[0.0,4]) : 0.0 : True\n",
- " (0.0, 'Vap', 'toluene') : 0.0 : fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,toluene] - fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene] + (0*fs.H101.control_volume.phase_equilibrium_generation[0.0,1] + fs.H101.control_volume.phase_equilibrium_generation[0.0,2] + 0*fs.H101.control_volume.phase_equilibrium_generation[0.0,3] + 0*fs.H101.control_volume.phase_equilibrium_generation[0.0,4]) : 0.0 : True\n",
- " pressure_balance : Momentum balance\n",
- " Size=1, Index=fs._time, Active=True\n",
- " Key : Lower : Body : Upper : Active\n",
- " 0.0 : 0.0 : fs.H101.control_volume.properties_in[0.0].pressure - fs.H101.control_volume.properties_out[0.0].pressure : 0.0 : True\n",
- "\n",
- " 2 Block Declarations\n",
- " properties_in : Material properties at inlet\n",
- " Size=1, Index=fs._time, Active=True\n",
- " fs.H101.control_volume.properties_in[0.0] : Active=True\n",
- " 5 Var Declarations\n",
- " enth_mol_phase : Phase molar specific enthalpies\n",
- " Size=2, Index=fs.BTHM_params.phase_list, Units=J/mol\n",
- " Key : Lower : Value : Upper : Fixed : Stale : Domain\n",
- " Liq : None : 2525.479995256094 : None : False : True : Reals\n",
- " Vap : None : 3211.3802801501315 : None : False : True : Reals\n",
- " enth_mol_phase_comp : Phase-component molar specific enthalpies\n",
- " Size=8, Index=fs.BTHM_params.phase_list*fs.BTHM_params.component_list, Units=J/mol\n",
- " Key : Lower : Value : Upper : Fixed : Stale : Domain\n",
- " ('Liq', 'benzene') : None : 2192.769648165968 : None : False : True : Reals\n",
- " ('Liq', 'hydrogen') : None : 0.0 : None : False : True : Reals\n",
- " ('Liq', 'methane') : None : 0.0 : None : False : True : Reals\n",
- " ('Liq', 'toluene') : None : 2525.839038198804 : None : False : True : Reals\n",
- " ('Vap', 'benzene') : None : 35222.27194658621 : None : False : True : Reals\n",
- " ('Vap', 'hydrogen') : None : 460.2898578972873 : None : False : True : Reals\n",
- " ('Vap', 'methane') : None : 573.3661650080942 : None : False : True : Reals\n",
- " ('Vap', 'toluene') : None : 39982.308320562464 : None : False : True : Reals\n",
- " flow_mol_phase_comp : Phase-component molar flow rates\n",
- " Size=8, Index=fs.BTHM_params.phase_list*fs.BTHM_params.component_list, Units=mol/s\n",
- " Key : Lower : Value : Upper : Fixed : Stale : Domain\n",
- " ('Liq', 'benzene') : 1e-12 : 2.0008000000025254e-05 : 100 : False : True : Reals\n",
- " ('Liq', 'hydrogen') : 1e-12 : 2.0008000000025254e-05 : 100 : False : True : Reals\n",
- " ('Liq', 'methane') : 1e-12 : 2.0008000000025254e-05 : 100 : False : True : Reals\n",
- " ('Liq', 'toluene') : 1e-12 : 0.30001000799999994 : 100 : False : True : Reals\n",
- " ('Vap', 'benzene') : 1e-12 : 0.11973067378485161 : 100 : False : True : Reals\n",
- " ('Vap', 'hydrogen') : 1e-12 : 0.5621188927427752 : 100 : False : True : Reals\n",
- " ('Vap', 'methane') : 1e-12 : 1.0409451348733987 : 100 : False : True : Reals\n",
- " ('Vap', 'toluene') : 1e-12 : 0.012503960539012862 : 100 : False : True : Reals\n",
- " pressure : State pressure\n",
- " Size=1, Index=None, Units=Pa\n",
- " Key : Lower : Value : Upper : Fixed : Stale : Domain\n",
- " None : 100000 : 349999.99919098296 : 1000000 : False : True : NonNegativeReals\n",
- " temperature : State temperature\n",
- " Size=1, Index=None, Units=K\n",
- " Key : Lower : Value : Upper : Fixed : Stale : Domain\n",
- " None : 298 : 314.0747969291496 : 1000 : False : True : NonNegativeReals\n",
- "\n",
- " 6 Expression Declarations\n",
- " enthalpy_flow_terms : Size=2, Index=fs.BTHM_params.phase_list\n",
- " Key : Expression\n",
- " Liq : (fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,hydrogen])*fs.H101.control_volume.properties_in[0.0].enth_mol_phase[Liq]\n",
- " Vap : (fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,hydrogen])*fs.H101.control_volume.properties_in[0.0].enth_mol_phase[Vap]\n",
- " flow_mol : Total molar flowrate\n",
- " Size=1, Index=None\n",
- " Key : Expression\n",
- " None : fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,hydrogen] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,hydrogen]\n",
- " flow_mol_phase : Phase molar flow rates\n",
- " Size=2, Index=fs.BTHM_params.phase_list\n",
- " Key : Expression\n",
- " Liq : fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,hydrogen]\n",
- " Vap : fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,hydrogen]\n",
- " material_flow_terms : Size=8, Index=fs.BTHM_params.phase_list*fs.BTHM_params.component_list\n",
- " Key : Expression\n",
- " ('Liq', 'benzene') : fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,benzene]\n",
- " ('Liq', 'hydrogen') : fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,hydrogen]\n",
- " ('Liq', 'methane') : fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,methane]\n",
- " ('Liq', 'toluene') : fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,toluene]\n",
- " ('Vap', 'benzene') : fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,benzene]\n",
- " ('Vap', 'hydrogen') : fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,hydrogen]\n",
- " ('Vap', 'methane') : fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,methane]\n",
- " ('Vap', 'toluene') : fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,toluene]\n",
- " mole_frac_comp : Mixture mole fractions\n",
- " Size=4, Index=fs.BTHM_params.component_list\n",
- " Key : Expression\n",
- " benzene : (fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,benzene])/(fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,hydrogen] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,hydrogen])\n",
- " hydrogen : (fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,hydrogen] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,hydrogen])/(fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,hydrogen] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,hydrogen])\n",
- " methane : (fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,methane])/(fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,hydrogen] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,hydrogen])\n",
- " toluene : (fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,toluene])/(fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,hydrogen] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,hydrogen])\n",
- " mole_frac_phase_comp : Phase mole fractions\n",
- " Size=8, Index=fs.BTHM_params.phase_list*fs.BTHM_params.component_list\n",
- " Key : Expression\n",
- " ('Liq', 'benzene') : fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,benzene]/(fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,hydrogen])\n",
- " ('Liq', 'hydrogen') : fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,hydrogen]/(fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,hydrogen])\n",
- " ('Liq', 'methane') : fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,methane]/(fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,hydrogen])\n",
- " ('Liq', 'toluene') : fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,toluene]/(fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,hydrogen])\n",
- " ('Vap', 'benzene') : fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,benzene]/(fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,hydrogen])\n",
- " ('Vap', 'hydrogen') : fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,hydrogen]/(fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,hydrogen])\n",
- " ('Vap', 'methane') : fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,methane]/(fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,hydrogen])\n",
- " ('Vap', 'toluene') : fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,toluene]/(fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,hydrogen])\n",
- "\n",
- " 2 Constraint Declarations\n",
- " eq_enth_mol_phase : Size=2, Index=fs.BTHM_params.phase_list, Active=True\n",
- " Key : Lower : Body : Upper : Active\n",
- " Liq : 0.0 : fs.H101.control_volume.properties_in[0.0].enth_mol_phase[Liq] - (fs.H101.control_volume.properties_in[0.0].enth_mol_phase_comp[Liq,benzene]*(fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,benzene]/(fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,hydrogen])) + fs.H101.control_volume.properties_in[0.0].enth_mol_phase_comp[Liq,toluene]*(fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,toluene]/(fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,hydrogen])) + fs.H101.control_volume.properties_in[0.0].enth_mol_phase_comp[Liq,methane]*(fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,methane]/(fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,hydrogen])) + fs.H101.control_volume.properties_in[0.0].enth_mol_phase_comp[Liq,hydrogen]*(fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,hydrogen]/(fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Liq,hydrogen]))) : 0.0 : True\n",
- " Vap : 0.0 : fs.H101.control_volume.properties_in[0.0].enth_mol_phase[Vap] - (fs.H101.control_volume.properties_in[0.0].enth_mol_phase_comp[Vap,benzene]*(fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,benzene]/(fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,hydrogen])) + fs.H101.control_volume.properties_in[0.0].enth_mol_phase_comp[Vap,toluene]*(fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,toluene]/(fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,hydrogen])) + fs.H101.control_volume.properties_in[0.0].enth_mol_phase_comp[Vap,methane]*(fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,methane]/(fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,hydrogen])) + fs.H101.control_volume.properties_in[0.0].enth_mol_phase_comp[Vap,hydrogen]*(fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,hydrogen]/(fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp[Vap,hydrogen]))) : 0.0 : True\n",
- " eq_enth_mol_phase_comp : Size=8, Index=fs.BTHM_params.phase_list*fs.BTHM_params.component_list, Active=True\n",
- " Key : Lower : Body : Upper : Active\n",
- " ('Liq', 'benzene') : 0.0 : 1000.0*fs.H101.control_volume.properties_in[0.0].enth_mol_phase_comp[Liq,benzene] - (fs.BTHM_params.cp_ig_5[Liq,benzene]/5*(fs.H101.control_volume.properties_in[0.0].temperature**5 - fs.BTHM_params.temperature_ref**5) + fs.BTHM_params.cp_ig_4[Liq,benzene]/4*(fs.H101.control_volume.properties_in[0.0].temperature**4 - fs.BTHM_params.temperature_ref**4) + fs.BTHM_params.cp_ig_3[Liq,benzene]/3*(fs.H101.control_volume.properties_in[0.0].temperature**3 - fs.BTHM_params.temperature_ref**3) + fs.BTHM_params.cp_ig_2[Liq,benzene]/2*(fs.H101.control_volume.properties_in[0.0].temperature**2 - fs.BTHM_params.temperature_ref**2) + fs.BTHM_params.cp_ig_1[Liq,benzene]*(fs.H101.control_volume.properties_in[0.0].temperature - fs.BTHM_params.temperature_ref)) : 0.0 : True\n",
- " ('Liq', 'hydrogen') : 0.0 : 1000.0*fs.H101.control_volume.properties_in[0.0].enth_mol_phase_comp[Liq,hydrogen] - (fs.BTHM_params.cp_ig_5[Liq,hydrogen]/5*(fs.H101.control_volume.properties_in[0.0].temperature**5 - fs.BTHM_params.temperature_ref**5) + fs.BTHM_params.cp_ig_4[Liq,hydrogen]/4*(fs.H101.control_volume.properties_in[0.0].temperature**4 - fs.BTHM_params.temperature_ref**4) + fs.BTHM_params.cp_ig_3[Liq,hydrogen]/3*(fs.H101.control_volume.properties_in[0.0].temperature**3 - fs.BTHM_params.temperature_ref**3) + fs.BTHM_params.cp_ig_2[Liq,hydrogen]/2*(fs.H101.control_volume.properties_in[0.0].temperature**2 - fs.BTHM_params.temperature_ref**2) + fs.BTHM_params.cp_ig_1[Liq,hydrogen]*(fs.H101.control_volume.properties_in[0.0].temperature - fs.BTHM_params.temperature_ref)) : 0.0 : True\n",
- " ('Liq', 'methane') : 0.0 : 1000.0*fs.H101.control_volume.properties_in[0.0].enth_mol_phase_comp[Liq,methane] - (fs.BTHM_params.cp_ig_5[Liq,methane]/5*(fs.H101.control_volume.properties_in[0.0].temperature**5 - fs.BTHM_params.temperature_ref**5) + fs.BTHM_params.cp_ig_4[Liq,methane]/4*(fs.H101.control_volume.properties_in[0.0].temperature**4 - fs.BTHM_params.temperature_ref**4) + fs.BTHM_params.cp_ig_3[Liq,methane]/3*(fs.H101.control_volume.properties_in[0.0].temperature**3 - fs.BTHM_params.temperature_ref**3) + fs.BTHM_params.cp_ig_2[Liq,methane]/2*(fs.H101.control_volume.properties_in[0.0].temperature**2 - fs.BTHM_params.temperature_ref**2) + fs.BTHM_params.cp_ig_1[Liq,methane]*(fs.H101.control_volume.properties_in[0.0].temperature - fs.BTHM_params.temperature_ref)) : 0.0 : True\n",
- " ('Liq', 'toluene') : 0.0 : 1000.0*fs.H101.control_volume.properties_in[0.0].enth_mol_phase_comp[Liq,toluene] - (fs.BTHM_params.cp_ig_5[Liq,toluene]/5*(fs.H101.control_volume.properties_in[0.0].temperature**5 - fs.BTHM_params.temperature_ref**5) + fs.BTHM_params.cp_ig_4[Liq,toluene]/4*(fs.H101.control_volume.properties_in[0.0].temperature**4 - fs.BTHM_params.temperature_ref**4) + fs.BTHM_params.cp_ig_3[Liq,toluene]/3*(fs.H101.control_volume.properties_in[0.0].temperature**3 - fs.BTHM_params.temperature_ref**3) + fs.BTHM_params.cp_ig_2[Liq,toluene]/2*(fs.H101.control_volume.properties_in[0.0].temperature**2 - fs.BTHM_params.temperature_ref**2) + fs.BTHM_params.cp_ig_1[Liq,toluene]*(fs.H101.control_volume.properties_in[0.0].temperature - fs.BTHM_params.temperature_ref)) : 0.0 : True\n",
- " ('Vap', 'benzene') : 0.0 : fs.H101.control_volume.properties_in[0.0].enth_mol_phase_comp[Vap,benzene] - (fs.BTHM_params.cp_ig_5[Vap,benzene]/5*(fs.H101.control_volume.properties_in[0.0].temperature**5 - fs.BTHM_params.temperature_ref**5) + fs.BTHM_params.cp_ig_4[Vap,benzene]/4*(fs.H101.control_volume.properties_in[0.0].temperature**4 - fs.BTHM_params.temperature_ref**4) + fs.BTHM_params.cp_ig_3[Vap,benzene]/3*(fs.H101.control_volume.properties_in[0.0].temperature**3 - fs.BTHM_params.temperature_ref**3) + fs.BTHM_params.cp_ig_2[Vap,benzene]/2*(fs.H101.control_volume.properties_in[0.0].temperature**2 - fs.BTHM_params.temperature_ref**2) + fs.BTHM_params.cp_ig_1[Vap,benzene]*(fs.H101.control_volume.properties_in[0.0].temperature - fs.BTHM_params.temperature_ref) + fs.BTHM_params.dh_vap[benzene]) : 0.0 : True\n",
- " ('Vap', 'hydrogen') : 0.0 : fs.H101.control_volume.properties_in[0.0].enth_mol_phase_comp[Vap,hydrogen] - (fs.BTHM_params.cp_ig_5[Vap,hydrogen]/5*(fs.H101.control_volume.properties_in[0.0].temperature**5 - fs.BTHM_params.temperature_ref**5) + fs.BTHM_params.cp_ig_4[Vap,hydrogen]/4*(fs.H101.control_volume.properties_in[0.0].temperature**4 - fs.BTHM_params.temperature_ref**4) + fs.BTHM_params.cp_ig_3[Vap,hydrogen]/3*(fs.H101.control_volume.properties_in[0.0].temperature**3 - fs.BTHM_params.temperature_ref**3) + fs.BTHM_params.cp_ig_2[Vap,hydrogen]/2*(fs.H101.control_volume.properties_in[0.0].temperature**2 - fs.BTHM_params.temperature_ref**2) + fs.BTHM_params.cp_ig_1[Vap,hydrogen]*(fs.H101.control_volume.properties_in[0.0].temperature - fs.BTHM_params.temperature_ref) + fs.BTHM_params.dh_vap[hydrogen]) : 0.0 : True\n",
- " ('Vap', 'methane') : 0.0 : fs.H101.control_volume.properties_in[0.0].enth_mol_phase_comp[Vap,methane] - (fs.BTHM_params.cp_ig_5[Vap,methane]/5*(fs.H101.control_volume.properties_in[0.0].temperature**5 - fs.BTHM_params.temperature_ref**5) + fs.BTHM_params.cp_ig_4[Vap,methane]/4*(fs.H101.control_volume.properties_in[0.0].temperature**4 - fs.BTHM_params.temperature_ref**4) + fs.BTHM_params.cp_ig_3[Vap,methane]/3*(fs.H101.control_volume.properties_in[0.0].temperature**3 - fs.BTHM_params.temperature_ref**3) + fs.BTHM_params.cp_ig_2[Vap,methane]/2*(fs.H101.control_volume.properties_in[0.0].temperature**2 - fs.BTHM_params.temperature_ref**2) + fs.BTHM_params.cp_ig_1[Vap,methane]*(fs.H101.control_volume.properties_in[0.0].temperature - fs.BTHM_params.temperature_ref) + fs.BTHM_params.dh_vap[methane]) : 0.0 : True\n",
- " ('Vap', 'toluene') : 0.0 : fs.H101.control_volume.properties_in[0.0].enth_mol_phase_comp[Vap,toluene] - (fs.BTHM_params.cp_ig_5[Vap,toluene]/5*(fs.H101.control_volume.properties_in[0.0].temperature**5 - fs.BTHM_params.temperature_ref**5) + fs.BTHM_params.cp_ig_4[Vap,toluene]/4*(fs.H101.control_volume.properties_in[0.0].temperature**4 - fs.BTHM_params.temperature_ref**4) + fs.BTHM_params.cp_ig_3[Vap,toluene]/3*(fs.H101.control_volume.properties_in[0.0].temperature**3 - fs.BTHM_params.temperature_ref**3) + fs.BTHM_params.cp_ig_2[Vap,toluene]/2*(fs.H101.control_volume.properties_in[0.0].temperature**2 - fs.BTHM_params.temperature_ref**2) + fs.BTHM_params.cp_ig_1[Vap,toluene]*(fs.H101.control_volume.properties_in[0.0].temperature - fs.BTHM_params.temperature_ref) + fs.BTHM_params.dh_vap[toluene]) : 0.0 : True\n",
- "\n",
- " 13 Declarations: flow_mol_phase_comp pressure temperature flow_mol_phase flow_mol mole_frac_phase_comp mole_frac_comp material_flow_terms enthalpy_flow_terms enth_mol_phase eq_enth_mol_phase enth_mol_phase_comp eq_enth_mol_phase_comp\n",
- " properties_out : Material properties at outlet\n",
- " Size=1, Index=fs._time, Active=True\n",
- " fs.H101.control_volume.properties_out[0.0] : Active=True\n",
- " 3 Param Declarations\n",
- " eps_1 : Smoothing parameter for Teq\n",
- " Size=1, Index=None, Domain=Any, Default=0.01, Mutable=True, Units=K\n",
- " Key : Value\n",
- " None : 0.01\n",
- " eps_2 : Smoothing parameter for Teq\n",
- " Size=1, Index=None, Domain=Any, Default=0.0005, Mutable=True, Units=K\n",
- " Key : Value\n",
- " None : 0.0005\n",
- " temperature_bubble : Bubble point temperature\n",
- " Size=1, Index=None, Domain=Any, Default=None, Mutable=True, Units=K\n",
- " Key : Value\n",
- " None : 33.0\n",
- "\n",
- " 9 Var Declarations\n",
- " _t1 : Intermediate temperature for calculating Teq\n",
- " Size=1, Index=None, Units=K\n",
- " Key : Lower : Value : Upper : Fixed : Stale : Domain\n",
- " None : None : 600.0000000440917 : None : False : True : Reals\n",
- " _teq : Temperature for calculating phase equilibrium\n",
- " Size=1, Index=None, Units=K\n",
- " Key : Lower : Value : Upper : Fixed : Stale : Domain\n",
- " None : None : 367.75868720488586 : None : False : True : Reals\n",
- " enth_mol_phase : Phase molar specific enthalpies\n",
- " Size=2, Index=fs.BTHM_params.phase_list, Units=J/mol\n",
- " Key : Lower : Value : Upper : Fixed : Stale : Domain\n",
- " Liq : None : 64383.97262126232 : None : False : True : Reals\n",
- " Vap : None : 26366.377714386934 : None : False : True : Reals\n",
- " enth_mol_phase_comp : Phase-component molar specific enthalpies\n",
- " Size=8, Index=fs.BTHM_params.phase_list*fs.BTHM_params.component_list, Units=J/mol\n",
- " Key : Lower : Value : Upper : Fixed : Stale : Domain\n",
- " ('Liq', 'benzene') : None : 56825.818946131 : None : False : True : Reals\n",
- " ('Liq', 'hydrogen') : None : 0.0 : None : False : True : Reals\n",
- " ('Liq', 'methane') : None : 0.0 : None : False : True : Reals\n",
- " ('Liq', 'toluene') : None : 65554.90548557646 : None : False : True : Reals\n",
- " ('Vap', 'benzene') : None : 70982.1937493005 : None : False : True : Reals\n",
- " ('Vap', 'hydrogen') : None : 8809.610210110926 : None : False : True : Reals\n",
- " ('Vap', 'methane') : None : 13288.690957398636 : None : False : True : Reals\n",
- " ('Vap', 'toluene') : None : 84411.90574416363 : None : False : True : Reals\n",
- " flow_mol_phase_comp : Phase-component molar flow rates\n",
- " Size=8, Index=fs.BTHM_params.phase_list*fs.BTHM_params.component_list, Units=mol/s\n",
- " Key : Lower : Value : Upper : Fixed : Stale : Domain\n",
- " ('Liq', 'benzene') : 1e-12 : 1.3034933986355738e-07 : 100 : False : True : Reals\n",
- " ('Liq', 'hydrogen') : 1e-12 : 1e-12 : 100 : False : True : Reals\n",
- " ('Liq', 'methane') : 1e-12 : 1e-12 : 100 : False : True : Reals\n",
- " ('Liq', 'toluene') : 1e-12 : 8.414875983652426e-07 : 100 : False : True : Reals\n",
- " ('Vap', 'benzene') : 1e-12 : 0.11975055143551176 : 100 : False : True : Reals\n",
- " ('Vap', 'hydrogen') : 1e-12 : 0.5621389007418034 : 100 : False : True : Reals\n",
- " ('Vap', 'methane') : 1e-12 : 1.040965142872427 : 100 : False : True : Reals\n",
- " ('Vap', 'toluene') : 1e-12 : 0.31251312705141443 : 100 : False : True : Reals\n",
- " pressure : State pressure\n",
- " Size=1, Index=None, Units=Pa\n",
- " Key : Lower : Value : Upper : Fixed : Stale : Domain\n",
- " None : 100000 : 349999.99919098296 : 1000000 : False : True : NonNegativeReals\n",
- " pressure_sat : Vapor pressure\n",
- " Size=4, Index=fs.BTHM_params.component_list, Units=Pa\n",
- " Key : Lower : Value : Upper : Fixed : Stale : Domain\n",
- " benzene : None : 153528.18538316718 : None : False : True : Reals\n",
- " hydrogen : None : 189790945.5804816 : None : False : True : Reals\n",
- " methane : None : 60785306.759204485 : None : False : True : Reals\n",
- " toluene : None : 62064.03049432264 : None : False : True : Reals\n",
- " temperature : State temperature\n",
- " Size=1, Index=None, Units=K\n",
- " Key : Lower : Value : Upper : Fixed : Stale : Domain\n",
- " None : 298 : 600 : 1000 : True : True : NonNegativeReals\n",
- " temperature_dew : Dew point temperature\n",
- " Size=1, Index=None, Units=K\n",
- " Key : Lower : Value : Upper : Fixed : Stale : Domain\n",
- " None : None : 367.75868720515496 : None : False : True : Reals\n",
- "\n",
- " 9 Expression Declarations\n",
- " _p_sat_dewT : Size=4, Index=fs.BTHM_params.component_list\n",
- " Key : Expression\n",
- " benzene : 100000.0*Pa*10**(fs.BTHM_params.pressure_sat_coeff_A[benzene] - fs.BTHM_params.pressure_sat_coeff_B[benzene]/(fs.H101.control_volume.properties_out[0.0].temperature_dew + fs.BTHM_params.pressure_sat_coeff_C[benzene]))\n",
- " hydrogen : 100000.0*Pa*10**(fs.BTHM_params.pressure_sat_coeff_A[hydrogen] - fs.BTHM_params.pressure_sat_coeff_B[hydrogen]/(fs.H101.control_volume.properties_out[0.0].temperature_dew + fs.BTHM_params.pressure_sat_coeff_C[hydrogen]))\n",
- " methane : 100000.0*Pa*10**(fs.BTHM_params.pressure_sat_coeff_A[methane] - fs.BTHM_params.pressure_sat_coeff_B[methane]/(fs.H101.control_volume.properties_out[0.0].temperature_dew + fs.BTHM_params.pressure_sat_coeff_C[methane]))\n",
- " toluene : 100000.0*Pa*10**(fs.BTHM_params.pressure_sat_coeff_A[toluene] - fs.BTHM_params.pressure_sat_coeff_B[toluene]/(fs.H101.control_volume.properties_out[0.0].temperature_dew + fs.BTHM_params.pressure_sat_coeff_C[toluene]))\n",
- " _tr_eq : Component reduced temperatures\n",
- " Size=4, Index=fs.BTHM_params.component_list\n",
- " Key : Expression\n",
- " benzene : 1/fs.BTHM_params.temperature_crit[benzene]*fs.H101.control_volume.properties_out[0.0]._teq\n",
- " hydrogen : 1/fs.BTHM_params.temperature_crit[hydrogen]*fs.H101.control_volume.properties_out[0.0]._teq\n",
- " methane : 1/fs.BTHM_params.temperature_crit[methane]*fs.H101.control_volume.properties_out[0.0]._teq\n",
- " toluene : 1/fs.BTHM_params.temperature_crit[toluene]*fs.H101.control_volume.properties_out[0.0]._teq\n",
- " enthalpy_flow_terms : Size=2, Index=fs.BTHM_params.phase_list\n",
- " Key : Expression\n",
- " Liq : (fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen])*fs.H101.control_volume.properties_out[0.0].enth_mol_phase[Liq]\n",
- " Vap : (fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen])*fs.H101.control_volume.properties_out[0.0].enth_mol_phase[Vap]\n",
- " flow_mol : Total molar flowrate\n",
- " Size=1, Index=None\n",
- " Key : Expression\n",
- " None : fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen]\n",
- " flow_mol_phase : Phase molar flow rates\n",
- " Size=2, Index=fs.BTHM_params.phase_list\n",
- " Key : Expression\n",
- " Liq : fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen]\n",
- " Vap : fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen]\n",
- " fug_phase_comp : Size=8, Index=fs.BTHM_params.phase_list*fs.BTHM_params.component_list\n",
- " Key : Expression\n",
- " ('Liq', 'benzene') : fs.H101.control_volume.properties_out[0.0].pressure_sat[benzene]*(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene]/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen]))\n",
- " ('Liq', 'hydrogen') : fs.H101.control_volume.properties_out[0.0].mole_frac_phase_comp[Liq,hydrogen]\n",
- " ('Liq', 'methane') : fs.H101.control_volume.properties_out[0.0].mole_frac_phase_comp[Liq,methane]\n",
- " ('Liq', 'toluene') : fs.H101.control_volume.properties_out[0.0].pressure_sat[toluene]*(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene]/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen]))\n",
- " ('Vap', 'benzene') : (fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene]/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen]))*fs.H101.control_volume.properties_out[0.0].pressure\n",
- " ('Vap', 'hydrogen') : 1e-06\n",
- " ('Vap', 'methane') : 1e-06\n",
- " ('Vap', 'toluene') : (fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene]/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen]))*fs.H101.control_volume.properties_out[0.0].pressure\n",
- " material_flow_terms : Size=8, Index=fs.BTHM_params.phase_list*fs.BTHM_params.component_list\n",
- " Key : Expression\n",
- " ('Liq', 'benzene') : fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene]\n",
- " ('Liq', 'hydrogen') : fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen]\n",
- " ('Liq', 'methane') : fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane]\n",
- " ('Liq', 'toluene') : fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene]\n",
- " ('Vap', 'benzene') : fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene]\n",
- " ('Vap', 'hydrogen') : fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen]\n",
- " ('Vap', 'methane') : fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane]\n",
- " ('Vap', 'toluene') : fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene]\n",
- " mole_frac_comp : Mixture mole fractions\n",
- " Size=4, Index=fs.BTHM_params.component_list\n",
- " Key : Expression\n",
- " benzene : (fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene])/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen])\n",
- " hydrogen : (fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen])/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen])\n",
- " methane : (fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane])/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen])\n",
- " toluene : (fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene])/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen])\n",
- " mole_frac_phase_comp : Phase mole fractions\n",
- " Size=8, Index=fs.BTHM_params.phase_list*fs.BTHM_params.component_list\n",
- " Key : Expression\n",
- " ('Liq', 'benzene') : fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene]/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen])\n",
- " ('Liq', 'hydrogen') : fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen]/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen])\n",
- " ('Liq', 'methane') : fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane]/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen])\n",
- " ('Liq', 'toluene') : fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene]/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen])\n",
- " ('Vap', 'benzene') : fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene]/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen])\n",
- " ('Vap', 'hydrogen') : fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen]/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen])\n",
- " ('Vap', 'methane') : fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane]/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen])\n",
- " ('Vap', 'toluene') : fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene]/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen])\n",
- "\n",
- " 7 Constraint Declarations\n",
- " _t1_constraint : Size=1, Index=None, Active=True\n",
- " Key : Lower : Body : Upper : Active\n",
- " None : 0.0 : fs.H101.control_volume.properties_out[0.0]._t1 - 0.5*(fs.H101.control_volume.properties_out[0.0].temperature + fs.H101.control_volume.properties_out[0.0].temperature_bubble + sqrt((fs.H101.control_volume.properties_out[0.0].temperature - fs.H101.control_volume.properties_out[0.0].temperature_bubble)**2 + fs.H101.control_volume.properties_out[0.0].eps_1**2)) : 0.0 : True\n",
- " _teq_constraint : Size=1, Index=None, Active=True\n",
- " Key : Lower : Body : Upper : Active\n",
- " None : 0.0 : fs.H101.control_volume.properties_out[0.0]._teq - 0.5*(fs.H101.control_volume.properties_out[0.0]._t1 + fs.H101.control_volume.properties_out[0.0].temperature_dew - sqrt((fs.H101.control_volume.properties_out[0.0]._t1 - fs.H101.control_volume.properties_out[0.0].temperature_dew)**2 + fs.H101.control_volume.properties_out[0.0].eps_2**2)) : 0.0 : True\n",
- " eq_enth_mol_phase : Size=2, Index=fs.BTHM_params.phase_list, Active=True\n",
- " Key : Lower : Body : Upper : Active\n",
- " Liq : 0.0 : fs.H101.control_volume.properties_out[0.0].enth_mol_phase[Liq] - (fs.H101.control_volume.properties_out[0.0].enth_mol_phase_comp[Liq,benzene]*(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene]/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen])) + fs.H101.control_volume.properties_out[0.0].enth_mol_phase_comp[Liq,toluene]*(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene]/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen])) + fs.H101.control_volume.properties_out[0.0].enth_mol_phase_comp[Liq,methane]*(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane]/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen])) + fs.H101.control_volume.properties_out[0.0].enth_mol_phase_comp[Liq,hydrogen]*(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen]/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen]))) : 0.0 : True\n",
- " Vap : 0.0 : fs.H101.control_volume.properties_out[0.0].enth_mol_phase[Vap] - (fs.H101.control_volume.properties_out[0.0].enth_mol_phase_comp[Vap,benzene]*(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene]/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen])) + fs.H101.control_volume.properties_out[0.0].enth_mol_phase_comp[Vap,toluene]*(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene]/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen])) + fs.H101.control_volume.properties_out[0.0].enth_mol_phase_comp[Vap,methane]*(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane]/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen])) + fs.H101.control_volume.properties_out[0.0].enth_mol_phase_comp[Vap,hydrogen]*(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen]/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen]))) : 0.0 : True\n",
- " eq_enth_mol_phase_comp : Size=8, Index=fs.BTHM_params.phase_list*fs.BTHM_params.component_list, Active=True\n",
- " Key : Lower : Body : Upper : Active\n",
- " ('Liq', 'benzene') : 0.0 : 1000.0*fs.H101.control_volume.properties_out[0.0].enth_mol_phase_comp[Liq,benzene] - (fs.BTHM_params.cp_ig_5[Liq,benzene]/5*(fs.H101.control_volume.properties_out[0.0].temperature**5 - fs.BTHM_params.temperature_ref**5) + fs.BTHM_params.cp_ig_4[Liq,benzene]/4*(fs.H101.control_volume.properties_out[0.0].temperature**4 - fs.BTHM_params.temperature_ref**4) + fs.BTHM_params.cp_ig_3[Liq,benzene]/3*(fs.H101.control_volume.properties_out[0.0].temperature**3 - fs.BTHM_params.temperature_ref**3) + fs.BTHM_params.cp_ig_2[Liq,benzene]/2*(fs.H101.control_volume.properties_out[0.0].temperature**2 - fs.BTHM_params.temperature_ref**2) + fs.BTHM_params.cp_ig_1[Liq,benzene]*(fs.H101.control_volume.properties_out[0.0].temperature - fs.BTHM_params.temperature_ref)) : 0.0 : True\n",
- " ('Liq', 'hydrogen') : 0.0 : 1000.0*fs.H101.control_volume.properties_out[0.0].enth_mol_phase_comp[Liq,hydrogen] - (fs.BTHM_params.cp_ig_5[Liq,hydrogen]/5*(fs.H101.control_volume.properties_out[0.0].temperature**5 - fs.BTHM_params.temperature_ref**5) + fs.BTHM_params.cp_ig_4[Liq,hydrogen]/4*(fs.H101.control_volume.properties_out[0.0].temperature**4 - fs.BTHM_params.temperature_ref**4) + fs.BTHM_params.cp_ig_3[Liq,hydrogen]/3*(fs.H101.control_volume.properties_out[0.0].temperature**3 - fs.BTHM_params.temperature_ref**3) + fs.BTHM_params.cp_ig_2[Liq,hydrogen]/2*(fs.H101.control_volume.properties_out[0.0].temperature**2 - fs.BTHM_params.temperature_ref**2) + fs.BTHM_params.cp_ig_1[Liq,hydrogen]*(fs.H101.control_volume.properties_out[0.0].temperature - fs.BTHM_params.temperature_ref)) : 0.0 : True\n",
- " ('Liq', 'methane') : 0.0 : 1000.0*fs.H101.control_volume.properties_out[0.0].enth_mol_phase_comp[Liq,methane] - (fs.BTHM_params.cp_ig_5[Liq,methane]/5*(fs.H101.control_volume.properties_out[0.0].temperature**5 - fs.BTHM_params.temperature_ref**5) + fs.BTHM_params.cp_ig_4[Liq,methane]/4*(fs.H101.control_volume.properties_out[0.0].temperature**4 - fs.BTHM_params.temperature_ref**4) + fs.BTHM_params.cp_ig_3[Liq,methane]/3*(fs.H101.control_volume.properties_out[0.0].temperature**3 - fs.BTHM_params.temperature_ref**3) + fs.BTHM_params.cp_ig_2[Liq,methane]/2*(fs.H101.control_volume.properties_out[0.0].temperature**2 - fs.BTHM_params.temperature_ref**2) + fs.BTHM_params.cp_ig_1[Liq,methane]*(fs.H101.control_volume.properties_out[0.0].temperature - fs.BTHM_params.temperature_ref)) : 0.0 : True\n",
- " ('Liq', 'toluene') : 0.0 : 1000.0*fs.H101.control_volume.properties_out[0.0].enth_mol_phase_comp[Liq,toluene] - (fs.BTHM_params.cp_ig_5[Liq,toluene]/5*(fs.H101.control_volume.properties_out[0.0].temperature**5 - fs.BTHM_params.temperature_ref**5) + fs.BTHM_params.cp_ig_4[Liq,toluene]/4*(fs.H101.control_volume.properties_out[0.0].temperature**4 - fs.BTHM_params.temperature_ref**4) + fs.BTHM_params.cp_ig_3[Liq,toluene]/3*(fs.H101.control_volume.properties_out[0.0].temperature**3 - fs.BTHM_params.temperature_ref**3) + fs.BTHM_params.cp_ig_2[Liq,toluene]/2*(fs.H101.control_volume.properties_out[0.0].temperature**2 - fs.BTHM_params.temperature_ref**2) + fs.BTHM_params.cp_ig_1[Liq,toluene]*(fs.H101.control_volume.properties_out[0.0].temperature - fs.BTHM_params.temperature_ref)) : 0.0 : True\n",
- " ('Vap', 'benzene') : 0.0 : fs.H101.control_volume.properties_out[0.0].enth_mol_phase_comp[Vap,benzene] - (fs.BTHM_params.cp_ig_5[Vap,benzene]/5*(fs.H101.control_volume.properties_out[0.0].temperature**5 - fs.BTHM_params.temperature_ref**5) + fs.BTHM_params.cp_ig_4[Vap,benzene]/4*(fs.H101.control_volume.properties_out[0.0].temperature**4 - fs.BTHM_params.temperature_ref**4) + fs.BTHM_params.cp_ig_3[Vap,benzene]/3*(fs.H101.control_volume.properties_out[0.0].temperature**3 - fs.BTHM_params.temperature_ref**3) + fs.BTHM_params.cp_ig_2[Vap,benzene]/2*(fs.H101.control_volume.properties_out[0.0].temperature**2 - fs.BTHM_params.temperature_ref**2) + fs.BTHM_params.cp_ig_1[Vap,benzene]*(fs.H101.control_volume.properties_out[0.0].temperature - fs.BTHM_params.temperature_ref) + fs.BTHM_params.dh_vap[benzene]) : 0.0 : True\n",
- " ('Vap', 'hydrogen') : 0.0 : fs.H101.control_volume.properties_out[0.0].enth_mol_phase_comp[Vap,hydrogen] - (fs.BTHM_params.cp_ig_5[Vap,hydrogen]/5*(fs.H101.control_volume.properties_out[0.0].temperature**5 - fs.BTHM_params.temperature_ref**5) + fs.BTHM_params.cp_ig_4[Vap,hydrogen]/4*(fs.H101.control_volume.properties_out[0.0].temperature**4 - fs.BTHM_params.temperature_ref**4) + fs.BTHM_params.cp_ig_3[Vap,hydrogen]/3*(fs.H101.control_volume.properties_out[0.0].temperature**3 - fs.BTHM_params.temperature_ref**3) + fs.BTHM_params.cp_ig_2[Vap,hydrogen]/2*(fs.H101.control_volume.properties_out[0.0].temperature**2 - fs.BTHM_params.temperature_ref**2) + fs.BTHM_params.cp_ig_1[Vap,hydrogen]*(fs.H101.control_volume.properties_out[0.0].temperature - fs.BTHM_params.temperature_ref) + fs.BTHM_params.dh_vap[hydrogen]) : 0.0 : True\n",
- " ('Vap', 'methane') : 0.0 : fs.H101.control_volume.properties_out[0.0].enth_mol_phase_comp[Vap,methane] - (fs.BTHM_params.cp_ig_5[Vap,methane]/5*(fs.H101.control_volume.properties_out[0.0].temperature**5 - fs.BTHM_params.temperature_ref**5) + fs.BTHM_params.cp_ig_4[Vap,methane]/4*(fs.H101.control_volume.properties_out[0.0].temperature**4 - fs.BTHM_params.temperature_ref**4) + fs.BTHM_params.cp_ig_3[Vap,methane]/3*(fs.H101.control_volume.properties_out[0.0].temperature**3 - fs.BTHM_params.temperature_ref**3) + fs.BTHM_params.cp_ig_2[Vap,methane]/2*(fs.H101.control_volume.properties_out[0.0].temperature**2 - fs.BTHM_params.temperature_ref**2) + fs.BTHM_params.cp_ig_1[Vap,methane]*(fs.H101.control_volume.properties_out[0.0].temperature - fs.BTHM_params.temperature_ref) + fs.BTHM_params.dh_vap[methane]) : 0.0 : True\n",
- " ('Vap', 'toluene') : 0.0 : fs.H101.control_volume.properties_out[0.0].enth_mol_phase_comp[Vap,toluene] - (fs.BTHM_params.cp_ig_5[Vap,toluene]/5*(fs.H101.control_volume.properties_out[0.0].temperature**5 - fs.BTHM_params.temperature_ref**5) + fs.BTHM_params.cp_ig_4[Vap,toluene]/4*(fs.H101.control_volume.properties_out[0.0].temperature**4 - fs.BTHM_params.temperature_ref**4) + fs.BTHM_params.cp_ig_3[Vap,toluene]/3*(fs.H101.control_volume.properties_out[0.0].temperature**3 - fs.BTHM_params.temperature_ref**3) + fs.BTHM_params.cp_ig_2[Vap,toluene]/2*(fs.H101.control_volume.properties_out[0.0].temperature**2 - fs.BTHM_params.temperature_ref**2) + fs.BTHM_params.cp_ig_1[Vap,toluene]*(fs.H101.control_volume.properties_out[0.0].temperature - fs.BTHM_params.temperature_ref) + fs.BTHM_params.dh_vap[toluene]) : 0.0 : True\n",
- " eq_pressure_sat : Size=4, Index=fs.BTHM_params.component_list, Active=True\n",
- " Key : Lower : Body : Upper : Active\n",
- " benzene : - fs.BTHM_params.pressure_sat_coeff_B[benzene] : (log10(1/Pa*1e-05*fs.H101.control_volume.properties_out[0.0].pressure_sat[benzene]) - fs.BTHM_params.pressure_sat_coeff_A[benzene])*(fs.H101.control_volume.properties_out[0.0]._teq + fs.BTHM_params.pressure_sat_coeff_C[benzene]) : - fs.BTHM_params.pressure_sat_coeff_B[benzene] : True\n",
- " hydrogen : - fs.BTHM_params.pressure_sat_coeff_B[hydrogen] : (log10(1/Pa*1e-05*fs.H101.control_volume.properties_out[0.0].pressure_sat[hydrogen]) - fs.BTHM_params.pressure_sat_coeff_A[hydrogen])*(fs.H101.control_volume.properties_out[0.0]._teq + fs.BTHM_params.pressure_sat_coeff_C[hydrogen]) : - fs.BTHM_params.pressure_sat_coeff_B[hydrogen] : True\n",
- " methane : - fs.BTHM_params.pressure_sat_coeff_B[methane] : (log10(1/Pa*1e-05*fs.H101.control_volume.properties_out[0.0].pressure_sat[methane]) - fs.BTHM_params.pressure_sat_coeff_A[methane])*(fs.H101.control_volume.properties_out[0.0]._teq + fs.BTHM_params.pressure_sat_coeff_C[methane]) : - fs.BTHM_params.pressure_sat_coeff_B[methane] : True\n",
- " toluene : - fs.BTHM_params.pressure_sat_coeff_B[toluene] : (log10(1/Pa*1e-05*fs.H101.control_volume.properties_out[0.0].pressure_sat[toluene]) - fs.BTHM_params.pressure_sat_coeff_A[toluene])*(fs.H101.control_volume.properties_out[0.0]._teq + fs.BTHM_params.pressure_sat_coeff_C[toluene]) : - fs.BTHM_params.pressure_sat_coeff_B[toluene] : True\n",
- " eq_temperature_dew : Size=1, Index=None, Active=True\n",
- " Key : Lower : Body : Upper : Active\n",
- " None : 0.0 : fs.H101.control_volume.properties_out[0.0].pressure*(((fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene])/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen]))/(100000.0*Pa*10**(fs.BTHM_params.pressure_sat_coeff_A[toluene] - fs.BTHM_params.pressure_sat_coeff_B[toluene]/(fs.H101.control_volume.properties_out[0.0].temperature_dew + fs.BTHM_params.pressure_sat_coeff_C[toluene]))) + ((fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene])/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen]))/(100000.0*Pa*10**(fs.BTHM_params.pressure_sat_coeff_A[benzene] - fs.BTHM_params.pressure_sat_coeff_B[benzene]/(fs.H101.control_volume.properties_out[0.0].temperature_dew + fs.BTHM_params.pressure_sat_coeff_C[benzene])))) - 1 : 0.0 : True\n",
- " equilibrium_constraint : Size=4, Index=fs.BTHM_params.component_list, Active=True\n",
- " Key : Lower : Body : Upper : Active\n",
- " benzene : 0.0 : (fs.H101.control_volume.properties_out[0.0].pressure_sat[benzene]*(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene]/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen]))) - ((fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene]/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen]))*fs.H101.control_volume.properties_out[0.0].pressure) : 0.0 : True\n",
- " hydrogen : 0.0 : ((fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen]/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen]))) - 1e-06 : 0.0 : True\n",
- " methane : 0.0 : ((fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane]/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen]))) - 1e-06 : 0.0 : True\n",
- " toluene : 0.0 : (fs.H101.control_volume.properties_out[0.0].pressure_sat[toluene]*(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene]/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Liq,hydrogen]))) - ((fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene]/(fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,benzene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,toluene] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,methane] + fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp[Vap,hydrogen]))*fs.H101.control_volume.properties_out[0.0].pressure) : 0.0 : True\n",
- "\n",
- " 1 Suffix Declarations\n",
- " scaling_factor : Direction=EXPORT, Datatype=FLOAT\n",
- " Key : Value\n",
- " fs.H101.control_volume.properties_out[0.0].equilibrium_constraint : 1e-06\n",
- " fs.H101.control_volume.properties_out[0.0].equilibrium_constraint[benzene] : 1e-06\n",
- " fs.H101.control_volume.properties_out[0.0].equilibrium_constraint[hydrogen] : 1e-06\n",
- " fs.H101.control_volume.properties_out[0.0].equilibrium_constraint[methane] : 1e-06\n",
- " fs.H101.control_volume.properties_out[0.0].equilibrium_constraint[toluene] : 1e-06\n",
- "\n",
- " 29 Declarations: flow_mol_phase_comp pressure temperature flow_mol_phase flow_mol mole_frac_phase_comp mole_frac_comp _teq _t1 eps_1 eps_2 _t1_constraint temperature_bubble _teq_constraint temperature_dew _p_sat_dewT eq_temperature_dew _tr_eq equilibrium_constraint fug_phase_comp pressure_sat eq_pressure_sat material_flow_terms enthalpy_flow_terms enth_mol_phase eq_enth_mol_phase enth_mol_phase_comp eq_enth_mol_phase_comp scaling_factor\n",
- "\n",
- " 1 Suffix Declarations\n",
- " scaling_factor : Direction=EXPORT, Datatype=FLOAT\n",
- " Key : Value\n",
- " fs.H101.control_volume.heat : 0.01\n",
- " fs.H101.control_volume.heat[0.0] : 0.01\n",
- "\n",
- " 8 Declarations: properties_in properties_out phase_equilibrium_generation material_balances heat enthalpy_balances pressure_balance scaling_factor\n"
- ]
- }
- ],
- "source": [
- "m.fs.H101.control_volume.pprint()"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 13,
- "metadata": {},
- "outputs": [
- {
- "data": {
- "text/plain": [
- "-3.6307028494775295e-09"
- ]
- },
- "execution_count": 13,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "(((m.fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp['Liq','benzene'].value + m.fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp['Liq','toluene'].value + m.fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp['Liq','methane'].value + m.fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp['Liq','hydrogen'].value)*m.fs.H101.control_volume.properties_in[0.0].enth_mol_phase['Liq'].value) + ((m.fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp['Vap','benzene'].value + m.fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp['Vap','toluene'].value + m.fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp['Vap','methane'].value + m.fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp['Vap','hydrogen'].value)*m.fs.H101.control_volume.properties_in[0.0].enth_mol_phase['Vap'].value) - (((m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Liq','benzene'].value + m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Liq','toluene'].value + m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Liq','methane'].value + m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Liq','hydrogen'].value)*m.fs.H101.control_volume.properties_out[0.0].enth_mol_phase['Liq'].value) + ((m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Vap','benzene'].value + m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Vap','toluene'].value + m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Vap','methane'].value + m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Vap','hydrogen'].value)*m.fs.H101.control_volume.properties_out[0.0].enth_mol_phase['Vap'].value)) + m.fs.H101.control_volume.heat[0.0].value)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 14,
- "metadata": {},
- "outputs": [
- {
- "data": {
- "text/plain": [
- "-2.8161118050115327e-14"
- ]
- },
- "execution_count": 14,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "(m.fs.H101.control_volume.properties_in[0.0].flow_mol_phase_comp['Liq','hydrogen'].value - m.fs.H101.control_volume.properties_out[0.0].flow_mol_phase_comp['Liq','hydrogen'].value + (0*m.fs.H101.control_volume.phase_equilibrium_generation[0.0,1].value + 0*m.fs.H101.control_volume.phase_equilibrium_generation[0.0,2].value - m.fs.H101.control_volume.phase_equilibrium_generation[0.0,3].value + 0*m.fs.H101.control_volume.phase_equilibrium_generation[0.0,4].value))"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": []
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "idaes-pse",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.10.13"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 2
-}
diff --git a/idaes_examples/notebooks/docs/flowsheets/trial.py b/idaes_examples/notebooks/docs/flowsheets/trial.py
deleted file mode 100644
index 5a5b6666..00000000
--- a/idaes_examples/notebooks/docs/flowsheets/trial.py
+++ /dev/null
@@ -1,117 +0,0 @@
-from pyomo.environ import (
- Constraint,
- Var,
- ConcreteModel,
- Expression,
- Objective,
- TransformationFactory,
- value,
-)
-
-import pyomo.environ as pyo
-
-# Todo: Import the above mentioned tools from pyomo.network
-from pyomo.network import Arc, SequentialDecomposition
-from idaes.core import FlowsheetBlock
-
-from idaes.models.unit_models import (
- PressureChanger,
- Mixer,
- Separator as Splitter,
- Heater,
- CSTR,
- Flash,
- Translator,
-)
-
-from idaes.models_extra.column_models import TrayColumn
-from idaes.models_extra.column_models.condenser import CondenserType, TemperatureSpec
-# Utility tools to put together the flowsheet and calculate the degrees of freedom
-from idaes.models.unit_models.pressure_changer import ThermodynamicAssumption
-from idaes.core.util.model_statistics import degrees_of_freedom
-from idaes.core.util.initialization import propagate_state
-from idaes.core.solvers import get_solver
-import idaes.core.util.scaling as iscale
-
-# Import idaes logger to set output levels
-import idaes.logger as idaeslog
-
-from idaes_examples.mod.hda import hda_reaction as reaction_props
-from idaes.models.properties.activity_coeff_models.BTX_activity_coeff_VLE import (
- BTXParameterBlock,
-)
-
-from idaes_examples.mod.hda.hda_ideal_VLE import HDAParameterBlock
-
-def main():
- # Create a Pyomo Concrete Model to contain the problem
- m = ConcreteModel()
-
- # Add a steady state flowsheet block to the model
- m.fs = FlowsheetBlock(dynamic=False)
- # Property package for benzene, toluene, hydrogen, methane mixture
- m.fs.BTHM_params = HDAParameterBlock()
-
- # Property package for the benzene-toluene mixture
- m.fs.BT_params = BTXParameterBlock(
- valid_phase=("Liq", "Vap"), activity_coeff_model="Ideal"
- )
-
- # Reaction package for the HDA reaction
- m.fs.reaction_params = reaction_props.HDAReactionParameterBlock(
- property_package=m.fs.BTHM_params
- )
- # Adding the mixer M101 to the flowsheet
- m.fs.M101 = Mixer(
- property_package=m.fs.BTHM_params,
- inlet_list=["toluene_feed", "hydrogen_feed", "vapor_recycle"],
- )
-
- # Adding the heater H101 to the flowsheet
- m.fs.H101 = Heater(property_package=m.fs.BTHM_params, has_phase_equilibrium=True)
-
- m.fs.s03 = Arc(source=m.fs.M101.outlet, destination=m.fs.H101.inlet)
-
- TransformationFactory("network.expand_arcs").apply_to(m)
-
- m.fs.M101.toluene_feed.flow_mol_phase_comp[0, "Vap", "benzene"].fix(1e-5)
- m.fs.M101.toluene_feed.flow_mol_phase_comp[0, "Vap", "toluene"].fix(1e-5)
- m.fs.M101.toluene_feed.flow_mol_phase_comp[0, "Vap", "hydrogen"].fix(1e-5)
- m.fs.M101.toluene_feed.flow_mol_phase_comp[0, "Vap", "methane"].fix(1e-5)
- m.fs.M101.toluene_feed.flow_mol_phase_comp[0, "Liq", "benzene"].fix(1e-5)
- m.fs.M101.toluene_feed.flow_mol_phase_comp[0, "Liq", "toluene"].fix(0.30)
- m.fs.M101.toluene_feed.flow_mol_phase_comp[0, "Liq", "hydrogen"].fix(1e-5)
- m.fs.M101.toluene_feed.flow_mol_phase_comp[0, "Liq", "methane"].fix(1e-5)
- m.fs.M101.toluene_feed.temperature.fix(303.2)
- m.fs.M101.toluene_feed.pressure.fix(350000)
-
- m.fs.M101.hydrogen_feed.flow_mol_phase_comp[0, "Vap", "benzene"].fix(1e-5)
- m.fs.M101.hydrogen_feed.flow_mol_phase_comp[0, "Vap", "toluene"].fix(1e-5)
- m.fs.M101.hydrogen_feed.flow_mol_phase_comp[0, "Vap", "hydrogen"].fix(0.30)
- m.fs.M101.hydrogen_feed.flow_mol_phase_comp[0, "Vap", "methane"].fix(0.02)
- m.fs.M101.hydrogen_feed.flow_mol_phase_comp[0, "Liq", "benzene"].fix(1e-5)
- m.fs.M101.hydrogen_feed.flow_mol_phase_comp[0, "Liq", "toluene"].fix(1e-5)
- m.fs.M101.hydrogen_feed.flow_mol_phase_comp[0, "Liq", "hydrogen"].fix(1e-5)
- m.fs.M101.hydrogen_feed.flow_mol_phase_comp[0, "Liq", "methane"].fix(1e-5)
- m.fs.M101.hydrogen_feed.temperature.fix(303.2)
- m.fs.M101.hydrogen_feed.pressure.fix(350000)
-
- # Fix the temperature of the outlet from the heater H101
- m.fs.H101.outlet.temperature.fix(600)
-
- iscale.set_scaling_factor(m.fs.H101.control_volume.heat, 1e-2)
-
- m.scaling_factor = pyo.Suffix(direction=pyo.Suffix.EXPORT)
-
- def function(unit):
- print(unit)
- print(unit.default_initializer())
- initializer = unit.default_initializer()
- initializer.initialize(unit, output_level=idaeslog.DEBUG)
-
- units=[m.fs.M101,m.fs.H101]
- for i in units:
- function(i)
-
-if __name__=='__main__':
- main()
\ No newline at end of file