Skip to content

Commit

Permalink
Delete ZO Files (#1438)
Browse files Browse the repository at this point in the history
* Delete ZO flowsheets & rename flowsheet directory

* Address pylint issues

* Try addressing lssro_multi_sweep error

* Update flowsheet entry points for GUI

* Update import for tutorial

* Trying to fix lsrro multi sweep

* Add files for interpolated lsrro sweep results

* Turn absolute file path to relative file path

* Fix parameter sweep demo imports

* Update imports in how-to guides

* Address documentation issues

* Fix documentation identation

* Delete IEDO ZO unit models

* Remove IEDO ZO models and tests

* Update index

* Add blank line

* Correct typo

* Revert changes to UI How-to

* Edit entry points for GUI flowsheets

* Delete nf_with_bypass_ui, which was deleted in #1436

* Revert "Delete IEDO ZO unit models"

This reverts commit be6cd3d.

* Revert "Remove IEDO ZO models and tests"

This reverts commit 5b3807c.

* Revert "Update index"

This reverts commit 88d4d9a.

* Add IEDO ZO yaml files to data/techno_economic

* Update data/techno_economic yaml test

* Modify file location in ZO unit tests

* Add test file for sim_simple_crystallizer

---------

Co-authored-by: Adam Atia <aatia@keylogic.com>
Co-authored-by: Ludovico Bianchi <lbianchi@lbl.gov>
  • Loading branch information
3 people authored Jun 28, 2024
1 parent a5103f3 commit ef16eaa
Show file tree
Hide file tree
Showing 230 changed files with 158 additions and 9,843 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ As before, we begin by importing or explicitly programming any functions relatin

# replace this with your own flowsheet module, e.g.
# import my_flowsheet_module as mfm
import watertap.examples.flowsheets.RO_with_energy_recovery.RO_with_energy_recovery as RO_flowsheet
import watertap.flowsheets.RO_with_energy_recovery.RO_with_energy_recovery as RO_flowsheet

Once this is done, we import the differential parameter sweep tool and sampling classes.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ An example of the functions setup for use with loopTool for RO_with_energy_recov

.. code-block::
import watertap.examples.flowsheets.RO_with_energy_recovery.RO_with_energy_recovery as ro_erd
import watertap.flowsheets.RO_with_energy_recovery.RO_with_energy_recovery as ro_erd
def ro_build(erd_type=None, **kwargs):
m = ro_erd.build(erd_type)
return m
Expand Down
2 changes: 1 addition & 1 deletion docs/how_to_guides/how_to_use_parameter_sweep.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ In general you would import your own flowsheet module.

# replace this with your own flowsheet module, e.g.
# import my_flowsheet_module as mfm
import watertap.examples.flowsheets.RO_with_energy_recovery.RO_with_energy_recovery as RO_flowsheet
import watertap.flowsheets.RO_with_energy_recovery.RO_with_energy_recovery as RO_flowsheet

Once this is done, import the parameter sweep tool

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ As before, we begin by importing or explicitly programming any functions relatin

# replace this with your own flowsheet module, e.g.
# import my_flowsheet_module as mfm
import watertap.examples.flowsheets.RO_with_energy_recovery.RO_with_energy_recovery as RO_flowsheet
import watertap.flowsheets.RO_with_energy_recovery.RO_with_energy_recovery as RO_flowsheet

Once this is done, we import the parameter sweep tool and two different random sampling classes

Expand Down
10 changes: 5 additions & 5 deletions docs/how_to_guides/how_to_use_ui_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ similar to this::
category=FlowsheetCategory.wastewater,
build_options={
"Bypass": {
"name": "bypass option",
"name": "bypass option",
"display_name": "With Bypass",
"values_allowed": ['false', 'true'],
"value": "false"
}
}
)

There are 3 required functions:
There are 3 required functions:

1. ``do_export`` - This function defines the variables that will be displayed on the UI.

Expand Down Expand Up @@ -149,7 +149,7 @@ The raw text version is::
results = solve(fs)
return results

Additionally, there are optional parameters to assign a category, provide build options,
Additionally, there are optional parameters to assign a category, provide build options,
and provide a diagram function among others. See additional examples below.

