Skip to content

Commit

Permalink
Update integration_with_ro.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
avdudchenko committed Sep 12, 2024
1 parent bac1d57 commit 6c48895
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/reaktoro_pse/tutorials/integration_with_ro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"\n",
"# WaterTAP core components\n",
"from watertap.property_models.NaCl_prop_pack import NaClParameterBlock\n",
"\n",
"# WaterTAP core components\n",
"from watertap.property_models.seawater_prop_pack import SeawaterParameterBlock\n",
"\n",
Expand Down Expand Up @@ -133,14 +134,14 @@
"# create IDAES flowsheet\n",
"m.fs = FlowsheetBlock(dynamic=False)\n",
"# can use NaCl or Sea water prop pack\n",
"prop_pack='Seawater'\n",
"if prop_pack=='Seawater':\n",
"prop_pack = \"Seawater\"\n",
"if prop_pack == \"Seawater\":\n",
" # create NaCl property model\n",
" m.fs.properties=SeawaterParameterBlock()\n",
" bulk_ion='TDS'\n",
" m.fs.properties = SeawaterParameterBlock()\n",
" bulk_ion = \"TDS\"\n",
"else:\n",
" m.fs.properties = NaClParameterBlock()\n",
" bulk_ion='NaCl'\n",
" bulk_ion = \"NaCl\"\n",
"# build feed\n",
"m.fs.feed = Feed(property_package=m.fs.properties)"
]
Expand Down Expand Up @@ -1617,7 +1618,9 @@
" )\n",
"\n",
"ax.plot(indexes, reaktoro_osm, color=\"red\", label=\"Reaktoro\")\n",
"ax.plot(indexes, sewater_prop_pack_osm, color=\"black\", label=f\"{prop_pack} property pack\")\n",
"ax.plot(\n",
" indexes, sewater_prop_pack_osm, color=\"black\", label=f\"{prop_pack} property pack\"\n",
")\n",
"ax.set(xlabel=\"Node position\", ylabel=\"Osmotic pressure (Bar)\")\n",
"plt.legend()\n",
"plt.show()"
Expand Down Expand Up @@ -1788,7 +1791,9 @@
" )\n",
"\n",
"ax.plot(indexes, reaktoro_osm, color=\"red\", label=\"Reaktoro\")\n",
"ax.plot(indexes, sewater_prop_pack_osm, color=\"black\", label=f\"{prop_pack} property pack\")\n",
"ax.plot(\n",
" indexes, sewater_prop_pack_osm, color=\"black\", label=f\"{prop_pack} property pack\"\n",
")\n",
"ax.set(xlabel=\"Node position\", ylabel=\"Osmotic pressure (Bar)\")\n",
"plt.legend()\n",
"\n",
Expand Down

0 comments on commit 6c48895

Please sign in to comment.