Skip to content
2 changes: 1 addition & 1 deletion .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ jobs:
fail-fast: false
matrix:
python-version:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- '3.13'
os:
- linux
- win64
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -66,7 +66,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {
"scrolled": true
},
Expand All @@ -93,11 +93,11 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import pkg_resources\n",
"from importlib.resources import files\n",
"import pyomo.environ as pyo\n",
"from idaes.models_extra.power_generation.flowsheets.supercritical_steam_cycle import (\n",
" pfd_result,\n",
Expand All @@ -107,9 +107,10 @@
"# Create stream results as Pandas dataframe\n",
"df = create_stream_table_dataframe(streams=m._streams, orient=\"index\")\n",
"# Create a new PFD with simulation results\n",
"init_pfd = pkg_resources.resource_string(\n",
" \"idaes.models_extra.power_generation.flowsheets.supercritical_steam_cycle\",\n",
" \"supercritical_steam_cycle.svg\",\n",
"init_pfd = (\n",
" files(\"idaes.models_extra.power_generation.flowsheets.supercritical_steam_cycle\")\n",
" .joinpath(\"supercritical_steam_cycle.svg\")\n",
" .read_bytes()\n",
")\n",
"res_pfd = pfd_result(m, df, svg=init_pfd)\n",
"# Display PFD with results.\n",
Expand All @@ -118,7 +119,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {
"scrolled": true
},
Expand All @@ -138,7 +139,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "py311-black",
"language": "python",
"name": "python3"
},
Expand All @@ -152,9 +153,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
"version": "3.11.14"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -66,7 +66,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {
"scrolled": true
},
Expand All @@ -93,11 +93,11 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import pkg_resources\n",
"from importlib.resources import files\n",
"import pyomo.environ as pyo\n",
"from idaes.models_extra.power_generation.flowsheets.supercritical_steam_cycle import (\n",
" pfd_result,\n",
Expand All @@ -107,9 +107,10 @@
"# Create stream results as Pandas dataframe\n",
"df = create_stream_table_dataframe(streams=m._streams, orient=\"index\")\n",
"# Create a new PFD with simulation results\n",
"init_pfd = pkg_resources.resource_string(\n",
" \"idaes.models_extra.power_generation.flowsheets.supercritical_steam_cycle\",\n",
" \"supercritical_steam_cycle.svg\",\n",
"init_pfd = (\n",
" files(\"idaes.models_extra.power_generation.flowsheets.supercritical_steam_cycle\")\n",
" .joinpath(\"supercritical_steam_cycle.svg\")\n",
" .read_bytes()\n",
")\n",
"res_pfd = pfd_result(m, df, svg=init_pfd)\n",
"# Display PFD with results.\n",
Expand All @@ -118,7 +119,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {
"scrolled": true
},
Expand All @@ -138,7 +139,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "py311-black",
"language": "python",
"name": "python3"
},
Expand All @@ -152,7 +153,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
"version": "3.11.14"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -66,7 +66,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {
"scrolled": true
},
Expand All @@ -93,11 +93,11 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import pkg_resources\n",
"from importlib.resources import files\n",
"import pyomo.environ as pyo\n",
"from idaes.models_extra.power_generation.flowsheets.supercritical_steam_cycle import (\n",
" pfd_result,\n",
Expand All @@ -107,9 +107,10 @@
"# Create stream results as Pandas dataframe\n",
"df = create_stream_table_dataframe(streams=m._streams, orient=\"index\")\n",
"# Create a new PFD with simulation results\n",
"init_pfd = pkg_resources.resource_string(\n",
" \"idaes.models_extra.power_generation.flowsheets.supercritical_steam_cycle\",\n",
" \"supercritical_steam_cycle.svg\",\n",
"init_pfd = (\n",
" files(\"idaes.models_extra.power_generation.flowsheets.supercritical_steam_cycle\")\n",
" .joinpath(\"supercritical_steam_cycle.svg\")\n",
" .read_bytes()\n",
")\n",
"res_pfd = pfd_result(m, df, svg=init_pfd)\n",
"# Display PFD with results.\n",
Expand All @@ -118,7 +119,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {
"scrolled": true
},
Expand All @@ -138,7 +139,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "py311-black",
"language": "python",
"name": "python3"
},
Expand All @@ -152,7 +153,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
"version": "3.11.14"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,21 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# pkg_resources is used here to get the svg information from the\n",
"# \"files\" from importlib.resources is used to get the svg information from the\n",
"# installed IDAES package\n",
"\n",
"import pkg_resources\n",
"from importlib.resources import files\n",
"from IPython.display import SVG, display\n",
"\n",
"# Get the contents of the PFD (which is an svg file)\n",
"init_pfd = pkg_resources.resource_string(\n",
" \"idaes.models_extra.power_generation.flowsheets.supercritical_steam_cycle\",\n",
" \"supercritical_steam_cycle.svg\",\n",
"init_pfd = (\n",
" files(\"idaes.models_extra.power_generation.flowsheets.supercritical_steam_cycle\")\n",
" .joinpath(\"supercritical_steam_cycle.svg\")\n",
" .read_bytes()\n",
")\n",
"\n",
"# Make the svg contents into an SVG object and display it.\n",
Expand Down Expand Up @@ -221,4 +222,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
Loading
Loading