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 13, 2024
1 parent 4a11cb4 commit cedc74b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/reaktoro_pse/tutorials/integration_with_ro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
" ions, initialize=1, bounds=(0, None), units=pyunits.kg / pyunits.s\n",
")\n",
"\n",
"# Create pH variable for feed \n",
"# Create pH variable for feed\n",
"m.fs.feed.pH = Var(initialize=sea_water_ph)\n",
"m.fs.feed.pH.fix()\n",
"\n",
Expand Down Expand Up @@ -214,6 +214,7 @@
"source": [
"# Write constraints to convert concentration to mass flows\n",
"\n",
"\n",
"@m.fs.feed.Constraint(list(m.fs.feed.species_mass_flow.keys()))\n",
"def eq_feed_species_mass_flow(fs, ion):\n",
" if ion == \"H2O\":\n",
Expand All @@ -231,13 +232,13 @@
" )\n",
"\n",
"\n",
"# Need NaCl for the NaCl property package in watertap \n",
"# Need NaCl for the NaCl property package in watertap\n",
"m.fs.feed.eq_NaCl = Constraint(\n",
" expr=m.fs.feed.properties[0].flow_mass_phase_comp[(\"Liq\", bulk_ion)]\n",
" == sum(m.fs.feed.species_mass_flow[ion] for ion in m.fs.feed.species_concentrations)\n",
")\n",
"\n",
"# Calculate acid dose \n",
"# Calculate acid dose\n",
"m.fs.eq_acid_dose = Constraint(\n",
" expr=m.fs.acid_mass_flow\n",
" == pyunits.convert(\n",
Expand Down

0 comments on commit cedc74b

Please sign in to comment.