Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 46 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
This is a repository for WaterTAP development and analysis for the NAWI 3.25 project.

To install this environment, open command prompt or terminal and from the location of this repo execute the following command:
## Installation

`conda env create -f flex_desal_analysis_setup.yml`
### 1. Create the conda environment

Open command prompt or terminal and from the location of this repo execute:

```bash
conda env create -f flex_desal_analysis_setup.yml
conda activate flex_desal_analysis
```

### 2. Install WaterTAP (development version)

This project requires the development version of WaterTAP installed in editable mode:

```bash
# Clone watertap repository (if not already done)
git clone https://github.com/watertap-org/watertap.git
cd watertap

# Install in editable mode without dependencies to avoid version conflicts
pip install --no-deps -e .
cd ..
```

### 3. Install idaes-pse 2.10

Force install the required version:

```bash
pip install --upgrade --force-reinstall idaes-pse==2.10.0
```

### 4. Install this package

Return to the flex_desal directory and install in editable mode:

```bash
pip install --no-deps -e .
```

### Notes

- This project requires Python 3.11
- WaterTAP 1.5.dev0+ is required for compatibility
- idaes-pse 2.10.0 is required (WaterTAP may try to downgrade this)
- After installation, you may see dependency warnings from pip - these can typically be ignored
11 changes: 11 additions & 0 deletions dummy_result.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
,Day,Time,LMP,bypass_pretreatment_flow,power_from_grid,intake.op_mode,intake.startup,intake.shutdown,intake.energy_intensity,intake.power_consumption,intake.recovery,intake.feed_flowrate,intake.product_flowrate,intake.reject_flowrate,pretreatment.op_mode,pretreatment.startup,pretreatment.shutdown,pretreatment.energy_intensity,pretreatment.power_consumption,pretreatment.recovery,pretreatment.feed_flowrate,pretreatment.product_flowrate,pretreatment.reject_flowrate,reverse_osmosis.op_mode,reverse_osmosis.startup,reverse_osmosis.shutdown,reverse_osmosis.power_consumption,reverse_osmosis.feed_flowrate,reverse_osmosis.product_flowrate,reverse_osmosis.reject_flowrate,reverse_osmosis.inlet_flowrate,reverse_osmosis.leftover_flow,reverse_osmosis.ro_skid[1].op_mode,reverse_osmosis.ro_skid[1].startup,reverse_osmosis.ro_skid[1].shutdown,reverse_osmosis.ro_skid[1].energy_intensity,reverse_osmosis.ro_skid[1].power_consumption,reverse_osmosis.ro_skid[1].recovery,reverse_osmosis.ro_skid[1].feed_flowrate,reverse_osmosis.ro_skid[1].product_flowrate,reverse_osmosis.ro_skid[1].reject_flowrate,reverse_osmosis.ro_skid[2].op_mode,reverse_osmosis.ro_skid[2].startup,reverse_osmosis.ro_skid[2].shutdown,reverse_osmosis.ro_skid[2].energy_intensity,reverse_osmosis.ro_skid[2].power_consumption,reverse_osmosis.ro_skid[2].recovery,reverse_osmosis.ro_skid[2].feed_flowrate,reverse_osmosis.ro_skid[2].product_flowrate,reverse_osmosis.ro_skid[2].reject_flowrate,reverse_osmosis.ro_skid[3].op_mode,reverse_osmosis.ro_skid[3].startup,reverse_osmosis.ro_skid[3].shutdown,reverse_osmosis.ro_skid[3].energy_intensity,reverse_osmosis.ro_skid[3].power_consumption,reverse_osmosis.ro_skid[3].recovery,reverse_osmosis.ro_skid[3].feed_flowrate,reverse_osmosis.ro_skid[3].product_flowrate,reverse_osmosis.ro_skid[3].reject_flowrate,posttreatment.op_mode,posttreatment.startup,posttreatment.shutdown,posttreatment.energy_intensity,posttreatment.power_consumption,posttreatment.feed_flowrate,posttreatment.product_flowrate,posttreatment.reject_flowrate,brine_discharge.op_mode,brine_discharge.startup,brine_discharge.shutdown,brine_discharge.feed_flowrate,brine_discharge.power_consumption,num_skids_online,net_power_consumption,water_revenue,demand_response_revenue,emissions_cost,energy_cost
0,1,1,0.12955,7.154440539027692e-12,1796.670281616262,,,,0.157121734,167.098964109,1,1063.5,1063.5,0.0,1,,,0.01,10.634999999999929,1,1063.499999999993,1063.499999999993,0.0,,,,1441.9791216291196,1063.499999999993,431.6029166298917,581.4070833701084,1013.01,50.489999999992875,1.0,0.0,0.0,3.3409855820451884,480.6597072097066,0.4260598776220292,337.67,143.8676388766306,193.80236112336942,1.0,0.0,0.0,3.3409855820451893,480.65970720970665,0.42605987762202907,337.67,143.86763887663056,193.80236112336945,1.0,0.0,0.0,3.340985582045188,480.65970720970654,0.4260598776220291,337.67,143.86763887663056,193.80236112336945,1.0,,,0.41,176.9571958182556,431.6029166298917,431.6029166324336,0.0,0.0,,,631.8970833675664,5.988665493589163e-08,3.0,1796.6702816162617,0.0,-0.0,0.0,58.189658745846685
1,1,2,0.12955,7.154440539028204e-12,1796.670281616262,,,,0.157121734,167.098964109,1,1063.5,1063.5,0.0,1,,,0.01,10.634999999999929,1,1063.499999999993,1063.499999999993,8.829685626331071e-44,,,,1441.9791216291196,1063.499999999993,431.6029166298917,581.4070833701084,1013.01,50.4899999999929,1.0,0.0,0.0,3.340985582045189,480.6597072097066,0.42605987762202907,337.67,143.86763887663056,193.80236112336945,1.0,0.0,0.0,3.340985582045189,480.6597072097066,0.42605987762202907,337.67,143.86763887663056,193.80236112336945,1.0,0.0,0.0,3.340985582045189,480.6597072097066,0.42605987762202907,337.67,143.86763887663056,193.80236112336945,1.0,,,0.41,176.95719581825557,431.6029166298917,431.6029166324336,0.0,0.0,,,631.8970833675664,5.988665493589161e-08,3.0,1796.6702816162617,0.0,-0.0,0.0,58.189658745846685
2,1,3,0.12955,7.154440539026487e-12,1796.670281616262,,,,0.157121734,167.098964109,1,1063.5,1063.5,0.0,1,,,0.01,10.634999999999929,1,1063.499999999993,1063.499999999993,4.3941107118622926e-44,,,,1441.9791216291196,1063.499999999993,431.60291662989175,581.4070833701084,1013.01,50.489999999992904,1.0,0.0,0.0,3.340985582045189,480.6597072097066,0.42605987762202907,337.67,143.86763887663056,193.80236112336945,1.0,0.0,0.0,3.340985582045189,480.65970720970665,0.4260598776220291,337.67,143.8676388766306,193.80236112336942,1.0,0.0,0.0,3.340985582045188,480.6597072097065,0.4260598776220292,337.67,143.86763887663056,193.80236112336945,1.0,,,0.41,176.9571958182556,431.60291662989175,431.6029166324336,0.0,0.0,,,631.8970833675664,5.988665493589163e-08,3.0,1796.6702816162617,0.0,-0.0,0.0,58.189658745846685
3,1,4,0.12955,7.1544405390276086e-12,1796.670281616262,,,,0.157121734,167.098964109,1,1063.5,1063.5,0.0,1,,,0.01,10.634999999999929,1,1063.499999999993,1063.499999999993,4.495102730091952e-44,,,,1441.9791216291196,1063.499999999993,431.6029166298917,581.4070833701084,1013.01,50.489999999992875,1.0,0.0,0.0,3.340985582045189,480.6597072097066,0.4260598776220291,337.67,143.86763887663056,193.80236112336945,1.0,0.0,0.0,3.340985582045189,480.6597072097066,0.42605987762202907,337.67,143.86763887663056,193.80236112336945,1.0,0.0,0.0,3.3409855820451884,480.65970720970654,0.4260598776220291,337.67,143.86763887663056,193.80236112336945,1.0,,,0.41,176.9571958182556,431.6029166298917,431.6029166324336,0.0,0.0,,,631.8970833675664,5.988665493589161e-08,3.0,1796.6702816162617,0.0,-0.0,0.0,58.189658745846685
4,1,5,0.12955,7.154440539026553e-12,1796.670281616262,,,,0.157121734,167.098964109,1,1063.5,1063.5,0.0,1,,,0.01,10.634999999999929,1,1063.499999999993,1063.499999999993,0.0,,,,1441.9791216291196,1063.499999999993,431.60291662989175,581.4070833701084,1013.01,50.489999999992875,1.0,0.0,0.0,3.340985582045189,480.65970720970665,0.4260598776220291,337.67,143.86763887663056,193.80236112336945,1.0,0.0,0.0,3.340985582045189,480.65970720970665,0.4260598776220291,337.67,143.86763887663056,193.80236112336945,1.0,0.0,0.0,3.340985582045188,480.6597072097065,0.4260598776220291,337.67,143.86763887663056,193.80236112336945,1.0,,,0.41,176.9571958182556,431.60291662989175,431.6029166324336,0.0,0.0,,,631.8970833675664,5.988665493589163e-08,3.0,1796.6702816162617,0.0,-0.0,0.0,58.189658745846685
5,1,6,0.12955,7.154440539027364e-12,1796.670281616262,,,,0.157121734,167.098964109,1,1063.5,1063.5,0.0,1,,,0.01,10.634999999999929,1,1063.499999999993,1063.499999999993,6.7601703259419886e-46,,,,1441.9791216291196,1063.499999999993,431.6029166298917,581.4070833701084,1013.01,50.489999999992875,1.0,0.0,0.0,3.340985582045189,480.6597072097066,0.42605987762202907,337.67,143.86763887663056,193.80236112336945,1.0,0.0,0.0,3.3409855820451884,480.6597072097066,0.4260598776220291,337.67,143.86763887663056,193.80236112336945,1.0,0.0,0.0,3.340985582045189,480.6597072097066,0.42605987762202907,337.67,143.86763887663056,193.80236112336945,1.0,,,0.41,176.95719581825557,431.6029166298917,431.6029166324336,0.0,0.0,,,631.8970833675664,5.98866549358916e-08,3.0,1796.6702816162617,0.0,-0.0,0.0,58.189658745846685
6,1,7,0.12955,7.15444053902837e-12,1796.670281616262,,,,0.157121734,167.098964109,1,1063.5,1063.5,0.0,1,,,0.01,10.634999999999929,1,1063.499999999993,1063.499999999993,0.0,,,,1441.9791216291196,1063.499999999993,431.6029166298917,581.4070833701084,1013.01,50.489999999992875,1.0,0.0,0.0,3.3409855820451884,480.65970720970654,0.4260598776220291,337.67,143.86763887663056,193.80236112336945,1.0,0.0,0.0,3.340985582045189,480.6597072097066,0.42605987762202907,337.67,143.86763887663056,193.80236112336945,1.0,0.0,0.0,3.3409855820451884,480.6597072097066,0.42605987762202907,337.67,143.86763887663056,193.80236112336945,1.0,,,0.41,176.9571958182556,431.6029166298917,431.6029166324336,0.0,0.0,,,631.8970833675664,5.988665493589161e-08,3.0,1796.6702816162617,0.0,-0.0,0.0,58.189658745846685
7,1,8,0.12955,6.462239583664445e-12,1351.4388464356916,,,,0.157121734,167.098964109,1,1063.5,1063.5,0.0,1,,,0.01,10.634999999999936,1,1063.4999999999936,1063.4999999999936,0.0,,,,1045.373418782598,1063.4999999999936,313.00356945541756,362.33643054458247,675.34,388.1599999999935,1.0,0.0,0.0,3.339813090954207,522.686709391299,0.4634755374410187,337.67,156.50178472770878,181.16821527229123,1.0,0.0,0.0,3.339813090954207,522.686709391299,0.4634755374410187,337.67,156.50178472770878,181.16821527229123,0.0,0.0,1.0,3.3580698795641535,7.531979245745892e-44,0.48957107422033336,0.0,2.2420775429197073e-44,0.0,1.0,,,0.41,128.33146347672118,313.00356945541756,313.0035694579595,0.0,0.0,,,750.4964305420405,6.737255316331029e-08,2.0,1351.4388464356919,0.0,-0.0,0.0,43.76972563893596
8,1,9,0.12955,6.462239583663725e-12,1351.4388464356916,,,,0.157121734,167.098964109,1,1063.5,1063.5,0.0,1,,,0.01,10.634999999999936,1,1063.4999999999936,1063.4999999999936,3.1389085600875902e-43,,,,1045.373418782598,1063.4999999999936,313.00356945541756,362.33643054458247,675.34,388.1599999999935,1.0,0.0,0.0,3.3398130909542076,522.686709391299,0.4634755374410186,337.67,156.50178472770875,181.16821527229126,1.0,0.0,0.0,3.339813090954207,522.6867093912991,0.46347553744101866,337.67,156.50178472770878,181.16821527229123,0.0,0.0,0.0,3.358069879564154,0.0,0.48957107422033236,2.5817282058546874e-44,0.0,7.066156982800415e-44,1.0,,,0.41,128.33146347672118,313.00356945541756,313.0035694579595,0.0,0.0,,,750.4964305420406,6.73725531633103e-08,2.0,1351.4388464356919,0.0,-0.0,0.0,43.76972563893596
9,1,10,0.12955,6.46223958366386e-12,1351.4388464356916,,,,0.157121734,167.098964109,1,1063.5,1063.5,0.0,1,,,0.01,10.634999999999936,1,1063.4999999999936,1063.4999999999936,0.0,,,,1045.373418782598,1063.4999999999936,313.0035694554175,362.3364305445825,675.34,388.1599999999935,1.0,0.0,0.0,3.3398130909542076,522.686709391299,0.4634755374410186,337.67,156.50178472770875,181.16821527229126,1.0,0.0,0.0,3.3398130909542076,522.6867093912989,0.46347553744101855,337.67,156.50178472770872,181.1682152722913,0.0,0.0,0.0,3.3580698795641535,3.0121348396432044e-43,0.4895710742203331,1.793662034335766e-43,8.96831017167883e-44,8.96831017167883e-44,1.0,,,0.41,128.33146347672115,313.0035694554175,313.00356945795943,0.0,0.0,,,750.4964305420406,6.737255316331029e-08,2.0,1351.4388464356919,0.0,-0.0,0.0,43.76972563893596
2 changes: 1 addition & 1 deletion flex_desal_analysis_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- conda-forge
- defaults
dependencies:
- python=3.10
- python=3.11
- git
- pytest
- pip
Expand Down
Binary file added operation_profile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 9 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,16 @@ name = "flex_desal_analysis"
readme = "README.md"
version = "0.1.0"
description = "Python package for conducting analysis for NAWI 3.25"
requires-python = ">=3.10,<3.11"
requires-python = ">=3.11,<3.12"
dependencies = [
"watertap-reflo>=0.2"
"idaes-pse>=2.10",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this not work if reflo is also a dependency?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nevermind just looked at the README

"pyomo>=6.9.3",
"pint>=0.24",
"pyyaml",
"pandas",
"numpy",
"matplotlib",
"scipy"
]

[tool.setuptools]
Expand Down
Empty file added src/pricetaker/__init__.py
Empty file.
Empty file.
Loading
Loading