Produced Water Application for Beneficial Reuse, Environmental Impact and Treatment Optimization (PARETO)
Project Goals
The goal of the project is to develop a modeling and optimization application, PARETO, that can help organizations better manage, better treat, and – where possible – beneficially reuse produced water from oil and gas operations. Specifically, PARETO will help decision-makers with:
buildout of the produced water infrastructure
management of produced water volumes
selection of effective treatment technologies
placement & sizing of treatment facilities
identification of beneficial water reuse options
distribution of treated produced water for reuse
The initiative is committed to viewing produced water management from a “systems” perspective and to building an inclusive framework that will unite stakeholders from across the produced water community. The vision is that PARETO will not only help oil & gas but also allow other industries (e.g., agriculture, mining) explore beneficial reuse opportunities for treated produced water. Figure 1 (below) illustrates the scope of “Project PARETO”.
Collaborating institutions
The PARETO team is comprised of collaborators from the following institutions:
National Energy Technology Laboratory (Lead)
Sandia National Laboratory
Lawrence Berkeley National Laboratory
Project Timeline
Project PARETO is a 3-year initiative that has been split into three distinct phases; with each phase taking up exactly one year. In execution year 2021, PARETO will capture produced water management, i.e., capturing options for coordinating water deliveries in a given development area. By execution year 2022, the project will shift its attention towards produced water treatment. Finally, execution year 2023 will be dedicated to produced water beneficial reuse.

Figure 4. Project PARETO Timeline
In terms of deliverables, PARETO itself will be released as free and open-source software every year of the initiative – with increasing capabilities and functionality becoming available over time. The project team is also committed to conducting case studies with industrial and other partners; and where possible findings from those collaborations will be shared with the produced water community as best practice reports. It should also be noted that the project will be continuously evaluated by a comprehensive stakeholder board that involves individuals representing upstream operators, midstream organizations, treatment technology providers, beneficial reuse entities, regulatory agencies and others – all of which will guide the project team and provide necessary input.
Contact us
General, background and overview information is available at the PARETO main website. Framework development happens at our GitHub repo where you can report issues/bugs or make contributions. For further enquiries, send an email to: <pareto-support@pareto.org>
Contents
Getting Started
Installation
To install the PARETO framework on Windows operating systems, follow the set of instructions below that are appropriate for your needs. If you need assistance please contact pareto-support@pareto.org.
Users: Use the PARETO platform to develop models, but never contribute to development of the framework (i.e. never commit changes to the project-pareto repo). This includes people who only work with protected data.
Core-dev: Work primarily on PARETO platform development and never handle protected data.
Hybrid: Handle protected data, but also commit changes to the project-pareto repo (even occasionally) - needs approval from PhD. Markus Drouven
Developer Role |
Section |
---|---|
Users |
|
Core-dev |
|
Hybrid |
Install Miniconda (optional)
Download: https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe
Install anaconda from the downloaded file in (1).
Open the Anaconda Prompt (Start -> “Anaconda Prompt”).
Warning
If you are using Python for other complex projects, you may want to consider using environments of some sort to avoid conflicting dependencies. There are several good options including conda environments if you use Anaconda.
Users
Non-git tracked option
Install PARETO with pip by one of the following methods
To get the latest release:
pip install project-paretoTo get a specific release, for example 1.6.3:
pip install project-pareto==1.6.3If you need unreleased cutting-edge development versions of PARETO, you can install PARETO directly from the GitHub repo either from the main PARETO repo or a developer’s fork and branch (this installs from GitHub but does not create a local git clone/workspace):
pip install git+https://github.com/project-pareto/project-pareto.git pip install git+https://github.com/ksbeattie/project-pareto@feature_1
Core-dev
Fork the repo on GitHub (your copy of the main repo)
Clone your fork locally, creating a workspace (github id is “myusername,”):
git clone https://github.com/myusername/project-pareto git clone git@github.com:myusername/project-pareto.
In this new project-pareto directory, run the following command which installs PARETO in editable mode so that developers can make changes and push to their fork/branch:
pip install -e
Hybrid
User that can edit the base code
Create environment:
conda create -n pareto-env python=3.8pip --yes conda activate pareto-env
Download zip files (project-pareto-main)
Unpack zip files (select directory)
Install pareto-project (non-git tracked repo):
pip install -r requirements-dev.txt
Building Documentation
A convenient way of building documentation is to use Sphinx, which is able to translate a set of plain text source files into various output formats, such as a series HTML or PDF (via Latex) files. In addition to following the Sphinx Quickstart and Installation Guide, the following libraries are needed in order to use Sphinx (these packages have been included in the requirements-dev.txt file).:
pip install -U sphinx
pip install myst-parser
pip install sphinx_rtd_theme
pip install nbsphinx
To build the project documentation locally in your system, users must go to the docs folder and run the make file:
$ cd project-pareto/docs/
$ make html
Visit the Sphinx Style Guide for information on syntax rules, tips, and FAQ.
Model Library
Optimization Framework
The Produced Water Application for Beneficial Reuse, Environmental Impact and Treatment Optimization (PARETO) is specifically designed for produced water management and beneficial reuse. The major deliverable of this project will be an open-source, optimization-based, downloadable and executable produced water decision-support application, PARETO, that can be run by upstream operators, midstream companies, technology providers, water end users, research organizations and regulators.
PARETO is designed as an executable optimization-based decision-support application. In return for specifying select input data, users will be provided with specific, actionable recommendations as program outputs. The table below summarizes representative inputs and outputs.

Figure 1. Problem Description
Program Inputs
- Produced water forecast
Quantity
Quality
- Transportation resources
Water hauling trucks
Produced water pipelines
- Reuse opportunities
Demand forecasts
Quality constraints
- Cost assumptions
cost of freshwater
treatment, production, and storage cost

Figure 2. Input Data
Program Outputs
- Infrastructure buildout
Storage/treatment facilities
Pipeline network
- Source-to-sink matches
Volumetric flows
Blending/treatment options
- Planning and scheduling
Water delivery coordination
Operational and strategic
- Economic performance
Operational costs
Capital expenditures

