Water Management in Hydraulic Fracturing-A Planning and Decision Optimization Platform By MASSACHUSETTS WI OF TECHNOLOGY Neha Mehta OCT 0 7 2014 B.Tech. in Pulp and Paper Technology Indian Institute of Technology, Roorkee, India, 2010 LIBRARIES M.S. in Chemical Engineering University of California, Berkeley, 2011 SUBMITTED TO THE ENGINEERING SYSTEMS DIVISION IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF SCIENCE IN TECHNOLOGY AND POLICY AT THE MASSACHUSETTS INSTITUTE OF TECHNOLOGY SEPTEMBER 2014 C 2014 Massachusetts Institute of Technology. All rights reserved. Signature of Author: Signature redacted Engineering Systems Division August 21, 2014 Certified by:Francis' Accepted by: S Francis 0' Sullivan Director of Research, MIT Energy Initiative Thesis Supervisor Signature red acted Dava J. Newman Profes~or of Aeronautics and Astronautics and Engineering Systems Director, Technology and Policy Program ETLtE Water Management in Hydraulic Fracturing- A Planning and Decision Optimization Platform By Neha Mehta Submitted to the Engineering System Division on August 21st, 2014, in partial fulfillment of the requirements for the degree of Masters of Science in Technology and Policy Abstract Recent developments in hydraulic fracturing technology have enabled cost-effective production of unconventional resources, particularly shale gas in the U.S. The process of hydraulic fracturing is water intensive, requiring 4-7 million gallons of water per well, to which a range of chemicals must also be added in order to produce an effective fracturing fluid. Following a fracturing stimulation, anywhere from 10-40% of the injected volume of the water flows back to the surface as a polluted stream of wastewater. This polluted stream of water and the overall inefficient use of water in the hydraulic fracturing process has resulted in a number of negative environmental consequences, specifically surrounding ground and surface water quality and quantity. In considering how to minimize the environmental impacts of hydraulic fracturing, effectively managing water throughout the entire hydraulic fracturing water cycle (water acquisition and disposal) is obviously critical. This dissertation articulates a GIS based optimization model that has been developed to optimize water management planning for unconventional oil and gas production. The model enables a diverse set of stakeholders to develop customized water management strategies based on the geological characteristics and water infrastructure of any given play. The model comprises of a front end GIS interface and a back end optimization engine, designed to minimize the overall system cost of water handling as well as minimizing the overall water footprint of the system. Altogether, it is a powerful decision making tool, which allows the operators to optimize and analyze the temporal and spatial variations in flowback, and produced water management and provide an operationally convenient method to access and share the model analysis. From a regulatory perspective, the modeling framework provides a comprehensive template for a water management plan and could be used as a basis to develop tailored, customized regional solutions that can incorporate the inherent heterogeneity widespread across today's oil and gas plays. Thesis Supervisor: Francis 0' Sullivan Title: Director of Research, MIT Energy Initiative Acknowledgements I want to take this opportunity to thank my advisor Francis 0' Sullivan, MIT Energy Initiative. You have shown tremendous confidence in my capabilities, because of which I am able to expand my spectrum of skills to an entirely different level. Thanks for your continuous support and guidance, and I hope to seek it further during the course of my doctoral program here at MIT. I would also like to extend my token of gratitude towards the ESD staff, especially Barbara S DeLaBarre for being such a wonderful listener to all my administrative hassles. Thank you for constantly keeping check on us whether it was for submission of the thesis proposal, or fall registration. I would also like to extend several MIT faculty members especially Prof. John Lienhard, Dr. Roland Pellenq, Prof. James B. Orlin, Prof. Dennis McLaughlin and Andrew Cockerill, who took time to provide feedback on my research and gave me an opportunity to share it with their groups. The results of this thesis would not have been reflective of a practical setting without the generous sharing of data by the Texas Water Development Board. I appreciate your time and efforts in finding the data. The list would not end without mentioning my friends who made sure that I had some fun time through this journey. Prateek Verma, Ankita Vyas, Chandani Limbad thanks a ton for being there for me. And, lastly, my family is what gives me the strength and inspiration to keep going. (Pageintentionally left blank) Table of Contents 1. Introduction............................................................................................................................... 1 1.1. M otivation............................................................................................................................ 1.2. Scope.................................................................................................................................... 2 4 1.3. Thesis structure.................................................................................................................... 5 Section 1-Background................................................................................................................... 7 2. Hydraulic fracturing w ater cycle ......................................................................................... 8 2.1. W ater Acquisition........................................................................................................ 8 2.2. Chem ical Mixing ............................................................................................................... 10 2.3. W ater Injection .................................................................................................................. 2.4. HF Wastew ater Recovery ............................................................................................. 2.5. HF Wastew ater M anagem ent.......................................................................................... 12 14 17 3. Regulatory framework around hydraulic fracturing...................................................... 19 3.1. Federal Regulations ........................................................................................................... 3.1.1. Clean W ater Act (CW A) ..................................................................................................... 3.1.2. Safe Drinking W ater Act (SDW A) ....................................................................................... 3.2. State Regulations ............................................................................................................... 3.2.1. W ater Procurement and Use................................................................................................. 3.2.2. Fracture Fluid Chemical Disclosure..................................................................................... 3.2.3. Wastewater disposal requirements ....................................................................................... 3.3. Regulatory conundrum ................................................................................................... 19 19 20 21 23 24 24 :..25 4. C hallenges in m anaging HF wastew ater............................................................................ 27 4.1. Tem poral and spatial constraints .................................................................................... 4.2. Operational constraints .................................................................................................. 4.3. Regulatory constraints .................................................................................................... 4.4. Evaluation of wastewater management frameworks ..................................................... 4.4.1. Integrated multi-criteria decision ......................................................................................... 4.4.2. Produced Water M anagement Information System ............................................................. 4.4.3. W ater Decision Tree............................................................................................................. 27 28 29 30 30 30 30 Section 2- M odel Developm ent ............................................................................................. 32 5. Modeling approach for management of HF wastewater................................................. 33 5.1. M odel Fram ew ork.............................................................................................................. 5.2. Techniques and M ethodology ......................................................................................... 5.2.1. Determination of HF wastewater quality ............................................................................. 5.2.2. Determination of HF wastewater quantity .......................................................................... 5.2.3. Field development data ........................................................................................................ 5.2.4. M odeling transport network ................................................................................................. 33 35 35 36 37 37 6. Prelim inary Engineering Design A nalysis....................................................................... 39 6.1. Tw o-Stage Lim e Softening Plant.................................................................................. 6.1.1. Cost data sources............................................................................................................... 6.1.2. Process design consideration.............................................................................................. 39 40 43 6.2. Desalination Plant.............................................................................................................. 6.2.1. Reverse Osmosis (RO)........................................................................................................ 44 45 Section 3- Analysis and Recom m endation............................................................................ 48 7. Case Study Description ...................................................................................................... 49 7.1. Barnett Shale...................................................................................................................... 7.1.1. Water Supply............................................................................................................................50 7.1.2. HF W astewater quality and quantity .................................................................................. 7.1.3. Influent water quality .......................................................................................................... 7.1.4. HF W astewater Management .............................................................................................. 7.1.5. Economic inputs.......................................................................................................................60 7.2. Results................................................................................................................................ 49 7.3. Sensitivity analysis ............................................................................................................ 64 7.3.1. Influence of influent water quality ....................................................................................... 7.3.2. Influence of water availability in the region......................................................................... 8. Policy recom m endations..................................................................................................... 8.1. N on-uniform policy fram ework......................................................................................... 8.2. M arket based policy approaches..................................................................................... 8.3. Water m anagem ent planning ......................................................................................... 53 57 58 61 64 65 68 68 69 70 9. Future w ork............................................................................................................................. 71 10. Sum m ary................................................................................................................................ 71 References.................................................................................................................................... 73 List of Appendix.......................................................................................................................... 79 Appendix A : M ajor Shale Plays in the United States............................................................ Appendix B: Description of fracture fluid additives ........................................................... Appendix C: HF W astewater Characterization .................................................................... Appendix D : Detailed techno-econom ic analysis of RO plant............................................ Appendix E: Decay constant for estimating the volumetric rate of production of HF wastewater ................................................................................................................................ Appendix F: Cost summary of different Two Stage Lime Softening Plant........................... Appendix H : Linear Optim ization Program ing, M atlab TM .......................... . . . . . .. . . . . . .. . . . . . .. . . . . 80 81 85 87 89 90 91 List of Figures Figure 1: Hydraulic fracturing process overview ...................................................................... 1 Figure 2: Hydraulic fracturing water cycle (Source: EPA) ....................................................... 5 Figure 3: The maps displays the U.S. drought monitor for Texas. The completed wells are shown in black dots, overlaid by bands of reds and yellows, with red bands depicting areas of highest w ater stress...................................................................................................................................... 9 Figure 4: Degradation of a gel by a breaking agent. The breaker used in this case is ammonium persulfate and the gel is made from Guar Gum. The degradation mechanism is a free radical degradation reaction and prone to exhibit reduced free radical activity due to inhibition of the free radicals by the degraded fragm ents.......................................................................................... 13 Figure 5: Fracturing Fluid Disclosure requirement across states.............................................. 24 Figure 6: Temporal trends in wastewater volume produced...................................................... 27 Figure 7: Conceptual layout of the model framework............................................................. 33 Figure 8: Workflow for predicting the wastewater quality in fracturing operations ................. 35 Figure 9: Schematic of a two stage lime soda-ash softening plant ............................................ 39 Figure 10: Relationship between cost of wastewater treatment and number of wells completed annu ally ......................................................................................................................................... 43 Figure 11: Schematic of a basic RO loop (source: Puretec Industrial Water)........................... 45 Figure 12: Estimate of the groundwater/surface water split in different shale regions. The base map shows the outline of major aquifers and major rivers in Texas. SW stands for Surface water source and GW stands for groundw ater sources...................................................................................... 51 Figure 13: Groundwater location and major rivers in Johnson................................................. 51 Figure 14: Surface river withdrawal points ............................................................................. 52 Figure 15: Road network connecting gas wells to groundwater wells ...................................... 52 Figure 16: Salinity profiles in Texas based on spatial interpolation.......................................... 54 Figure 17: Calcium profiles in Texas based on spatial interpolation....................................... 54 Figure 18: Time series of salinity profiles of HF wastewater................................................... 55 Figure 19: Hardness time-series profile for HF wastewater ..................................................... 55 Figure 20: Turbidity time-series profile for HF wastewater..................................................... 56 Figure 21: Rate of wastewater production in different wells................................................... 57 Figure 22: The figure on left shows the transportation network from gas wells to deep-water injection wells whereas the figure on the right shows the transportation networks from gas wells to desalination plants (RO ). ..................................................................................................... 60 Figure 23: Water management plan for the field development ................................................ 62 Figure 24: The aggregate breakdown of the modeled plan for the three influent water qualities. 64 Figure 25: Impact of influent water quality variation in fracturing operation on the water m anagem ent costs......................................................................................................................... 65 Figure 26: Aggregate water management plan ......................................................................... 66 Figure 27: Impact on cost of water management....................................................................... 66 Figure 28: Major shale plays in the U.S. ................................................................................. 80 Figure Figure Figure Figure Figure 81 81 82 83 83 29: 30: 31: 32: 33: Structural form of gur gum..................................................................................... Structural form of ammonium persulfate ............................................................... Structural form of Glutaraldehyde ........................................................................... Structural form of borate salts ................................................................................ Structure form of Polyacrylamide ........................................................................... List of tables Table 1: Commonly used additives in a fracturing stimulation................................................. 10 Table 2: Analytical water characterization of influent water and after addition of fracture additives ....................................................................................................................................................... 11 Table 3: The reported cumulative wastewater volume in different counties in Pennsylvania..... 14 Table 4: An example of HF wastewater quality ...................................................................... 16 Table 5: Summary of potential additive compatibility concerns caused due to presence of high concentration of pollutant in influent water.............................................................................. 28 Table 6: General cost equations for UFSCC.............................................................................. 41 Table 7: General cost equations for Gravity filter .................................................................... 41 Table 8: General cost equations for chemical feeders ............................................................... 42 Table 9: RO model design parameters in DEEPTM..................................... ........................... . . 46 Table 10: Shale has field completion schedule......................................................................... 49 Table 11: Ultimate wastewater quality parameters for selected well sites ............................... 53 Table 12: The influent water quality for formulating fracture fluid used in the model............ 58 Table 13: The distance of nearest injection wells and desalination plants from the gas wells..... 59 Table 14: Summary of influent water quality in Barnett shale play ......................................... 85 Table 15: Summary of water quality parameters of a blended fluid in Barnett shale .............. 86 1. Introduction The U.S. natural gas industry, and by extension the industry globally has borne witness to tremendous change over the past decade. During this period, U.S. natural gas production levels have risen from a twenty year low of 18 TCF1 (510 BCM 2) in 2005, to an all-time high of 24 TCF (680 BCM) in 20123. At the same time, natural gas prices have fallen to levels not seen since the period immediately following the U.S. gas market deregulation in the mid-nineties. The underlying driver of these dynamics has been the very rapid growth in the production of unconventional natural gas resources, and in particular, shale gas resources - historically considered unrecoverable. Figure 1: Hydraulic fracturing process overview Some of the most active shale plays in the United States are the Barnett Shale, the Haynesville/Bossier Shale, the Antrim Shale, the Fayetteville Shale, the Marcellus Shale, and the New Albany Shale (see Appendix A: Major Shale Plays in the United States)~. The shale resource is a collection of many hydrocarbon-prone mud rock formations with a diverse set of geological, geomechanical, geochemical and petrophysical characteristics. Theses rock formations contain ' TCF: trillion cubic feet billion cubic meter 2 BCM: '3 Marketed production as reported by U.S. Energy Information Administration, June 2013 C organic matter (kerogen) which is the source material for all hydrocarbon resources 2. Over time, the rock matures, and hydrocarbons are produced from the kerogen 2,3. These hydrocarbons may later migrate from the source rock through existing rock fractures, in either liquid or gaseous state, and reach the earth's surface. However, in the case of shale gas resources, the very low permeability of the source rock inhibits the movements of hydrocarbon and prevents them from entering the zone of migration towards the surface. Absorption of hydrocarbon onto organic matter in the subsurface environment further limits the mobility of hydrocarbon in subsurface environment. Therefore, owing to very low rock matrix permeability and unfavorable gas storage and distribution properties in the shale rock strata, historically it was not feasible to produce hydrocarbons at economically feasible rates from shale rocks. Despite unfavorable geological characteristics of shale rocks, technical advances in the areas of drilling and reservoir stimulation over the years have enabled the recovery of hydrocarbons from shale rocks, particularly shale gas. The majority of supply of shale gas comes from wells drilled with horizontal bores and subjected to large-scale hydraulic fracture stimulation. Horizontal bores allow the wellbore to come in contact with a significantly larger surface area in comparison to a vertical well. Hydraulic fracturing is a well stimulation technique through which a large number of fractures are created mechanically in the rock strata, thus allowing the hydrocarbons to be released from the formations. Hydraulic fracturing of these formations results in a significant enhancement in well productivity, and today it is a ubiquitous reservoir stimulation technique across shale and other low and not so low permeability formations. Regardless of what type of formation is being stimulated, the fundamental processes involved in hydraulic fracturing remain the same. Large volumes of fluid is pumped (water is the commonly used) into the well bore at a sufficient rate to generate a pressure differential between the well bore and the reservoir. This causes stresses around the well bore to increase beyond the tensile stress of the rock, at which point it splits or "fractures" (see Figure 1). The newly formed fractures are supported by the proppant materials which ensure enhanced permeability as the well is brought to production mode. 1.1. Motivation In the current evolving energy sector, the economic exploitation of shale resources has unsurprisingly projected a more gas-centric future than was envisioned even a few years ago. However, the growth in gas, which some have styled a "revolution," is not without its issues. The 2 widespread use of hydraulic fracturing technology to extract hydrocarbons from shale formations has resulted in a number of potentially harmful environmental and public health consequences especially related to water. Contemporary hydraulic fracturing treatments are water intensive, requiring several million gallons of water per well. However, when compared to other energy production processes, the water intensity of shale gas production (including drilling, fracturing, extraction, and processing) appears relatively less, which is between 0.6 and 3.8 gallons of water per Million British Thermal Units (MMBtu) produced4 . The reason for the low water intensity of shale gas production process lies in the fundamental differences in the water requirements of hydraulic fracturing operations when compared to other energy production processes. Firstly, Hydraulic fracturing water consumption is primarily front-loaded, i.e. during the completion phase. In this stage, large volumes of water are procured over a relatively short span of time, creating a transient stress on the local water resources. Secondly, the companies engaged in hydraulic fracturing operations have to rely on local water supply of water as these wells are being developed in a limited geographic extent. Together these factors can adversely affect the regional water resources. Furthermore, in case of rapid and concentrated well development, the cumulative water needs of multiple drilling and fracturing operations may be significant, particularly in areas with water constraints and competing water demands for domestic, agricultural, and thermoelectric use. Water quantity concerns related to shale gas development are intensified furthermore by hydraulic fracturing wastewater management concerns. In the days following hydraulic fracturing of a well, large volumes of effluent flow from a well; a range of terms are used to describe this effluent including, but not limited to; "hydraulic fracturing wastewater," "flowback water," and "produced water." For the purpose of this dissertation, the effluent will be referred as "hydraulic fracturing wastewater (HF wastewater)." The management of HF wastewater is one of the key operational and environmental challenges associated with contemporary onshore oil and gas operations. The reasons for this are twofold: 1. the volumes of effluent can be large - often 10-40% of the injected volume flows from a well as effluent during the two weeks immediately post a hydraulic fracturing operation and 2. The effluent that flows from the hydraulically fractured well is very polluted, and the nature and composition of this pollution vary with time 5-8. Inadequate management of HF wastewater could 3 result in contamination of freshwater supplies, community disruption and air pollution from truck traffic related to gas development (e.g. Truck transport of HF wastewater and fracturing fluids on and off the well site), and eco-system disruption4 . Therefore, as hydraulic fracturing becomes ubiquitous across onshore oil and gas development in North America, even greater focus must be placed on the safe management of HF wastewater and the overall need to absolutely minimize the environmental footprint of the process. 1.2. Scope The study is limited to onshore oil and gas development in North America, and more specifically the United States. The focus of the study is to explore a solution space for mitigating environmental externalities related to shale oil and gas development water cycle (see Figure 2). Water externalities not covered in this study are during the chemical mixing stage and well injection stages. Some example of issues that can occur during these stages are on-site spill of fracturing fluids into surface and groundwater resources, mobilization of subsurface materials into aquifers, and formation fluid displacement into aquifers. These externalities are equally significant; however limited availability of documented reports compromises the understanding the associated issues. The adverse impacts of hydraulic fracturing operations are not limited to water, but also spans across the air (e.g. Fugitive emissions), land (e.g. Road traffic and acreage of a well pad) and community impacts (e.g. Noise pollution, truck traffic). Each of these are well defined topic in itself and out of scope of this thesis. Therefore, the reader is encouraged to look into published literature for more detailed information about non-water related externalities. ' (a) Dimmock versus Cabot Engineering: Dimmock is a small town in Pennsylvania and has number of shale wells. In 2010, a Cabot Oil and Gas water well caught fire. The water was slowly contaminated by the gas escaping allegedly from the fracturing operations. In 2009, Cabot oil and gas had three chemical water surface spills damaging nearby ecology. (b) Clearfield versus EOG Resource: Clearfield is a county in Pennsylvania. In 2010, a gas blow out caused unleashed (hazardous) HF wastewater over the ground. EOG was found responsible for improper water management practices by the PA state regulators. (c) Hopewell Township versus Range Resources: It is one of the major accidents where diluted HF wastewater spilled into a small tributary resulting in death of aquatic species 4 Figure 2: Hydraulic fracturing water cycle (Source: EPA) Within the scope of this thesis, I propose achieving following objectives: 1) Understanding the HF wastewater chemical profile and temporal trends over the shale formations, by building on publicly available data sources (USGS, state agencies) 2) Outline the regulatory framework for fracturing activities and address the regulatory conundrum surrounding the environmental implication of fracturing activities 3) Qualitative and quantitative evaluation of operational, environmental and spatial dynamics governing HF wastewater management 4) Development of a modeling tool coupled with a Geographic Information System (GIS) based front end which could provide utility to a diverse set of stakeholder (regulators, operators and public) in planning a sustainable HF wastewater management and 5) Provide recommendations for regulatory framework based on the model results 1.3. Thesis structure There are three parts in this dissertation: Background, Model development, Analysis and Recommendation. Section 1, Background includes chapter 2-4, focusing on providing the reader with fundamental concepts and an overview of the challenges in the management of HF wastewater in fracturing operations. Chapter 2 begins with an introduction to hydraulic fracturing water cycle, delineating the role of water in different stages of the overall process. Chapter 3 provides an insight into the regulatory structures in place for fracturing activities, including a discussion about the federal versus regional regulatory control of fracturing activities. Chapter 4 quantifies the different challenges in HF wastewater management followed by an evaluation of the different management models/tools currently or previously employed at industrial level or academic level. 5 Section 2, Model development, includes chapter 5-6 and focuses on the research methodology, and model structure. Chapter 5 describes the general framework of an integrated water management system and its objectives, including the tools and techniques used for determining the various inputs to the model such as wastewater quantity, wastewater quality, and geographical location of wastewater treatment plants. One of the critical factors in the modelling framework is the reliable cost estimation of the wastewater treatment plants. Thus, Chapter 6 describes the engineering design methodology for a Two-Stage Lime Softening Plant and a Reverse Osmosis Plant to determine the unit production cost of purified water. Section 3, Analysis and Recommendation, includes chapter 7-10 and focuses on demonstrating the utility of the modeling platform and developing policy recommendation based on the model results. Chapter 7 specifically addresses a shale gas field completion in Johnson County, Texas and discusses the model application results to this particular field development. Furthermore, sensitivity of the modeled HF wastewater management plan to different operating parameters such as influent water quality, wastewater recovery rates, etc. is also presented. Lastly, Chapter 8 discusses the policy implications of the model and provides the reader with potential policy instruments applicable to fracturing industry and the utility of the developed model in implementation of these policy instruments. Chapter 9 and 10 summarizes the thesis with scope of future work. 6 Section 1-Background 7 2. Hydraulic fracturing water cycle Water is an integral part of the hydraulic fracturing process. Large volumes of water are required to hydraulic fracture a well, out of which 10-40% of the water is returned to the surface as HF wastewater 5-8 in the initial first two weeks after the well is fractured. During this period, both water quality and quantity evolves because of a combination of both chemical and physical interactions occurring in subsurface environment. Understanding these interactions is of fundamental importance to the process of developing a system to minimize water-related environmental externalities associated with hydraulic fracturing. Therefore, this chapter describes these various interactions driving the modifications in water quality and quantity during the entire hydraulic fracturing water cycle (see Figure 2). 2.1. Water Acquisition Estimates of water needed per well have been reported to range anywhere from 3-10 million gallons, depending on the shale formation characteristics9"'. Typically, water for fracturing operations is either trucked or piped to a well site and stored in tanks or impoundments prior to fracturing activities begin at the well pad. Conventionally, water for fracturing operation is procured from local sources such as groundwater wells and surface water bodies such as rivers, ponds, and lakes. Access to these water sources is likely to become a constraint for the oil and gas companies, especially those operating in arid regions, which are facing excessive depletion of . water resources, and in areas where water flows and availability follow seasonal variations 1" 2 For instance, in arid states like Texas, hydraulic fracturing operations have resulted in deepening of the existing water unrest in the region. The map in Figure 3, shows the completed wells in black, overlaid by bands of reds and yellows, with red showing the areas of highest water stress. As shown in Figure 3, in 2010, the U.S. drought monitor data showed that the Barnett shale counties experienced a Drought Intensity (DI) in a range of dry to moderate (DI 00-0 1), which dramatically intensified to a severe to extreme ( DI 2-3) in 2012. In another instance, Susquehanna River Basin Commission (SRBC) suspended 37 water withdrawals (for at least 48 hours) for operators in the Marcellus shale region due to drop in localized stream flow levels in SRBC basin in June 2012'. 5 Press release from SRBC, available at http://www.srbc.net/newsroom/NewsRelease.aspx?NewsReleaselD=89 8 Owing to the unreliability of traditional water sources and risks involved in fracturing wells in arid regions, operators are transitioning towards alternative water sources, namely, industrial wastewater (e.g. Acid Mine Drainage Water (AMD), HF wastewater), and brackish6 or saltwater. Water procurement from these sources is costlier than procuring water from conventional sources, Inoensity:, 00 Abnorm s;ly 0 y 01 M oderat. Drought 02 govers Dlrugh*t D3CxtreMeDrought 04 F xoe fal naought Tha 1lnought Monitor foreuaja on road-scale onditions Locol onditone may very See acwmpanying tortsummary for forrant atetements Intonsitv: U OAnomiolly U ry D1 Maderaw Drought 02 Ravam Drought 02 txtrem* D rougm The nmught Manitor foeuwsm on broad-anale Local canditone may very Soo acammpanying hut mummary (foraro4aat codfltiona aetemaents, Figure 3: The maps displays the U.S. drought monitor for Texas. The completed wells are shown in black dots, overlaid by bands of reds and yellows, with red bands depicting areas of highest water stress. primarily due to an additional step of pre-conditioning of the water to meet the desired influent water quality criteria for a particular operator. Depending on the technology and the water quality requirements of the fracturing treatments, the cost of treatment can be less than $1.00 /bbl and as high as $5-$6/bb1 3 . These costs do not include transportation costs, which could be large if water sources are not located in proximity of the well site. Strategically, it is important for the industry to develop less water-intensive fractures. In the midterm, the ability of the industry to utilize 6 Brackish water refers water containing 0.5-30 parts per thousand salt, which is 10 times less saltier then seawater (34.7 parts per thousand) 9 alternative water sources will play a significant role in reducing freshwater demand in fracturing operations. 2.2. Chemical Mixing After water is available on site, it is blended with fracture fluid additives (chemical compounds) to formulate a fracture fluid. After the necessary blending, the fracture fluid is injected in the wellbore at high pressure to induce fractures in the rock strata. For most water-based fluids, the additives may comprise of no more than 1% of the fluid by volume. However, given the volume of fluid used in hydraulic fracturing treatments, 1% additives' concentration on an absolute scale can represent a very significant volume of chemicals. The function of the additives is to alter the chemical and physical properties of water (e.g. Viscosity, pH, etc.) required for optimal fluid performance in the subsurface environment. It is not possible here to document an exhaustive list of additives, but commonly used additives and their functions are noted in Table 114,15 These include gelling agents, proppant, breaker, friction reducer, corrosion-inhibitor, scale inhibitor, biocides, cross-linkers, and clay stabilizers. For a detailed description of these additives, please refer to Appendix B: Description of fracture fluid additives. Table 1: Commonly used additives in a fracturing stimulation Additive Type Chemical compound Function Gelling agent Guar Gum Thickens the fluid particles____________________ Silica or resin coated ceramic Prevents the induced fractures from collapsing Breaker Ammonium Persulfate Allows a delayed breakdown of the polymer Friction Reducer Polyacrylamide/Mineral Oil Minimizes friction between the fluid and pipe Corrosion-. inhibitor N,N, dimethyl formamide Prevents the corrosion of a pipe Scale inhibitor Ethylene glycol Prevents scale deposits in the pipe Biocides Glutaraldehyde Eliminates bacteria in the water that produce Cross-linker Borate salts Maintains fluid viscosity as temperature increases Iron control Citric acid Prevents precipitation of metal oxides Clay Stabilizer Potassium chloride Prevents clay from dissolving in the water Proppant ____ chains corrosive byproducts 10 The influent water quality dramatically changes after mixing the additives. Hayes et.al reported the chemical properties of blended water (influent water with fracture additives) sampled at different well sites in Marcellus and Barnett16 . The summary of their chemical characteristics are shown in Table 2 (see Appendix C: HF Wastewater Characterization for detailed chemical characterization). There is a widespread spatial variability in the water quality parameters of the tested water samples. Typically, the blended fluid composition is rich in organic and nitrogen content along with a high concentration of salts. However, formulation of fracture fluids from heavily contaminated influent water can result in a heavily contaminated blended water quality. For example, in areas where fracture fluid is formulated using untreated HF wastewater, the blended fluid can be as saline as seawater (35,000 ppm) and have high oxygen demand and may also contain toxic compounds. Such a fluid if released into the environment (because of accidental spills or improper handling) can pose some serious health and safety concerns. Table 2: Analytical water characterization of influent water and after addition of fracture additives General chemistry Influent water Blended water Units Hardness as CaCO3' 18-1,080 26-9,500 mg/L Total suspended solids 2 <2-24 4-5,290 mg/l Total dissolved solids 3 35-5,510 221-27,800 mg/l Total organic carbon 4 1.8-202 5.6-1,260 mg/l Total Nitrogen 5 <3-56.4 0.28-441 mg/l 1Hardness is chemical analysis parameters measuring the amount of divalent ions in a water sample 2 Total suspended solids includes colloidal particles and any particulate matter 3 Total dissolved salts, which reflects the salinity of HF wastewater by measuring the salt (NaCl) amount in water. 4Total Organic carbon is the amount of carbon present in water bound to organic compounds 5 Total Nitrogen is the sum of both organic and inorganic nitrogen present in the water For a successful fracturing treatment, it is required that the fracture additives are chemically compatible with the influent water quality, especially when various types of wastewaters are utilized to formulate the fracture fluid. In general, fracturing additives are sensitive to scaling ions, dissolved solids and colloidal particles present in the influent water. For example, polyacrylamide gels (gelling agent) undergo a phenomenon known as "Syneresis" in the presence of high levels 11 of scaling ions. Syneresis is a process where the polyacrylamide chains excessively hydrolyze (causing precipitation) in solution to carboxylate polyions, resulting in gel collapse. The degree of hydrolysis is dependent on pH, temperature and divalent ion concentration 1719. In the absence of scaling ions, Syneresis occurs at elevated temperatures of approximately 200 F 19. High amounts of scaling ions result in increased hydrolysis sufficient to precipitate the polymer at even low temperatures, resulting in inadequate fracture fluid performance' 9 . Salinity of influent water also retards the stability of additives and limits the performance of fracturing treatment. However, improvements have been made in additive chemistries, which enable the utilization of brackish water (5000 ppm dissolved salts) for making the fracture fluid. Influent water rich in suspended solids could result in pre-mature biological degradation of the polymeric gel, resulting in gel instability and inefficient performance. Thus, controlling the influent water quality is one of the critical process requirements. Companies engaged in oil and gas development often maintain relatively strict criteria for the acceptable quality of influent water used when formulating the fracture fluids for their wells. These water quality requirements depend upon the type of fracture additives used in the fracture fluid and will vary across the operators. An increasing number of states require operators to disclose fracture additives being used, with Wyoming being the first state to implement it. The exact nature of disclosure and exemption of the data under this disclosure will depend on the implementing state authority, but a widely common exemption granted across states under this disclosure is the exclusion of proprietary additives from the disclosure. Publically reported (limited) disclosure are available either on a national hydraulic fracturing chemical registry7 , managed by the Ground Water Protection Council (GWPC) and the Interstate Oil and Gas Compact Commission (OGCC) or the state regulatory website. 2.3. Water Injection The blended fluid is injected under high pressure in the wellbore to generate sufficient pressure to fracture the rocks strata. After the fracture fluid reaches the subsurface environment, a variety of geochemical interactions takes place that alters the chemistry of the fluid. The geochemical reactions of prime importance in fracturing process are: (1) mixing of injected fluid with formation ' www.fracfocus.org 12 water, and (2) dissolution of sediments from the rocks into the fracture fluid. Water is present in all the rock formation as the sediment layers are usually deposited by water. Formation water can be referred to as the total water content of a hydrocarbon bearing reservoir rock. Formation water is highly saline (250,000-300,000 ppm or greater) and rich in other ionic species such as calcium, potassium, barium and strontium etc. The mixing of formation water with the fracture fluid is cited as the prime source of the high salinity content in the wastewater recovered from a fractured well. Furthermore, as a result of this mixing reaction, the dissolution of minerals in the fracture fluid (and hence the HF wastewater) from a rock formation is also facilitated 20-, making the fracture fluid (and hence the HF wastewater) rich in in calcium, magnesium, etc. This reaction has significant implications for the management of the recovered HF wastewater, since the extent of mineral dissolution in fracture fluid is proportional to the fouling potential of the HF wastewater. CHH H H H 040 .0- H I41 H 64 H ni ' H H -0 o H H H H Figure 4: Degradation of a gel by a breaking agent. The breaker used in this case is ammonium persulfate and the gel is made from Guar Gum. The degradation mechanism is a free radical degradation reaction and prone to exhibit reduced free radical activity due to inhibition of the free radicals by the degraded fragments In addition to geochemical reactions, the interactions between the various fracture additives can also form compounds that influence the chemical profile of the fracture fluid when it returns to the surface. For example, Guar gels (thickening agent) are degraded using breakers to minimize formation permeability reduction from obstruction of formation pores by polymeric film. During 13 this degradation reaction (see Figure 4), the activity of oxidizing breakers is limited by the polymeric by- products formed during the reactions. As a result, high molecular weight polymeric compounds are found in recovered HF wastewater, which increase not only its toxicity, but also makes water prone to biological attack. The combination of the above described interactions plays a critical role in defining the chemical profile of fracturing wastewater as discussed in the next section. 2.4. HF Wastewater Recovery Following a fracturing stimulation, large volumes of polluted water (HF wastewater) flows back to the surface over the lifetime of the well. Estimates of the fraction of hydraulic fracturing wastewater recovered vary from geologic formation and range from 10% to 40% of the injected hydraulic fracturing fluid. As shown in Table 3, in Pennsylvania, for example, reported cumulative volume of liquid waste generated during hydraulic fracturing operations in different PA counties ranged between 0.5-3 million barrels for the period of six months in 2013 (PADEP). Table 3: The reported cumulative wastewater volume in different counties in Pennsylvania. Counties (top 10 liquid waste) Waste type Liquid (bbl) Solid (ton) Washington 3,307,467 97,690 Greene 2,154,551 27,044 Lycoming 1,868,362 103,980 Susquehanna 1,703,058 134,930 Bradford 1,537,807 53,796 Westmoreland Tioga 1,284,411 822,689 13,920 18,628 Clearfield 766,241 2,015 Fayette 758,895 390 587,335 17,268,126 65,261 727,739 Butler Statewide total 8 Fracturing wastewater represents collectively flowback and produced water. It does not include drilling wastewater or any solid waste. 14 A thorough understanding of the chemical and physical composition of HF wastewater is fundamental to mitigate the environmental impacts that may arise from the mismanagement of the HF wastewater. The chemical constituents of HF wastewater are highly dependent on various water-rock interactions, the chemicals used in the fracture fluid and the fluid sampling point during the water recovery period. No typical chemical profile of HF wastewater exists; however, it can be expected to contain elevated levels of salts, scaling ions, oil and grease and other organics, naturally occurring radioactive material (NORM), and derivative compounds of those used as additives in the originally injected fluid 14,23-25. Table 4 shows an exemplary chemical profile of HF wastewater from the Marcellus shale region16 . The analytical characterization of HF wastewater quality parameters is a challenging task and requires insight into how different chemical interferences can limit the accuracy of conventional testing and analysis methods. For instance, as shown in Table 4, the Chemical Oxygen Demand (COD) values of HF wastewater increases with time whereas the Biological Oxygen Demand (BOD) values decreases with time. Depending on the ratio of COD/BOD, the biodegradability or toxicity of an industrial grade wastewater is determined. Higher ratios imply the wastewater is toxic in nature and requires specialized management and treatment procedure for safe disposal. In the case of HF wastewater, despite high COD and low BOD levels, characterizing HF wastewater as highly toxic can be an erroneous deduction since large COD values are representative of not only organic pollutants, but also high concentrations of inorganic oxidizable pollutants, especially chloride 26 . Nevertheless, the limited scope of the conventional COD testing procedure is ineffective in preventing these errors. Thus, for improving our understanding of the nature of contaminants in HF wastewater, it is essential to mask any inorganic species before measuring a HF wastewater parameter. Despite the analytical challenges in HF wastewater characterization, understanding the interaction between the different ionic species present in the wastewater is vital from the perspective of its optimal management. From Table 4 it is seen that the water is mildly acidic with moderate alkalinity 16. Low alkalinity coupled with high level of hardness observed in water implies that the majority of hardness is a result of non-carbonate salts of divalent ions such as calcium, barium, strontium and magnesium. Such non-carbonate scales are difficult to remove and can be very abrasive to equipment surfaces. Among the non-carbonate scales, BaSO4 is of particular 15 importance as it has the lowest solubility product among sulfate salts of divalent ions and is amongst the first scale to precipitate in the Table 4: An example of HF wastewater quality Parameters Fracture Fluid (mgL) HF wastewater (mg/L) Day_5 Day 14 pH Total Total Total Total Total 7.2 130 735 226 6.6 138 99 17,700 67,300 62.8 6.2 85.2 209 34,000 120,000 38.7 1,730 <2-2,220 4,870 144 8,530 39.8 Alkalinity suspended solids hardness as CaCO 3 Dissolved Solids Organic carbon Chemical Oxygen Demand (COD) Biochemical Oxygen Demand (BOD) Oil and Gas - 6.3 ND Calcium Barium Strontium - 4950 686 1080 ND ND ND Sulfate - -_- _ formation. The HF wastewater is supersaturated with respect to barium with an ionic product of BaSO 4 being in order of 10-3. This is 100,000 fold higher than the solubility product of barium sulfate (1.05*10-10 at 25 *C) assuming activities in solution for both ions to be unity 27. The apparent activity coefficients are likely much lower than 1 due to possible complexing of barium with low molecular weight acids such as aliphatic acids, dicarboxylic acids, aromatic acids and cyclic acids 28,29. The complexing reactions are more common in low salinity HF wastewaters that contain high concentrations of organic matter 30 . In addition, barite solubility increases with temperature, pressure and salinity. These factors substantially increase the dissolution of barium in HF wastewater 22,3 1. HF wastewater with elevated concentrations of barium also contains elevated concentrations of strontium and radium in the form of Ba-Sr-Ra complexes 32. These interactions further decrease the activity of barium in solution and lead to increased leaching of barium from formation rocks into water. Suspended solids in HF wastewater are colloidal particles with sizes varying between 1 and 10 microns 3 3 . Some of XRD studies have found barite to be the main constituent of suspended solids 24 in Marcellus region. Analytical characterization of suspended solids in the Daqing oilfields in China has found that the major suspended solid constituents were organics, iron, and barium. 34 16 The presence of suspended solids in HF wastewater increases its turbidity. The excess water turbidity acts as a barrier to sunlight and provides favorable conditions for growth of bacteria that ultimately damages the biological profile of the wastewater. 2.5. HF Wastewater Management As mentioned earlier that improper management of HF wastewater has resulted in negative consequences for both surface and ground water resources. In considering how to minimize the environmental impacts of hydraulic fracturing, effectively managing HF wastewater is obviously critical, and is not trivial. Generically speaking, three pathways exist for management of HF wastewater: injection into dedicated wastewater wells, treatment for surface discharge, and reuse or recycling of wastewater for use during a subsequent fracture treatment. This final pathway may or may not involve some form of treatment prior to reuse 1435,36. Injection may not be a feasible management pathway in all plays due to non-availability of suitable injection wells near to the well site. For instance, in Pennsylvania, there were only seven operating class II wastewater disposal wells in 2008, whereas Texas had over 11,000 class II wastewater disposal wells in 2008 25. This means that in PA, disposal of HF wastewater in dedicated injection wells requires the truck haulers to traverse long distances to out-of-state disposal wells, often located in Ohio and West Virginia. As such, the cost of injection can be very significant. For instance, in the Bakken shale play, the cost of deep well injection ranged from $1-$11 /bbl, out of which transportation costs represent 50-80% of total injection costs. Considering these cost estimates, assessment of the economic potential of HF wastewater recycling may seem very attractive for certain regions. The regional regulatory discharge limits heavily influences the treatment of HF wastewater for surface discharge. In the early stages of Marcellus Shale development, (2008-09) the majority of HF wastewater water was transported to domestic wastewater treatment plants (WWTP) for treatment and dilution followed by the subsequent surface discharge. However, WWTPs are designed to handle municipal wastewaters and so cannot remove contaminants such as dissolved salts, barium and other potentially harmful substances present in the HF wastewater 31. As a result, in Pennsylvania, WWTPs have limited the intake of HF wastewater to remain in compliance to the discharge limits ". Centralized Wastewater Treatment plants (CWT) are better equipped to handle HF wastewater pollutants by using advanced treatment technologies. Such facilities are 17 costlier than WWTP's and often not locate in proximity of the shale gas fields. Estimates of the cost of treating the wastewater to regulatory surface discharge quality are approximately between $3-$6/bbl 38 With increasing shale gas development, reuse and recycling of HF wastewater has emerged as a promising option for its management. Maximizing recycling can provide various benefits, including a reduction in the water intensity of fracturing operations by partially making up the process water demand and reduction in the impacts associated with trucking large volumes of water to and from a well site. Nowadays, both mobile (on-site) and offsite configurations are available for HF wastewater treatment. Examples include Ecologix TM ITS system, Aqua-PureTM NOMAD, etc. The feasibility of the HF wastewater reuse pathway is dependent on the volume of water produced over time. Wells producing large volumes early in the water production period are preferred for reuse due to the logistics involved in storing and transportation HF wastewater and the relatively lower levels of pollutants seen during the initial water production period. For example, Barnett, Fayetteville. and Marcellus shale all produce approximately 10-15% of HF wastewater over a period of two weeks, enabling efficient reuse process, whereas Haynesville wells produce approximately 5% of HF wastewater over the same period, limiting reuse opportunities . The technologies incorporated for recycling can range from dilution to the use of desalination technologies such as Reverse Osmosis, Mechanical Vapor Compression and Multieffect Distillation 39,'40. The use of desalination technologies for treating HF wastewater is an ongoing development and to ensure large-scale deployment of these technologies in the long term, it is essential to develop cost -effective system that is adaptable to the wide range of pollutants. 18 3. Regulatory framework around hydraulic fracturing There is a complex set of federal and state statutes governing the development and production of shale oil and gas in the United States. Federal statutes applicable to shale activities include the Clean Water Act (CWA) and Safe Drinking Water Act (SDWA). The enforcement and monitoring of these statutes primarily fall under state authority supplemented with federal oversight. In addition to these federal regulations, each state may develop its own distinct framework of regulating hydraulic fracturing activities in their regions based on geological, economics, and environmental factors. This section will outline the specifics of the federal and state regulations, which governs the hydraulic fracturing water cycle followed by a discussion about the challenges faced by policymakers in regulating fracturing activities. 3.1. Federal Regulations 3.1.1. Clean Water Act (CWA) The act was enacted in 1972 to protect water resources from sewage and industrial toxic discharges, and contaminated runoff"'0 . The act regulates the discharge of wastewater, including HF wastewater, though the National Pollutant Discharge Elimination System (NPDES) permits program, which requires all treatment facilities that discharge from any point source into surface water to obtain a NPDES permit 41. Permits can be tailored to individual facilities or cover multiple facilities within a specific geographic region. The permits have two sets of conditions to be met: (1) technology-based conditions, which generally apply to all permitted treatment facilities, and (2) water quality conditions which can be unique to each facility and tailored to local conditions found in the surface water that receives the treated wastewater (Source: NRDC). Environmental Protection Agency (EPA) may delegate the primary enforcement of issuing the permits to the states if the states are able to demonstrate that its regulations are as stringent as the set by EPA. In order to obtain a permit, "treatment facilities must complete an application that, among other things, describes (1) the waste that will be discharged, (2) where the discharge will Runoff is the unfiltered water that reaches streams, lakes, sounds, and oceans by means of flowing across impervious surfaces (Wikipedia). 10 The Federal Water Pollution Control Act Amendments of 1972, Pub. L. No. 92-500, Sec2,86 Stst. 816, codified as amended at 33 U.S.C. 1251 et seq. (commonly referred to as the Clean Water Act) 9 19 take place, and (3) the method of treatment" 42 . Once the state or EPA has issued a permit, facilities must report any discharges, including the amount of each pollutant specified in the permit, to the permitting authority at least once per year 41 Pursuant to pollution control mandates prescribed in CWA, it forbids the shale gas operators from discharging the contaminated HF wastewater on-site without a NPDES permit. As a result, there is a surge in the wastewater volumes received by the (permitted) CWT facilities for treatment. Some operators started using modular treatment systems, which can treat the wastewater on-site, thereby reducing the risks of waster spills. However, as these mobile units relocate, they are required to obtain a new NPDES permit. Unlike the on-site discharge of HF wastewater, the act exempts the discharge of stormwater runoff from a hydraulic fracturing well site. EPA has delegated the decision to regulate this run-off to the state. For instance, New York and Pennsylvania have permits that regulate the run-off from constructing and operations of fractured wells. 3.1.2. Safe Drinking Water Act (SDWA) The SDWA enacted in 1974 protects public health by preventing the contamination of water quality and thereby providing clean drinking water. Under the act, EPA sets Maximum Contaminants Level (MCL's) that may be present in water fit for drinking purposes. Pursuant to protecting the drinking water quality, it also regulates the placement of wastewater and other fluids underground through the Underground Injection Control Program (UIC). To implement the UIC program as mandated by the SDWA, EPA has established six categories of injection wells based on the type of materials injected in them. For the injection of wastewater produced in hydraulic fracturing operations, Class-II wells are primarily used. EPA may grant the states the authority for the UIC program if the state programs are as stringent as the federal statutes. Under this authority, states have primary responsibility for executing the UIC program for their state, including permitting, monitoring, and enforcements. Before authorizing a Class II well, EPA or the authorizing state agency must consider the (1) location of existing wells and other geographical features in the area, (2) well operator's proposed operating date, (3) injection fluid's characteristics, (4) injection zone's geological characteristics, (5) proposed well's construction details, and (6) operator's demonstration of mechanical integrity. 20 A suitable HF wastewater injection location requires that a fault and fracture free zone separate the underground injection zone from any underground source of drinking water. The wells must be cased and cemented to prevent fluids moving into or between underground drinking water sources. Once operational, the well's injection pressure cannot exceed a predetermined maximum and operators must maintain the well's mechanical integrity or cease injection. One of the frequently debated questions among policy monks revolves around the equivalence of hydraulic fracturing technology and underground injection in a technological context. The first attempt to answer this question came in 2005, the Energy Policy Act, which amended the definition of "underground injection" to exclude "the underground injection of fluid or propping agents (other than diesel fuels) pursuant to hydraulic fracturing operations related to oil, gas, or geothermal production activities" 4,". This exemption means that injecting fracture fluid in subsurface environment do not require UIC permits under the current SDWA regulations. The key trigger for this exemption can be traced back to EPA's decision in 90's, to exempt hydraulic fracturing operations from SDWA because the principle function of fracturing operations is not the injection of fluid but rather the production of gas "'4. In summary, SDWA regulates hydraulic fracturing operations in two ways: (1) underground injection of HF wastewater in Class-IT wells is subjected to the UIC permit requirement and (2) if diesel fuel is used in fracturing fluids, hydraulic fracturing is regulated under SDWA at the point of injection; while all fracturing operations using non-diesel based fracturing fluid are exempted from point of injection regulations under SDWA. 3.2. State Regulations In the United States, the regulation of oil and natural gas exploration and production has always been primarily a state matter. Economic motives drove the earliest state government interventions into oil and gas production. The regulatory mechanism commonly deployed by states in regulating the fracturing activities is as follows: 1) Command and Control Policies These policy tools traditionally deployed to address pollution problems. It mandates specific control technologies or production processes that polluters must use to meet a pollution mitigation standard. Commonly used control measures are either ambient standards, emissions standards or technology standards. Ambient standards set the amount 21 of pollutant that can be present within a specific environment; Emission standards set the limit on the amount of the pollutant release by a particular firm; and technology standards enforces the polluters to install technologies that they deem cost-effective in reducing the pollution. 2) Market bases incentives An alternative approach for mitigation pollution is by creating economic incentives for polluters to incorporate pollution abatement into production decisions. The benefits of such approach are that the polluters are motivated to innovate so that they can continuously reduce their pollution levels. Both these approaches have their advantages and disadvantages. Command and control prove effective in cases where the Marginal Abatement Cost Curves (MAC)" are uniform across the industries. In addition, these policies provide a clear outcome with simple monitoring. The downside of such policies is that they limit an industry's capability to find a cost-effective solution, leading to economic inefficiency. Not to mention, it is very costly for regulators to collect necessary information, and they often have to collect it from the sources that they are regulating - creating favorable conditions for regulatory capture. On the other hand, market based approaches are flexible, lower cost alternatives to traditional command and control policies. These approaches derive their efficiency by exploiting the potential gains from the difference in relative costs of abatement of pollution. The main disadvantage associated with economic incentives is that they can be inappropriate for dealing with environmental issues that pose equity concerns'. In the context of fracturing operations, the predominant regulatory tool used by different states is command and control ". The key areas of hydraulic fracturing water cycle regulated by states are: (1) water procurement and use; (2) disclosure of chemicals used in fracture fluid; and (3) wastewater disposal requirement. Since, the states are still struggling to adapt to the rapid pace of shale gas developments, the level of stringency in enforcement of regulations in the above key areas varies significantly across states. Moreover, each state regulates in a way to achieve implicit " MAC are a set of options available to an economy to deal with pollution. 12 http://yosemite.epa.gov/EE%5Cepa%5Ceed.nsf/webpages/EconomicIncentives.html 22 balance between the benefits of shale gas activities in their region and the environmental risks posed by these activities. 3.2.1. Water Procurement and Use State regulations about the water use in fracturing operations are dependent on the water rights prevalent in the state. There are two types of water rights systems: (1) Riparian and (2) Doctrine of prior or first appropriation. Riparian rights is a system of allocation of water for those who possess land along its path13 . All these landowners (including natural gas operators) can make a reasonable use of the water flowing adjoining to their land. However, the demands of both upstream and downstream users of water are weighed equally, which means that if the water levels are insufficient to meet the needs of the users (both upstream and downstream), the water withdrawals can be curtailed by the states. Such curtailment of withdrawal might not require a mediated declaration from states, implying that oil and gas operators may have very little warning to adjust to any such curtailments. Riparian rights are mostly prevalent in the eastern United States such as Pennsylvania, New England etc. In contrast, states following the doctrine of prior appropriation (such as Texas, Colorado) allocate the water rights based on first come first serve basis- the first party to use water for a beneficial purpose gets the water right. The first party to withdraw water from the stream is referred to as "senior" water right owner, whereas all subsequent owners are "junior" water right owner 46. In cases, when the stream has low water level, it is the junior water right owners who are required to curtail their water use to make up for the senior water right owners. The states apply this hierarchical curtailment of withdrawal by grouping the owners according to their seniority and when the rivers are running low, states issues a blanket order to restrict all withdrawals of water right owners who claimed their right after a certain year. The states issue the orders spontaneously, leaving very little response time for oil and gas operators to respond to this sudden limitation. The situation can be complex, especially when the oil and gas companies use a junior water right. 13 http://en.wikipedia.org/wiki/Riparian-waterjrights 23 3.2.2. Fracture Fluid Chemical Disclosure As mentioned earlier, many states now require oil and gas companies to disclose their fracture fluid formulations (excluding the proprietary additives) on fracfocus.org. Reports estimate that 130 companies have disclosed the chemicals used in more than 15,000 wells 46. According to a survey done by the Resource for Future (RFF) in 2013, 14 states have mandatory fracturing fluid disclosure requirements (see Figure 5). Every chemical data sheet contains information about the commercial names of the additives, chemical supplier, CAS number, and chemical concentration in the fluid. In 2013, nearly 500,000 additives ingredients are listed in the database Me "Wo of TvAp5 4'. %undh Uomesynbw of miwd als waft 00O11) Figure 5: Fracturing Fluid Disclosure requirement across states 3.2.3. Wastewater disposal requirements Based on the previous discussion about the nature of pollutants and their levels observed in fracturing wastewater, the release of this wastewater into the environment poses one of the biggest threats to the environment. The state regulates the storage, trucking and methods of disposal of wastewater with a varying degree of stringency. Storage of wastewater in some states such as New York, Michigan require it to be stored in sealed tanks on-site, whereas states such as Ohio allow for open pits storage of wastewater. In regions storing wastewater in open pits, states regulate the pit liners for safe isolation of the fracture fluid from the groundwater table. Wyoming is relaxed in its standards for pit liners and requires liners only "if necessary" to prevent the contamination.45 24 On the other hand, in states like Arkansas pit liner requirement are more stringent, requiring specifications of pit liners depending on the fluid being stored (fracturing wastewater, drilling fluid, etc.) There are also (working) regulations established concerning HF wastewater transport in tanker trucks. One aspect of these regulations focuses on minimizing the road wear and traffic congestion resulting from the large number of trucking trips. These include regulations about hours of travel, selection of truck routes, road use surtaxes. The other aspect of regulations focuses on placing proper safeguard against any wastewater spills, thereby leading to release of wastewater into the environment. Either the well operators or the wastewater trucking companies are responsible in some states to monitor and track the information about the wastewater transported. 3.3. Regulatory conundrum Shale gas extraction has played an important role in boosting ailing economies by providing employment opportunities in the states. A study by IHS Global Insight (2009) estimated that natural gas industry attributes approximately 2.8 million jobs in 2008, amongst which more than 600,000 jobs were "directly involved in exploring, producing, transporting, and delivering natural gas to consumers or in providing critical supplies or on-site services to the natural gas industry." There are other spillover benefits of the gas extraction such as increased growth of central water treatment facilities, booming truck business, and state revenue generation by providing injection wells for waste disposal. Leaving aside the risk posed by fracturing activities, each state has an incentive to reap some of these above benefits. States would be willing to relax their regulatory framework around shale gas extraction, thereby making their state more attractive to operators for shale gas activities. In this phenomenon, also referred to as "race to bottom", states deregulates the business environment or taxes in order to attract or retain economic activity in their jurisdictions, resulting in lower wages, and fewer environmental protections. Not only state regulations but also federal regulations also exhibit race to bottom phenomenon in its policy framing. Example include exemption of injection of fracturing fluid from the Safe Drinking Water Act. The race to bottom effect become disastrous when the risk of water contamination associated with the shale plays is included in the equation. Owing to this biased balancing of trade-offs by state, some environmentalist demand centralized control of fracturing operations. This means that states are no longer the workhorse of federal 25 authorities and the federal agencies regulate every aspect of fracturing operations. Having federal jurisdiction will provide a uniform regulatory framework structure across states, thereby empowering states in effective dealing with the environmental risks of fracturing. However, on the other hand, the inherent widespread heterogeneity in the political, hydrological, and geological characteristics of the states, often derided as a weakness, is actually a strength; each state can rapidly respond to its unique blend of economic and political framework to implement a regulatory structure that caters to their regional demands. Furthermore, state control can address the distinctive challenges in a timely manner by providing resources instantaneously as and when needed. In summary, the current regulatory strategies are more or less a series of tradeoff in protecting the environment and reaping the benefits of the shale gas activities. These trade-offs inform our choices about the regulations, but the question arises whether there is a systematic way to address these trade-offs. 26 4. Challenges in managing HF wastewater The management of HF wastewater is a complex techno-economic issue. Operators choose different approaches depending upon a plethora of factors, including the relative economics of management pathways, and the local availability of water. These factors are exogenous in nature and their complexity will depend on the various endogenous factors influencing HF wastewater management. These endogenous factors include temporal and spatial variability, operational specifications and regulatory environment within the region. In order to develop a solution space for the optimal management of HF wastewater, this section focuses on laying out these endogenous factors. 4.1. Temporal and spatial constraints The volume of wastewater produced declines over time as seen in Figure 6. The bulk of the HF wastewater produced in the early days, is relatively clean and more suitable for direct reuse by simply blending. However, the level of contamination of HF wastewater increases with time making it difficult to reuse by simple dilution techniques. More sophisticated treatments are required to condition the highly contaminated to enable further reuse or the wastewater is disposed of into injection well. This time-sensitive nature of wastewater production of completion/fracturing operation requires not only flexible logistics support, but also an effective method to capture these dynamics in making decision about the fate of wastewater. Range of Water Production Throughout Well Operational Life P14"a~ no of ProdsaW ww 15 days 40 3WL a 10 to 20 a00rs 0 Figure 6: Temporal trends in wastewater volume produced 27 The temporal dynamics in water quantity and quality are further complicated due to prevalence of spatial heterogeneity in the location of injection wells, treatment facilities, and well pads. Nonavailability of a management pathway in a close proximity of the well site can result in the selection of a sub-optimal pathway. For instance, in Texas, underground injection is a preferred choice of management option for operators not because it is the optimal, but because the injection wells are available in close proximity to the wells. Because of this heterogeneity, an optimal wastewater management system requires customization pertinent to the well specific spatial and temporal dynamics. 4.2. Operational constraints To achieve a successful fracturing treatment, it is essential that influent water quality is compatible with the fracture fluid additives. Table 5 summarizes the compatibility issues raised when the pollutants in the influent water quality are at very high levels. In general, fracturing additives are sensitive to scaling ions, dissolved solids and colloidal particles present in the water. Mineral scales tend to precipitate the polymeric gel and result in its collapse. Salinity of HF wastewater also retards the stability of additives and limits the performance of fracturing treatment. However, today technical advancements in additive chemistries enable the utilization of brackish water (5000 ppm dissolved salts) for making the fracture fluid. Water rich in suspended solids could result in pre-mature biological degradation of the polymeric gel, resulting in gel instability and poor performance. These concerns are elevated, especially in regions using HF wastewater for making fracture fluids. Table 5: Summary of potential additive compatibility concerns caused due to presence of high concentration of pollutant in influent water Parameters Total hardness as CaCO 3, mg/l Concentration 17,700-34,000 Issues - Inhibits gel hydration and destabilize the gel - Source of bacteria growth which may result in Total Suspended Solids, mg/l 100-210 Total Dissolved Solids, mg/l Chemical Oxygen Demand (COD), mg/l Biochemical Oxygen Demand (BOD), mg/l 67,300-120,000 4,870-8530 biological degradation of polymeric gel - Damage proppant pack, reducing reservoir permeability 40-144 4 - Destabilize the gel and increases fouling potential - Increased accumulation of non-biodegradable compounds in environment - High BOD content can damage the biological profile of water 28 Total Alkalinity (mg/L of CaCO3) NORM, pCi/L 85-138 2460-18,000 - Could delay crosslinking of fluids - High NORM content is hazardous for environment These concerns make it necessary to control the influent water quality for making the fracture fluid. Depending on the fracture fluid formulation, it might be the case that the total HF wastewater simply reused by blending it with fresh water or, the reuse of wastewater is only possible if it pretreated for pollutants. Alternatively, underground injection would be a technically feasible option provided that the wastewater quality is degraded to such an extent making it not fit for any treatment technologies or requires excessive freshwater for reaching the targeted influent water quality criteria. 4.3. Regulatory constraints Regardless of the fragmented regulatory framework in different states, they play a crucial role in constraining (or relaxing) the availability of a management option in a region. For instance, in Pennsylvania, according to the Pennsylvania Code, Title 25, Environmental Protection, Chapter 95 Wastewater Treatment Requirements (PA DEP, 2010) the official effluent standards (daily maximums) for hydraulic fracturing wastewater as of January 1, 2011 are: - 500 mg/L for TDS - 250 mg/L for sulfates - 250 mg/L for chlorides - 10 mg/L for total barium - 10 mg/L for total strontium In lieu of the observed HF wastewater contamination levels, complying with such stringent effluent discharge water quality regulatory limits could be difficult task. There are desalination technologies, which treat the wastewater to these limits, but they are not very cost-effective under the current scenario. As a result, in Pennsylvania, surface discharge is one of the least commonly used wastewater management pathways by fracturing operators. In another instance, the Ohio Department of Natural Resources placed a moratorium on injections into Class II wells in the Youngstown after finding a "compelling argument" that injections in the wells had caused a series of earthquakes in 2011 and 2012 41. A consequence of such regulations has indirectly increased the attractiveness of recycling and reusing pathways in managing HF wastewater. 29 4.4. Evaluation of wastewater management frameworks Widely formulated frameworks target to capture multiple dimensions affecting wastewater management. Some noteworthy formulations include the Integrated Multi-Criteria Decision Making model, Produced Water Management Information System (PWMIS), and Water Decision tree. These approaches rely on the common principle of formulating an integrated HF wastewater management system, but seldom do any of them provide a standalone solution to the problem. Furthermore, they merely re-iterate the complexities and challenges involved in the integration of diverse sets of interests in managing HF wastewater. 4.4.1. Integrated multi-criteria decision Integrated multi-criteria decision making models are based on analytical hierarchy processes (AHP) which integrates subjective and relative preferences in performing analysis of feasible options 48. To begin with, the first step in the process involves arranging the HF wastewater management options and the evaluation criteria's in a hierarchical structure. In order to develop a judgment matrix from the hierarchical structure, pairwise comparison between any two criterions and assigned a numeric value using a (subjective) scale. The options are assigned scores based on the comparison matrix and further ranked according to scores. The major advantages of the approach include a user-friendly interface, the inclusion of verbal and expert judgment, and the structured analysis of the problem. Despite being a broad spectrum approach, the aggregation of scores which are from scales of different units is often not easily interpretable 4. 4.4.2. Produced Water Management Information System Produced Water Management Information System (PWMIS) is an online resource for technical and regulatory information for managing the produced water. Originally developed by Argonne National Laboratory for Department of Energy, the system compiles the practices and technologies in a three-tier system, namely minimization, recycle/reuse, and disposal. Users provide their data through a series of questions regarding the well characteristics, regulatory framework, and company policy. Based on these user inputs, the system advances management options, which have less environmental impact. Currently, the system is unavailable for application. 4.4.3. Water Decision Tree Water decision tree was jointly developed by Petroleum Technology Alliance Canada (PTAC), Schlumberger, and Science and Community Environmental Knowledge (SCEK). The decision- 30 making process screens the viability of various treatment options based on series of operational and water quality questions. Operational questions include information about the fracturing fluid treatment type, additive types, bottom hole pressure and temperature, and geology of the formation, whereas the water quality question includes information about blending ratios, target water quality, etc. Based on these data, the fate of HF wastewater is determined. There is a limited flexibility concerning direct integration of regulatory and soft factors in the decision process 31 Section 2- Model Development 32 5. Modeling approach for management of HF wastewater The previous section described various qualitative and quantitative approaches developed or under research for management of HF wastewater. All the models merely re-iterate the complexities and challenges involved in effectively addressing and representing the diverse sets of interests in managing HF wastewater. This section presents an integrated modeling approach to optimize endto-end water management in a hydraulic fracturing water cycle. 5.1. Model Framework Figure 7 shows a conceptual layout of the model. The model is a linear optimization-based cost minimization algorithm. The objective of the model is to determine a comprehensive strategy for the management of HF wastewater in a sustainable and economical manner. In developing this strategy, there are various inputs required, such as the spatial distribution of water quality, availability of water resources etc. The decision variables in the model are the volumetric flows shipped to different treatment endpoints available in the region, denoted by X1, X 2 , X 3 ... , Xn in Figure 7. Treatment endpoints here refer to different wastewater management pathways such as underground injection, primary treatment, desalination etc. Quantitative relationships derived within each endpoint relate process variables to the overall cost of wastewater management using engineering design analysis and plant sizing studies. Treatmen endpoints X, HF Wastewater Treated HF wastewater at certain quality - Dilition Model boundary Figure 7: Conceptual layout of the model framework There are three cost parameters characterizing each treatment endpoint: (1) transportation costs, (2) treatment cost and (3) displacement cost. The transportation cost includes labor cost and fuel cost; treatment cost includes operating and capital cost of the plant and; displacement costs signify the savings (or expenses in the case where wastewater is lost to underground injection wells) 33 resulting from reduction (increase) in water demand for subsequent fracturing operations owing to any reuse and recycling of streams. Displacement cost is equivalent to transportation cost of hauling the water to the well site from the fresh water source. The output water stream in the model is calibrated at a certain water quality such that it could be further reused in the process. The framework bounds include constraints set on the intake capacities of endpoints, water withdrawal for any dilution if necessary, and lastly the mass balances across the model boundary. Finally, based on these inputs and parameters, the objective of the model is to solve for the optimal management strategy at a minimum cost to various stakeholders. A general mathematical formulation of the schematic is as follows Objective function n 15 Minimize t=1 {fy[ai(1 + Ei) + bi - CiEi - dEi]vit) + (ft + d)qt i=1 s.t vitei(wit - w) 5 qtw t = 1,2,3 ... T (influent water quality constraint) i=1 Wit = f ( win) t2 (predictingwastewater quality) n (qt + ti vit) = Qo t = 1,2,3 ... T (supply demand relation) i=1 Vit = Vt vit 5 yi vit t = 1,2,3 ... T 0 t = 1,2,3 ... T i = 1,2,3 ... n, t = 1,2,3 ... T i = 1,2,3 . . n, (volume balance) (capacity constraints) t = 1,2,3 . . T Where, ai= cost of transportation to ith endpoint, bi=cost of treatment for ith endpoint, d=price of water in the region, ci= cost of transportation of water from surface sources to well site, Ei = treatment efficiency of ith endpoint, vit=wastewater entering in the ith endpoint at time t, wit =output wastewater quality parameter for ith endpoint at time t, w=influent water quality criteria, Vt= HF 34 wastewater recovered in time t, yi= intake capacity of ith endpoint, qt= total dilution volume used at different endpoints, Qo= volume of fracture fluid required at a well pad 5.2. Techniques and Methodology This section outlines the data sources of the different inputs to the models and modeling methodology. 5.2.1. Determination of HF wastewater quality As described earlier that one of the challenges in managing the HF wastewater is the temporal variation in its quality. To resolve the temporally varying wastewater quality, spatial interpolation methods were employed to predict the water quality in a region. The workflow for interpolating the water quality is shown in the Figure 8. As the first step, the USGS Produced Water Database is queried for region of interest. The database provides detailed information on the water chemistry, sample location, sampling date, completion date etc. This data is reflective of the ultimate wastewater quality, defined as wastewater quality that has reached a plateau with respect to time (a common trend observed in HF wastewater as discussed in section Temporal and spatial). was watuapie Il C C) ode neplto Data mininl AACIS tolba Figure 8: Workflow for predicting the wastewater quality in fracturing operations The queried database is mapped in ArcGISTM to determine the sample distribution on a spatial scale. The next step is to remove any statistically insignificant outliers from the database using Cluster and Outlier Analysis toolbox. The tool assigns each input feature in the database a z-value that indicates statistical significance of the data point based on randomized null hypothesis. The output of the Cluster and Outlier Analysis toolbox enters as an input to the Interpolation tool (under Geo-statistical toolbox) to construct a spatial wastewater quality surface. There are various methods for spatial interpolation such as IDW, Empirical Bayesian Kriging, Polynomial Interpolation, Radian basis Functions etc. Given the large sample size, Inverse Distance Weighted (IDW) is selected for our purpose, as other methods are expensive computationally. IDW predicts 35 a value at a non-sampled location based on the assumption that sample points that are close to one another are more alike than those that are farther. The interpolation generates a spatially distributes raster image, which consists of ultimate wastewater quality data for each point which lies in the area of interest. After assigning each location a predicted ultimate wastewater quality profile, it is desired to develop a time series of wastewater quality using this information. Based on the literature, the rate of increase in contamination level is faster in the early days of recovery and drops drastically over time. Using this information, an exponential increase in contaminant level is assumed such that ultimate wastewater quality is reached in 10 years after the completion of well. Then, the water quality as a function of time is written as w(t) = Aebt Where, w(t) is wastewater quality parameterof interestsuch as total dissolved solids, calcium etc A, is a constant, function of the ultimate wastewater quality value b is decay constant in units of time- 1 The decay constants are generated randomly under the constraint that at t=10 years w(t) is equal to Ao. The model's methodology for estimation of these water quality trends has a high degree of uncertainty due to lack of complete detailed water chemistry dataset. Thus, this method is used as proxy in cases where a detailed information about the temporal and spatial characteristics of the wastewater is not available. 5.2.2. Determination of HF wastewater quantity Similar to the water quality temporal trends, there is a gradual decline in the water recovery rates (volume per unit time) over time owing to factors such as a drop in pressure gradient, and varying permeability of rock strata with depth. Severin et.al formulated an empirical model to predict the water recovery rate in shale formation using the Darcy Law 16. Darcy's Law governs the flow of a fluid in porous media such as rock. Based on this principle, the rate of water production is linearly co-related to the cumulative water volume recovered over the life of the fractured well. Thus, the rate of wastewater production can be written as, v(t) = Bce-ct 36 Where, V(t) is the rate of wastewater productionin gallons per day Bis the cummulative wastewater volume equal to total water recovered per total operation time c is decay constant in units of time-' The total water recovered varies across shale formations and could be anywhere between 10-40% of the injected water volume. Model assumes that fracturing a well requires on an average injection of 5 million gallons of water (FracFocus database registry). Thereafter, the total water recovered from a particular well is the product of percent recovery and injected volume. The decay constant for decline in HF wastewater production is calculated under the constraint that the cumulative wastewater is recovered in 90 days following the completion of a well. 5.2.3. Field development data Each operator has a definitive schedule or workflow for execution of a fracturing process. Among other details, this schedule documents the timeline of the wells fractured and the number of wells completed over the operational period. The schedule of completion may change according to the market dynamics or other contingencies prevalent in the region. For developing a dynamic decision making strategy, completion schedule is an important input to the model. Users define their completion schedule via the user interface in the model. The configurations of the model are set to a default completion schedule acquired from Drilling Info DatabaseTM, which consists of a well completion schedule for different operators in a given region in the past. Target influent water quality, is also a user provided data and varies considerably according to the fracture fluid formulation employed and formation characteristics. Various other user defined inputs include the type of fracture fluid formulation, volume of fracture fluid, and expected recovery rate, 5.2.4. Modeling transport network Increasing transportation costs for delivery and disposal of water is one of the prime concerns of the operators. The transportation cost is a function of the distance traversed between two points. Therefore, minimizing the travelling distance between origin and destinations points will 37 subsequently reduce the transportation costs incurred in the process. In accordance with this rule, optimized transport networks are formulated connecting different origin (0) and destinations (D) encountered in a fracturing operation. The frequently encountered O-D pairs in the modeling algorithm are as follows: 1) Shale gas well-to-well distance 2) Shale gas well-to-wastewater treatment plant 3) Shale gas well-to- underground injection well 4) Shale gas well-to-groundwater well 5) Shale gas well-to- surface water source Built-in toolbox in ArcGISTM- Network Optimization Toolbox- configures the transport routes between the above plausible O-D pairs. In order to prepare for running the Network Optimization Toolbox, different origins and destinations along with street network dataset (source: ESRI) are mapped in ArcGISTM. The spatial information about the gas wells is a user-defined data source, whereas the spatial information about wastewater treatment plants, groundwater wells, surface water sources are obtained from the publicly available database maintained by state agencies. After mapping the origin, destination and network dataset in ArcGISTM, the network analyst toolbox solves for the shortest travel distance between two points at a given time. 38 6. Preliminary Engineering Design Analysis Recycling or reusing the wastewater either for subsequent fracturing process or for discharge to a surface source requires a prior water treatment application. The simplest form of treatment is dilution. However, depending on the type and amount of contaminant present in the wastewater, a complex assembly of different water treatment unit processes may be required to achieve the desired level of treatment. Such an assembly is referred to as wastewater treatment plants. Reliable cost estimation of these wastewater treatment plants is a critical input to the modeling framework. Thus, this chapter discusses the methodology for estimating the construction and operating cost for two different wastewater treatment plants, namely (1) Two Stage Lime Softening Plant and (2) Desalination Plant. 6.1. Two-Stage Lime Softening Plant Figure 9 shows a schematic of the treatment plant. The plant configuration effectively removed scaling ions (calcium, magnesium, etc.), suspended solids and contaminants removable by filtration. In lime softening plants, the design follows a sequence of three-unit process: rapid mixing, flocculation, and sedimentation. Nowadays, rather than using different tanks for achieving these unit operations, Upflow Solids Contact Clarifiers (UFSCC) is used in the process. In the UFSCC, rapid mix, flocculation, and sedimentation occur in a single unit. These Clarifiers not only have high clarification efficiency, but also allow for easy sludge removal. Lime Wastewater ) Sod -ash Media filtration 2nstage softening Ststage softening Sludge Gravity Dewatered sludge to Belt Filter Press landfill Thickener Figure 9: Schematic of a two stage lime soda-ash softening plant 39 Treated HF Wastewater There are two clarification stages in the process, each utilizing UFSCC unit. Each clarification process begins with the mixing of the chemicals into the water, followed by agitation, termed as rapid mixing and concluded with sedimentation. Rapid mixing allows chemicals to react with the water, and precipitate scaling ions in the form of their insoluble salts. In this first stage of clarification, lime (calcium hydroxide) removes any carbonate hardness, which is mainly due to the presence of any carbonate salts of divalent ions while in the second stage of clarification soda ash removes non-carbonate hardness present due to any salts of divalent ions with anions such as sulfates etc. Rapid mixing follows by flocculation, where the colloidal particles settle down simultaneously with the insoluble divalent ion salts. Sedimentation is the last step in clarification where the suspended particles are retained in the tank to settle at the bottom under the influence of gravitational force. The second stage clarified water (or softened water) is sent to a gravity media filtration to remove any residual finer suspended solids that escaped the sedimentation tanks. The treated water may still require further dilution to comply with salinity standards for the end use, as this treatment sequence does not remove any salinity from the wastewater. Each unit process in the sequence generates a residual sludge that requires safe disposal. The current configuration for sludge management includes a sequence of dewatering of the sludge prior to sending it to a landfill site. Sludge is dewatered using a combination of gravity thickener and belt filter press. Gravity thickeners use gravitational force to dewater the sludge whereas belt filter press use mechanical force to concentrate the sludge. The preliminary cost estimate of the wastewater treatment plant is developed by summing the cost incurred in each unit process. Primarily, these costs include (1) the capital cost, related with the total investments and (2) the operating costs, related with the maintenances and current expenses. The percentage cost of the operating costs decrease as the capacity of the plant increases, owing to economies of scale. 6.1.1. Cost data sources Environmental Protection Agency (EPA) documents comprehensive information about the construction and operating cost of various unit process in form of cost curves 50. The cost curves parameterize unit process cost as a function of the plant capacities or design variables. Later Qasim 40 et.al developed mathematical equations from these cost curves that simplified the cost estimating procedures. Hence, mathematical equations as proposed by Qasim are used for estimating the capital and operating costs". According to this proposed method, the capital costs included in this estimation are manufacturing and electrical equipment, housing, excavation, site work and labor, piping and valves, and material cost while the operating expenses include materials, energy, and labor. The cost equations used for different unit process (UFSCC, gravity media filter and chemical feeders) of the plant are listed in Table 6, Table 7, and Table 8. Table 6: General cost equations for UFSCC [Upflow Solids Contact Clarifier Construction Cost Equations for basin area X Basin area General form = A + BX <400 m 2 >400 m2 O&M Cost Equation for basin area X General form=A + BX b a 62801.1 416.8 132264.7 244.3 a b 5.3 8.8 12.4 5967.9 5806.5 5939.8 G = 70 G= 110 G = 150 Table 7: General cost equations for Gravity filter Gravity Filter Backwash Pumping Costs for a filter area X Construction Costs: General Form: A + BX + CX 2 A B C o & M Costs for basin area X 36000 1254.21 -0.1212 General Form: AXB + C A B C Gravity Filter Structure Costs for a filter area X Construction Costs: 73.3 0.75 2200 General Form: AX 8exp(CX) o 35483.4 0.591 0.000162 A B C & M Costs for a filter area X 41 General Form: AXB + C A 359.5 B 0.8568 C 8100 Table 8: General cost equations for chemical feeders Lime & Soda Ash Feed Capital Cost for lime feed rate X General Form = A + Bln(X) A B -24950.9 20424.6 Operating Cost for lime feed rate X General Form = AXB A B 866.3 0.515 The cost of chemicals and filtration media is not included in the cost equations provided in Table 8. The cost of lime and soda ash for this estimate is 20 $/ton and 23 $/ton respectively and the cost of filtration media is assumed to be equal to 699 $/m3 based on commercial vendor pricing. Over the years, inflation induced changes in commodity pricing significantly affects the estimation of capital and operating costs. The majority of the cost functions adopted in the model are prepared based on commodity pricing in 80's. To adjust for inflation to current year, cost indexes are frequently used. The most commonly used cost indexes are the ENR Construction cost Index, the Building Cost Index (BCI) and the Producers Prices Received Index (PPRI). It has often been a customary practice among planners and engineers to use a single index to encompass the variation in the cost of different component 52. For this analysis, ENR index is used to update capital expenses, whereas PPRI index to update the operating expenses. To update the cost of a treatment plant using the cost index, typically a reference base year is selected, which is assigned a value of 100 5. In this analysis, 1913 is chosen as the base year. The cost functions adapted in the model utilize pricing based in the year 1978, therefore in reference to the 1913 estimates, the ENR cost index for the year 1978 is 2776 and for 2012 is 94142.25 and 42 PPRI index is 115 in 1978 and 284.95 in 201214. Using these values, the revised plant cost in the year 2012 is calculated as follows: Cost2o12 USD= Cost1978 USD X (CostIndex2o12/Cost Indexi978)1913 base year In addition to inflation adjustment, the total capital costs are amortized over the useful life period of the facility using capital recovery factor (CRF), which is defined below: I(1 + I)n [(1 + J)n - 1] Where, I is the interest rate and N is the number of years over which the cost will be amortized. All capital costs of this work will be spread over a period of 20 years at an interest rate of 10 percent54. 6.1.2. Process design consideration 6 0 0 Figure 100 200 400 300 500 600 Number of wells completed in an years 700 10: Relationship between cost of wastewater treatment and number of wells completed annually The on-site treatment plant capacity will vary depending on the average wastewater volume produced during the completion schedule. As a result, the plant treatment cost will be a function of the total number of wells completed during the operating period. If w is the total number of wells completed annually in a region, total annual wastewater volume (WV) produced is given by Vrw, where V is the volume requiredfor fracturinga well (equal to 5 million gallons) and r is the HF wastewaterrecovery in ayear (equal to 20% on an average). The relationship between w and 14 ENR indexes are obtained from Engineering News Review, http://enr.construction.com/economics/default.asp. The PPR index are obtained from Bureau 43 accessible of Labor Statistics. at the unit cost of wastewater treatment (c) is determined by the simulating the plant cost with plant capacity as a parametric function of w given by= Vrw, assuming plant has an operating factor equal to 60%. Figure 10 shows that with increasing number of wells developed in the region, the cost of treating wastewater decreases. Using Figure 10, the functional form of the unit cost of production is written as: C = 294.33w-0. 7 87 This relationship is used in the model to estimate the on-site plant treatment cost required for the projected development plan proposed in a certain region. 6.2. Desalination Plant Although dilution of wastewater is the simplest approach to handle salinity levels in fracturing wastewater, but in many cases where fresh water supply is limited, dilution is not always feasible. Another approach for managing salinity in fracturing wastewater is by use of desalination technologies. These technologies can effectively remove dissolved salts from the wastewater resulting in treating water (permeate) of drinking water quality standards (after some pre and post treatment). The two commonly used technologies are either membrane based or evaporation based. Membrane based technologies include Reverse Osmosis (RO) and Electrodialysis Reversal (EDR) and Evaporation based technologies include Multistage Flash (MSF) and Multi-Effect Distillation (MED). Evaporation based technologies are mostly suited for treating high salinity brine wastewaters and/or larger plants because their energy requirements are high and almost independent of the source of water salinity ". However, they require lesser conditioning of the feed stream unlike the membrane based technologies and are less susceptible to fouling and scaling. For the purpose of this thesis, we will focus on Reverse Osmosis technology (RO), as it is the most widespread and mature technology in the United States. The RO cost modeling is performed using Desalination Economic Evaluation Program (DEEPTM) tool, originally developed for the International Atomic Energy Agency (IAEA) by General Atomics and later expanded as DEEPTM. The tool is an excel spreadsheet where different technologies can be evaluated for optimal performance. 44 6.2.1. Reverse Osmosis (RO) Reverse Osmosis is a membrane-based technology where the feed water passes across a semipermeable RO membrane by application of high pressure on the feed side. As a result, dissolved salts (nearly 95% to 99%) are left behind in the reject stream. The amount of pressure applied depends on the feed salinity-more concentrated feeds require more pressure to achieve the desired level of rejection of salts. Figure 11 shows a basic schematic of the plant. RO Membrane -Pump , Prmete Water (Low Concentration of Sats) Reject Stream (Higher Concentration than feed water) Figure 11: Schematic of a basic RO loop (source: Puretec Industrial Water) It is important to note that extensive pre-treatment or conditioning of the feed stream is required before it enters the RO module. In the absence of pre-treatment, the membranes can frequently foul and develop scales on the surface, requiring costly premature cleaning or membrane replacements. Thus, the feed is treated both mechanically and chemically for contaminants such as suspended solids, hardness, bacterial activity etc. 6.2.1.1. DEEP "' RO model The RO model in DEEP TM utilizes Polyamide membranes with a design average permeate flux 2 13.2 L/m /h (LMI-). The RO plant is designed to produce a permeate containing dissolved salt concentration of 199 ppm. From Table 9 the plant is designed for a recovery ratio of 42%. Recovery ratio is the ratio of the amount of water that is recovered as desalted water (permeate). It is a critical performance parameter of an RO plant. Too high recovery can lead to problems of scaling and fouling whereas too low values can generate large residual waste streams. The recovery ratio's for RO plants are carefully established by taking into consideration feed water chemistry, and RO pre-treatment. The residual brine is managed by disposing it into a landfill or injecting into the saltwater disposal wells. 45 Table 9: RO model design parameters in DEEPTM RO Model Recovery Ratio Seawater Flow 42% 240000 m3/d Reject brine flow 140000 m3/d Seawater flow Outlet dissolved solids concentration Product water quality (before post) Temperature correction factor Salinity correction factor Membrane area factor (over reference) Pretreatment, pump, piping size increase factor Design net driving pressure Approximate inlet osmotic pressure Approximate outlet osmotic pressure Average Osmotic Pressure High head pump pressure rise 2778 60000 199 1.27 0.788 0.73 0.99 27.9 24 41 34.5 65.4 kg/s ppm High head pump power 23.7 MW Seawater pumping power Booster pump power Other power 0.6 1.2 1.7 MW MW MW Energy recovery -13.14 MW Total Power use 14.00 MW Specific Power use 3.36 kWh/m3 Maximum design pressure of the membrane Constant used for recovery ratio calculation Design average permeate flux Nominal permeate flux Polyamide membrane permeability constant Nominal net driving pressure Fouling factor Aggregation of individual ions correction factor Specific gravity of seawater feed correction factor Specific gravity of concentrate correction factor 69 0.00115 13.6 27.8 3500 28.2 0.8 1.05 1.02 1.04 bar - - PPM - bar bar bar bar bar - 1 /(m2h) 1 /(m2h) - - - - bar 6.2.1.2. Economic Analysis The designed capacity of RO plant is equal to 10,000 m3/day and the incoming feed salinity is calibrated at 35,000 ppm. The operating factor for the plant is 77% and the costs are amortized over a lifetime of 25 years with a capital recovery factor of 0.1. The total water produced annually is 3.3 million cubic meters at a salinity of 200 ppm by using a power of one MW. The detailed financial model of the plant is summarized in the Appendix D: Detailed techno-economic analysis 46 of RO plant. The capital costs of the plant include construction, and contingency costs. Construction costs are a significant portion of the capital costs, amounting to 88% of the total capital expenses. The total specific annualized capital costs of the plant equal to 0.34 $/m3. The operating expenses are composed of two components: energy costs and maintenance costs. As the RO process requires high pressures, significant energy costs are incurred in operation of high-pressure pumps. The energy costs amount to 48% of the total operating expenses. The remaining 52% of the operating cost is attributed to maintenance costs, which are incurred in membrane cleaning and replacement, and other general management costs. The total operating cost of the plant is 0.6$/m3. The total water production cost is 0.931 $/m3. For long-term profitability of the plant, it needs to generate cash flows from the sale of the desalted water. The selling price of the desalted water is determined by the payback period method. For an RO plant, typical payback period are 4-5 years 56. Thus, the selling price of water to the oil and gas operators was determined to be equal to $10/m3, giving a payback of 4.3 years. Refer to Appendix D: Detailed techno-economic analysis of RO plant for detailed financial analysis and cost breakdown. 47 Section 3- Analysis and Recommendation 48 7. Case Study Description This section discusses the application of the modeling platform to a shale gas development located in one of the major shale plays in the United States. The application will not only provide an understanding of the functioning of the model in a practical setting, but also demonstrate its utility in managing the hydraulic fracturing water cycle effectively. Although this application is solely for the purpose of illustration, the results of the model are indicative of the type of conclusions generated from a comprehensive user data inputs. 7.1. Barnett Shale Barnett shale is one of the prolific shale plays in the United States, underlying the city of Fort Worth, Texas. The play is located in the Fort Worth Basin in the north-central Texas and covers an area of 5,000 square miles1 . The shale formation is composed of sedimentary rocks of Mississippian age (354-323 million years ago). The core drilling and fracturing activities in this play are concentrated in areas that include counties like Denton, Johnson, Tarrant, and Wise. In these core counties, 1484 horizontal wells were completed in 2010. In 2006 there were 925 wells completed. Table 10: Shale has field completion schedule. API Number County State Completion Date 42-251-34007-00 42-251-34075-00 42-251-33891-00 42-251-33904-00 42-251-33828-00 42-251-33954-00 42-251-34092-00 42-251-34019-00 42-251-34018-00 42-251-34020-00 Johnson Johnson Johnson Johnson Johnson Johnson Johnson Johnson Johnson Johnson Texas Texas Texas Texas Texas Texas Texas Texas Texas Texas 4/1/2011 4/3/2011 4/16/2011 4/16/2011 4/17/2011 4/18/2011 4/22/2011 4/28/2011 4/28/2011 4/28/2011 For illustration purpose, a gas field development located in Johnson County is selected for analysis purposes. The field development schedule is composed of fracturing 10 wells at different spatially located well pads during a planning period of 30 days (see Table 10) (Source: Drilling Info T M ). "http://www.netl.doe.gov/File%20Library/Research/Oil-Gas/publications/brochures/DOE-NETL-2011-1478Marcellus-Barnett.pdf 49 There is large variability around the quantity of water injected to fracture these wells. The reported data on the water volume injected for fracturing wells during 2004-2013 in Texas suggests that the median volume of water injected into a shale gas well was 4.2 million gallons/15899 m3 (interquartile range in gallons, (3.0*106, 5.5* 106)) (source: Frac Focus database). However, for the modeling purposes, here a value of 5 million gallons (18927 M 3) of injection water per well is used. In a reference scenario, oil and gas companies operating in Johnson County and for that matter the Barnett Shale has predominantly used underground injection for the management of HF wastewater. Opportunities of recycling HF wastewater in subsequent fracturing operations are not completely exploited due to constraints on the cost of treatment, fracture chemistry and spatial and temporal variability in the water quality and quantity. In this illustration, it is intended to show that, how the use of the model would have made the HF wastewater management and planning decisions efficient and minimize the associated adverse impacts on the environment. 7.1.1. Water Supply Reliable water availability is one of the critical requirements in a fracturing operation. In Johnson County (and for that matter Texas), companies engaged in the shale gas extraction and production rely on either groundwater or surface water sources to meet their process water demands. In 2005, it was estimated that Johnson county utilized 530 million gallons of water annually for fracturing operations, out of which 320 million gallons of water was obtained from groundwater sourceswhich is approximately 60/40 split between groundwater and surface water sources 57 . The geography of Texas suggests that the amount of surface water decreases towards the south and west (combination of decrease in precipitation and increase in evaporations). This means that as the shale play expands southwards and westwards, fraction of groundwater use in fracturing activities will most likely increase through time (see Figure 12). Within the extent of Barnett shale, the Trinity and Woodbine aquifers are the primary groundwater sources, whereas the Brazos River Basin is the primary surface water source meeting the water demands in the Barnett shale. Figure 13 shows the geospatial data obtained for both these water sources from Texas Water Development Board (TWDB). Only a subset of these groundwater and surface water sources can serve as viable water supply for fracturing operations. Depending on the type of water source, screening criteria for these water 50 resources will differ. For this illustration, screening of the groundwater sources is in accordance to the Groundwater Availability Model (GAM) criterion while the surface water withdrawal locations are screened based on the historic USGS stream flow data. GAM establishes a minimum Figure 12: Estimate of the groundwater/surface water split in different shale regions. The base map shows the outline of major aquifers and major rivers in Texas. SW stands for Surface water source and GW stands for groundwater sources. yield for those groundwater wells where water is withdrawn for use in hydraulic fracturing operations 17. Based on the model, water wells supplying water to fracturing activities are required to have a minimum yield equal to 81 gallons per minute (gpm), with no downtime, which translates into a minimum yield equal to 50 gpm assuming two wells provide water to an operator. There are only 23 viable groundwater wells in Johnson County, which satisfy this criterion. Figure 13: Groundwater location and major rivers in Johnson 51 In mobilizing water from these sources to the well sites, optimal road networks are established to ensure that the movement of the truck fleet between the origin and destinations are smooth and at a minimal adverse consequence to the community. For the subset of feasible water sources, road networks are developed based on the methodology described earlier to determine the road distance between these water sources and gas well site. The networks are shown in Figure 14 and Figure 15. From these figures it can be seen that, the distance between the shale gas wells and surface water sources varies anywhere from 6-27 miles (standard deviation 7.5 miles) while the distance between the shale gas wells and the groundwater wells varies anywhere from 3-34 miles (standard deviation 8.2 miles) . However, many of these water sources might become unavailable subjected to seasonal variation and regulatory limits. Figure 14: Surface river withdrawal locations in vicinity to the gas wells Figure 15: Road network connecting gas wells to groundwater wells 52 7.1.2. HF Wastewater quality and quantity The source of contamination in the HF wastewater is attributed to various geochemical reactions occurring in the subsurface environment and the residual fracture additive chemistry. The three key water quality parameters analyzed in the wastewater are calcium, total dissolved salts, and turbidity, mainly because high concentrations of these parameters in the wastewater can lead to destabilization of the fracture fluid additives17-'9. Generation of temporally distributed HF wastewater quality profiles requires determination of two parameters: (1) ultimate effective wastewaterquality and (2) growth rate (see section Techniques and Methodology). Following the model methodology, USGS Produced Water Database is used to obtain water quality parameters (total dissolved solids and calcium) at water sampling locations in Texas to develop spatially interpolated salinity and calcium profiles for Texas (see Figure 16 and Figure 17). Based on the interpolation results, Table 11 shows the estimates of the ultimate effective wastewater quality parameters for each planned well site. However, the wastewater samples found in the USGS database were not characterized for turbidity16 parameters. Therefore, to calculate the spatial distribution of turbidity concentration present in the HF wastewater, each well is spatially assigned a randomly sampled ultimate effective wastewater turbidity parameter from a Poisson distribution with a mean turbidity equal to 2000 ppm. Of course, this method is an approximate representation of the spatial and temporal characteristics of the HF wastewater turbidity parameter, but the model can develop precise profile with the availability of user-defined data set. Table 11: Ultimate wastewater quality parameters for selected well sites Well A B C D E F G Ultimate effective salinity, ppm 157277 157277 123725 157846 123725 159077 159569 Ultimate effective hardness, ppm 11075 11075 11449 11155 11449 11779 11865 16 Turbidity here is a measure of concentration of suspended 53 Ultimate effective turbidity, ppm 2053 2053 2070 1954 2020 1913 1949 It is important to emphasize here that in the Barnett shale, calcium is observed to be a major constituent of hardness causing ions in wastewater 16. Thus, in this particular case, hardness parameters are synonymous with calcium concentration in the HF wastewater. In addition, some wells will show similar HF wastewater quality as they are fractured on the same well pad. The second parameter- growth rate- as previously mentioned is determined based on the assumption that the wells reach the effective wastewaterquality over the period of 10 years from the day they start producing wastewater. Figure 16: Salinity profiles in Texas based on spatial interpolation 44' Fgo Figure -eol 17: Calcium profiles in Texas based on spatial interpolation 54 Temporally distributed total dissolved solids and calcium profiles are assigned to each fractured well location by fitting both the ultimate effective water quality parameters and growth rate, to an exponential growth model. The resulting HF wastewater profiles for the completed 10 wells are shown in Figure 18, Figure 19, and Figure 20. As shown in these figures, salinity of HF wastewater can be as high as 80,000 ppm, which is twice the salinity of seawater. Likewise, the maximum hardness and turbidity concentration is equal to 6000 ppm and 800 ppm, respectively, in a month. Salinity time-series 100 - 80 . 60 - 40 C2 0 U 20 0 -_ 1 6 11 16 Time elapsed, days 21 26 Figure 18: Time series of salinity profiles of HF wastewater Hardness time-series - 7000 6000 5000 .2 4000 3000 0 - 8 002000 U1000 * 0 1 6 11 16 21 Time elapsed, days Figure 19: Hardness time-series profile for HF wastewater 55 26 Turbidity time-series 900 - - 800 E 700 600 .0 500 400 - S300 0 - - U 200 100 0 1 6 11 16 Time elapsed, days 21 26 Figure 20: Turbidity time-series profile for HF wastewater Similar to HF wastewater quality profile, the volumetric rate of HF wastewater production is calculated using an exponential decline curve. Two parameters required for fitting the exponential decay curve are: (1) cumulative HF wastewater volume and (2) decay constants. Cumulative HF wastewater volume recovered is a function of the injected water volume and HF wastewater recovery. In Barnett shale, Nicot et.al have reported a wastewater recovery of approximately 60% after one year of production". Since the model uses the assumption that the cumulative water volume is reached in 90 days after the well is brought online, 60% annual wastewater recovery is equivalent to approximately 15% wastewater recovery in 90 days. For this analysis, a slightly higher recovery value of 20% is utilized. To account for heterogeneity in the geology of the formations, the wastewater recovery are randomly sampled from a Poisson distribution with a mean cumulative HF wastewater recovery volume equal to 1 million gallons (20% of 5 million gallons) in the first two weeks after the fracturing treatment). Obviously, the HF wastewater volume distribution varies depending on the geology of the shale play and the user can define these parameters in the model to reflect the geological and operational conditions of the development. Using the sampled recovery for each well, the cumulative water recovery is equal to the product of the recovery (in %) and injection volume. 56 450 400 350 300 250 200 150 100 50 0 0 10 20 30 Time elapsed, days 40 50 Figure 21: Rate of wastewater production in different wells In order to integrate the cumulative HF wastewater volumes into the model, it is required to decompose these volumes into a time series of HF wastewater production. As mentioned earlier that exponential decay curve are better fit for modeling the HF wastewater production. To generate this curve for each fractured gas well, the decay constants are calculated using the boundary condition that at t=90 days, the total water recovered is equal to the cumulative HF wastewater volume. See the detailed calculation for determining the decay constant in Appendix E: Decay constant for estimating the volumetric rate of production of HF wastewater. This boundary condition gives the decay constant equal to 0.22 per day. Using the derived decay constant and estimated cumulative wastewater volumes, the exponential decline curve for volumetric production rates for HF wastewater is determined and shown in Figure 21. 7.1.3. Influent water quality Companies engaged in oil and gas development often maintain relatively strict criteria for the acceptable quality of influent water used when formulating the fracture fluids for their wells. These specifications depend upon the type of fracture fluid formulations being utilized. The three general fracture fluid formulations commonly used are (1) Cross-linked fluids, (2) Slickwater fluids, and (3) Hybrid fluids. Cross-linked fluids comprise of a gelling agent with one or more crosslinking agent in water; Slickwater fluids are composed of friction reducing agents and (or) low molecular weight gelling agents in water; and Hybrid fluids, as the name suggests is a combination of crosslinked fluids and slickwater fluids. A recent analysis of U.S. hydraulic fracturing fluid system 57 trends shows that out of the total wells fractured during the third quarter of 2012, 34% used crosslinked fluids, 24% used slickwater fluids, 40% used a hybrid combination of cross-linked and slickwater fluids and 2-3% other -miscellaneous types of fluid systems41. Table 12: The influent water quality for formulating fracture fluid used in the model Parameter Range Total dissolved solids, mg/l 9,000-16,000 Turbidity, NTU 0-5 pH 6.5-8 Iron, mg/l 1-10 Chloride, mg/i 5,000-10,000 Potassium, mg/1 100-500 Calcium, mg/l 50-250 Magnesium, mg/l 10-100 Sodium, mg/l 2,000-5,000 Boron, mg/l 0-20 For the purposes of the analysis presented here the influent water quality specifications utilized in the model were set as shown in Table 12'9. Based on this guideline, any water that has less than 16,000 ppm salinity and has a hardness level of less than 1000 ppm is considered acceptable as influent for use in the Johnson County fracturing operations under consideration. It will be later shown that varying this quality can substantially affect the volume of wastewater reused possible in the subsequent fracturing process. 7.1.4. HF Wastewater Management Traditionally, numerous UIC underground injection wells located within Johnson County have been the dominant pathway for managing the HF wastewater. However, owing to water scarcity in Texas and growing concerns around potential contamination of drinking water supplies from HF wastewater, approaches to recycling and reusing the HF wastewater are being actively sought. There is a broad spectrum of water treatment technologies documented in the literature for removal of a wide variety of contaminants present in the HF wastewater such as Filtration, Oxidation, and Adsorption for removal of organics; Nanofiltration, Electrodialysis, Lime-softening, and Ion exchange for removal for removal of scaling ions; Reverse Osmosis, Multi-Stage Flashing, and Freeze-Thaw for removal of dissolved salts". The selection of the treatment technology in the model is a user-defined choice based on the characteristics of their specific field development. 58 For this analysis, however, model considers to reduce the concentration of three key contaminants in HF wastewater prior to recycling it in the process: scaling ions, chlorides and suspended solids. This is achieved by using one or more of the following methods: (1) On-site dilution and re-use without any treatment, (2) On-site lime softening followed by dilution and (3) off-site desalination (Reverse Osmosis) and discharge. Additionally, underground injection to class II wells are also available for disposal of any HF wastewater as necessary. It should be noted here that on-site dilution as an option implies that water is being reused for another fracture treatment on either the pad of origin or another well pad, depending on the field development schedule. The geospatial dataset for class 1I injection wells in Johnson County is obtained from the Railroad Commission of Texas (RRC) and the geospatial dataset for desalination facilities is obtained from the Texas Water Development Board (TWDB). There are 21 active injection wells (for oil and gas waste disposal) in Johnson and 38 desalination plants across Texas, out of which the majority of the plants use Reverse Osmosis (RO) technology. Within a 50 miles radius around the wells studied here, there are 4 desalination plants and 21 injection wells (see Figure 22). Table 13 shows the distance between wells to their corresponding closest desalination plant and closest injection well. Table 13: The distance of nearest injection wells and desalination plants from the gas wells Well A B C D E F G Injection Well (miles) 4.0 6.7 6.8 4.9 2.5 4.0 8.9 Desalination Plant (miles) 9.1 9.1 22 7.3 22 25.8 27.4 It should be noted that these distances are static parameters for each well because the injection plants and desalination plants are stationary. However, in case when HF wastewater is transported for reuse at another well site, the same well-to-well distance is a function of time. For example, let us say that at t=2nd day, well A is sending water to well B as it is located in closest vicinity to the producing well A and is not yet producing wastewater itself according to the fracturing schedule. However, at t=1 0 th day, the well A is no longer able to send wastewater to well B as it is already brought online (or fractured). Thus, both the wells instead send their wastewater to a third well C scheduled for fracturing on t=12th day and located at an optimal distance from both the producing 59 wells, A and B. This inter-transfer of wastewater between the different well pads will later turn out to be very useful in managing the HF wastewater for an operator. Figure 22: The figure on left shows the transportation network from gas wells to deep-water injection wells whereas the figure on the right shows the transportation networks from gas wells to desalination plants (RO). 7.1.5. Economic inputs As mentioned earlier that each treatment endpoint is characterized by three cost parameters that significantly depend on the region of operation. Firstly, the transportation costs are incurred in hauling water in trucks back and forth from the well site and to appropriate endpoints. The trucking contracts are based on the mileage allowed per (loaded) mile for mobilization of the trucking fleet to transport the required volume of liquid. The cost per mile is the summation of the personnel and fuel cost incurred in trucking the fluid between two locations. For this illustration, the detailed calculation for estimating the cost per mile is shown below: Assumption: A vehicle travels an average of 35 miles per hour at 10 miles per gallon Fuel costs $3.5 per gallon Calculations $100 hourly ratefor personnel divided by 35 mikes per hour= $2.85 per mile 10 miles per gallon at $3.5 per gallon = $0.35 per miles Total = $3.2 per mile 60 The mileage allowance estimated by this method is in the typical range as quoted in the different invoices and different contractor survey analysis 60. Of course, actual costs can vary significantly depending on the market for transport services in the region and so actual transport costs are an important user-defined exogenous input to the model. It is further assumed that the capacity of the trucks is 2,500 gallons. The second cost parameter is the displacement cost. Any wastewater volume, which is recycled into the system, results in a reduction in the same amount of water volume to be transported to the well site. Thus, these savings are identified in the model in the form of displacement costs and equivalent to the cost of water otherwise sourced by the operators for making the injection fluid in the absence of HF wastewater recycling. These costs mainly include transportation cost of hauling the water to the well site from the water source. The third cost parameter is the treatment cost associated with each endpoint. Treatment cost varies depending on the technologies used for treating the HF wastewater. For this analysis, there are two treatment technologies available: RO plant and on-site lime softening plant. The RO plant being stationary has a fixed plant capacity and hence a fixed cost of treatment, equivalent to 10$/m3 (see Desalination Plant for detail plant sizing study). However, the on-site plant being modular in nature, the unit cost of treating HF wastewater is a function of the number of wells completed in the region annually. From Drilling Info DatabaseTM, number of wells completed in Johnson County for the year 2011 is 297. Using the functional form of the relationship between the wells completed and the cost of treatment as shown in Figure 10, the unit cost of water production is equal to 0.5 $/bbl (3.3 $/m3). Reported costs for disposal via injection wells vary broadly. A range of between 0.5-1.75 $/bbl has been reported in the literature, though anecdotal reporting has suggested higher costs in some instances6 16 2 . For modeling purposes here a lower value of 0.25 $/bbl is used. Again, these are user-defined inputs and can be altered to reflect the cost profile of any given pathway within any particular market. 7.2. Results Over the entire planning period of 30 days, shale gas field (10 wells completed) located in Johnson County, Texas produce approximately 9.2 million gallons (34826 M 3 ) of HF wastewater. Figure 23 shows the optimized aggregate HF water management plan for the field development, where the x-axis denotes the progression of the well completion schedule and y-axis shows the total 61 volume of HF wastewater produced by completed wells on each day of the planning period. In comparison to the reference scenario (where the total volume of HF wastewater is sent for underground injection to class II wells), the modeled scenario suggests following strategies: (1) 46% of the HF wastewater can be captured in form of reuse (by combination of dilution and onsite treatment) for subsequent hydraulic fracturing operations, (2) 50% of the HF wastewater is disposed to underground injection and (3) 4% of the HF wastewater is discharged to surface water after treatment at an off-site desalination plant. These strategies taken together, can result in curbing at least 9% of the hydraulic fracturing water demands in the base case scenario. 6 a Dilution aOnsite Treatment 5 a Offsite Treatment Underground Injection 4 24 4/1 4/6 4/11 4116 4/21 4/26 5/1 5/6 Completion date Figure 23: Water management plan for the field development It should be noted here that in this illustration, the field development is not continuous, i.e. after 30 days (total operation time) there is no well scheduled to be fractured. However, the completed wells still produce wastewater after the total operation time. This volume of wastewater is referred here as residual wastewater. For this illustration, the management of residual wastewater is actively managed by underground injection to class II wells and off-site desalination, while the other two on-site management options are rendered inactive due to discontinuity in the field development. As seen in the Figure 23, the optimal plan for managing the residual wastewater is by sending the majority of the volume to a class II well for underground injection and partially to offsite desalination plants. Alternatively, in a case of continuous field development plans, this residual wastewater (or a portion of it) will be reflected in the form of reused wastewater (by dilution or on-site treatment) for subsequent fracturing operation, thereby resulting in a higher 62 percentage of recycled HF wastewater. In this particular instance, the HF wastewater quality and quantity enabled successful reuse of the majority of the HF wastewater by simple on-site dilution. This may not be the case for field developments where the HF wastewater quality and quantity are not conducive for capturing majority of reusable volume of wastewater by simply dilution (e.g. Marcellus shale play). In these regions, alternative treatment methods such as on-site limesoftening, and off-site desalination system have proven more effective. While the aggregate water management plan offers insights about the overall field level impact of the fracturing operations on the water logistics, individual wells (or well pads) may have a slightly different mix of management strategies, depending on their local spatial and temporal parameters. There are certain key trends that can be drawn based on the individual well management plans. In the initial days when a few wells are completed, dilution of HF wastewater is a dominant management option across the producing wells. However, with the increase in the number of producing wells with time, underground injection in class II wells becomes the dominant HF wastewater management option. The reason for such a shift in management option is due the increasing pollution level in the HF wastewater, which makes it economically and environmentally sub-optimal to reuse HF wastewater in fracturing operations owing to compatibility concerns with the fracture additives. The total cost of implementation of the plan includes water acquisition, management and disposal costs incurred in a hydraulic fracturing field development. The cost incurred in the reference case is $ 4.7 per well per barrel of water handled on the well site whereas the base case (shown in Figure 23) costs $ 3.8 per well per barrel of water handled on well site, resulting in a 20 % reduction in water life cycle costs. Another significant area impacted by the findings of the base case is the environmental footprint of the fracturing operations. Because of the optimized water management plans, the number of truck trips and thereby the resulting community disruptions and noise are reduced drastically. In the reference case scenario, total round trip trucking miles required to acquire fresh water and manage the HF wastewater are 58,610 per well. Comparing this to the optimized plan of water management, the total number of round-trip trucking miles is reduced to 42,000 per well, owing to internal reuse of wastewater, resulting in a 28 % reduction in trucking miles. This reduction in 63 truck traffic also translates into reduced surface disruptions, low noise pollution, and improved ambient air quality. 7.3. Sensitivity analysis 7.3.1. Influence of influent water quality Controlling the quality of water used in formulating the fracture fluid is of prime importance in HF wastewater decision-making process. As mentioned earlier, the additives used in the fracture fluid have limited tolerance to the amount of contaminants present in the influent water. Depending on the operators' fracture fluid formulations, one may require the influent water quality equivalent to fresh water, while some may be relaxed and accept industrial grade wastewater. This analysis considers three types of influent water quality requirements are considered, namely: (1) Fresh Water, (2) Brackish Water (total dissolved solids 5000 ppm) and (3) Seawater (total dissolved solids 35,000ppm). The default water quality used in the base case is shown in Table 12. Undergmund Injection a Offisuie Treatment wOnsit Treatment a Dilution 10 1=4 0 Freshwater Brackishwater Seawater Figure 24: The aggregate breakdown of the modeled plan for the three influent water qualities. Figure 24 shows the aggregate breakdown of the modeled plan for each of the three types of influent water qualities. The y-axis in this figure denotes the total volume of HF wastewater managed by each treatment endpoint specified in the model during the entire planning period. It is evident from the Figure 24 that with relaxing the criterion of the acceptable pollution or contaminant level in the influent water quality, higher percentage of HF wastewater can be reused in the subsequent process. Moreover, employing a stringent influent water quality for formulating fracture fluid will necessitate the utilization of off-site desalination treatment plants to capture any reusable volume of HF wastewater. Underground injection remains a dominant option in the 64 optimized plan, with its proportion decreasing with decreasing stringency in the water quality requirement. Seawater Base Case Brakishwater Freshwe"c 3 4 Cost ($#bb) 5 Figure 25: Impact of influent water quality variation in fracturing operation on the water management costs. The impact of influent water quality on water cycle life cost are shown in Figure 25. The highest cost is incurred in the fresh water scenario while the lowest is incurred in seawater scenario. These cost trends are smoothly aligned with the choice of treatment endpoints in different scenarios. Since in seawater scenario, due to relaxed water quality allowance, the reusable volume of HF wastewater can be captured by simply dilution, which is also the relatively cheapest option, the cost of water management is lowest for this scenario amongst all scenarios. However, in the fresh water scenario, due to stringent water quality allowance, the reusable volume of wastewater is captured by a mix of dilution, and off-site desalination, thereby driving the cost of water management to be the highest amongst all the scenarios. 7.3.2. Influence of water availability in the region In the base case, the water supply for fracturing operations in Johnson is available within a close perimeter around the field development plan. However, due to the ongoing drought conditions in Texas, the availability of water in proximity of the plays is certainly questionable. Water hauling from sources located at very long distances from the plays, will greatly impact the HF wastewater management as well as the economics of fracturing water supply chain. Thus, it is vital to understand these impacts so that contingency plans can be prepared and appropriate measures can adopted to ensure continual fracturing operations at minimal environmental damage. To estimate these impacts, the model runs three cases, which are as follows: 65 1) Case A- the mean distance between the gas well and fresh water source is 30 miles 2) Case B- the mean distance between the gas well and fresh water source is 40 miles 3) Case C- the mean distance between the gas well and fresh water source is 60 miles a Dilution SOnit* tramMent a Mte Tn~anwnm Underwtd Injccton -6 S 2 0 Base case Case A Cae B Case C Figure 26: Aggregate water management plan The results of these cases are compared against the base case (see Results), where the mean distance between the gas well and the fresh water source is 15 miles. The results are shown in Figure 26 and Figure 27, which shows aggregate management plan for different cases and cost of implementation of plan respectively. As it is evident from Figure 26, with increasing hauling distance between gas wells and water sources, the proportion of wastewater being managed by offsite desalination plant increases. Simultaneously, there is an increase in overall wastewater volume captured for reuse with increasing distance of water sources from the gas wells. These trends indicate that any water supply constraint for a fracturing operation will result in increased reuse and make the desalination plants attractive. 6 4 0 BaseCase Cus A Cus B Case C Figure 27: Impact on cost of water management 66 While recycling and reuse of wastewater is encouraging step towards curbing the water stress prevalent in the region, the cost of implementation of such a strategy increases tremendously in comparison to the base case. In comparison to the base case, case C has 40 % higher cost of wastewater management plan, which is due to the higher transportation costs and the increased proportion of offsite desalination endpoint in the management plan. Based on this analysis, it is crucial from an operator's perspective to foresee these dynamic challenges and realize the value of wastewater. Similarly, from a regulatory perspective, these insights are valuable to understand the intrigued dynamics underlying the fast paced shale revolution and long term planning of infrastructure. 67 8. Policy recommendations The model framework is designed to represent the hydraulic fracturing water cycle (water acquisition and HF wastewater management) as an integrated planning and management system to examine the interdependency of the factors, including hydrology, geochemistry, physical infrastructure and regulatory paradigm. As a consequence of the model's holistic representation of the fracturing water cycle, the model can provide regulators a clear line-of- sight to dynamics involved in shaping an effective regulatory framework around hydraulic fracturing. This chapter discusses in detail the key policy outcomes derived from the model application. 8.1. Non-uniform policy framework As it is seen from the case study that each well differs in its characteristics, thereby making it evident that each region will have its own customized management plan optimized to its specific features. Incorporating these insights into policymaking, implies that each state should be empowered to internalize the variability in geochemistry, resources, economics, etc. so that optimal policy decisions can be made. Such internalization of heterogeneity at the state level means that there will be a widespread patchwork of hydraulic fracking regulations across states, with each region operating its optimal management policy, different from the other. The case study results have provided strong evidence that the heterogeneity across shale plays places the state regulatory agencies in a strong position to rapidly respond to its unique blend of regional dynamics. A typical example of such policy making can be encountered in the case where the different influent water quality target are employed across regions (Figure 24 and Figure 25). Depending on the type of influent water quality criterion, different water reuse technologies can present themselves as the Pareto optimal option. In regions where freshwater quality of influent water is required, a combination of desalination technologies and dilution are effective in managing the wastewater. However the strategy is different when the influent water quality is relaxed to the level of seawater, where it is seen that simple dilution is sufficient to capture the reusable wastewater. This implies that for a particular state regulatory agency if the prominent influent water quality in their region is fresh water, investing in public infrastructure such as desalination plants can prove to be a useful long -term solution; while on the other hand, if the prominent influent water quality in the region is seawater, promoting dilution practices through effective regulations (e.g. pipelines investments, liability laws etc.) can prove to be a useful long68 term solution. For implementing these statewide policy changes, it's essential that each state agency is empowered with resources so that they can invest sufficient time and funds in monitoring the compliance and enforcement of regulations. 8.2. Market based policy approaches As mentioned earlier, the current landscape of state policy approaches around hydraulic fracturing operations are conventionally command and control regulations. These approaches typically enforce implementation of a uniform pollution control strategies, assuming that all the players have identical marginal abatement curves. However, it is clearly noted from the model application that the pollution abatement curve is not uniform across operators and rather a function of various operating, geological, hydrological and economical parameters. Thus, such intrinsic non-uniform nature of the pollution abatement curve and the consequent tension to further the environmental aims, makes market based policy instruments a meaningful approach in context of hydraulic fracturing. Market based policy instruments can be implemented in the form of price signals, where the state agencies levy a tax on the amount of HF wastewater pollution generated in hydraulic fracturing operations in order to create an incentive for pollution abatement. Establishment of this tax rate will presumably motivate the operators to manage their wastewater more effectively such that the marginal costs of management are lower that the relevant tax rate. Conversely, if the marginal cost of management is higher than the state imposed tax rate, then the operators will continue to ineffectively manage their wastewater. Therefore, setting the tax rates is of course not a trivial matter. The modeling platform can be critical to provide vital information to the state agencies about the cost incurred in managing wastewater and acquiring water on site. For example, as shown in Figure 23, cost incurred in implementing the modeled plan is $3.8 per well per barrel. If the state agencies require the operator to follow the optimal management plan, they would need to enforce a pollution tax rate of at least $3.8 dollar per well per barrel. Thus, such precise information can be used by policymakers to develop targeted interventions aimed to mitigate water pollution from hydraulic fracturing operations. 69 8.3. Water management planning Hydraulic fracturing operations have resulted in a variety of environmental and societal adverse impacts associated with the acquisition, consumption, and management of water in the process. To minimize these impacts, it is essential to engage both the state agencies and the operators in the development of water management plans which will be acceptable to the communities neighboring oil and gas operations. Based on the modeling paradigm and the best management practices established by API, framework for a water management plan will include a review of potential water resources and HF wastewater management opportunities, anticipated volumes of water required for field level fracturing activities, and other broad spectrum of competing water requirements and constraints such as: location and timing of water withdrawal, water sources, water transport, fluid handling and storage requirements, wastewater disposal options and potential recycling. With a robust water management plan, both the local water planning agencies and operators ensure that oil and gas operations do not constraint the resource requirement of local communities and comply with all regulatory requirements. To ensure that operators adapt and formulate a water management plan, it is necessary that state authorities pursue regulatory actions necessitating approval of an operators' water management plans prior to hydraulic fracturing operations. As a result of such progressive policy, operators will make water management planning their priority and regulatory agencies can evaluate and assess the impact of the hydraulic fracturing activities on the environment and local communities in a more informed manner. 70 9. Future work This study has advanced our understanding of the complexities involved in developing an integrated planning tool for effectively managing HF wastewater. Based on the findings of this study, several potential future research areas can be expanded. At least three future areas of research'identified are as below: 1) Little is known about the mechanism involved in subsurface fracture fluid migration and the interaction of chemicals in the subsurface environment. It is suggested that these areas are explored further through experimental studies which will strengthen our understanding of the technology. 2) The intriguing issue of high contamination of HF wastewater could be explored further to establish the kinetics and mechanisms of the geochemical reactions. These findings will provide a closer look into ways to better control these reactions in the first place, thereby reducing the amount of contamination in the HF wastewater. 3) On the modeling end of the research, it is recommended that a further study is undertaken to integrate the model into the different state environmental regulatory agencies so that model can be validated and feedback can be collected about its long term impacts on mitigating the environmental impacts associated with hydraulic fracturing. 10. Summary Recent developments in hydraulic fracturing have enabled a dramatic increase in the production of unconventional oil and gas resources. Contemporary hydraulic fracturing treatments are water intensive, and require several million gallons of water per well. Environmental externalities associated with the shale gas development, particularly related to HF wastewater have drawn significant public and regulatory attention and should be addressed in an appropriate manner for a continual development of the shale resources. This dissertation investigates the underlying complexities in managing the water in hydraulic fracturing operations and used these findings to develop a modeling platform which can be used as a decision making tool by operators and regulators. The modeling platform can accommodate temporal and spatial variability in effluent quality and quantity, and optimize the transportation logistics associated with moving effluent from well sites and acquiring influent water. The system 71 of this nature not only manages the management of the HF wastewater, but also manages the acquisition of water required for fracturing as it is seen from the exemplar case study in Johnson County, Texas. Additionally, such as system can also minimize several environmental impacts associated with contemporary onshore oil and gas exploration and production activities, including reducing trucking levels through optimized logistics, and reducing demand on freshwater resources through maximizing effluent reuse. The findings of the model and its practical application to the case study also suggests several courses of policy actions for mitigating environmental impacts associated with hydraulic fracturing operations. Firstly, heterogeneity in shale plays necessitate a dynamic regulatory regime, which is tailored to the local conditions. This implies that regulatory center of gravity needs to be in the states rather than implementing a new federal regime. Secondly, states need to acknowledge the fact that the marginal pollution abatement curve is not uniform in case of hydraulic fracturing operations. Thus, market based policy instruments such as taxation, should be employed as a measure to mitigate the water pollution. The model can be used by the states to determine the feasible tax rate which is above the marginal cost of pollution abatement. And lastly, a key policy priority for the state regulatory agencies should be to collaborate with operators and develop a water management plan prior to operations begin. The model provides a comprehensive template for a water management plan and could be used as a basis to develop tailored customized regional solutions. This dissertation has emerged as a reliable indicator of the fact that the intricacies surrounding the regulatory environment around water sourcing and disposal is getting increasingly complex, and that it is demanding more integrative water planning. Thus, the modeling paradigm and its finding presented in this dissertation will serve as the basis for future studies on developing collaborative frameworks, which not only mitigates the environmental implication related to the water cycle of fracturing but also air and so forth. 72 References (1) U.S. Department of Energy; Council, G. P. Modern Shale Gas development in the United States: A Primer; 2009. (2) An Introduction to Shale Gas. Available at http://www.3legsresources.com/wp- content/uploads/2013/06/A-guide-to-shale-gas.pdf2011. (3) The Future of Natural Gas: An interdisciplinary MIT study. Available at https://mitei.mit.edu/system/files/NaturalGas_Report.pdf22l11. (4) Carter, N. T. Energy 's Water Demand: Trends , Vulnerabilities , and Management. CongressionalResearch Service Reportfor Congress2010. (5) Blauch, M. E.; Myers, R. R.; Lipinski, B. A. SPE 125740 Marcellus Shale Post-Frac Flowback Waters - Where is All the Salt Coming From and What are the Implications? Society ofPetroleum Engineers2009, 1-20. (6) Gregory, K. B.; Vidic, R. D.; et al. Water Management Challenges Associated with the Production of Shale Gas by Hydraulic Fracturing. Elements 2011, 7, 181-186. (7) Barbot, E.; Vidic, N. S.; Gregory, K. B.; Vidic, R. D. Spatial and temporal correlation of water quality parameters of produced waters from devonian-age shale following hydraulic fracturing. EnvironmentalScience & Technology 2013, 47, 2562-2569. (8) Haluszczak, L. 0.; Rose, A. W.; Kump, L. R. Geochemical evaluation of flowback brine from Marcellus gas wells in Pennsylvania, USA. Applied Goechemistry 2013, 28, 55-61. (9) BP International Ltd. Water in the energy industry: An introduction; Williams, E.; Simmons, J., Eds.; First edit.; 2013. (10) Nicot, J.-P.; Scanlon, B. R. Water use for Shale-gas production in Texas, U.S. EnvironmentalScience & Technology 2012, 46, 3 580-35 86. (11) Entrekin, S.; Evans-White, M.; Johnson, B.; Hagenbuch, E.; et al. Rapid expansion of natural gas development poses a threat to surface waters. Frontiers in Ecology and the Environment 2011, 9, 503-511. (12) Olmstead, S. M.; Muehlenbachs, L. A.; Shih, J.-S.; Chu, Z.; Krupnick, A. J. Shale gas development impacts on surface water quality in Pennsylvania. Proceedingsofthe National Academy of Sciences of the United States ofAmerica 2013, 110, 4962-4967. (13) An Integrated Framework for Treatment and Management of Produced Water. Report by Colorado School of Mines, 73 Available at http://aqwatec.mines.edu/producedwater/treat/docs/TechAssessmentPWTreatment_T ech.pdf2009. (14) Supplemental Generic Environmental Impact Statement on the Oil, Gas and Solution Mining Regulatory Program;New York State Department of Environment Conservation (NYSDEC): New York, 2011. (15) Economides, M. J.; Martin, T. Modern Fracturing;ET Publishing, Houston, TX, 2007. (16) Hayes, T.; Severin, B. F. Barnett and Appalachian Shale Water Management and Reuse Technologies. Project report by Gas Technology Institute for Research Partnershipto Secure Energyfor America (RPSEA) 2012. (17) Kabir, A. H. SPE 72119 Chemical Water & Gas Shutoff Technology - An Overview. Society ofPetroleum Engineers2001. (18) DiGiacomo, P. M.; Schramm, C. M. SPE 11787 Mechanism of Polyacrylamide Gel Syneresis Determined by C-13 NMR. Proceedings of SPE Oilfield and Geothermal Chemistry Symposium, Denver, CO 1983. (19) Moradi-Araghi, A.; Doe, P. SPE 13033 Hydrolysis and Precipitation of Polyacrylamides in Hard Brines at Elevated Temperatures. Society ofPetroleum Engineers 1987. (20) Mathews, R.; Carlberg, B. Solubility of Calcium Sulfate in Brine. Society of Petroleum Engineering 1973. (21) Shi, W.; Kan, A. T.; Fan, C.; Tomson, M. B. Solubility of Barite up to 250 'C and 1500 bar in up to 6 m NaCl Solution. Industrial& EngineeringChemistry Research2012, 51, 3119- 3128. (22) Templeton, C. C. Solubility of Barium Sulfate in Sodium Chloride Solutions from 25 to 95 C. Journalof Chemical and EngineeringData 1960, 5, 514-516. (23) Kimball, R. J. Key Considerations for Frac Flowback / Produced Water Reuse and Treatment. In Proceedings of New Jersey Water Environment Assciation Conference, Atlantic City; 2012. (24) Minnich, K. A Water Chemistry Perspective on Flowback Reuse with Several Case Studies. In ProceedingsofEPA HydraulicFracturingStudy Technical Workshop on Water Resource Management; 2011. 74 (25) Gregory, K. B.; Vidic, R. D.; Dzombak, D. A.; et al. Water Management Challenges Associated with the Production of Shale Gas by Hydraulic Fracturing. ELEMENTS 2011, 7, 181-186. (26) Wolford, R.; Dempsey, B. Characterization of organics in the Marcellus shale flowback and produced waters, Department of Civil and Environmental Engineering, The Pennsylvania State University, 2011. (27) Haarberg, T.; Selm, I.; et al. SPE 19449 Scale Formation in Reservoir and Production Equipment During Oil Recovery: An Equilibrium Model. Society ofPetroleum Engineers 1990. (28) Neff, J.; Theodor, S. Barium in Produced Water- Fate and Effects in the Marine Environment. American Petroleum Institute 1995. (29) Palmer, A. D.; Drummond, S. E. Thermal decarboxylation of acetate. Part II. Boundary conditions for the role of acetate in the primary migration of natural gas and the transportation of metals in hydrothermal systems. Geochimica et CosmochimicaActa 1986, 50, 825-833. (30) Shock, E. L.; Koretsky, C. M. Metal-organic complexes in geochemical processes: Calculation of standard partial molal thermodynamic properties of aqueous acetate complexes at high pressures and temperatures. Geochimica et Cosmochimica Acta 1993, 59, 1497-1532. (31) Blount, C. W. Barite solubilities and thermodynamic quantities up to 300 C and 1400 bars. American Mineralogist1977, 62, 942-957. (32) Hanor, H. S.; Lui-Heung Chan. Non-conservative behavior of Barium during mixing of Mississippi river and Gulf of Mexico Water. Earthand PlanetaryScience Letters 1977, 37, 242-250. (33) Ziemkiewicz, P.; Hause, J.; et al. Zero Discharge Water Management for Horizontal Shale Gas Well Development. Project report by West Virginia Water Research Institute to U.S. Departmentof EnergyAvailable at http://www.netl. doe.gov/File%20Library/Research/Oil2012. Gas/Natural%2OGas/shale%20gas/FEOOO466_TSA.pdf (34) Deng, S.; Yu, G.; et al.; Shubo, D.; Gang, Y.; Zhongxi, C.; Di, W.; Fujun, X.; Neng, J. Characterization of suspended solids in produced water in Daqing oilfield. Colloids and Surfaces A: PhysicochemicalandEngineeringAspects 2009, 332, 63-69. 75 (35) Mantell, M. Produced Water Reuse and Recycling Challenges and Opportunities Across Major Shale Plays. In Proceedingsof EPA HydraulicFracturingStudy Technical Workshop on Water Resource Management, Washington D.C.; 2011. (36) Veil, J. Water Management Technologies Used by Marcellus Shale Gas Producers. Project report by Argonne National Laboratory to U.S. Department of Energy, Available at http://fracfocus.org/sites/default/files/publications/water_management-inthemarcellus. pdf2010. (37) Ferrar, K. J.; Michanowicz, D. R.; et al. Assessment of Effluent Contaminants from Three Facitlites Discharging Marcellus Shale Wastewater to Surface Waters in Pennsylvania. EnviornmentalScience & Technology 2013. (38) Slutz, J.; Anderson, J.; Broderick, R.; Homer, P. SPE 157532 Key Shale Gas Water Management Strategies: An Economic Assessment Tool. Society of Petroleum Engineers 2012. (39) Nathan, K.; Weline Rusty; Ken, N. Water Reuse and Recycling in the Oil and Gas Industry: Devon's Water Management Success. In Proceedings of 2nd Annual Texas Reuse Conference, Texas; 2012. (40) Vasiliu, C. C.; Pierce, D.; Bertrand, K. SPE 157615 Challenging Wastewater Treatment. Society ofPetroleum Engineers 2012. (41) States, U.; Accountability, G. Energy-Water Nexus: Information on the Quantity, Quality , and Management of Water Produced during Oil and Gas Production. Report by United States Government Accountability Office, Availale at http://www.gao.gov/assets/590/587522.pdf2012. (42) Hansen, L. R. Transport, Storage and Disposal of Fracking Waste. Available at http://www.cga.ct.gov/2014/rpt/2014-R-0016.htm 2014. (43) Spence, D. Federalism, Regulatory Lags, and the Politica Economy of Energy Production. University ofPennsylvaniaLaw Review 2013, 161, 431-508. (44) Tiemann, M.; Vann, A. Hydraulic Fracturing and Safe Drinking Water Act Regulatory Issues. CongressionalResearch Service Reportfor Congress 2013. (45) Richardson, N.; Gottlieb, M.; Krupnick, A.; Wiseman, H. The State of State Shale Gas Regulation. Report by Resourcesfor the Future,Available at www. rfforg/shalemaps2013. 76 (46) Kulander, C. S. Shale oil and gas state regulatory issues and trends. Case Western Reserve Law Review 2013, 63. (47) Robart, C.; Ruegamer, M.; Yang, A. SPE 163875 Analysis of U . S . Hydraulic Fracturing Fluid System Trends. Society ofPetroleum Engineers 2013. (48) Lee, K.; Neff, J. Produced Water; Lee, K.; Neff, J., Eds.; Springer New York: New York, 2011. (49) Ishizaka, A.; Labib, A. Analytic Hierarchy Process and Expert Choice: Benefits and limitations. Operation Research Insight 2009, 22, 201-220. (50) Gumerman, R. C.; Culp, R. L.; Hansen, S. P. Estimating water treatment costs. EnvironmentalProtectionAgency 1979. (51) Qasim, S. R.; Lim, S. W.; Motley, E. M.; G., H. K. Estimating Costs for Treatment Plant Construction. American Water Works Association 1992. (52) Clark, R. M. Estimating water treatment costs: Cost curves applicable to 2500 gpd to 1 mgd Treatment Available Plants. at http://nepis.epa.gov/Exe/ZyNET exe/300009IH. TXT?ZyActionD=ZyDocument&Client=E PA&Index=1976+Thru+1980&Docs=&Query=&Time=&EndTime=&SearchMethod=J &TocRestrict=n&Toc=&TocEntry=&QField=&QFieldYear=&QFieldMonth=&QField 1979. Day=&IntQFieldOp=0&ExtQFieldOp (53) Remer, D. S.; Mattos, F. B. Cost and scale-up factors, international inflation indexes and location factors. InternationalJournalofProductionEconomics 2003, 84, 1-16. (54) Hackney, J.; Wiesner, M. R. Cost assessment of Produced Water Treatment. Retrievedfrom 1996. http://wiesner.cee.duke.edu/files/wiesner/Produced%2OWater%2OCosts.pdf (55) Nicot, J.-P.; Walden, S.; Greenlee, L.; Els, J. A Desalination Database for Texas. Contract reportfor Texas Water Water Development Board2006. (56) Macharg, J. P. Energy Optimization of Brackish Groundwater Reverse Osmosis Desalination. Contractreportfor Texas Water Water Development Board 2011. (57) Bene, J.; Harden, B.; Griffin, S. W.; Nicot, J.-P. Assessment of Groundwater Use in the Northern Trinity Aquifer Due To Urban Growth and Barnett Shale Development. Contract reportfor Texas Water Water Development Board2007. (58) Nicot, J.-P. Hydraulic Fracturing and Water Resources: A Texas Study. The Gulf Coast Association of GeologicalSocities Transactions2013, 63, 359-368. 77 (59) Shafer, L. SPE 141448 Water Recycling and Purification in the Pinedale Anticline Field: Results From the Anticline Disposal Project. Society ofPetroleum Engineers 2011. (60) Contractor Cost Outine: Energy and Environment Cabinet Division of Waste Management. report by Division of Waste Management, Kentucky, Available at http://waste.ky.gov/UST/Forms/2OJ%2OForms%20and%2OOutlines/ContractorCostO utline.pdf2011. (61) Stepan, J. D.; Shockey, E. R.; Kurz, A. B.; et.al. Bakken Water Opportunities AssessmentPhase 1. Available at http://www.undeerc.org/bakken/pdfs/FracWaterPhaseIreport.pdf 2010. (62) Mccurdy, R. Underground Injection Wells For Produced Water Disposal. In Proceedings of EPA Hydraulic FracturingStudy Technical Workshop on Water Resource Management; 2011. (63) Aqualon. Guar and Guar Derivatives Oil and Gas Field Applications. Retrieved from http://www.ashland.com/Ashland/Static/Documents/AAFI/PRO_250-61_Guar.pdf 2007. (64) Weaver, J.; Gdanski, R.; et al. SPE 80226 Guar Gum Degradation : A Kinetic Study. Society of PetroleumEngineers 2003. (65) Sarwar, M. U.; Cawiezel, K. E.; et al. SPE 140520 Gel Degradation Studies of Oxidative and Enzyme Breakers to Optimize Breaker Type and Concentration for Effective Break Profiles at Low and Medium Temperature Ranges. Society ofPetroleumEngineers 2011. (66) Rimassa, S. M.; Howard, P.; et al. SPE 141211 Evaluation of an oxidative biocide during and after a hydraulic fracturing job in the Marcellus shale. Society ofPetroleum Engineers 2011. (67) Blair, C. C.; Chang, K. T.; Trybig, D. S. Use of dispersion polymers as friction reducers in aqueous fracturing fluids. 6787506, 2004. (68) Phillips, K. G.; Hunter, W. E. Method for reducing friction loss in a well fracturing process. 4152274, 1979. 78 List of Appendix 79 Appendix A: Major Shale Plays in the United States Nftw AOWI Figure 28: Major shale plays in the U.S. 80 Appendix B: Description of fracture fluid additives Gelling agents CH2OH H OH CH 2OH OH 0 H CH2 0 H HH H H H H HH n Figure 29: Structural form of guar gum These fluids consist of a water soluble polymer compound to increase the viscosity of the base fluid at ambient temperature. The earliest water-soluble polymer to be used in water-based fluids was Guar Gum or Galactomannan. Guar Gum is a naturally occurring polysaccharide composed of Galactose and Mannose units. Mannose (M) units are joined together via P, 1,4, - glycosidic linkages whereas Galactose (G) units are bonded to Mannose via a, 1, 4, - glycosidic linkages 63. The ratio of M/G is critical to the solubility of the polymer in water. High ratio implies low solubility in water. For instance, Guar derived from locust bean has low Galactose content and is sparingly soluble in water and salinity 63. '. The performance of natural guar is sensitive to pH, temperature, shear Chemically modified guar derivatives such as hydroxypropyl guar (HPG) and carboxymethyl hydroxypropyl guar (CMHPG) exhibits improved performance and chemical and thermal stability in fracturing operations. Fluids using low molecular weight Guar and its derivatives are also referred to as "Linear gels" based fluids. Breakers 0 No 0- 0 0 .\ 0 NH; Figure 30: Structural form of ammonium persulfate 81 After proppant particles are successfully placed into the fracture, the gelled fracturing fluid must be broken down (or degraded). This is necessary as otherwise the gel would reduce the conductivity of the induced fracture and ultimately reduce gas production. Breaker compounds are used to achieve this. Ammonium persulfate is a commonly used breaker due to its strong oxidizing potential. Enzyme based breakers are also used to degrade the gels. Enzymes are selective for a specific polymer gel and degrade the gel by the same mechanism as chemical breakers. However, enzymes are not consumed in the reaction like the chemical breakers and can achieve equivalent performance to their chemical counterparts at lower concentrations 6 . Widespread application of enzyme breakers is often constrained due to high cost and high sensitivity to process parameters such as pH and temperature. Biocide 0 Figure 31: Structural form of Glutaraldehyde High reservoir temperatures and an abundance of biodegradable polymeric gel means microbial growth can take place within a fracture fluid. This microbial growth can rapidly degrade the polymeric gel, and this can result in loss of fluid viscosity being in only a few hours. In addition, acid producing bacteria and sulfate reducing bacteria can cause localized corrosion in the equipment. The latter can also be responsible for well souring and iron sulfide precipitation. Biocides are mixed into the injected fluid to prevent growth of bacteria in the wellbore environment. Biocides are regulated by the Environmental Protection Agency (EPA) under the Federal Insecticide, Fungicide, and Rodenticide Act (FIFRA). The most common biocides are typically either oxidizing or non-oxidizing in nature. Oxidizing biocides are faster than non- 82 oxidizing biocides, but faster activity could result in interaction of biocide with other components of the fracture fluid which could compromise the fluid stability 66. Non-oxidizing biocides in contrast, are generally passive to other fluid components, but are intrinsically hazardous and toxic, thus requiring special handling. Commonly used biocides include Glutaraldehyde, DBNPA (2, 2, dibromo-3-nitrilopropionamide), BNPD (bromonitropropane-1, 3 diol), THPS (tetrakishydroxymethylphosphonium sulfate), Isothiazolone". Most of these biocides function effectively within a wide pH range; however a few (THPS, DBNPA) may show limited stability at high ph. Crosslinking agents KB H-O\ O-H H-0 O-H Figure 32: Structural form of borate salts The stability of gelled fluids is significantly influenced by high temperature and high shear stress, resulting in premature thinning of the gel. To offset these viscosity reductions, initially high polymer loaded gels were utilized to provide sufficient viscosity. However, it was later found that excess polymer in the fluid can adversely impact the fracture conductivity. An alternative approach to improve the stability of the gels is by using crosslinking agents. Such gels are also referred to as "cross-linked gels", and exhibit a stable viscosity profile at elevated temperature and high shear regime. Salts of metal ions such as borate, zirconium, titanium, and aluminum are commonly used as crosslinking agents. -CH I-C- ~~CO NH2 - Friction reducers n Figure 33: Structure form of Polyacrylamide 83 Partially hydrolyzed Polyacrylamide (PAM) is commonly used a friction reducing agent in a fracture fluid. The hydration of PAM is a critical factor influencing its effectiveness as a friction reducer 9 . This rate is sensitive to the contaminants present in the water such as divalent ions, and chlorides. Over time, various alternative friction reducing formulations have been commercialized, which have higher salt and ionic tolerance, improved stability at high temperature and easier handling and storage characteristics. For example, aqueous dispersions containing either organic solvents or surfactants are fast dissolving to reach the desired activity67 ; copolymers of acrylamide . and quaternary salts are effective in fresh water as well as high salinity brines 6 8 84 Appendix C: HF Wastewater Characterization Table 14: Summary of influent water quality in Barnett shale play Para ter pH Acidity otal Alkalinity HIardness as CaCO3 ITotal Suspended Solids Turbidlty Chloride Total Dissolved Solids Specific Conductance Total Kjeldahl Nrog Ammonia Nitrogen Nitrate-Nitrite Nitrite as N niochemIcaI Oxygen Demand Chemical Oxygen Demand Total Organic Cabon (TOC) D ssoived Organic Carbon it & Grease (HEM) Cyanofe. Total Amenable Cyanide romide Fluonde Total Sulfide Sulfate otal Phosphorus otal Recoverabie Phenolics Sulite ethylene Blue Active ubstances (MBAS) Rame Medm Uot 6.7-7.4 '5-5.5 6.2-88.8 18-1.080 <2 - 24 1,3-33.7 4.1 - 3.000 35- 5,5100 55-10,100 < 3 - 56.4 0.017-20-8 < 0.1 - 3.0 < 0.05 - 4.9 < 2.0 - 110 < 10 -924 1.8 - 202 1.4 - 222 Not Detected < 10 -625 < 0.01 - 0.27 < 0.2- 31.9 < 0.05 - 1.2 1.6- 5.6 3.8-139 <0.1 - 0.14 0.01 - 0.031 7.2 No Units NC 52.5 132 NC 37 35.2 334 423 NC 0.41 NC NC NC NC 3.4 3.2 NC NC NC NC NC NC 26 NC NC mg/L 6 -21.6 10.8 mg/I < 0,05 - 0,962 NC mg/L 85 mg/L mg/IL mg/IL NTU mg/L mg/L umhoslcm mg/L mg/L mg/L mg/L mg/L mg/L mg/L mg/I mg/L ug/L mg/L mg/L mg/L mg/L mg/L mg/L mg/L Table 15: Summary of water quality parameters of a blended fluid in Barnett shale pH Acidity Total Alkalinity Hardness as CaCO3 Total Suspended Solids Turbidity Chloride Total Dissolved Solids Specitic Conductance Total Kjeldahl Nitrogen Amimonia Nitrogen NIlrate-NItdte Nirite as N Biochemical Oxygen Demand Chemical Oxygen Demand Total Organic Carbon (TOC) Dissolved Organic Carbon Oil & Grease (HEM) Cyanide. Total Amenable Cyanide Bromide Fluoride Total Sulfide Sulfate Total Phosphorus Total Recoverable Phenolics Suffite Methylene Blue Active Substances (MBAS) P rme 5.2-8.9 Median < 0.01 -0.77 < 5 - 61.6 7.2 NC NC 130 NC 249 902 735 726 33,5 5.9 NC NC NC 1,730 226 301 NC NC NC NC NC NC NC NC NC NC <0.03 - 0.506 NC <5-1.230 5-308 26-9.500 4-5.290 2.7-'15 18-10,700 221 - 27,8000 177-34.600 2.3 -400 028-441 0.1-3.1 <0.05 - 5 < 2.0 - 2220 35.3-47400 5.6 - 1,260 5-1.270 4.6-255 3.5- 954 < 0.01- 0.87 < 0.2 - 107 < 0.05 - 58.3 - 3-8.8 2.9-2,920 < 0.1 - 16 86 ME& No Units mg& mg/L mgfL mgAl NTU mgtL mgL Umhos/cm mgAL mgfL mg/L gIL mg/L mg/L mgA. mgIL ug/L mgAL mg/L mg& mg/L mg/i mgAI mgAI mgAI mg/L Appendix D: Detailed techno-economic analysis of RO plant 41SF Consruction Cost lrienwediale loop cost Backup Heat Source lnfA@OLzfaN costs Water plant owners cost Water plant cuitingency cost Inberest d4ang Consuction Toba Capit Costs Annuaiezd Capita Costs Sp. Annualzed Cap Costs - RO 12 ToWd (AO) 12 - - - - - - - - MSF Energy Cost Heat cost Backup heat cost Electricity cost Purhased elkcmrinty cost Total Energy Costs Operaion andMainmenance Costs Management cost Labour cost Materal cost Insurance cost Totm OSM cast -2 Total Operating Costs 1 1 D 14 Specfic ($Wn3 d) 1,177 - Shae 80% 0% 0% - 1 1 1 0 15 i 5% 4% 8% 2% 77 59 124 34 1470 0.34 $m3 RO Total (M) SecVi"c (W4i3) 0.8 0.1 1 0.8 0.1 1 0. 4 D.07 1 0.13 0.27 0.5 0.1 0.24 0.05 028 0.04 0.08 0.17 0.02 1 031 2 0.m Share 0% 0% 40% 8% 48% 0% 7% 14% 28% 4% 52% 3J06 M$ 0.931 SIme Total water cost 0.931 $1m3 - Total annual cost Water production cost Water Transport costs 87 a. a .4i .4i .4i .4i a .4i Ii ~ e. a a ap A4 - , 88 Eli ~ ~ij~ I a T 'I U I I I 'It S II I IiI I I"hi I1 I Ia a S Appendix E: Decay constant for estimating the volumetric rate of production of HF wastewater V, = Cummulative HF wastewater volume, gallons ) a = decay constant (day-1 V = volume of HF wastewater produced at any time t, gallons The volume of HF wastewater production is assumed in the model to follow an exponential decay curve given by V = V1'(1 - exp(-at)) Equation 1 Applying the boundary condition i.e. at t=O, V= Vo; t=15 days, V=O - VO t=90 V = ft V(1 - exp(-at)) Using Taylor series expansionfor exponentialfunction, we get VO= =0 VO(l - I - at + 2! 2 2 ) a t=90 Solving the integral, we get a = 0.2 Thus the rate ofproduction of HF wastewater is determined by differentiating the equation 1 dV = V 0aexp(-at) 89 Appendix F: Cost summary of different Two Stage Lime Softening Plant For the onsite- lime softening process (shown in Figure 9), the various component costs and design factors are outlined below: 1) Upflow Solids Contact Clarifier " " * * * Designed basin area of clarifier is 48 m 2 The velocity gradient in the clarifier is maintained at 70 per sec using commercial standards Total annual amortized construction cost: $52,577 Total annual operation cost: $15,421 The mass of sludge generated is 66512 kg/day at solids content of 3% 2) Gravity Media Filter The design basin filtration bed area is 74 m 2 " The velocity gradient in the clarifier is maintained at 70 per sec using commercial standards " Total annual amortized construction cost: $ 395,176 * Total annual operation cost: $69,419 * The mass of sludge generated is 12333 kg/day at a solids content of 6% 3) Chemical Feeder " Design chemical feed rates for lime and soda ash are: 3252 kg/hr and 1996 kg/hr respectively * Total annualized amortized construction cost: $ 71,104 * Total annual operating expenses: $ 1,364,534 4) Gravity Thickener * * Design sludge loading is 15 kg/hr/m2 resulting in basin diameter of 26 m * Total annualized construction cost: $93,056 * Total annualized operating cost: $ 12,813 * The sludge is thickened to 30% solid content 5) Belt Filter Press * * * * The sludge volume is 2.4 m3/hr Total annualized construction cost: $114058 Total annualized operating cost: $63815 The sludge is dewatered to 70% solid content 90 Appendix H: Linear Optimization Programing, MatlabTM The optimization program is coded using MatabTM. I Neha Mehta, MIT % S.M. Technology and Policy, 2014 % The Matlab script is a linear optimization program for % management of HF wastewater in hydraulic fracturing operations %% Reads the GIS data into Matlab % read the completion schedule of an operator well=xlsread('F:\Data\InputModelData','Sheetl','Bl:Bl'); dcomp=xlsread('F:\Data\InputModelData','Sheetl','D8:D14');% Number of wells completed daily dailycompl=dcomp'; % reads the total planning period totaloperation=xlsread('F:\Data\InputModelData','Sheetl','B5:B5'); time sub=xlsread('F:\Data\InputModelData','Sheetl','C8:Cl4'); time=timesub'; % reads the total number of injection wells in a region injectionwell=xlsread('F:\Data\InputModelData','Sheetl','B2:B2'); % reads the total number of freshwater sources in a region freshwaterwell=xlsread('F:\Data\InputModelData','Sheetl','B3:B3'); % reads the total number of desalination plants in a region offsite-plant=xlsread('F:\Data\InputModelData','Sheetl','B4:B4'); %% defining the variables filenamell='F:\Data\MappingData\welltowell'; filenamel2='F:\Data\MappingData\welltoUI'; filenamel3='F:\Data\MappingData\welltooff'; filenamel4='F:\Data\MappingData\weIltofresh'; filenamel5='F:\Data\HPDIproducedWaterQuality\saltquality'; filenamel6='F:\Data\HPDIproducedWaterQuality\calquality'; columnrangeww='F2:F50'; columnrangeui='F2:F701';% distance between well to ui columnrangeoff='F2:F267';% distance between well to offsite plant columnrangewfre='F2:F169';% distance between well to fresh water columnrangesal='K2:K8';% Effective Ultimate salinity columnrangecal='K2:K8';% Effective Ultimate salinity %% Origin-destination distance matirx based on ArcGIS information % matrix for well to well distance disww colum=xlsread(filenamell,'Lines',columnrangeww); disww reshape(diswwcolum,well,well); % matrix for well to injection well distance diswelcolum=xlsread(filenamel2,'Lines',columnrangeui); diswel=reshape(diswelcolum,injectionwell,well)'; % matrix for well to freshwater source distance 91 diswe3_colum=xlsread(filenamel3,'Lines',columnrangeoff); diswe2=reshape(diswe2_colum,freshwaterwell,well)'; % matrix for well to desalination plant distance diswe2_colum=xlsread(filenamel4,'Lines',columnrangewfre); diswe3=reshape (diswe3_colum,offsiteplant,well)'; t% Creating a state of well matrix system statewell=zeros(well,well,total operation); for t2=1:totaloperation for i2=1:well for m2=1:well if(time(m2)<=t2) statewell(i2,m2,t2)=1; end end end end %% Creating matrix for water quality % Concentration in ppm % TDS in ppm meanTDS=30000; % hardness in ppm at CaCO3 meanHardness=10000; % Mean suspended solids in ppm meanSS= 2000; allocating memory salt=zeros(well,totaloperation+10);calci=zeros(well,total-operation+10); susp=zeros(well,total operation+10); TDSt=zeros(well,well,total_operation+10); Hardness t=zeros(well,well,total operation+10); SSt=zeros(well,well,totaloperation+10); 0 temporal profile of wastewater quality for qt=l:well salt(qt,1:totaloperation+10)=wsalinity(qt); calci(qt,1:totaloperation+10)=wscales(qt); susp(qt,l:total-operation+10)=wturbid(qt); end for t4 1=1:total operation+10 for i4 1=1:well for m4 1=1:well TDSt(i4_1,m4_1,t4_1)=salt(m4_l,t4_1); Hardnesst(i4_1,m4_l,t4_1)=calci(m4_1,t4_1); SSt(i4_1,m4_l,t4_1)=susp(m4_l,t4_1); end end end % Fitting exponential growth curve to pollutant concentration % allocating memory 92 salinity=zeros(well,well,total operation); scales=zeros(well,well,totaloperation); turbid=zeros(well,well,total operation); for t5=1:total operation+10 for i5=1:well for m5=1:well if(t5>total operation) salinity(i5,m5,t5)=TDSt(i5,m5,t5-time(m5)+l); scales(i5,m5,t5)=Hardnesst(i5,m5,t5-time(m5)+l); turbid(i5,m5,t5)=SSt(i5,m5,t5-time(m5)+l); else if(statewell(i5,m5,t5)==l) if((t5-time(m5)+l)==0) salinity(i5,m5,t5)=TDS t(i5,m5,t5); scales(i5,m5,t5)=Hardnesst(i5,m5,t5); turbid(i5,m5,t5)=SSt(i5,m5,t5); else salinity(i5,m5,t5)=TDSt(i5,m5,t5-time(m5)+l); scales(i5,m5,t5)=Hardnesst(i5,m5,t5-time(m5)+l); turbid(i5,m5,t5)=SSt(i5,m5,t5-time(m5)+l); end end end end end end %% Exporting the temporal wastewater quality profile to excel % salinity profile xlswrite('F:\Data\MappingData\WaterQuality.xls',salt, 'Base', 'Bl:AD7'); xlswrite ('F:\Data\MappingData\WaterQuality.xls', 'Salinity' }, 'Base', 'Al:Al' 'Target salinity 15000 xlswrite('F:\Data\MappingData\WaterQuality.xls', ppm'I,'Base','A16:A16'); %hardness profile xlswrite('F:\Data\MappingData\WaterQuality.xls',calci, 'Base', 'B8:AD14'); xlswrite( 'F:\Data\MappingData\WaterQuality.xls', ('Hardness' }, 'Base', 'A8:A8'); %turbidity profile xlswrite('F:\Data\MappingData\WaterQuality.xls',susp, 'Base', xlswrite( 'F:\Data\MappingData\WaterQuality.xls', { 'Suspended Solids'},'Base','A15:A15'); % Providing distance matrix a time base we4=zeros(7,38,total operation); for tl=l:total operation ww(:,:,tl)=disww(:,:); wel(:,:,tl)=diswel(:,:); we3(:,:,tl)=diswe2(:,:); we4(:,:,tl)=diswe3(:,:); end Creating matrix for water production 93 'B15:AD21'); % Wastwater recovery in 2 weeks meanrecovery=20; meanw=1000000; sd_w=1; % Water required to fracture the well, gallons avgfracvolume=5000000; % randomized wastewater recovery rates from different wells based on a % Poisson distribution rofl=[26 24 14 19 16 23 24]; volumesrecoverable=(avg-fracvolume/100).*rofl.*dailycompl; % Fitting exponential decay curve to wastewater production for t3_1=1:total operation+10 for i3_1=1:well for m3 1=1:well V(i3_1,m3_1,t3_1)=volumes recoverable(m3_1)*exp(-.2*t3_1)*.2; end end end dmstate=ones(well,well,total operation+10); dmstate(:,:,1:totaloperation)=statewell; produce=zeros(well,well,totaloperation); for t3=1:total operation+10 for i3=1:well for m3=1:well if(dmstate(i3,m3,t3)==1) if((t3-time(m3)+1)==O) produce(i3,m3,t3)=V(i3,m3,t3); else produce(i3,m3,t3)=V(i3,m3,t3-time(m3)+l); end end end end end % Writing the wastewater volume in excel xlswrite('F:\Data\MappingData\WaterVolume.xls',volumes recoverable','Sheetl', 'A2:A8'); Screening of management options based on distance allocation of memory gaswell=zeros(well,1,total_operation); ui well=zeros(well,1,totaloperation); f_water=zeros(well,1,totaloperation); offwell=zeros(well, 1, totaloperation); % screening loop for t6=1:totaloperation for i6=1:well if (statewell(i6,i6,t6)==1) buf=length(find(statewell(i6,1:well,t6)==l)); if (buf<well) [gaswell(i6,1,t6),Il]=min(ww(i6, (buf+1):well,t6)); [ui well(i6,1,t6),I2]=min(wel(i6,1:injectionwell,t6)); [fwater(i6,1,t6),13]=min(we3(i6,1:freshwater-well,t6)); 94 [offwell(i6,1,t6),I4]=min(we4(i6,1:offsiteplant,t6)); ind (i6, 1, t6) =Il+buf; ind2 (i6,1,t6)=I2+buf; ind3 (i6, 1, t6) =I3+buf; ind4 (i6,1,t6)=I4+buf; else [gas well(i6,1,t6), I]=min(ww(i6, (buf):well,t6)); [ui well(i6,1,t6),I2]=min(wel(i6,1:injectionwell,t6)); [fwater(i6,1,t6),I3]=min(we3(i6,1:freshwaterwell,t6)); [offwell(i6,1,t6),I4]=min(we4(i6,1:offsite plant,t6)); ind ind2 ind3 ind4 (i6, 1,t6)=buf; (i6, 1, t6) =buf; (i6, 1, t6) =buf; (i6, 1, t6) =buf; end end end end %% matching the supply-demand of water in accordance to completion schedule % allocation of memory to variable samewell=zeros(well,1,totaloperation); same ui=zeros(injection_well,l,totaloperation); samef=zeros(freshwaterwell,l,totaloperation); same off=zeros(offsite plant, 1, totaloperation); % maching process loop for t7=1:total operation for i7=l:well bufl=length(find(statewell(i7,:,t7)==l)); if (bufl==l) same well(i7,1,t7)=O; sameui(i7,1,t7)=O; same f(i7,1,t7)=O; sameoff(i7,1,t7)=O; else a=indl(i7,1,t7); b=ind2(i7,1,t7); c=ind3 (i7, 1,t7); d=ind4(i7,1,t7); buf2=find(indl(l:bufl,l,t7)==a); buf3=find(ind2(1:bufl,l,t7)==b); buf4=find(ind3(1:bufl,l,t7)==c); buf5=find(ind2(1:bufl,l,t7)==d); if (length(buf2)==l) % more than one producing bt sending to different well samewell(i7,1,t7)=O; else % sends water to same well samewell(buf2,1,t7)=l; end if (length(buf3)==l) % more than one producing bt sending to different well same ui(i7,1,t7)=O; else 95 % sends water to same well sameui(buf3,l,t7)=l; end if (length(buf4)==l) %more than one producing bt sending to different well samef(i7,1,t7)=0; else % sends water to same well samef(buf4,1,t7)=1; end if (length(buf5)==1) % more than one producing bt sending to different well sameoff(i7,1,t7)=0; else sends water to same well sameoff(buf5,1,t7)=1; end end end end %% Chaacteristics of wastewater management options All plants of one type are assumed at same capacity rather than % stochastically differeing the capcity for one type of plant Although, with more comhrehensive data, more accurate estimate % of each plant's capacity can be done. % Average injection capacity in gallons avguicap=100000; C4(1:injectionwell)=avg ui cap; % average onsite treatment capacity avg one cap=293040; C2(1:well)=avg_one_cap; % average onsite dilution capacity in gallons avgdilcap=1788571; Cl(1:well)=avgdilcap; % average desalination plant capacity in gallons avgdesal plant=2000000; C3(1:offsiteplant)=avg desalplant; % Water treatment cost estimates in $/gal p1=0; % Cost of dilution p2=.012; % Cost of onsite diltuion p3=.04; % cost of desalination p4=.006; % Cost of underground injection % Efficiency of output volume el=1; % efficiency of dilution e2=1; % efficiency of onsite dilution% efficiency of underground injection of offsite dilution e3=1; % efficiency e4=0; % efficiency of underground injection % Output water quality from each end point [On salinity_out(:,:,:),On_HH_out(:,:,:),OnSSout(:,:,:)]=... onsitequality(salinity, scales,turbid); [De-salinityout(:,:,:),DeHH-out(:,:,:),DeSS-out(:,:,:)]=... 96 desalquality(salinity,scales,turbid); Water Cost waterprice=0; % $/gallon % Influent water quality maintained by operators TDSrr=15000; HH rr=5000; SSrr=100; TargetQual=[TDSrr,HH_rr,SSrr]; % allocating memory to variable matrix al=zeros(1,5);dl=zeros(1,5); cl=zeros (1,5); % Objective function for linear optimization fo=zeros (1,5); Al=zeros (7,5); DA=500000; on=zeros (well, 1); X_sol=zeros(well,5,total_operation); % Case when only one well is producing wastewater for kl=1:total operation on=length(find(statewell(1,:,kl)==1)); if(on==1) fo=zeros (1,5); % inequality matrix A1=zeros (7,5); % Inequality co-efficient matrix bl=zeros(7,1); % Water quality constraints % Salinity compatibility al(1)=el*(salinity(1,1,kl))/DA; al(2)=e2*(Onsalinity out(1,1,kl))/DA; al(5)=TDSrr/DA; % Hardness compatibility d1(1)=el*(scales(1,1,k1))/DA; dl(2)= e2*(On_HHout(1,1,kl))/DA; dl(5)=HHrr/DA; % Turbidity compatibility cl(1)= el*(turbid(1,1,kl))/DA; cl(2)= e2*(OnSSout(1,1,kl))/DA; cl(5)=SS rr/DA; % Optimization constraint formations A1(1,:)=al(1:5);% salinity balance Al(2,:)=dl(1:5);% hardness balance Al(3,:)=cl(1:5);% suspended solids balance A1(4:7,1:4)=eye(4,on*4); % capacity constraints for pjl=1:3 bl(pjl,1)=Target_Qual(l,pjl); end bl(4:7,1)=[C1(1);C2(1);C3(1);C4(1)1; Co-efficient of equality matrix Aeql=zeros(1,5); 97 Aeql(1,1:4)=ones(1,4); beql (1,1) =produce (1, 1,kl); % lower bound on decision variables lb=zeros(5,1); % Co-efficient of objective function dill(1)=pl*el+transportation(gaswell(1,1,kl))*e1+... water price-transportation(fwater(1,1,kl)); on1(1)= p2*e2+transportation(gas well(1,1,kl))*e2+... water price-transportation(fwater(1,1,kl)); desl(1)= p3*e3+transportation(offwell(1,1,kl))*e3-... transportation(fwater(1,1,kl))*.42; uil(t)=p4*(r-e4)+transportation(ui well(1,1,k))*(1-e4)+... transportation(f water(1,1,kl)); water1(1)=transportation(f-water(1,1,kl)); % objective function fo(1:5)=[dill(1), uil(1),onl(1), desl(1), waterl(1)]; % linear programing problem framing [x2(1:5,1,kl),fvall(1,k1)]=linprog(fo,A1,bl,Aeql,beql,lb, []); g2=reshape(x2,5,l,kl); Solution to the optimization problem X_sol(1,:,kl)=g2(:,1,kl)'; else % allocating the memory to variables A3_1=zeros(1,5);A3_2=zeros(1,5);A3_3=zeros(1,5);A3_4=zeros(4,5); % more than one well producing % Here the trick is to optimize all wells at same time by use of % two conditions which automatically handles the concept of water % being sent to same well for 11=1:on well indexing dew=indl (11,1, k); dew2=find(indl(1:on,1,kl)==dew); % all dilution variable w=reshape(linspace(1,5*length(dew2)4,length(dew2)),length(dew2),1); all onsite treatment variable z=reshape(linspace(2,5*length(dew2)3,length(dew2)),length(dew2),1); % all offsite treatment variable v=reshape(linspace(3,5*length(dew2)2,length(dew2)),length(dew2),1); % all injection variable t=reshape(linspace(4,5*length(dew2)1,length(dew2)),length(dew2),1); % all fresh water variable wa=reshape(linspace(5,5*length(dew2),length(dew2)),length(dew2),1); % more than one well producing but sending to different wells if (length(dew2)==1) % Water quality constraints 98 % Salinity compatibility a3(1,11)=el*(salinity(1,l1,kl))/DA; a4(1,l1)=e2*(On salinity out(1,11,kl))/DA; a5(1,11)=TDSrr; % hardness compatibility d3(1,1l)=el*(scales(1,11,kl))/DA; d4(1,l1)=e2*(On_HHout(1,l1,kl))/DA; d5(1,ll)=HHrr/DA; % turbidity compatbility c3(1,11)=el*(turbid(1,11,kl))/DA; c4(1,11)=e2*(OnSSout(1,ll,kl))/DA; c5(1,ll)=SSrr; % Optimization constraint formations % salinity balance A3_1(1, [1,2,5])=[a3(1,11),a4(1,11),a5(1,11)]; % hardness balance A3_2(1, [1,2,5])=[d3(l,l1),d4(1,l1),d5(1,11)]; % turbidity balance A3_3(1, [1,2,5])=[c3(1,11),c4(1,11),c5(1,11)]; % capacity constraints A3_4(:,1:4)=eye(4); A3=vertcat(A3_1,A3_2,A3_3,A3_4); % CO-efficient matrix b2(1,1)=TargetQual(1); b2(2,1)=Target Qual(2); b2(3,1)=TargetQual(3); b2(4:7,1)=[Cl(1);C2(1);C3(1);C4(1)]; Aeq2=zeros(1,5); Aeq2(1,1:4)=ones(1,4); beq2(1)=produce(1,l1,kl); lb2=zeros(5,1); % Co-efficient of objective function dil2=pl*el+transportation(gaswell(11,1,kl))*el-.... transportation(fwater(ll,1,kl)); % Total cost for dilution onsi2= p2*e2+transportation(gas well(ll,1,kl))*e2+... water_price-transportation(fwater(ll,1,kl)); % Total cost for dilution des2= p3*e3+transportation(offwell(ll,1,kl))*e3-... transportation(fwater(11,1,kl))*.42; ui2=p4*(1-e4)+transportation(ui well(ll,1,kl))*(1-e4)+... transportation(fwater(11,1,kl)); water2=transportation(f water(ll,1,kl)); 99 objective function ff1 (1,1) =dil2; fl(1,2)=onsi2; fl(1,3)=des2; ff1 (1,4) =ui2; f1(1,5)=water2; % linear optimization [x1(1:5,1,k1),fval2(1,kl)]=linprog(fl,A3,b2,Aeq2,beq2,lb2,[]); g4=reshape(xl,5,1,ki); % optimization solution X_sol(ll,:,kl)=g4(:,1,kl)'; else % Case when wells send water to management options located % at same position if (on<well) % allocating memory to variables a3_1=zeros(1,length(dew2));a4_1=zeros(1,length(dew2)); a5_1=zeros(1,length(dew2)); d3_1=zeros(1,length(dew2));d4_1=zeros(1,length(dew2)); d5 1=zeros(1,length(dew2)); c3_l=zeros(1,iength(dew2));c4 1=zeros(1,length(dew2)); c5_1=zeros(1,length(dew2)); for ml=l:length(dew2) % Water quality constraints % Salinity compatibility a3_1(1,m1)=el*(salinity(1,dew2(ml),kl))/DA; a4_1(1,m1)=e2*(Onsalinityout(1,dew2(ml),kl))/DA; a5_1(1,m1)=TDSrr/DA; % Hardness compatibility d3_1(1,ml)=el*(scales(1,dew2(ml),kl))/DA; d4_1(1,ml)= e2*(OnHHout(1,dew2(ml),k1))/DA; d5_l(1,m1)=HHrr/DA; % Turbidity compatibility c3_1(1,m1)= el*(turbid(1,dew2(m1),k1))/DA; c4_1(1,m1)= e2*(OnSSout(1,dew2(m1),k1))/DA; c5_1(1,ml)=SSrr/DA; end % allocate memory to inequality matrix A4_1=zeros(1,5*length(dew2)); A4_2=zeros(1,5*iength(dew2)); A4_3=zeros(1,5*iength(dew2)); % Formulating inequality constraints for pj=1:length(dew2) % salinity constraints A4_1(1,w(pj))=a3_1(1,pj); A4_1(1,z(pj))=a4_1(1,pj); A4_1(1,wa(pj))=a5_1(1,pj); % hardness constraints A4_2(1,w(pj))=d3_1(1,pj); 100 A4_2(1,z(pj))=d4_1(1,pj); A4_2(l,wa(pj))=d5_1(1,pj); % turbidity constraints A4_3(l,w(pj))=c3 1(1,pj); A4_3(1,z(pj))=c4_1(1,pj); A4_3(l,wa(pj))=c5_1(1,pj); end A4=vertcat(A4_1,A4_2,A4_3); % Inequality co-efficient matrix b3(1,1)=TargetQual(1); b3(2,1)=TargetQual(2); b3(3,1)=TargetQual(3); % upper bound of decision variables ub2=zeros(5*length(dew2),1); ub2(w(1:length(dew2)),1)=C1(1); ub2(z(1:length(dew2)),1)=C2(1); ub2(v(1:length(dew2)),1)=C3(1); ub2(t(1:length(dew2)),1)=C4(1); dop=length(dew2)+1; Aeq3=zeros(dop,5*length(dew2));beq3=zeros(dop,1); for jj=l:length(dew2) Aeq3(jj,[w(jj),z(jj),v(jj),t(jj)])=l; beq3(jj)=produce(l,dew2(jj),kl); end % lower bound of decision variables lb3=zeros(5*length(dew2),1); % allocation of memory to variables dil3=zeros (1,length(dew2) );onsi3=zeros (1,length(dew2)); des3=zeros(1,length(dew2)); ui3=zeros (1,length(dew2) ) ;water3=zeros (1,length(dew2)); f2=zeros(1,5*length(dew2)); x3=zeros(5*length(dew2),1,kl); % Co-efficient of objective function for kk=l:length(dew2) dil3(kk)=pl*el+transportation(gas well(dew2(kk),l,kl))*eltransportation(fwater(indl(dew2(kk),l,kl))); % Total cost for dilution onsi3(kk)= p2*e2+transportation(gas well(dew2(kk),l,kl))*e2transportation(fwater(indl(dew2(kk),l,kl))); % Total cost des3(kk)= p3*e3+transportation(offwell(dew2(kk),l,kl))*e3transportation(f water(indl(dew2(kk),l,kl)))*.42; ui3 (kk)=p4* (1e4)+transportation(ui well(dew2(kk),l,kl))*(1e4)+transportation(fwater(indl(dew2(kk),l,kl))); water3(kk)=transportation(fwater(indl(dew2(kk),1,kl))); end % Objective function formulation 101 for dilution f2(1,w(l:length(dew2)))=dil3(:); f2(1,z(l:length(dew2)))=onsi3(:); f2(l,v(l:length(dew2)))=des3(:); f2(1,t(1:length(dew2)))=ui3(:); f2(1,wa(l:length(dew2)))=water3(:); [x3(1:5*length(dew2) ,1,kl),fval3(1,kl)]=linprog(f2,A4,b3,Aeq3,beq3,lb3,ub2); g3=reshape(x3,5,length(dew2),ki); % Optimal solution for hi=1:length(dew2) X sol(dew2(hi),:,kl)=g3(:,hi,kl)'; end management of residual HF wastewater else for lo=1:10 % desalination decision variables gg=linspace(1,2*length(dew2)-l,length(dew2)); % underground injection decision variables vv=linspace(2,2*length(dew2),length(dew2)); % upper bound of decision variables ub3=zeros(2*length(dew2),1); ub3(gg(1:length(dew2)),1)=C3(l); ub3(vv(l:length(dew2)),l)=C4(l); , allocating memory to inequality matirx Aeq4=zeros(1,2*length(dew2));beq4=zeros(1,1); % Equality co-efficient matrix for hp=l:length(dew2) beq4_4(hp)=produce(1,dew2(hp),kl+lo-1); end % equality constraint matrix for toll=1:length(dew2) Aeq4(toll,[gg(toll),vv(toll)])=1; beq4(toll)=(beq4_4(toll)); end Co-efficient of objective function for kk=1:length(dew2) des4(kk)= p3*e3+transportation... (offwell(dew2(kk),1,k1))*e3-... transportation(fwater(dew2(kk),1,k1))*.42; ui4(kk)=p4*(l-e4)+transportation... (ui well(dew2(kk),1,k1))*(1-e4)+... transportation(fwater(dew2(kk),l,kl)); end % objective function f3(1,gg(1:length(dew2)))=des4(:); f3(l,vv(l:length(dew2)))=ui4(:); % lower bound to the variables lb4=zeros(2*length(dew2),1); x4=zeros(2*length(dew2),1,kl+lo-1); % linear optimization formulation [x4(1:2*length(dew2),1,kl+lo-1),fval4(1,kl+lo-1)]= ... 102 linprog(f3,[],[],Aeq4,beq4,lb4,ub3); g6=vertcat(zeros(2,length(dew2),kl+10-1),... reshape(x4,2,length(dew2),kl+lo-1),... zeros(1,length(dew2),kl+lo-1)); % optimized solution for go=1:length(dew2) X_sol(dew2(go),:,kl+lo-1)=g6(:,go,kl+lo-1)'; end end end end end end end Writing the optimal solution in excel sheets configuring the solution data for oo=l:total operation Management(oo,1)=sum(Xsol(:,l,oo)); Management(oo,2)=sum(Xsol(:,2,oo)); Management(oo,5)=sum(Xsol(:,5,oo)); end for lol=1:well Dilutionw(lol,:)=sum(Xsol(lol,1,1:29)); Onsitew(lol,:)=sum(Xsol(lol,2,1:29)); Offsitew(lol,:)=sum(Xsol(lol,3,1:29)); Injectw(lol,:)=sum(Xsol(lol,4,1:29)); end for joo=1:total operation+10-1 Management(joo,3)=sum(Xsol(:,3,joo)); Management(joo,4)=sum(Xsol(:,4,joo)); end prodvolu=zeros(39,1); prod volu(:,1)=sum(produce(1,:,:)); % Cost of management,$/bbl cost cost price=sum(fvall(1,:))+sum(fval2(1,:))+sum(fval3(1,:))+(sum(dailycompl)*10^6*5 -sum(Management(:,1))-sum(Management(:,2)))*transportation(15); % Total dollar cost unitcost=price*31.5/(sum(dailycompl)*10^6*5); %% Recording the total trucking mileage for tlO=l:totaloperation for ilO=l:well dmil(ilO,1)=(X sol(ilO,1,tlO)*gas well(ilO,1,tlO)*2/5000); onmil(ilO,1)=(Xsol(ilO,2,tlO)*gas well(ilO,1,t1O)*2/5000); ofmil(ilO,1)=(Xsol(ilO,3,tlO)*offwell(ilO,1,tlO)*2/5000); inmil(ilO,1)=(Xsol(ilO,4,tlO)*gas well(ilO,1,tlO)*2/5000); fmil(ilO,1)=2000000*f water(ilO,l,tlO)*2/5000; end A mile(1,1)=sum(dmil); A-mile(2,1)=sum(onmil); A mile(3,1)=sum(ofmil); A mile(4,1)=sum(inmil); A-mile(5,1)=sum(fmil); 103 ToMile(l,tlO)=sum(A-mile(:,1)); end ,% in excel Writing the results file xlswrite('F:\Data\MappingData\Cost.xls',unitcost,'Solution','A2:A2'); 'Al:Al'); xlswrite('F:\Data\MappingData\Cost.xls',{'Cost'},'Solution', xlswrite('F:\Data\MappingData\Strategy.xls',Management,'Solution','A2:E39'); xlswrite('F:\Data\MappingData\Strategy.xls',prodvolu,'Solution','F2:F39'); xlswrite('F:\Data\MappingData\Strategy.xls',{'Dilution'},'Solution','Al:Al'); xlswrite('F:\Data\MappingData\Strategy.xls',{'Onsite Treatment'},'Solution','Bl:Bl'); xlswrite ('F: \Data\MappingData\Strategy. xls', {'Offsite Treatment'},'Solution','Cl:Cl'); xlswrite ('F: \Data\MappingData\Strategy. xls', {'Underground Injection'},'Solution','Dl:Dl'); xlswrite ('F: \Data\MappingData\Strategy.xls', {'Fresh Water'},'Solution','El:El'); xlswrite ( 'F: \Data\MappingData\Strategy. xls', {'Produce volume'},'Solution','Fl:Fl'); The various user defined function used in the model are described as follows: % This function gives cost per volume (in gallon) for trucking function cost=transportation (dis miles) % Normalized water shipment quantity in gallon per day Vol= 10000; % Truck LT=2; loading time, hr hr % % Truck unloading time, ULT=2; % Heavy vehicle average Avg speed=35; speed, mph RTHD=dis miles;% trip distance in miles RTHT=RTHD/Avg speed;% trip haul time in hr Cap=5000;% capacity of truck in gallons NRT=Vol/Cap;% total number of roundtrips driver time DT=(LT+ULT+RTHT)*NRT; % total mileage=10; % miles per gallon Fuelconsume= RTHD/mileage; % gallon % Economic inputs Fuelcost=3.5;% $/gallon LaborCost=100; % $/hr Totallabor=DT*LaborCost; TotalFuel=Fuel consume*Fuel cost; CPM=(LaborCost/Avgspeed)+(Fuelcost/mileage); cost=CPM*dismiles/42; % cost per gal end % cost per gal mile t This function determines the output water quality % from a onsite lime softening treatment plant function [V1,V2,V3]=onsitequality(a,b,c) %% removal efficieny 104 % residual TDS left rl=1; % residual Hardness lest r2=0.1; % residual suspended solids r3=0.1; % Outflow water quality Vl=a*rl; V2=b*r2; V3=c*r3; end % Determines the output water quality for offsite desalination plant function [V1,V2,V3]=desalquality(a,b,c) %% removal efficiency % residual salinity rl=.2; % residual hardness r2=0.10; % residual suspended solids r3=0.10; % Output water quality Vl=a*rl; V2=b*r2; V3=c*r3; end % Reads the temporally distibuted salinity profiles from excel % HF wastewater function b=wsalinity(d) % read the total planning days total operation=xlsread('F:\Data\InputModelData','Sheetl ,'B5:B5'); b=zeros(l,totaloperation+10); file='F:\Data\HPDIproducedWaterQuality\saltquality'; range='12:040'; % reads the fitted distribution frm excel file sa=xlsread(file,'Fits',range); b=sa(:,d); end % Reads the temporally distibuted hardness profiles from excel % HF wastewater function b=wscales(d) % total planning days totaloperation=xlsread('F:\Data\InputModelData','Sheetl','B5:B5'); b=zeros(l,totaloperation+10); file='F:\Data\HPDIproducedWaterQuality\calquality'; range='12:040'; % reads the fitted distribution frm excel file sa=xlsread(file,'Fits',range); b=sa (:, d); end % Reads the temporally distibuted turbidity profiles % HF wastewater 105 from excel function b=wturbid(d) % reads total planning days totaloperation=xlsread('F:\Data\InputModelData', b=zeros(1,totaloperation+10); 'SheetI', file='F:\Data\HPDIproducedWaterQuality\ssquality'; range='I2:040'; % reads the fitted distribution frm excel file sa=xlsread(file,'Fits',range); b=sa(:,d); end 106 'B5:B5');