Build function using build options::
Expand Down Expand Up @@ -184,7 +184,7 @@ Custom diagram function::
else:
return "nf_ui.png"

Enable UI to discover flowsheet - In order for the UI to discover a flowsheet, an
Enable UI to discover flowsheet - In order for the UI to discover a flowsheet, an
entrypoint must be defined in setup.py with the path to the export file. For examples, see below::

entry_points={
Expand All @@ -194,4 +194,4 @@ entrypoint must be defined in setup.py with the path to the export file. For exa
]


For a complete overview of all arguments, see :class:`FlowsheetInterface`.
For a complete overview of all arguments, see :class:`FlowsheetInterface`.
16 changes: 8 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,14 @@
},
entry_points={
"watertap.flowsheets": [
"nf = watertap.examples.flowsheets.nf_dspmde.nf_ui",
"bsm2 = watertap.examples.flowsheets.case_studies.full_water_resource_recovery_facility.BSM2_ui",
"bsm2_P_extension = watertap.examples.flowsheets.case_studies.full_water_resource_recovery_facility.BSM2_P_extension_ui",
"dye_desalination = watertap.examples.flowsheets.case_studies.wastewater_resource_recovery.dye_desalination.dye_desalination_ui",
"mvc = watertap.examples.flowsheets.mvc.mvc_single_stage_ui",
"RO = watertap.examples.flowsheets.RO_with_energy_recovery.RO_with_energy_recovery_ui",
"OARO = watertap.examples.flowsheets.oaro.oaro_multi_ui",
"GAC = watertap.examples.flowsheets.gac.gac_ui",
"nf = watertap.flowsheets.nf_dspmde.nf_ui",
"bsm2 = watertap.flowsheets.full_water_resource_recovery_facility.BSM2_ui",
"bsm2_P_extension = watertap.flowsheets.full_water_resource_recovery_facility.BSM2_P_extension_ui",
"dye_desalination = watertap.flowsheets.dye_desalination.dye_desalination_ui",
"mvc = watertap.flowsheets.mvc.mvc_single_stage_ui",
"RO = watertap.flowsheets.RO_with_energy_recovery.RO_with_energy_recovery_ui",
"OARO = watertap.flowsheets.oaro.oaro_multi_ui",
"GAC = watertap.flowsheets.gac.gac_ui",
],
},
)
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
# "https://github.com/watertap-org/watertap/"
#################################################################################
from watertap.core.solvers import get_solver
from watertap.examples.flowsheets.RO_with_energy_recovery.RO_with_energy_recovery import (
from watertap.flowsheets.RO_with_energy_recovery.RO_with_energy_recovery import (
optimize,
)
from watertap.examples.flowsheets.RO_with_energy_recovery.monte_carlo_sampling_RO_ERD import (
from watertap.flowsheets.RO_with_energy_recovery.monte_carlo_sampling_RO_ERD import (
build_model,
build_outputs,
)
Expand Down Expand Up @@ -263,8 +263,6 @@ def build_spec(model):
if __name__ == "__main__":
import sys
import time
import numpy as np
import pprint

start_time = time.time()

Expand Down
6 changes: 3 additions & 3 deletions tutorials/parameter_sweep_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@
"from pprint import pprint\n",
"from IPython import get_ipython\n",
"from watertap.core.solvers import get_solver\n",
"from watertap.examples.flowsheets.RO_with_energy_recovery.RO_with_energy_recovery import (\n",
"from watertap.flowsheets.RO_with_energy_recovery.RO_with_energy_recovery import (\n",
" optimize,\n",
")\n",
"from watertap.examples.flowsheets.RO_with_energy_recovery.monte_carlo_sampling_RO_ERD import (\n",
"from watertap.flowsheets.RO_with_energy_recovery.monte_carlo_sampling_RO_ERD import (\n",
" build_model,\n",
" build_outputs,\n",
")\n",
Expand Down Expand Up @@ -795,7 +795,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.17"
"version": "3.11.5"
},
"rise": {
"enable_chalkboard": true,
Expand Down
251 changes: 0 additions & 251 deletions watertap/costing/tests/test_costing_interop.py

This file was deleted.

Loading

0 comments on commit ef16eaa

Please sign in to comment.