Figure 3. Output Data
It should be noted that PARETO users will be able to choose from a range of objectives for their optimization runs; these can range from minimizing costs to maximing the ruese of produced water (or combinations thereof).
Water Management Model Library
Operational Water Management
Overview
Given a fixed network of pads (completion and/or production), storage tanks, water forecasts (both consumption and production), and distribution options (trucks and/or pipelines), the operational water management model provides insight into the operational costs associated with water management. The operational model allows the user to explore the tradeoff between minimizing costs (distribution, storage, treatment, disposal, etc.) and maximizing reuse water.
Sections |
---|
Operational Model Mathematical Notation
Sets
\(\textcolor{blue}{t ∈ T}\) Time periods (i.e. days)
\(\textcolor{blue}{p ∈ P}\) Well pads
\(\textcolor{blue}{p ∈ PP}\) Production pads (subset of well pads P)
\(\textcolor{blue}{p ∈ CP}\) Completions pads (subset of well pads P)
\(\textcolor{blue}{f ∈ F}\) Freshwater sources
\(\textcolor{blue}{k ∈ K}\) Disposal sites
\(\textcolor{blue}{s ∈ S}\) Storage sites
\(\textcolor{blue}{r ∈ R}\) Treatment sites
\(\textcolor{blue}{o ∈ O}\) Beneficial Reuse options
\(\textcolor{blue}{n ∈ N}\) Network nodes
\(\textcolor{blue}{l ∈ L}\) Locations (superset of well pads, disposal sites, nodes, …)
\(\textcolor{blue}{a ∈ A}\) Production tanks
\(\textcolor{blue}{(p,p) ∈ PCA}\) Production-to-completions pipeline arcs
\(\textcolor{blue}{(p,n) ∈ PNA}\) Production-to-node pipeline arcs
\(\textcolor{blue}{(p,p) ∈ PPA}\) Production-to-production pipeline arcs
\(\textcolor{blue}{(p,n) ∈ CNA}\) Completions-to-node pipeline arcs
\(\textcolor{blue}{(p,p) ∈ CCA}\) Completions-to-completions pipeline arcs
\(\textcolor{blue}{(n,n) ∈ NNA}\) Node-to-node pipeline arcs
\(\textcolor{blue}{(n,p) ∈ NCA}\) Node-to-completions pipeline arcs
\(\textcolor{blue}{(n,k) ∈ NKA}\) Node-to-disposal pipeline arcs
\(\textcolor{blue}{(n,s) ∈ NSA}\) Node-to-storage pipeline arcs
\(\textcolor{blue}{(n,r) ∈ NRA}\) Node-to-treatment pipeline arcs
\(\textcolor{blue}{(n,o) ∈ NOA}\) Node-to-beneficial reuse pipeline arcs
\(\textcolor{blue}{(f,p) ∈ FCA}\) Freshwater-to-completions pipeline arcs
\(\textcolor{blue}{(r,n) ∈ RNA}\) Treatment-to-node pipeline arcs
\(\textcolor{blue}{(r,p) ∈ RCA}\) Treatment-to-completions pipeline arcs
\(\textcolor{blue}{(r,k) ∈ RKA}\) Treatment-to-disposal pipeline arcs
\(\textcolor{blue}{(s,n) ∈ SNA}\) Storage-to-node pipeline arcs
\(\textcolor{blue}{(s,p) ∈ SCA}\) Storage-to-completions pipeline arcs
\(\textcolor{blue}{(s,k) ∈ SKA}\) Storage-to-disposal pipeline arcs
\(\textcolor{blue}{(s,r) ∈ SRA}\) Storage-to-treatment pipeline arcs
\(\textcolor{blue}{(s,o) ∈ SOA}\) Storage-to-beneficial reuse pipeline arcs
\(\textcolor{blue}{(p,p) ∈ PCT}\) Production-to-completions trucking arcs
\(\textcolor{blue}{(f,c) ∈ FCT}\) Freshwater-to-completions trucking arcs
\(\textcolor{blue}{(p,k) ∈ PKT}\) Production-to-disposal trucking arcs
\(\textcolor{blue}{(p,s) ∈ PST}\) Production-to-storage trucking arcs
\(\textcolor{blue}{(p,r) ∈ PRT}\) Production-to-treatment trucking arcs
\(\textcolor{blue}{(p,o) ∈ POT}\) Production-to-beneficial reuse trucking arcs
\(\textcolor{blue}{(p,k) ∈ CKT}\) Completions-to-disposal trucking arcs
\(\textcolor{blue}{(p,s) ∈ CST}\) Completions-to-storage trucking arcs
\(\textcolor{blue}{(p,r) ∈ CRT}\) Completions-to-treatment trucking arcs
\(\textcolor{blue}{(p,p) ∈ CCT}\) Completions-to-completions trucking arcs (flowback reuse)
\(\textcolor{blue}{(s,p) ∈ SCT}\) Storage-to-completions trucking arcs
\(\textcolor{blue}{(s,k) ∈ SKT}\) Storage-to-disposal trucking arcs
\(\textcolor{blue}{(r,k) ∈ RKT}\) Treatment-to-disposal trucking arcs
\(\textcolor{blue}{(p,a) ∈ PAL}\) Pad-to-tank links
Continuous Variables
\(\textcolor{red}{F_{l,l,t}^{Piped}}\) = Produced water piped from one location to another location
\(\textcolor{red}{F_{l,l,t}^{Trucked}}\) = Produced water trucked from one location to another location
\(\textcolor{red}{F_{f,p,t}^{Sourced}}\) = Fresh water sourced from source to completions
\(\textcolor{red}{F_{p,t}^{PadStorageIn}}\) = Water put into completions pad storage
\(\textcolor{red}{F_{p,t}^{PadStorageOut}}\) = Water removed from completions pad storage
\(\textcolor{red}{F_{r,t}^{TreatmentDestination}}\) = Water delivered to treatment site
\(\textcolor{red}{F_{r,t}^{UnusedTreatedWater}}\) = Water leftover from the treatment process
\(\textcolor{red}{F_{k,t}^{DisposalDestination}}\) = Water injected at disposal site
\(\textcolor{red}{F_{o,t}^{BeneficialReuseDestination}}\) = Water delivered to beneficial reuse site
If the production tanks are separate, water level and water drainage are tracked at each individual production tank:
\(\textcolor{red}{F_{p,a,t}^{DrainF}}\) = Produced water drained from production tank
\(\textcolor{red}{L_{p,a,t}^{ProdTankL}}\) = Water level in production tank at the end of time period t
Otherwise, if the production tanks are equalized, the water level and water drainage can be aggregated to a pad level:
\(\textcolor{red}{F_{p,t}^{DrainF}}\) = Produced water drained from equalized production tanks
\(\textcolor{red}{L_{p,t}^{ProdTank}}\) = Water level in equalized production tanks at the end of time period t
\(\textcolor{red}{B_{p,t}^{ProductionB}}\) = Produced water for transport from pad
\(\textcolor{red}{L_{s,t}^{Storage}}\) = Water level in storage site at the end of time period t
\(\textcolor{red}{L_{p,t}^{PadStorage}}\) = Water level in completions pad storage at the end of time period t
\(\textcolor{red}{C_{l,l,t}^{Piped}}\) = Cost of piping produced water from one location to another location
\(\textcolor{red}{C_{l,l,t}^{Trucked}}\) = Cost of trucking produced water from one location to another location
\(\textcolor{red}{C_{f,p,t}^{Sourced}}\) = Cost of sourcing fresh water from source to completions pad
\(\textcolor{red}{C_{k,t}^{Disposal}}\) = Cost of injecting produced water at disposal site
\(\textcolor{red}{C_{r,t}^{Treatment}}\) = Cost of treating produced water at treatment site
\(\textcolor{red}{C_{p,t}^{CompletionsReuse}}\) = Cost of reusing produced water at completions site
\(\textcolor{red}{C_{s,t}^{Storage}}\) = Cost of storing produced water at storage site (incl. treatment)
\(\textcolor{red}{R_{s,t}^{Storage}}\) = Credit for retrieving stored produced water from storage site
\(\textcolor{red}{C^{TotalSourced}}\) = Total cost of sourcing freshwater
\(\textcolor{red}{C^{TotalDisposal}}\) = Total cost of injecting produced water
\(\textcolor{red}{C^{TotalTreatment}}\) = Total cost of treating produced water
\(\textcolor{red}{C^{TotalCompletionsReuse}}\) = Total cost of reusing produced water
\(\textcolor{red}{C^{TotalPiping}}\) = Total cost of piping produced water
\(\textcolor{red}{C^{TotalStorage}}\) = Total cost of storing produced water
\(\textcolor{red}{C^{TotalPadStorage}}\) = Total cost of storing produced water at completions pad
\(\textcolor{red}{C^{TotalTrucking}}\) = Total cost of trucking produced water
\(\textcolor{red}{C^{Slack}}\) = Total cost of slack variables
\(\textcolor{red}{R^{TotalStorage}}\) = Total credit for withdrawing produced water
\(\textcolor{red}{S_{p,t}^{FracDemand}}\) = Slack variable to meet the completions water demand
\(\textcolor{red}{S_{p,t}^{Production}}\) = Slack variable to process produced water production
\(\textcolor{red}{S_{p,t}^{Flowback}}\) = Slack variable to process flowback water production
\(\textcolor{red}{S_{l,l}^{Pipeline Capacity}}\) = Slack variable to provide necessary pipeline capacity
\(\textcolor{red}{S_{s}^{StorageCapacity}}\) = Slack variable to provide necessary storage capacity
\(\textcolor{red}{S_{k}^{DisposalCapacity}}\) = Slack variable to provide necessary disposal capacity
\(\textcolor{red}{S_{r}^{TreatmentCapacity}}\) = Slack variable to provide necessary treatment capacity
\(\textcolor{red}{S_{o}^{BeneficialReuseCapacity}}\) = Slack variable to provide necessary beneficial reuse capacity
Binary Variables
\(\textcolor{red}{y_{l,l,t}^{Flow}}\) = Directional flow between two locations
\(\textcolor{red}{z_{p,t}^{PadStorage}}\) = Completions pad storage use
Parameters
\(\textcolor{green}{y_{p,t}^{Completions}}\) = Completions demand at a completions site in a time period
If the production tanks are separate, water level and water drainage are tracked at each individual production tank:
\(\textcolor{green}{β_{p,a,t}^{Production}}\) = Produced water supply forecast for a production pad
\(\textcolor{green}{σ_{p,a}^{ProdTank}}\) = Production tank capacity
\(\textcolor{green}{λ_{p,a}^{ProdTank}}\) = Initial water level in production tank
Otherwise, if the production tanks are equalized, the water level and water drainage can be aggregated to a pad level:
\(\textcolor{green}{β_{p,t}^{Production}}\) = Produced water supply forecast for a production pad
\(\textcolor{green}{σ_{p}^{ProdTank}}\) = Combined capacity of equalized production tanks
\(\textcolor{green}{λ_{p}^{ProdTank}}\) = Initial water level in equalized production tanks
\(\textcolor{green}{β_{p,t}^{Flowback}}\) = Flowback supply forecast for a completions pad
\(\textcolor{green}{σ_{l,l}^{Pipeline}}\) = Daily pipeline capacity between two locations
\(\textcolor{green}{σ_{k}^{Disposal}}\) = Daily disposal capacity at a disposal site
\(\textcolor{green}{σ_{s}^{Storage}}\) = Storage capacity at a storage site
\(\textcolor{green}{σ_{p,t}^{PadStorage}}\) = Storage capacity at completions site
\(\textcolor{green}{σ_{r}^{Treatment}}\) = Daily treatment capacity at a treatment site
\(\textcolor{green}{σ_{o}^{BeneficialReuse}}\) = Daily reuse capacity at a beneficial reuse site
\(\textcolor{green}{σ_{f,t}^{Freshwater}}\) = Daily freshwater sourcing capacity at freshwater source
\(\textcolor{green}{σ_{p}^{Offloading,Pad}}\) = Daily truck offloading sourcing capacity per pad
\(\textcolor{green}{σ_{s}^{Offloading,Storage}}\) = Daily truck offloading sourcing capacity per storage site
\(\textcolor{green}{σ_{p}^{Processing,Pad}}\) = Daily processing (e.g. clarification) capacity per pad
\(\textcolor{green}{σ_{s}^{Processing,Storage}}\) = Daily processing (e.g. clarification) capacity at storage site
\(\textcolor{green}{ϵ_{r,w}^{Treatment}}\) = Treatment efficiency for water quality component at treatment site
\(\textcolor{green}{δ^{Truck}}\) = Truck Capacity
\(\textcolor{green}{τ_{p,p}^{Trucking}}\) = Drive time between two pads
\(\textcolor{green}{τ_{p,k}^{Trucking}}\) = Drive time from a pad to a disposal site
\(\textcolor{green}{τ_{p,s}^{Trucking}}\) = Drive time from a pad to a storage site
\(\textcolor{green}{τ_{p,r}^{Trucking}}\) = Drive time from a pad to a treatment site
\(\textcolor{green}{τ_{p,o}^{Trucking}}\) = Drive time from a pad to a beneficial reuse site
\(\textcolor{green}{τ_{s,p}^{Trucking}}\) = Drive time from a storage site to a completions site
\(\textcolor{green}{τ_{s,k}^{Trucking}}\) = Drive time from a storage site to a disposal site
\(\textcolor{green}{τ_{r,k}^{Trucking}}\) = Drive time from a treatment site to a disposal site
\(\textcolor{green}{λ_{s}^{Storage}}\) = Initial storage level at storage site
\(\textcolor{green}{λ_{p}^{PadStorage}}\) = Initial storage level at completions site
\(\textcolor{green}{θ_{p}^{PadStorage}}\) = Terminal storage level at completions site
\(\textcolor{green}{λ_{l,l}^{Pipeline}}\) = Pipeline segment length
\(\textcolor{green}{π_{k}^{Disposal}}\) = Disposal operational cost
\(\textcolor{green}{π_{r}^{Treatment}}\) = Treatment operational cost (may include “clean brine”)
\(\textcolor{green}{π_{p}^{CompletionReuse}}\) = Completions reuse operational cost
\(\textcolor{green}{π_{s}^{Storage}}\) = Storage deposit operational cost
\(\textcolor{green}{π_{p,t}^{PadStorage}}\) = Completions pad operational cost
\(\textcolor{green}{ρ_{s}^{Storage}}\) = Storage withdrawal operational cgreenit
\(\textcolor{green}{π_{l,l}^{Pipeline}}\) = Pipeline operational cost
\(\textcolor{green}{π_{l}^{Trucking}}\) = Trucking hourly cost (by source)
\(\textcolor{green}{π_{f}^{Sourcing}}\) = Fresh sourcing cost (does not include transportation cost)
\(\textcolor{green}{M^{Flow}}\) = Big-M flow parameter
\(\textcolor{green}{ψ^{FracDemand}}\) = Slack cost parameter
\(\textcolor{green}{ψ^{Production}}\) = Slack cost parameter
\(\textcolor{green}{ψ^{Flowback}}\) = Slack cost parameter
\(\textcolor{green}{ψ^{PipelineCapacity}}\) = Slack cost parameter
\(\textcolor{green}{ψ^{StorageCapacity}}\) = Slack cost parameter
\(\textcolor{green}{ψ^{DisposalCapacity}}\) = Slack cost parameter
\(\textcolor{green}{ψ^{TreamentCapacity}}\) = Slack cost parameter
\(\textcolor{green}{ψ^{BeneficialReuseCapacity}}\) = Slack cost parameter
Operational Model Mathematical Program Formulation
The default objective function for this produced water operational model is to minimize costs, which includes operational costs associated with procurement of fresh water, the cost of disposal, trucking and piping produced water between well pads and treatment facilities, and the cost of storing, treating and reusing produced water. A credit for using treated water is also considered, and additional slack variables are included to facilitate the identification of potential issues with input data.
Objective
Completions Pad Demand Balance: ∀p ∈ CP, t ∈ T
Completions Pad Storage Balance: ∀p ∈ CP, t ∈ T
This constraint sets the storage level at the completions pad. For each completions pad and for each time period, completions pad storage is equal to storage in last time period plus water put in minus water removed. If it is the first time period, the pad storage is the initial pad storage.
Completions Pad Storage Capacity: ∀p ∈ CP, t ∈ T
The storage at each completions pad must always be at or below its capacity in every time period.
Terminal Completions Pad Storage Level: ∀p ∈ CP, t ∈ T
The storage in the last period must be at or below its terminal storage level.
Freshwater Sourcing Capacity: ∀f ∈ F, t ∈ T
For each freshwater source and each time period, the outgoing water from the freshwater source is below the freshwater capacity.
Completions Pad Truck Offloading Capacity: ∀p ∈ CP, t ∈ T
For each completions pad and time period, the volume of water being trucked into the completions pad must be below the trucking offloading capacity.
Completions Pad Processing Capacity:
For each completions pad and time period, the volume of water (excluding freshwater) coming in must be below the processing limit.
Note
This constraint has not actually been implemented yet.
Storage Site Truck Offloading Capacity: ∀p ∈ S, t ∈ T
For each storage site and each time period, the volume of water being trucked into the storage site must be below the trucking offloading capacity for that storage site.
Storage Site Processing Capacity: ∀s ∈ S, t ∈ T
For each storage site and each time period, the volume of water being trucked into the storage site must be less than the processing capacity for that storage site.
Production Tank Balance:
If there are individual production tanks, the water level must be tracked at each tank. The water level at a given tank at the end of each period is equal to the water level at the previous period plus the flowback supply forecast at the pad minus the water that is drained. If it is the first period, it is equal to the initial water level.
For individual production tanks: ∀(p,a) ∈ PAL, t ∈ T
For equalized production tanks: ∀p ∈ P, t ∈ T
Production Tank Capacity:
The water level at the production tanks must always be below the production tank capacity.
For individual production tanks: ∀(p,a) ∈ PAL, t ∈ T
For equalized production tanks: ∀p ∈ P, t ∈ T
Terminal Production Tank Level Balance:
The water level at the production tanks in the final time period must be below the terminal production tank water level parameter.
For individual production tanks: ∀(p,a) ∈ PAL, t ∈ T
For equalized production tanks: ∀p ∈ P,t ∈ T
Tank-to-Pad Production Balance:
If there are individual production tanks, the water drained across all tanks at the completions pad must be equal to the produced water for transport at the pad.
For individual production tanks: ∀p ∈ P, t ∈ T
Otherwise, if the production tanks are equalized, the production water drained is measured on an aggregated production pad level.
For equalized production tanks: ∀p ∈ P, t ∈ T
Note
The constraint proposed above is not necessary but included to facilitate switching between (1) an equalized production tank version and (2) a non-equalized production tank version.
Production Pad Supply Balance: ∀p ∈ PP, t ∈ T
All produced water must be accounted for. For each production pad and for each time period, the volume of outgoing water must be equal to the produced water transported out of the production pad.
Completions Pad Supply Balance (i.e. Flowback Balance): ∀p ∈ CP, t ∈ T
All flowback water must be accounted for. For each completions pad and for each time period, the volume of outgoing water must be equal to the forecasted flowback produced water for the completions pad.
Network Node Balance: ∀n ∈ N, t ∈ T
Flow balance constraint (i.e., inputs are equal to outputs). For each pipeline node and for each time period, the volume water into the node is equal to the volume of water out of the node.
Bi-Directional Flow: ∀(l,l) ∈ {PCA,PNA,PPA,CNA,NNA,NCA,NKA,NSA,NRA,…,SOA}, t ∈ T
There can only be flow in one direction for a given pipeline arc in a given time period.
Flow is only allowed in a given direction if the binary indicator for that direction is “on”.
Note
Technically this constraint should only be enforced for truly reversible arcs (e.g. NCA and CNA); and even then it only needs to be defined per one reversible arc (e.g. NCA only and not NCA and CNA).
Storage Site Balance: ∀s ∈ S, t ∈ T
For each storage site and for each time period, if it is the first time period, the storage level is the initial storage. Otherwise, the storage level is equal to the storage level in the previous time period plus water inputs minus water outputs.
Pipeline Capacity:
∀(l,l) ∈ {PCA,PNA,PPA,CNA,NNA,NCA,NKA,NSA,NRA,…,SOA}, [t ∈ T]
∀(l,l) ∈ {PCA,PNA,PPA,CNA,NNA,NCA,NKA,NSA,NRA,…,SOA}, t ∈ T
Storage Capacity:
The total stored water in a given time period must be less than the capacity. If the storage capacity limits the feasibility, the slack variable will be nonzero, and the storage capacity will be increased to allow a feasible solution.
∀s ∈ S,[t ∈ T]
∀s ∈ S, t ∈ T
Disposal Capacity:
The total disposed water in a given time period must be less than the capacity. If the disposal capacity limits the feasibility, the slack variable will be nonzero, and the disposal capacity will be increased to allow a feasible solution.
∀k ∈ K, [t ∈ T]
∀k ∈ K, t ∈ T
∀k ∈ K, t ∈ T
Treatment Capacity:
The total treated water in a given time period must be less than the capacity. If the treatment capacity limits the feasibility, the slack variable will be nonzero, and the treatment capacity will be increased to allow a feasible solution.
∀r ∈ R, t ∈ T
∀r ∈ R, t ∈ T
Beneficial Reuse Capacity:
The total water for beneficial reuse in a given time period must be less than the capacity. If the beneficial reuse capacity limits the feasibility, the slack variable will be nonzero, and the beneficial reuse capacity will be increased to allow a feasible solution.
∀o ∈ O, t ∈ T
∀o ∈ O, t ∈ T
Fresh Sourcing Cost: ∀f ∈ F, p ∈ CP, t ∈ T
For each freshwater source, for each completions pad, and for each time period, the freshwater sourcing cost is equal to all output from the freshwater source times the freshwater sourcing cost.
Disposal Cost: ∀k ∈ K, t ∈ T
For each disposal site, for each time period, the disposal cost is equal to all water moved into the disposal site multiplied by the operational disposal cost. Total disposal cost is the sum of disposal costs over all time periods and all disposal sites.
Treatment Cost: ∀r ∈ R, t ∈ T
For each treatment site, for each time period, the treatment cost is equal to all water moved to the treatment site multiplied by the operational treatment cost. The total treatments cost is the sum of treatment costs over all time periods and all treatment sites.
Treatment Balance: ∀r ∈ R, t ∈ T
Water input into treatment facility is treated with a level of efficiency, meaning only a given percentage of the water input is outputted to be reused at the completions pads.
where \(\textcolor{green}{ϵ^{Treatment}}\) <1
Completions Reuse Cost: ∀p ∈ P, t ∈ T
Completions reuse water is all water that meets completions pad demand, excluding freshwater. Completions reuse cost is the volume of completions reused water multiplied by the cost for reuse.
Note
Freshwater sourcing is excluded from completions reuse costs.
Piping Cost: ∀(l,l) ∈ {PPA,…,CCA}, t ∈ T
Piping cost is the total volume of piped water multiplied by the cost for piping.
Note
The constraints above explicitly consider freshwater piping via FCA arcs.
Storage Deposit Cost: ∀s ∈ S, t ∈ T
Cost of depositing into storage is equal to the total volume of water moved into storage multiplied by the storage operation cost rate.
Storage Withdrawal Credit: ∀s ∈ S, t ∈ T
Credits from withdrawing from storage is equal to the total volume of water moved out from storage multiplied by the storage operation credit rate.
Pad Storage Cost: ∀l ∈ L, l ̃ ∈ L, t ∈ T
Trucking Cost (Simplified)
Trucking cost between two locations for time period is equal to the trucking volume between locations in time t divided by the truck capacity [this gets # of truckloads] multiplied by the lead time between two locations and hourly trucking cost.
Note
The constraints above explicitly consider freshwater trucking via FCT arcs.
Slack Costs:
Weighted sum of the slack variables. In the case that the model is infeasible, these slack variables are used to determine where the infeasibility occurs (e.g. pipeline capacity is not sufficient).
Operational Model Water Quality Extension
An extension to this operational optimization model measures the water quality across all locations over time. As of now, water quality is not a decision variable. It is calculated after optimization of the operational model. The process for calculating water quality is as follows: the operational model is first solved to optimality, water quality variables and constraints are added, flow rates and storage levels are fixed to the solved values at optimality, and the water quality is calculated.
Note
Fixed variables are denoted in purple in the documentation.
Assumptions:
Water quality at a production pad or completions pad remains the same across all time periods
When blending flows of different water quality, they blend linearly
Treatment does not affect water quality
Water Quality Sets
\(\textcolor{blue}{w ∈ W}\) Water Quality Components (e.g., TDS)
Water Quality Parameters
\(\textcolor{green}{v_{l,w,[t]}}\) = Water quality at well pad
\(\textcolor{green}{ξ_{l,w}}\) = Initial water quality at storage
Water Quality Variables
\(\textcolor{red}{Q_{l,w,t}}\) = Water quality at location
Disposal Site Water Quality ∀k ∈ K, w ∈ W, t ∈ T
The water quality of disposed water is dependent on the flow rates into the disposal site and the quality of each of these flows.
Storage Site Water Quality ∀s ∈ S, w ∈ W, t ∈ T
The water quality at storage sites is dependent on the flow rates into the storage site, the volume of water in storage in the previous time period, and the quality of each of these flows. Even mixing is assumed, so all outgoing flows have the same water quality. If it is the first time period, the initial storage level and initial water quality replaces the water stored and water quality in the previous time period respectively.
Treatment Site Water Quality ∀r ∈ R, w ∈ W, t ∈ T
The water quality at treatment sites is dependent on the flow rates into the treatment site, the efficiency of treatment, and the water quality of the flows. Even mixing is assumed, so all outgoing flows have the same water quality. The treatment process does not affect water quality
where \(\textcolor{green}{ϵ_{r,w}^{Treatment}}\) <1
Network Node Water Quality ∀n ∈ N, w ∈ W, t ∈ T
The water quality at nodes is dependent on the flow rates into the node and the water quality of the flows. Even mixing is assumed, so all outgoing flows have the same water quality.
Beneficial Reuse Water Quality ∀o ∈ O, w ∈ W, t ∈ T
The water quality at beneficial reuse sites is dependent on the flow rates into the site and the water quality of the flows.
Operational Model Terminology
Beneficial Reuse Options: This term refers to the reuse of water at mining facilities, farms, etc.
Completions Demand: Demand set by completions pads. This demand can be met by produced water, treated water, or freshwater.
Completions Reuse Water: Water that meets demand at a completions site. This does not include freshwater or water for beneficial reuse.
Network Nodes: These are branch points for pipelines only.
Note
Well pads are not a subset of network nodes.
[t]: This notation indicates that timing of capacity expansion has not yet been implemented.
Terminal Storage Level: These are goal storage levels for the final time period. Without this, the storage levels would likely be depleted in the last time period.
Strategic Water Management
Overview
Given a set of existing network components (completion pads, storage pads, production pads, and distribution options like trucks and/or pipelines) and capacity expansion options, the strategic water management model provides an insight into financial opportunities and mid-long term investment decisions to reduce operational costs or maximize reuse or reduce fresh water consumption.
Section |
---|
Strategic Model Mathematical Notation
Sets
\(\textcolor{blue}{t ∈ T}\) Time periods (i.e. days)
\(\textcolor{blue}{p ∈ P}\) Well pads
\(\textcolor{blue}{p ∈ PP}\) Production pads (subset of well pads P)
\(\textcolor{blue}{p ∈ CP}\) Completions pads (subset of well pads P)
\(\textcolor{blue}{f ∈ F}\) Freshwater sources
\(\textcolor{blue}{k ∈ K}\) Disposal sites
\(\textcolor{blue}{s ∈ S}\) Storage sites
\(\textcolor{blue}{r ∈ R}\) Treatment sites
\(\textcolor{blue}{o ∈ O}\) Beneficial Reuse options
\(\textcolor{blue}{n ∈ N}\) Network nodes
\(\textcolor{blue}{l ∈ L}\) Locations (superset of well pads, disposal sites, nodes, …)
\(\textcolor{blue}{d ∈ D}\) Pipeline Diameters
\(\textcolor{blue}{c ∈ C}\) Storage capacities
\(\textcolor{blue}{j ∈ J}\) Treatment capacities
\(\textcolor{blue}{i ∈ I}\) Injection (i.e. disposal) capacities
\(\textcolor{blue}{(p,p) ∈ PCA}\) Production-to-completions pipeline arcs
\(\textcolor{blue}{(p,n) ∈ PNA}\) Production-to-node pipeline arcs
\(\textcolor{blue}{(p,p) ∈ PPA}\) Production-to-production pipeline arcs
\(\textcolor{blue}{(p,n) ∈ CNA}\) Completions-to-node pipeline arcs
\(\textcolor{blue}{(p,p) ∈ CCA}\) Completions-to-completions pipeline arcs
\(\textcolor{blue}{(n,n) ∈ NNA}\) Node-to-node pipeline arcs
\(\textcolor{blue}{(n,p) ∈ NCA}\) Node-to-completions pipeline arcs
\(\textcolor{blue}{(n,k) ∈ NKA}\) Node-to-disposal pipeline arcs
\(\textcolor{blue}{(n,s) ∈ NSA}\) Node-to-storage pipeline arcs
\(\textcolor{blue}{(n,r) ∈ NRA}\) Node-to-treatment pipeline arcs
\(\textcolor{blue}{(n,o) ∈ NOA}\) Node-to-beneficial reuse pipeline arcs
\(\textcolor{blue}{(f,p) ∈ FCA}\) Freshwater-to-completions pipeline arcs
\(\textcolor{blue}{(r,n) ∈ RNA}\) Treatment-to-node pipeline arcs
\(\textcolor{blue}{(r,p) ∈ RCA}\) Treatment-to-completions pipeline arcs
\(\textcolor{blue}{(r,k) ∈ RKA}\) Treatment-to-disposal pipeline arcs
\(\textcolor{blue}{(r,s) ∈ RSA}\) Treatment-to-storage pipeline arcs
\(\textcolor{blue}{(s,n) ∈ SNA}\) Storage-to-node pipeline arcs
\(\textcolor{blue}{(s,p) ∈ SCA}\) Storage-to-completions pipeline arcs
\(\textcolor{blue}{(s,k) ∈ SKA}\) Storage-to-disposal pipeline arcs
\(\textcolor{blue}{(s,r) ∈ SRA}\) Storage-to-treatment pipeline arcs
\(\textcolor{blue}{(s,o) ∈ SOA}\) Storage-to-beneficial reuse pipeline arcs
\(\textcolor{blue}{(p,p) ∈ PCT}\) Production-to-completions trucking arcs
\(\textcolor{blue}{(f,c) ∈ FCT}\) Freshwater-to-completions trucking arcs
\(\textcolor{blue}{(p,k) ∈ PKT}\) Production-to-disposal trucking arcs
\(\textcolor{blue}{(p,s) ∈ PST}\) Production-to-storage trucking arcs
\(\textcolor{blue}{(p,r) ∈ PRT}\) Production-to-treatment trucking arcs
\(\textcolor{blue}{(p,o) ∈ POT}\) Production-to-beneficial reuse trucking arcs
\(\textcolor{blue}{(p,k) ∈ CKT}\) Completions-to-disposal trucking arcs
\(\textcolor{blue}{(p,s) ∈ CST}\) Completions-to-storage trucking arcs
\(\textcolor{blue}{(p,r) ∈ CRT}\) Completions-to-treatment trucking arcs
\(\textcolor{blue}{(p,p) ∈ CCT}\) Completions-to-completions trucking arcs (flowback reuse)
\(\textcolor{blue}{(s,p) ∈ SCT}\) Storage-to-completions trucking arcs
\(\textcolor{blue}{(s,k) ∈ SKT}\) Storage-to-disposal trucking arcs
\(\textcolor{blue}{(r,k) ∈ RKT}\) Treatment-to-disposal trucking arcs
Continuous Variables
\(\textcolor{red}{F_{l,l,t}^{Piped}}\) = Produced water piped from one location to another location
\(\textcolor{red}{F_{1,1,t}^{Trucked}}\) = Produced water trucked from one location to another location
\(\textcolor{red}{F_{f,p,t}^{Sourced}}\) = Fresh water sourced from source to completions
\(\textcolor{red}{F_{p,t}^{PadStorageIn}}\) = Water put into completions pad storage
\(\textcolor{red}{F_{p,t}^{PadStorageOut}}\) = Water removed from completions pad storage
\(\textcolor{red}{F_{r,t}^{TreatmentDestination}}\) = Water delivered to treatment site
\(\textcolor{red}{F_{r,t}^{UnusedTreatedWater}}\) = Treated water that is not used
\(\textcolor{red}{F_{k,t}^{DisposalDestination}}\) = Water injected at disposal site
\(\textcolor{red}{F_{p,t}^{CompletionsReuseDestination}}\) = Water delivered to completions pad for reuse
\(\textcolor{red}{F_{p,t}^{CompletionsDestination}}\) = All water delivered to completions pad
\(\textcolor{red}{F_{p,t}^{BeneficialReuseDestination}}\) = Water delivered to beneficial reuse site
\(\textcolor{red}{L_{s,t}^{Storage}}\) = Water level at storage site at the end of time period t
\(\textcolor{red}{L_{p,t}^{PadStorage}}\) = Water level in completions pad storage at the end of time period t
\(\textcolor{red}{F^{TotalTrucked}}\) = Total volume of water trucked
\(\textcolor{red}{F^{TotalSourced}}\) = Total volume of freshwater sourced
\(\textcolor{red}{F^{TotalDisposed}}\) = Total volume of produced water disposed
\(\textcolor{red}{F^{TotalCompletionsReuse}}\) = Total volume of produced water reused
\(\textcolor{red}{C_{l,l,t}^{Piped}}\) = Cost of piping produced water from one location to another location
\(\textcolor{red}{C_{l,l,t}^{Trucked}}\) = Cost of trucking produced water from one location to another location
\(\textcolor{red}{C_{f,p,t}^{Sourced}}\) = Cost of sourcing fresh water from source to completions pad
\(\textcolor{red}{C_{k,t}^{Disposal}}\) = Cost of injecting produced water at disposal site
\(\textcolor{red}{C_{r,t}^{Treatment}}\) = Cost of treating produced water at treatment site
\(\textcolor{red}{C_{p,t}^{CompletionsReuse}}\) = Cost of reusing produced water at completions site
\(\textcolor{red}{C_{s,t}^{Storage}}\) = Cost of storing produced water at storage site (incl. treatment)
\(\textcolor{red}{R_{s,t}^{Storage}}\) = Credit for retrieving stored produced water from storage site
\(\textcolor{red}{C^{TotalSourced}}\) = Total cost of sourcing freshwater
\(\textcolor{red}{C^{TotalDisposal}}\) = Total cost of injecting produced water
\(\textcolor{red}{C^{TotalTreatment}}\) = Total cost of treating produced water
\(\textcolor{red}{C^{TotalCompletionsReuse}}\) = Total cost of reusing produced water
\(\textcolor{red}{C^{TotalPiping}}\) = Total cost of piping produced water
\(\textcolor{red}{C^{TotalStorage}}\) = Total cost of storing produced water
\(\textcolor{red}{C^{TotalTrucking}}\) = Total cost of trucking produced water
\(\textcolor{red}{C^{Slack}}\) = Total cost of slack variables
\(\textcolor{red}{R^{TotalStorage}}\) = Total credit for withdrawing produced water
\(\textcolor{red}{D_{k,[t]}^{Capacity}}\) = Disposal capacity in a given time period at disposal site
\(\textcolor{red}{X_{s,[t]}^{Capacity}}\) = Storage capacity in a given time period at storage site
\(\textcolor{red}{T_{r,[t]}^{Capacity}}\) = Treatment capacity in a given time period at treatment site
\(\textcolor{red}{F_{l,l,[t]}^{Capacity}}\) = Flow capacity in a given time period between two locations
\(\textcolor{red}{C_{[t]}^{DisposalCapEx}}\) = Capital cost of constructing or expanding disposal capacity
\(\textcolor{red}{C_{[t]}^{PipelineCapEx}}\) = Capital cost of constructing or expanding piping capacity
\(\textcolor{red}{C_{[t]}^{StorageCapEx}}\) = Capital cost of constructing or expanding storage capacity
\(\textcolor{red}{C_{[t]}^{TreatmentCapEx}}\) = Capital cost of constructing or expanding treatment capacity
\(\textcolor{red}{S_{p,t}^{FracDemand}}\) = Slack variable to meet the completions water demand
\(\textcolor{red}{S_{p,t}^{Production}}\) = Slack variable to process produced water production
\(\textcolor{red}{S_{p,t}^{Flowback}}\) = Slack variable to process flowback water production
\(\textcolor{red}{S_{l,l}^{Pipeline Capacity}}\) = Slack variable to provide necessary pipeline capacity
\(\textcolor{red}{S_{s}^{StorageCapacity}}\) = Slack variable to provide necessary storage capacity
\(\textcolor{red}{S_{k}^{DisposalCapacity}}\) = Slack variable to provide necessary disposal capacity
\(\textcolor{red}{S_{r}^{TreamentCapacity}}\) = Slack variable to provide necessary treatment capacity
\(\textcolor{red}{S_{o}^{BeneficialResueCapacity}}\) = Slack variable to provide necessary beneficial reuse capacity
Binary Variables
\(\textcolor{red}{y_{l,l,d}^{Pipeline}}\) = New pipeline installed between one location and another location with specific diameter
\(\textcolor{red}{y_{s,c}^{Storage}}\) = New or additional storage facility installed at storage site with specific storage capacity
\(\textcolor{red}{y_{r,j}^{Treatment}}\) = New or additional treatment facility installed at treatment site with specific treatment capacity
\(\textcolor{red}{y_{k,i}^{Disposal}}\) = New or additional disposal facility installed at disposal site with specific injection capacity
\(\textcolor{red}{y_{l,l,t}^{Flow}}\) = Directional flow between two locations
\(\textcolor{red}{z_{l,l,d,t}^{Pipeline}}\) = Timing of pipeline installation between one location and another location with specific diameter
\(\textcolor{red}{z_{s,c,t}^{Storage}}\) = Timing of storage facility installation at storage site with specific storage capacity
\(\textcolor{red}{z_{k,i,t}^{Disposal}}\) = Timing of disposal facility installation at disposal site with specific injection capacity
Parameters
\(\textcolor{green}{y_{p,t}^{Completions}}\) = Completions demand at a completions site in a time period
\(\textcolor{green}{y^{TotalDemand}}\) = Total water demand over the planning horizon
\(\textcolor{green}{β_{p,t}^{Production}}\) = Produced water supply forecast for a production pad
\(\textcolor{green}{β_{p,t}^{Flowback}}\) = Flowback supply forecast for a completions pad
\(\textcolor{green}{β^{TotalProd}}\) = Total water production (production & flowback) over the planning horizon
\(\textcolor{green}{σ_{l,l}^{Pipeline}}\) = Initial weekly pipeline capacity between two locations
\(\textcolor{green}{σ_{k}^{Disposal}}\) = Initial weekly disposal capacity at a disposal site
\(\textcolor{green}{σ_{s}^{Storage}}\) = Initial storage capacity at a storage site
\(\textcolor{green}{σ_{p,t}^{PadStorage}}\) = Storage capacity at completions site
\(\textcolor{green}{σ_{r}^{Treatment}}\) = Initial weekly treatment capacity at a treatment site
\(\textcolor{green}{σ_{o}^{BeneficialReuse}}\) = Initial weekly reuse capacity at a reuse site
\(\textcolor{green}{σ_{f,t}^{Freshwater}}\) = Weekly freshwater sourcing capacity at freshwater source
\(\textcolor{green}{σ_{p}^{Offloading,Pad}}\) = Weekly truck offloading sourcing capacity per pad
\(\textcolor{green}{σ_{s}^{Offloading,Storage}}\) = Weekly truck offloading sourcing capacity per storage site
\(\textcolor{green}{σ_{p}^{Processing,Pad}}\) = Weekly processing (e.g. clarification) capacity per pad
\(\textcolor{green}{σ_{s}^{Processing,Storage}}\) = Weekly processing (e.g. clarification) capacity at storage site
\(\textcolor{green}{W_{r}^{TreatmentComponent}}\) = Water quality component treated for at treatment site
\(\textcolor{green}{ϵ_{r, w}^{Treatment}}\) = Treatment efficiency at treatment site
\(\textcolor{green}{α^{AnnualizationRate}}\) = Annualization Rate [%]
\(\textcolor{green}{μ_{d}^{Pipeline}}\) = Pipeline diameter installation or expansion increments [inch]
\(\textcolor{green}{δ_{d}^{Pipeline}}\) = Pipeline capacity installation or expansion increments [bbl/week]
\(\textcolor{green}{δ_{i}^{Disposal}}\) = Disposal capacity installation or expansion increments
\(\textcolor{green}{δ_{c}^{Storage}}\) = Storage capacity installation or expansion increments
\(\textcolor{green}{δ_{j}^{Treatment}}\) = Treatment capacity installation or expansion increments
\(\textcolor{green}{δ^{Truck}}\) = Truck capacity
\(\textcolor{green}{τ_{k}^{Disposal}}\) = Disposal construction or expansion lead time
\(\textcolor{green}{τ_{s}^{Storage}}\) = Storage construction or expansion lead time
\(\textcolor{green}{τ_{l,l}^{Pipeline}}\) = Pipeline construction or expansion lead time
\(\textcolor{green}{τ_{p,p}^{Trucking}}\) = Drive time between two pads
\(\textcolor{green}{τ_{p,k}^{Trucking}}\) = Drive time from a pad to a disposal site
\(\textcolor{green}{τ_{p,s}^{Trucking}}\) = Drive time from a pad to a storage site
\(\textcolor{green}{τ_{p,r}^{Trucking}}\) = Drive time from a pad to a treatment site
\(\textcolor{green}{τ_{p,o}^{Trucking}}\) = Drive time from a pad to a beneficial reuse site
\(\textcolor{green}{τ_{s,p}^{Trucking}}\) = Drive time from a storage site to a completions site
\(\textcolor{green}{τ_{s,k}^{Trucking}}\) = Drive time from a storage site to a disposal site
\(\textcolor{green}{τ_{r,k}^{Trucking}}\) = Drive time from a treatment site to a disposal site
\(\textcolor{green}{λ_{s}^{Storage}}\) = Initial storage level at storage site
\(\textcolor{green}{λ_{p}^{PadStorage}}\) = Initial storage level at completions site
\(\textcolor{green}{θ_{s}^{Storage}}\) = Terminal storage level at storage site
\(\textcolor{green}{θ_{p}^{PadStorage}}\) = Terminal storage level at completions site
\(\textcolor{green}{λ_{l,l}^{Pipeline}}\) = Pipeline segment length [miles]
\(\textcolor{green}{κ_{k,i}^{Disposal}}\) = Disposal construction or expansion capital cost for selected capacity increment
\(\textcolor{green}{κ_{s,c}^{Storage}}\) = Storage construction or expansion capital cost for selected capacity increment
\(\textcolor{green}{κ_{r,j}^{Treatment}}\) = Treatment construction or expansion capital cost for selected capacity increment
\(\textcolor{green}{κ^{Pipeline}}\) = Pipeline construction or expansion capital cost for selected diameter [$/inch-mile]
\(\textcolor{green}{π_{k}^{Disposal}}\) = Disposal operational cost
\(\textcolor{green}{π_{r}^{Treatment}}\) = Treatment operational cost (may include “clean brine”)
\(\textcolor{green}{π_{p}^{CompletionReuse}}\) = Completions reuse operational cost
\(\textcolor{green}{π_{s}^{Storage}}\) = Storage deposit operational cost
\(\textcolor{green}{ρ_{s}^{Storage}}\) = Storage withdrawal operational credit
\(\textcolor{green}{π_{l,l}^{Pipeline}}\) = Pipeline operational cost
\(\textcolor{green}{π_{l}^{Trucking}}\) = Trucking hourly cost (by source)
\(\textcolor{green}{π_{f}^{Sourcing}}\) = Fresh sourcing cost
\(\textcolor{green}{M^{Flow}}\) = Big-M flow parameter
\(\textcolor{green}{ψ^{FracDemand}}\) = Slack cost parameter
\(\textcolor{green}{ψ^{Production}}\) = Slack cost parameter
\(\textcolor{green}{ψ^{Flowback}}\) = Slack cost parameter
\(\textcolor{green}{ψ^{PipelineCapacity}}\) = Slack cost parameter
\(\textcolor{green}{ψ^{StorageCapacity}}\) = Slack cost parameter
\(\textcolor{green}{ψ^{DisposalCapacity}}\) = Slack cost parameter
\(\textcolor{green}{ψ^{TreamentCapacity}}\) = Slack cost parameter
\(\textcolor{green}{ψ^{BeneficialReuseCapacity}}\) = Slack cost parameter
Strategic Model Mathematical Program Formulation
Objectives
Two objective functions can be considered for the optimization of a produced water system: first, the minimization of costs, which includes operational costs associated with procurement of fresh water, the cost of disposal, trucking and piping produced water between well pads and treatment facilities, and the cost of storing, treating and reusing produced water. Capital costs are also considered due to infrastructure build out such as the installation of pipelines, treatment, and storage facilities. A credit for (re)using treated water is also considered, and additional slack variables are included to facilitate the identification of potential issues with input data. The second objective is the maximization of water reused which is defined as the ratio between the treated produced water that is used in completions operations and the total produced water coming to surface.
Annualization Rate Calculation:
The annualization rate is calculated using the formula described at this website: http://www.energycommunity.org/webhelppro/Expressions/AnnualizedCost.htm. The annualization rate takes the discount rate (rate) and the number of years the CAPEX investment is expected to be used (life) as input.
Completions Pad Demand Balance: ∀p ∈ CP, t ∈ T
Completions pad demand can be met by trucked or piped water moved into the pad in addition to water in completions pad storage. For each completions pad and for each time period, completions demand at the given pad is equal to the sum of all piped and trucked water moved into the completions pad plus water removed from the pad storage minus water put into the pad storage plus a slack.
Completions Pad Storage Balance: ∀p ∈ CP, t ∈ T
Sets the storage level at the completions pad. For each completions pad and for each time period, completions pad storage is equal to storage in last time period plus water put in minus water removed. If it is the first time period, the pad storage is the initial pad storage.
Completions Pad Storage Capacity: ∀p ∈ CP, t ∈ T
The storage at each completions pad must always be at or below its capacity in every time period.
Terminal Completions Pad Storage Level: ∀p ∈ CP, t ∈ T
The storage in the last period must be at or below its terminal storage level.
The storage in the last period must be at or below its terminal storage level.
Freshwater Sourcing Capacity: ∀f ∈ F, t ∈ T
For each freshwater source and each time period, the outgoing water from the freshwater source is below the freshwater capacity.
Completions Pad Truck Offloading Capacity: ∀p ∈ CP, t ∈ T
For each completions pad and time period, the volume of water being trucked into the completions pad must be below the trucking offloading capacity.
Completions Pad Processing Capacity:
For each completions pad and time period, the volume of water (excluding freshwater) coming in must be below the processing limit.
Note
This constraint has not actually been implemented yet.
Storage Site Truck Offloading Capacity: ∀s ∈ S, t ∈ T
For each storage site and each time period, the volume of water being trucked into the storage site must be below the trucking offloading capacity for that storage site.
Storage Site Processing Capacity: ∀s ∈ S, t ∈ T
For each storage site and each time period, the volume of water being trucked into the storage site must be less than the processing capacity for that storage site.
Production Pad Supply Balance: ∀p ∈ PP, t ∈ T
All produced water must be accounted for. For each production pad and for each time period, the volume of outgoing water must be equal to the forecasted produced water for the production pad.
Completions Pad Supply Balance (i.e. Flowback Balance): ∀p ∈ CP, t ∈ T
All flowback water must be accounted for. For each completions pad and for each time period, the volume of outgoing water must be equal to the forecasted flowback produced water for the completions pad.
Network Node Balance: ∀n ∈ N, t ∈ T
Flow balance constraint (i.e., inputs are equal to outputs). For each pipeline node and for each time period, the volume water into the node is equal to the volume of water out of the node.
Bi-Directional Flow: ∀(l,l) ∈ {PCA,PNA,PPA,CNA,NNA,NCA,NKA,NSA,NRA,…,SOA}, t ∈ T
There can only be flow in one direction for a given pipeline arc in a given time period. Flow is only allowed in a given direction if the binary indicator for that direction is “on”.
Note
Technically this constraint should only be enforced for truly reversible arcs (e.g. NCA and CNA); and even then it only needs to be defined per one reversible arc (e.g. NCA only and not NCA and CNA).
Storage Site Balance: ∀s ∈ S, t ∈ T
For each storage site and for each time period, if it is the first time period, the storage level is the initial storage. Otherwise, the storage level is equal to the storage level in the previous time period plus water inputs minus water outputs.
Terminal Storage Level: ∀s ∈ S, t ∈ T
For each storage site, the storage in the last time period must be less than or equal to the predicted/set terminal storage level.
Pipeline Capacity Construction Expansion: ∀{l,l} ∈ {PCA,PNA,PPA,NKA,CNA,NCA,NSA,NOA,FCA,RCA,SKA,SOA,RSA,SRA}, [t ∈ T]
Sets the flow capacity in a given pipeline during a given time period. Different constraints apply depending on if the pipeline is realistically reversible or not.
∀(l,l)∈{PPA,CNA,NNA,NCA,NSA,NRA,RNA,RKA,SNA,SCA},[t∈T]
Note
Parameter \(δ_{d}^{Pipeline}\) will be calculated as follows:
where k_{l,l} is Hazen-Williams constant and ω is Hazen-Williams exponent as per Cafaro & Grossmann (2020) and d represents the pipeline diameter as per the set d∈D.
∀{l,l} ∈ {PCA,PNA,PPA,CNA,RCA NNA,NCA,NKA,NSA,NRA,…,SOA}, t ∈ T
Storage Capacity Construction/Expansion: ∀s ∈ S, [t ∈ T]
This constraint accounts for the expansion of available storage capacity or installation of storage facilities. If expansion/construction is selected, expand the capacity by the set expansion amount. The water level at the storage site must be less than this capacity. As of now, the model considers that a storage facility is expanded or built at the beginning of the planning horizon. The C0 notation indicates that we also include the 0th case, meaning that there is no selection in the set C where no capacity is added.
∀s ∈ S, t ∈ T
Disposal Capacity Construction/Expansion: ∀k ∈ K, [t ∈ T]
This constraint accounts for the expansion of available disposal sites or installation of new disposal sites. If expansion/construction is selected, expand the capacity by the set expansion amount. The total disposed water in a given time period must be less than this new capacity.
∀k ∈ K, t ∈ T
Treatment Capacity Construction/Expansion: ∀r ∈ R, [t ∈ T]
Similarly to Disposal and Storage Capacity Construction/Expansion constraints, the current treatment capacity can be expanded as required or new facilities may be installed.
∀r ∈ R, t ∈ T
Treatment Balance: ∀r ∈ R, t ∈ T
Water input into treatment facility is treated with a level of efficiency, meaning only a given percentage of the water input is outputted to be reused at the completions pads.
where \(\textcolor{green}{ϵ_{r, w}^{Treatment}}\) <1
Beneficial Reuse Capacity: ∀o ∈ O, t ∈ T
For each beneficial reuse site and for each time period, water sent to a site must be less than or equal to the capacity.
Fresh Sourcing Cost: ∀f ∈ F, p ∈ CP, t ∈ T
For each freshwater source, for each completions pad, and for each time period, the freshwater sourcing cost is equal to all output from the freshwater source times the freshwater sourcing cost.
Total Fresh Sourced Volume:
The total fresh sourced volume is the sum of freshwater movements by truck and pipeline over all time periods, completions pads, and freshwater sources.
Disposal Cost: ∀k ∈ K, t ∈ T
For each disposal site, for each time period, the disposal cost is equal to all water moved into the disposal site multiplied by the operational disposal cost. Total disposal cost is the sum of disposal costs over all time periods and all disposal sites.
Total Disposed Volume:
Total disposed volume over all time is the sum of all piped and trucked water to disposal summed over all time periods.
Treatment Cost: ∀r ∈ R, t ∈ T
For each treatment site, for each time period, the treatment cost is equal to all water moved to the treatment site multiplied by the operational treatment cost. The total treatments cost is the sum of treatment costs over all time periods and all treatment sites.
Completions Reuse Cost: ∀p ∈ P, t ∈ T
Completions reuse water is all water that meets completions pad demand, excluding freshwater. Completions reuse cost is the volume of completions reused water multiplied by the cost for reuse.
Note
Freshwater sourcing is excluded from completions reuse costs.
Total Completions Reuse Volume:
The total reuse volume is the total volume of produced water reused, or the total water meeting completions pad demand over all time periods, excluding freshwater.
Piping Cost: ∀(l,l) ∈ {PPA,…,CCA}, t ∈ T
Piping cost is the total volume of piped water multiplied by the cost for piping.
Note
The constraints above explicitly consider freshwater piping via FCA arcs.
Storage Deposit Cost: ∀s ∈ S, t ∈ T
Cost of depositing into storage is equal to the total volume of water moved into storage multiplied by the storage operation cost rate.
Storage Withdrawal Credit: ∀s ∈ S, t ∈ T
Credits from withdrawing from storage is equal to the total volume of water moved out from storage multiplied by the storage operation credit rate.
Pad Storage Cost: ∀l ∈ L, l ̃ ∈ L, t ∈ T
Trucking Cost (Simplified)
Trucking cost between two locations for time period is equal to the trucking volume between locations in time t divided by the truck capacity [this gets # of truckloads] multiplied by the lead time between two locations and hourly trucking cost.
Note
The constraints above explicitly consider freshwater trucking via FCT arcs.
Total Trucking Volume: ∀t ∈ T
The total trucking volume is estimated as the summation of trucking movements over all time periods and locations.
Disposal Construction or Capacity Expansion Cost: ∀t ∈ T
Cost related to expanding or constructing new disposal capacity. Takes into consideration capacity increment, cost for selected capacity increment, and if the construction/expansion is selected to occur.
Storage Construction or Capacity Expansion Cost: ∀t ∈ T
Cost related to expanding or constructing new storage capacity. Takes into consideration capacity increment, cost for selected capacity increment, and if the construction/expansion is selected to occur.
Treatment Construction or Capacity Expansion Cost: ∀t ∈ T
Cost related to expanding or constructing new treatment capacity. Takes into consideration capacity increment, cost for selected capacity increment, and if the construction/expansion is selected to occur.
Pipeline Construction or Capacity Expansion Cost: ∀t ∈ T
Cost related to expanding or constructing new pipeline capacity. Takes into consideration capacity increment, cost for selected capacity increment, and if the construction/expansion is selected to occur.
Slack Costs:
Weighted sum of the slack variables. In the case that the model is infeasible, these slack variables are used to determine where the infeasibility occurs (e.g. pipeline capacity is not sufficient).
Logic Constraints: ∀k ∈ K
New pipeline or facility capacity constraints: e.g., only one injection capacity can be used for a given site
∀s ∈ S
∀r ∈ R
∀l ∈ L, l ∈ L
Deliveries Destination Constraints:
Completions reuse deliveries at a completions pad in time period t is equal to all piped and trucked water moved into the completions pad, excluding freshwater. ∀p ∈ CP, t ∈ T
Disposal deliveries for disposal site k at time t is equal to all piped and trucked water moved to the disposal site k. ∀k ∈ K, t ∈ T
Completions deliveries destination for completions pad p at time t is equal to all piped and trucked water moved to the completions pad. ∀p ∈ CP, t ∈ T
Strategic Model Water Quality Extension
An extension to this strategic optimization model measures the water quality across all locations over time. As of now, water quality is not a decision variable. It is calculated after optimization of the strategic model. The process for calculating water quality is as follows: the strategic model is first solved to optimality, water quality variables and constraints are added, flow rates and storage levels are fixed to the solved values at optimality, and the water quality is calculated.
Note
Fixed variables are denoted in purple in the documentation.
Assumptions:
Water quality of produced water from production pads and completions pads remains the same across all time periods
When blending flows of different water quality, they blend linearly
Treatment does not affect water quality
Water Quality Sets
\(\textcolor{blue}{w ∈ W}\) Water Quality Components (e.g., TDS)
\(\textcolor{blue}{p^{IntermediateNode} ∈ CP}\) Intermediate Completions Pad Nodes
\(\textcolor{blue}{p^{PadStorage} ∈ CP}\) Pad Storage
Water Quality Parameters
\(\textcolor{green}{v_{l,w,[t]}}\) = Water quality at well pad
\(\textcolor{green}{ξ_{l,w}^{StorageSite}}\) = Initial water quality at storage
\(\textcolor{green}{ξ_{l,w}^{PadStorage}}\) = Initial water quality at pad storage
Water Quality Variables
\(\textcolor{red}{Q_{l,w,t}}\) = Water quality at location
Disposal Site Water Quality ∀k ∈ K, w ∈ W, t ∈ T
The water quality of disposed water is dependent on the flow rates into the disposal site and the quality of each of these flows.
Storage Site Water Quality ∀s ∈ S, w ∈ W, t ∈ T
The water quality at storage sites is dependent on the flow rates into the storage site, the volume of water in storage in the previous time period, and the quality of each of these flows. Even mixing is assumed, so all outgoing flows have the same water quality. If it is the first time period, the initial storage level and initial water quality replaces the water stored and water quality in the previous time period respectively.
Treatment Site Water Quality ∀r ∈ R, w ∈ W, t ∈ T
The water quality at treatment sites is dependent on the flow rates into the treatment site, the efficiency of treatment, and the water quality of the flows. Even mixing is assumed, so all outgoing flows have the same water quality. The treatment process does not affect water quality
where \(\textcolor{green}{ϵ_{r,w}^{Treatment}}\) <1
Network Node Water Quality ∀n ∈ N, w ∈ W, t ∈ T
The water quality at nodes is dependent on the flow rates into the node and the water quality of the flows. Even mixing is assumed, so all outgoing flows have the same water quality.
Water Quality at Completions Pads
Water that is Piped and Trucked to a completions pad is mixed and split into two output streams: Stream (1) goes to the completions pad and stream (2) is input to the completions storage. This mixing happens at an intermediate node. Finally, water that meets completions demand comes from two inputs: The first input is output stream (1) from the intermediate step. The second is outgoing flow from the storage tank.
Completions Pad Intermediate Node Water Quality ∀p ∈ P, w ∈ W, t ∈ T
The water quality at the completions pad intermediate node is dependent on the flow rates of water from outside of the pad to the pad. Even mixing is assumed, so the water to storage and water to completions input have the same water quality.
Completions Pad Input Node Water Quality ∀p ∈ P, w ∈ W, t ∈ T
The water quality at the completions pad input is dependent on the flow rates of water from pad storage and water from the intermediate node. Even mixing is assumed, so all water into the pad is of the same water quality.
Completions Pad Storage Node Water Quality ∀p ∈ P, w ∈ W, t ∈ T
The water quality at pad storage sites is dependent on the flow rates into the pad storage site, the volume of water in pad storage in the previous time period, and the quality of each of these flows. Even mixing is assumed, so the outgoing flow to completions pad and water in storage at the end of the period have the same water quality. If it is the first time period, the initial storage level and initial water quality replaces the water stored and water quality in the previous time period, respectively.
Beneficial Reuse Water Quality ∀o ∈ O, w ∈ W, t ∈ T
The water quality at beneficial reuse sites is dependent on the flow rates into the site and the water quality of the flows.
Terminology
Beneficial Reuse Options: This term refers to the reuse of water at mining facilities, farms, etc.
Completions Demand: Demand set by completions pads. This demand can be met by produced water, treated water, or freshwater.
Completions Reuse Water: Water that meets demand at a completions site. This does not include freshwater or water for beneficial reuse.
Network Nodes: These are branch points for pipelines only.
Note
Well pads are not a subset of network nodes.
[t]: This notation indicates that timing of capacity expansion has not yet been implemented.
Terminal Storage Level: These are goal storage levels for the final time period. Without this, the storage levels would likely be depleted in the last time period.
Water Boosting: Moving large volumes of water requires water pumps. Water boosting refers to the infrastructure required to maintain water pressure.
Tutorials
PARETO tutorials are currently under development and will be made publicly available as soon as possible.
Since PARETO project is an open source project and we are in collaboration with WaterTAP and IDAES projects, the IDAES tutorials and WaterTAP tutorials are good learning materials.
In particular, new users should be familiar with Python and Pyomo. Because PARETO and IDAES share this common base, we refer users unfamiliar with Python or Pyomo to the IDAES tutorials Short Introduction to Python and Pyomo or the Longer Introduction to Python and Pyomo.
PARETO will leverage WaterTAP models for desalination technologies, therefore, WaterTAP tutorials can be found here: https://watertap.readthedocs.io/en/latest/tutorials/index.html
The IDAES documentation and tutorials can be found here: https://idaes-pse.readthedocs.io/en/stable/
Utilities
PARETO project provides a set of user-friendly utility methods to display and analyze results. These methods include debugging tools, plotting utilities, and Python-Excel interfaces.
Get Data Functions
The following functions are used to conveniently acquire data.
Function |
Section |
---|---|
get_data |
|
set_consistency_check |
|
od_matrix |
Get Data
Method Description:
This method uses Pandas methods to read data for sets and parameters from an Excel spreadsheet. Sets are assumed to not have neither a header nor an index column. In addition, the data should be placed in column A, row 2, for example:

Figure 1. get_data Set Setup Format
Parameters can be in either table or column format. Table format requires a header (usually time periods) and index columns whose elements should be contained in a set. Each index column should be labeled with a header starting in cell A2. Spreadsheet names for sets should be used as headers; however, generic keywords “NODES” and “INDEX” can also be used. Column format requires that each set be placed in one column, starting from cell A3. Spreadsheet names for sets should be used as headers in row 2 for each column “NODES” and “INDEX” can also be used. Data should be provided in the last column, and the keyword “VALUE” should be used as header.

Figure 2. get_data Parameter Setup Format
This method outputs a dictionary that contains a list for each set and a dictionary that contains parameters in the following format: {‘param1’: {(set1, set2): value}, ‘param1’: {(set1, set2): value}}
How to Use:
set_list = ['ProductionPads','CompletionsPads'], parameter_list = ['DriveTimes', 'CompletionsDemand]
fpath = 'path\\to\\excel\\file.xlsx’
[df_sets, df_parameters] = get_data(fpath, set_list, parameter_list)
Set Consistency Check
Method Description:
This method checks if the elements included in a table or parameter have been defined as part of the Sets that index such parameter. set_consistency_check() raises a TypeError exception If there are entries in the Parameter that are not contained in the Sets, and prints out a list with all the entries that require revision.
How to Use:
The method requires one specified parameter (e.g. ProductionRates) AND one OR several sets over which the aforementioned parameter is declared (e.g.ProductionPads, ProductionTanks, TimePeriods). In general, the method can be run as follows: set_consistency_check(Parameter, set_1, set_2, etc)
Origin/Destination Matrix
Method Description:
This method allows the user to request drive distances and drive times using Bing maps API and Open Street Maps API. The method accept the following input arguments: - origin:
REQUIRED. Data containing information regarding location name, and coordinates latitude and longitude. Two formats are acceptable:
{(origin1,”latitude”): value1, (origin1,”longitude”): value2} or
{origin1:{“latitude”:value1, “longitude”:value2}}
The first format allows the user to include a tab with the corresponding data in a table format as part of the workbook casestudy.
- destination:
OPTIONAL. If no data for destination is provided, it is assumed that the origins are also destinations.
- api:
OPTIONAL. Specify the type of API service, two options are supported:
Bing maps: https://docs.microsoft.com/en-us/bingmaps/rest-services/
Open Street Maps: https://www.openstreetmap.org/
If no API is selected, Open Street Maps is used by default
- api_key:
An API key should be provided in order to use Bing maps. The key can be obtained at: https://www.microsoft.com/en-us/maps/create-a-bing-maps-key
- output:
OPTIONAL. Define the parameters that the method will output. The user can select:
‘time’: A list containing the drive times between the locations is returned
‘distance’: A list containing the drive distances between the locations is returned
‘time_distance’: Two lists containing the drive times and drive distances between the locations is returned
If not output is specified, ‘time_distance’ is the default
- fpath:
OPTIONAL. od_matrix() will ALWAYS output an Excel workbook with two tabs, one that contains drive times, and another that contains drive distances. If not path is specified, the excel file is saved with the name ‘od_output.xlsx’ in the current directory.
- create_report:
OPTIONAL. if True an Excel report with drive distances and drive times is created
Results Functions
The following functions are used to conveniently display and analyze data.
Function |
Section |
---|---|
generate_report |
|
generate_sankey |
|
plot_sankey |
|
plot_bars |
Generate Report
Method Description:
This method identifies the type of model: [strategic, operational], creates a printing list based on is_print, and creates a dictionary that contains headers for all the variables that will be included in an Excel report. The dictionaries are used to create separate excel sheets which categorize the data by variable name or type. This same data is put into excel sheets named after each variable as well as an overview sheet which contains totals and Key Performance Indicators (KPI) information.
Warning
If an indexed variable is added or removed from a model, the printing lists and headers should be updated accordingly.
The output of this method prints out each variable’s information in the terminal as specified by the user, as shown below.

Figure 1. Example of Terminal Output

Figure 2. Example of Excel Output
How to Use:
This method requires two parameters:
1.) The model that is being returned from the create_model() method after a solution is found
2.) An array of an “enum” class value specifying which variables to print which are chosen by the user. These values are:
“PrintValues.Essential” – Specifies that the overview information will be printed
“PrintValues.Nominal” – Specifies that all information from PrintValues.Essential + Trucked, Piped, and Sourced water information will be printed
“PrintValues.Detailed” – Specifies that all information including slack information will be printed
Example of how this method is used:
strategic_model = create_model(df_sets, df_parameters)
results = opt.solve(strategic_model, tee=True)
[model, results] = generate_report(strategic_model, is_print=[PrintValues.Detailed], fname="..\\..\\PARETO_report.xlsx")
Generate Sankey
Method Description:
Sankey diagrams are a graphic tool used to easily visualize supply-sink flows across a given infrastructure (source/destination). The relative width of each “flow” is proportional to the amount of water that is being transported between locations. Such diagrams are commonly used to visualize the complex nature of money, energy or material flows.
This method receives the final lists for source, destination, value, and labels to be used in generating the Sankey diagram. It also receives arguments that determine font size and plot titles. The user can save the Sankey diagram in the following formats: jpg, jpeg, pd, png, svg, and html. Html format is set by default.
How to Use:
# Creating links and nodes based on the passed in lists to be used as the data for generating the Sankey diagram
link = dict(source=source, target=destination, value=value)
node = dict(label=label, pad=30, thickness=15, line=dict(color="black", width=0.5))
data = go.Sankey(link=link, node=node)
# Assigning sankey diagram to fig variable
fig = go.Figure(data)
fig.write_html("first_figure.html", auto_open=True)
Plot Sankey
Method Description:
This method receives data in the form of 3 seperate lists (origin, destination, value lists), generate_report dictionary output format, or get_data dictionary output format. It then places this data into 4 lists of unique elements so that proper indexes can be assigned for each list so that the elements will correspond with each other based off of the indexes. These lists are then passed into the outlet_flow method which gives an output which is passed into the method to generate the sankey diagram.

Figure 3. Example of Sankey Diagram Showing Water Production Flows
How to Use:
This method requires two parameters:
1.) An input data dictionary that includes the time periods requested as well as said data. The data is passed in as ‘pareto_var’ and can be in get_data() format, which requires labels, generate_report() format, or 3 separate lists:
“pareto_var” – This parameter can be variable data returned from the get_data() or generate_report() format
“time_period” – This is used to specify which time periods from the data that the user wants shown in the diagram. If the user passes no time periods in, then all time periods are used in the data.
“labels” – This is only required if the data being passed in is in get_data() format. The labels are used to distinguish between the columns.
2.) A dictionary of arguments that include formatting options like font size, title of the plot and output file:
output_file – This parameter is used for creating the file that contains the Sankey Diagram created by this method
Example of how this method is used:
args = {"font_size": 15, "plot_title": "Completion Storage", "output_file": "..\\first_sankey.png"}
input_data = {"pareto_var": df_parameters["v_f_Trucked"]
"labels": [("Origin", "Destination", "Time", "Trucked Water")]}
plot_sankey(input_data, args)
Plot Bars
Method Description:
This method generates a bar chart based on the variable data that the user passes in. It automatically creates either an animated bar chart (if the variable is indexed by time) or a static bar chart.

Figure 4. Animated Bar Chart
How to Use
This method requires two parameters:
1.) A dictionary including the data and labels that are being used, either in get_data() output format or generate_report() output format. (Labels only required for get_data() format).
“pareto_var”– This parameter contains the data that the user wants to use
“labels”– This parameter contains the labels for the data provided
2.) A dictionary of arguments that include the title of the plot, a group by parameter, and an output file. Here is an example of the arguments:
“group_by” - This specifies what field will be used as the x axis in the plot
“output_file” - This parameter is used for creating the file that contains the Bar Chart created by this method.
“y_axis” - This specifies if the user wants to take the logarithm of the y axis. If not provided, then the y axis remains the default(linear).
Example of how this method is used:
args = {"plot_title": "Completion Storage", "y_axis": "log", "group_by": "Destination", "output_file": "first_bar.html"}
input_data = {"pareto_var": df_parameters["v_f_PadStorage"]
"labels": [("Completion Pad", "Time", "Storage Levels")]}
plot_bars(input_data, args)
Frequently Asked Questions
How to …
- … Run examples?
PARETO project provides examples to run the operational produced water management model and the strategic produced water management model (see pareto/case_studies/). To run the examples, go to:
pareto/operatinal_water_management/run_operational_model.py
pareto/strategic_water_management/run_strategic_model.py
- … Get more help?
Use the website to register for the PARETO support mailing list. Then you can send questions to pareto-support@pareto.org. For more specific technical questions, we recommend our new PARETO discussions board on Github.
Troubleshooting
- Missing win32api DLL
For Python 3.8 and maybe others, you can get an error when running Jupyter on Windows 10 about missing the win32api DLL. There is a relatively easy fix:
pip uninstall pywin32 pip install pywin32==225
License
License Agreement
PARETO Copyright (c) 2021, by the software owners: The Regents of the University of California, through Lawrence Berkeley National Laboratory, et al. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of the Produced Water Application for Beneficial Reuse Environmental Impact and Treatment Optimization (PARETO), University of California, Lawrence Berkeley National Laboratory, U.S. Dept. of Energy, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE S PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
You are under no obligation whatsoever to provide any bug fixes, patches, or upgrades to the features, functionality or performance of the source code (“Enhancements”) to anyone; however, if you choose to make your Enhancements available either publicly, or directly to Lawrence Berkeley National Laboratory, without imposing a separate written license agreement for such Enhancements, then you hereby grant Lawrence Berkeley National Laboratory the following license: a non-exclusive, royalty-free perpetual license to install, use, modify, prepare derivative works, incorporate into other computer software, distribute, and sublicense such enhancements or derivative works thereof, in binary and source code form
Copyright
Copyright Notice
PARETO was produced under the DOE Produced Water Application for Beneficial Reuse Environmental Impact and Treatment Optimization (PARETO), and is copyright (c) 2021 by the software owners: The Regents of the University of California, through Lawrence Berkeley National Laboratory, et al. All rights reserved.
NOTICE. This Software was developed under funding from the U.S. Department of Energy and the U.S. Government consequently retains certain rights. As such, the U.S. Government has been granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide license in the Software to reproduce, distribute copies to the public, prepare derivative works, and perform publicly and display publicly, and to permit other to do so.