Skip to main content
EPA Author Manuscripts logoLink to EPA Author Manuscripts
. Author manuscript; available in PMC: 2019 Jan 1.
Published in final edited form as: J Am Water Works Assoc. 2018;110(11):E43–E61. doi: 10.1002/awwa.1146

Web-based applications to simulate drinking water inorganic chloramine chemistry

David G Wahman 1,*
PMCID: PMC6301018  NIHMSID: NIHMS1511343  PMID: 30581194

Abstract

Two web-based applications (WBAs) relevant to drinking water practice are presented to simulate (1) inorganic chloramine formation and stability, including an example inorganic chloramine demand reaction for organic matter and (2) breakpoint curves. The model underlying both WBAs is a well-established inorganic chloramine formation and decay model. The WBAs were developed to be freely accessible over the Internet as web pages (https://usepaord.shinyapps.io/Unified-Combo/ and https://usepaord.shinyapps.io/Breakpoint-Curve/), providing drinking water practitioners (e.g., operators, regulators, engineers, professors, and students) learning tools to explore inorganic chloramine chemistry in an interactive manner without requiring proprietary software or user modeling expertise. The WBAs allow the user to specify two side-by-side simulations, providing a direct comparison of impacts associated with changing simulation conditions (e.g., free chlorine, free ammonia, and total organic carbon concentrations; pH; total alkalinity; and temperature). Once completed, the user may download simulation data to use offline. The WBAs’ implementation, validation, and example simulations are described.

INTRODUCTION

Chlorine disinfection remains quite popular in the United States (AWWA Water Quality and Technology Division Disinfection Systems Committee 2008b, 2008a), but because of the Stage 1 and Stage 2 Disinfectants and Disinfection Byproducts Rules (USEPA 2006, 1998), many United States utilities now use combinations of chlorine and chloramines to avoid excessive regulated trihalomethane (THM) and haloacetic acid (HAA) formation. In addition, the presence of raw water ammonia and its potential impacts on disinfectant efficacy are becoming increasingly understood (American Water Works Association 2013). Therefore, an understanding of chloramine chemistry is of practical importance.

When free ammonia (consisting of ammonium [NH4+] and ammonia [NH3]) and free chlorine (consisting of hypochlorous acid [HOCl] and hypochlorite ion [OCl]) are added to water, three inorganic chloramine chemical species may form: monochloramine (NH2Cl), dichloramine (NHCl2), and trichloramine (NCl3). The inorganic chloramines formed and their subsequent stability largely depends on the initially added free ammonia and free chlorine concentrations and the water’s pH. In addition, chloramine demand reactions (e.g., natural organic matter) and the degree of chemical mixing will also impact inorganic chloramine formation.

If one ignores chloramine demand reactions, has a water with low bromide (e.g., <0.1 mg/L), and assumes perfect chemical mixing, Eq 1 through Eq 3 represent a simplified set of reactions typically presented (e.g., Crittenden et al. 2005) to explain inorganic chloramine formation, highlighting (1) pH’s importance resulting from free chlorine and free ammonia being acid-base chemicals, (2) free chlorine and free ammonia’s concentration importance, and (3) the sequential nature of inorganic chloramine formation (i.e., monochloramine must form prior to any dichloramine formation).

NH3+HOClNH2Cl+H2O (1)
NH2Cl+HOClNHCl2+H2O (2)
NHCl2+HOClNCl3+H2O (3)

As shown in Eq 1 through 3, the reacting free chlorine and free ammonia chemical species in inorganic chloramine formation are HOCl and NH3, respectively, and their respective percentage of free chlorine and free ammonia is pH dependent (Figure 1). As pH decreases, the HOCl fraction of free chorine increases (pKa = 7.5, 25°C) and the NH3 fraction of free ammonia decreases (pKa = 9.3, 25°C), leading to the increased formation of dichloramine, and possibly trichloramine, in relation to monochloramine.

Figure 1.

Figure 1

pH based percent of free ammonia or free chlorine that is ammonia or hypochlorous acid

The other major consideration for inorganic chloramine formation is the added free chlorine and free ammonia concentrations. The ratio of added free chlorine to free ammonia (i.e., mg of free chlorine as chlorine [Cl2] to mg of free ammonia as nitrogen [N]) is referred to as the chlorine to ammonia–nitrogen (Cl2:N) mass ratio. If a water has a given free ammonia concentration, increasing the Cl2:N mass ratio translates into increasing the free chlorine added to the water. A common method to concisely illustrate the impact of Cl2:N mass ratio on resulting chemical (e.g., free ammonia, free chlorine, and inorganic chloramines) concentrations is a chlorine breakpoint curve (Figure 2) where the chemical species are plotted against the applied Cl2:N mass ratio (or increasing free chlorine dose). In Figure 2, total chlorine represents the sum of free chlorine and the inorganic chloramines, and 1 mg N/L of ammonia is present initially.

Figure 2.

Figure 2

Chlorine breakpoint curve: 120-minute reaction, pH 7.5, 150 mg CaCO3/L total alkalinity, 1 mg N/L initial free ammonia, and 25°C

In practice, using less than a 5.07:1 Cl2:N mass ratio (1:1 molar ratio) and at pHs commonly found in drinking water (i.e., pH 7 to 9), monochloramine is the predominant and desired inorganic chloramine formed (American Water Works Association 2013). For Cl2:N mass ratios greater than 5.07:1, enough free chlorine has been added to combine essentially all the free ammonia into inorganic chloramines. Therefore, additionally–added free chlorine reacts with the formed inorganic chloramines, leading to total chlorine residual loss (where chlorine degrades to chloride and cannot recombine to reform chloramines) for Cl2:N mass ratios up until the breakpoint. If nitrogen gas (N2) is assumed as the only nitrogen product (Eq 4), the breakpoint theoretically occurs at a 7.6:1 Cl2:N mass ratio (1.5:1 molar ratio), but the actual ratio is likely higher as some nitrate will form as well (Eq 5). For example, the breakpoint occurs at an approximate 8.6:1 Cl2:N mass ratio for the breakpoint curve in Figure 2 that was generated using the kinetic model described in the Model Development section. A ratio of 8.6:1 is not unexpected as in pure solutions or relatively clean waters, the breakpoint occurs at reported Cl2:N mass ratios ranging from 7.8:1 to 9.5:1, which is consistent with a mixture N2 and nitrate formation (Black & Veatch Corporation 2010). The breakpoint represents the point of lowest total chlorine residual. Further increasing the Cl2:N mass ratio past the breakpoint leads to an increase in the total chlorine residual, primarily in the form of free chlorine but some trichloramine may also form (Figure 2).

3HOCl+2NH3N2(g)+3H2O+3HCl (4)
4HOCl+NH3HNO3+H2O+4HCl (5)

Every chlorine breakpoint curve is generated based on the initial free ammonia concentration, temperature, pH, and a specific reaction time. Therefore, chlorine breakpoint curves are a snapshot at a given reaction time after chemical addition. Depending on the chosen conditions, chlorine breakpoint curves may look substantially different than the one presented in Figure 2 but will, in general, possess a similar shape.

Once formed, inorganic chloramines react (i.e., are lost) by two general pathways which are also pH and Cl2:N mass ratio dependent: (1) decay and (2) demand. For discussion purposes herein, inorganic chloramine decay refers to inherent inorganic chloramine instability that results in decreasing inorganic chloramine concentrations over time (Jafvert & Valentine 1992), and inorganic chloramine demand refers to water constituents or surfaces in contact with the water that react with and decrease inorganic chloramines over time, including reactions with nitrite (Wahman & Speitel 2012, Vikesland et al. 2001, Margerum et al. 1994, Johnson & Margerum 1991), bromide (Wahman et al. 2017, Luh & Mariñas 2014, Vikesland et al. 2001), natural organic matter (NOM) (Duirk 2006, Duirk et al. 2005, Duirk 2003, Duirk et al. 2002, Vikesland et al. 1998), microorganisms and their soluble products (e.g., Maestre et al. 2013), and pipe surfaces (Vikesland & Valentine 2002b, 2002a, 2000). In addition, nitrification and monochloramine cometabolism are additional pathways to accelerate chloramine residual loss that become more prevalent at lower Cl2:N ratios (i.e., greater free ammonia concentrations) (Wahman et al. 2016).

The demand reactions may be generalized by the reaction shown as Eq 6, showing that any demand reaction decreases chloramine stability. In a practical sense, only considering inorganic chloramine decay reactions results in a “best-case” scenario for maintaining inorganic chloramine residuals for a given set of environmental parameters (e.g., pH, temperature, and total alkalinity), and inorganic chloramine demand represents additional reaction mechanisms that may accelerate inorganic chloramine residual loss in actual drinking water systems. Therefore, inorganic chloramine decay represents the baseline inorganic chloramine stability that one can hope to obtain for a given set of conditions. As with initial inorganic chloramine formation, inorganic chloramine stability is also impacted by pH and Cl2:N mass ratio. Inorganic chloramines are more stable as pH increases and the Cl2:N mass ratio decreases (Vikesland et al. 2001, Jafvert & Valentine 1992).

DemandConstituent(e.g.,NO2,Br,NOM)+NH2ClNH3+Cl+products (6)

Although useful for providing a basic conceptual understanding, simplifying inorganic chloramine chemistry formation and stability to discussions centered on recommended ranges of Cl2:N mass ratios and pHs hides the underlying complexities of inorganic chloramine formation and their subsequent stability because the chloramine system is kinetically controlled. The simplification limits one’s ability to fundamentally understand the implication of deviating from typical conditions and to possibly troubleshoot inorganic chloramine issues in practice. In addition, simply knowing trends does not allow one to quantify how a process change may impact inorganic chloramine formation or stability. For example, should one expect a pH increase from 7 to 8 to increase inorganic chloramine stability 10% or 100%?

Fortunately, for almost 30 years, an experimentally validated reaction scheme, typically termed the Unified Model (Table 1, Reactions 1 through 14), has existed that describes inorganic chloramine formation and decay over a range of conditions applicable to drinking water (Jafvert & Valentine 1992, Jafvert 1985). The Unified Model was further experimentally validated and updated by Vikesland et al. (2001) to include temperature dependence of important reactions (Table 1 and Table 2, Reactions 1, 2, 3, and 5) and carbonate general acid catalysis of monochloramine disproportionation (i.e., monochloramine reacting with itself to form dichloramine; Table 1 and Table 2, Reaction 5).

Table 1.

Chloramine reactions, rate expressions, and associated stoichiometry (Duirk et al. 2005, Jafvert & Valentine 1992)

Reaction
Number
Reaction Reaction
Rate Expression
Process Matrix Stoichiometry

NH3 HOCl NH2Cl NHCl2 NCl3 I DOC1 DOC2

1 HOCl + NH3 → NH2Cl + H2O k1[HOCl][NH3] –1 –1 1
2 NH2Cl + H2O → HOCl + NH3 k2[NH2Cl] 1 1 –1
3 HOCl + NH2Cl → NHCl2 + H2O k3[HOCl][NH2Cl] –1 –1 1
4 NHCl2 + H2O → HOCl + NH2Cl k4[NHCl2] 1 1 –1
5 NH2Cl + NH2Cl → NHCl2 + NH3 k5[NH2Cl]2 1 –2 1
6 NHCl2 + NH3 → NH2Cl + NH2Cl k6[NHCl2][NH3][H+] –1 2 –1
7 NHCl2 + H2O → I k7[NHCl2][OH] –1 1
8 I + NHCl2 → HOCl + N2 + 3H+ + 3Cl k8[I][NHCl2] 1 –1 –1
9 I + NH2Cl → N2 + 3H+ + 3Cl k9[I][NH2Cl] –1 –1
10 NH2Cl + NHCl2 → N2 + 3H+ + 3Cl k10[NH2Cl][NHCl2] –1 –1
11 HOCl + NHCl2 → NCl3 + H2O k11[HOCl][NHCl2] –1 –1 1
12 NHCl2 + NCl3 + 2H2O → N2 + 2HOCl + 3HCl k12[NHCl2][NCl3][OH] 2 –1 –1
13 NHCl2 + NCl3 + H2O → N2 + HOCl + 3HCl k13[NH2Cl][NCl3][OH] 1 –1 –1
14 NHCl2 + 2HOCl + H2O → NO3 + 5H+ + 4Cl k14[NHCl2][OCl] –2 –1
15* NH2Cl + DOC1 → NH3 + Products k15[NH2Cl][DOC1] 1 –1 –1
16* HOCl + DOC2 →Products k16[HOCl][DOC2] –1 –1

pH is set and maintained at a user–defined value in the web-based applications; therefore, OH and H+ have been omitted from the process matrix stoichiometry to simplify presentation.

DOC1 – fast reacting organic matter, DOC2 – slow reacting organic matter, I – unidentified monochloramine auto–decomposition intermediate

*

Only included in the chloramine formation and decay web–based application.

Table 2.

Kinetic rate constants (25°C unless temperature dependency provided)

Reaction Number Rate Constant Value or Equation (T in Kelvin) Source(s)

1 k1 6.6×108e –1510/T s–1 Morris and Isaac (1983)
2 k2 1.38×108e–8800/T s–1 Morris and Isaac (1983)
3 k3 3.0×105e–2010/T s–1 Morris and Isaac (1983)
4 k4 6.5×10–7 s–1 Margerum et al. (1978)
5 k5 k5H[H+]+k5HCO3[HCO3]+k5H2CO3[H2CO3]
where
    k5H = 1.05×107e–2169/T M–2s–1
    k5HCO3 = 4.2×1031e–22144/T M–2s–1
    k5H2CO3 = 8.19×106e–4026/T M–2s–1

Granstrom (1955)
Vikesland et al. (2001)
Vikesland et al. (2001)
6 k6 6.0×104 M–2s–1 Hand and Margerum (1983)
7 k7 1.1×102 M–1s–1 (Jafvert and Valentine (1987), Jafvert (1985))
8 k8 2.8×104 M–1s–1 Leao (1981)
9 k9 8.3×103 M–1s–1 Leao (1981)
10 k10 1.5×10–2 M–1s–1 Leao (1981)
11 k11 kCO3[CO32–] + kOCl[OCl] + kOH[OH]
where
    kCO3 = 6.0×106 M–2s–1
    kOCl = 9.0×104 M–2s–1
    kOH = 3.28×109 M–2s–1
Hand and Margerum (1983)
12 k12 5.56×1010 M–2s–1 Jafvert and Valentine (1992)
13 k13 1.39×109 M–2s–1 Jafvert and Valentine (1992)
14 k14 2.31×102 M–1s–1 Jafvert and Valentine (1992)
15 k15 5.4 M–1s–1 Average from Duirk et al. (2005)
16 k16 1.8×102 M–1s–1 Average from Duirk et al. (2005)

Even though a reasonable reaction scheme has existed, a widely and freely accessible implementation of the Unified Model has not existed. This is largely because of the requirement to program and solve the reaction scheme which prevented model implementation in a user-friendly environment where proprietary software or user modeling experience was not required. Recognizing some of these limitations, Ozekin et al. (1996) made several simplifying assumptions to describe chloramine decay by a simple second order relationship (Eq 7) with a single coefficient they termed the Valentine Stability Coefficient (kVSC). The major assumptions were that (1) only Reactions 1, 2, 3, 5, and 7 in Table 1 were considered, (2) the rate of monochloramine loss is governed by the rate of dichloramine formation (Table 1, Reactions 3 and 5), (3) monochloramine and free chlorine are in equilibrium (Table 1, Reactions 1 and 2), and (4) any formed dichloramine is rapidly lost through Reaction 7 in Table 1. Although adequate to simulate chloramine decay of already formed chloramines, the VSC concept was not envisioned to simulate the range of conditions that a completely implemented Unified Model would simulate.

Rateofmonochloramineloss=kVSC[NH2Cl]2 (7)

To address the limited access and accelerate the learning curve associated with simulating inorganic chloramine chemistry formation and stability, two web-based applications (WBAs) relevant to drinking water practice were developed to simulate (1) inorganic chloramine formation and subsequent stability, including an example inorganic chloramine demand reaction for organic matter and (2) breakpoint curves. The intent is for the two WBAs to serve as learning tools for drinking water operators, engineers, researchers, and students, but the WBAs also are applicable to actual practice. The WBAs provide the user a free, interactive environment to explore and understand fundamental inorganic chloramine chemistry where the only requirement is a web browser and Internet connection to access the WBAs’ web pages. Although not intended to simulate specific “real-life” situations, the WBAs may be used to evaluate and understand the implications of possible operational changes (e.g., Cl2:N mass ratios, target inorganic chloramine residual, booster chlorination, and pH) and their possible impacts to inorganic chloramine formation and subsequent stability. Recent developments in freely available software allowed a web–based interface to be developed, overlaying a robust statistical software package. The result is a Unified Model implementation accessible over the Internet.

MODEL DEVELOPMENT

Model reactions and hydraulics.

Table 1 provides a summary of the implemented reaction scheme process matrix underlying both WBAs while Table 2 provides the associated reaction rate constants. As pH is set to a fixed user-inputted parameter, the model’s final aspect is the required acid-base equilibrium chemistry for the free chlorine, free ammonia, and carbonate systems (Table 3).

Table 3.

Equilibrium reactions and associated temperature dependent rate constants

Equilibrium Reaction Rate/Equilibrium
Constant (T in Kelvin)
Source
HOCl ⇌ H+ + OCl KHOCl=10–(1.18×10−4T2–7.86×10−2T+20.5) Morris (1966)
NH4+ ⇌ NH3 + H+ KNH4+=10–(1.03×10−4T2–9.21×10−2T+27.6) Bates and Pinching (1950)
H2CO3 ⇌ HCO3 + H+ KH2CO3 = 10–(1.48×10−4T2–9.39×10−2T+21.2) Snoeyink and Jenkins (1980)
HCO3 ⇌ CO32– + H+ KHCO3 = 10–(1.19×10−4T2–7.99×10−2T+23.6) Snoeyink and Jenkins (1980)
H2O ⇌ OH + H+ Kw = 10–(1.5×10−4T2–1.23×10−1T+37.3) Snoeyink and Jenkins (1980)

The inorganic chloramine reaction scheme (Table 1, Reactions 1 through 14) developed by Jafvert and Valentine (1992) served as the model basis. The model also includes extensions made by Vikesland et al. (2001) for temperature dependence of important reactions and carbonate general acid catalysis of monochloramine disproportionation (Table 1 and Table 2, Reactions 1, 2, 3, and 5). To provide the ability to simulate the impact of an example demand reaction for illustrative purposes, a basic implementation of reactions with NOM (Duirk et al. 2005) was also incorporated, providing the user with the ability to investigate this common and important inorganic chloramine demand reaction (Table 1 and Table 2, Reactions 15 and 16). Organic chloramine formation is not included in the reaction scheme. Also, because the currently implemented model does not include bromide reactions, the model is most applicable to waters containing no or low (e.g., <0.1 mg/L) bromide concentrations (Vikesland et al. 2001). For context, 0.115 mg/L bromide represented the 90th percentile value among large (serving greater than 10,000 customers) surface water plants (USEPA 2005). The incorporation of bromide chemistry is a future research need as bromide sources include brackish water, desalination sources, and upstream bromide–laden discharges (Regli et al. 2015).

For simplicity, the model uses batch (equivalent to ideal plug-flow) hydraulics, assumes chemical additions are immediately and completely mixed with no localized concentration gradients, and ignores wall reactions. The model hydraulics translate into several scenarios in practice that can be simulated, including (1) chemical injections into continuously flowing water pipelines where the added chemicals are immediately and completely mixed with the flowing bulk water, and pipe wall reactions do not impact the bulk water chemical concentrations; (2) sampling of water from a point in a distribution system and holding that water over time in batch to access chloramine stability; and (3) preparing inorganic chloramines in the laboratory in a beaker and then holding that water over time in batch. As a first estimate and if plug-flow conditions are maintained and wall reactions are negligible in an actual drinking water distribution system, simulation times are equivalent to water age. The assumed hydraulics are a simplification of actual drinking water systems but provide a relevant hydraulic condition found in practice, allowing a first estimate of expected inorganic chloramine formation and subsequent stability.

The current model allows the user to investigate inorganic chloramine formation and stability over a variety of conditions, and additional model extensions may be included in the future (e.g., nitrite or bromide impacts) to further expand the possible simulation conditions. Conceptually and when ignoring the NOM chloramine demand reactions, the model represents a first estimate for inorganic chloramine stability based on water age because only the inherent inorganic chloramine instability is included (i.e., inorganic chloramine decay). In practice, non-ideal mixing and flow, localized pH, pipe–wall reactions, nitrification, and presence of other inorganic chloramine demand reactions would serve to decrease inorganic chloramine stability.

Model implementation.

The model (Tables 1, 2, and 3) was implemented using R (R Core Team 2017), a freeware language and environment for statistical computing and graphics available for download at http://www.r-project.org/. R’s capabilities were extended using free user-contributed packages downloaded through the R software (Table 4).

Table 4.

Additional R software packages used for web-based application development

Name Purpose Source

deSolve Solves systems of ordinary differential equations representing the implement model Soetaert et al. (2010)
ggplot2 Generates output plots for simulation data Wickham (2009)
reshape2 Restructures and aggregates simulation data for output plots Wickham (2007)
scales Provides methods to modify scales and legends in graphics Wickham (2014)
shiny Creates interactive web-based applications with R RStudio Inc. (2014)
shinyBS Extends the shiny package by adding Twitter Bootstrap components, including generation of pop-up boxes upon screen–pointer hovering Bailey (2014)

The recent development making WBA creation possible with R was the release of the shiny package (RStudio Inc. 2014), providing the ability to create a web–based user interface to interact with the underlying model calculations being performed by R, removing the need for the WBA end–user to become familiar with and learn the R language (or any other model implementation language) and providing a platform to access the WBAs (e.g., an Internet web page). Because the WBAs are hosted on a server, no special software is required by the user. The server computer also (1) provides the necessary computing resources, avoiding consumption of the user’s resources and (2) any future WBA updates are immediately available.

Model validation.

The Unified Model is well established, but the WBAs required validation with other Unified Model implementations to ensure no programming errors had occurred in WBA development. To accomplish this, WBA simulations were compared with simulations generated using the Unified Model implemented in Aquasim (Reichert 1994) by Wahman and Speitel (2012). Aquasim is a freely available computer program designed to simulate aquatic systems that is freely available at http://www.eawag.ch/en/department/siam/software/. Figure 3, Panel A displays an example simulation comparing both model implementations. The current WBA implementation is providing the same results as the published implementation, providing evidence that the WBA model implementation is working as expected. In addition to a numerical check on model implementation, an example of the WBA simulations compared to published experimental data (Vikesland et al. 2001) is provided in Figure 3, Panel B, detailing the WBA is representing the published experimental data as well.

Figure 3.

Figure 3

Validation Examples: (A) numeric comparison with published modela and (B) comparison with published datab

a Web–based application simulation compared to Wahman and Speitel (2012) Aquasim model simulation

b Web–based application simulations compared to experimental data from Vikesland et al. (2001)

INORGANIC CHLORAMINE FORMATION AND DECAY APPLICATION

The inorganic chloramine formation and decay WBA (CFD-WBA) may be accessed at https://usepaord.shinyapps.io/Unified-Combo/. The CFD-WBA’s web page areas are discussed below.

Header and simulation input areas.

The top of the CFD-WBA’s web page contains a header area (Figure 4, part A) where general information about the CFD-WBA is presented along with hyperlinks to the three main research articles used in creating the CFD-WBA.

Figure 4.

Figure 4

Chloramine formation and decay application screenshot: header (part A) and simulation input (part B) areas

Below the header area is the simulation input area where the user selects and inputs the desired variables (Figure 4, part B). In the simulation input area, the user selects from three different general chemical addition scenarios: (1) Simultaneous Addition (selected in Figure 4, part B): free chlorine and free ammonia are present simultaneously from either free chlorine addition to a water containing free ammonia or free ammonia addition to a water containing free chlorine, and the user wishes to simulate inorganic chloramine formation and subsequent decay (e.g., drinking water treatment plant inorganic chloramine formation); (2) Preformed Chloramines: known concentrations of inorganic chloramines and free ammonia already exist and the user wishes to simulate inorganic chloramine decay (e.g., drinking water distribution system samples); or (3) Booster Chlorination: known concentrations of inorganic chloramines and free ammonia already exist and the user wishes to simulate adding free chlorine to recombine the free ammonia into inorganic chloramines and then the subsequent inorganic chloramine decay (e.g., distribution system free chlorine addition). The Booster Chlorination scenario would also represent blending free chlorine and chloraminated waters. The CFD-WBA is self-contained and provides the necessary information to direct the user on how to conduct a simulation, providing guidance through pop-up boxes that appear when hovering a screen pointer over a required input or possible selection (Figure 5). For each chemical addition scenario, the user selects the free chlorine and free ammonia addition methods. In addition, the user inputs general water quality parameters (e.g., pH, alkalinity, and temperature).

Figure 5.

Figure 5

Chloramine formation and decay application screenshot: example pop-up box describing possible chemical addition scenario selections

If desired, the user may also simulate organic matter demand by entering a total organic carbon (TOC) concentration and then selecting the TOC fraction associated with the fast and slow reactive fractions defined by Duirk et al. (2005). Because organic carbon reactions are likely source water dependent, the implementation of the organic matter reactions are provided in a simplistic manner to illustrate an example of how chloramine demand reactions impact inorganic chloramine stability. The current implementation uses the average reaction rates for the fast (Table 2, Reaction 15) and slow (Table 2, Reaction 16) reactive TOC fractions determined by Duirk et al. (2005) and are not currently user adjustable. The CFD-WBA does allow the user to change the TOC fraction associated with the fast and slow reactions if they desire to investigate the impact of having more or less reactive TOC. For reference, Duirk et al. (2005) determined fast and slow TOC reactive site fractions for six different NOM sources, ranging from 0.010–0.023 and 0.42–0.68, respectively.

Because inorganic chloramine reactions may occur on varying time scales, the CFD-WBA allows the user to select timeframes in minutes, hours, and days, ranging from 1 minute to 60 days. The time selection will affect the (1) simulation run length and (2) abscissa scale on generated plots.

The general input area also contains three buttons that allow the user to (1) copy the current simulation’s input conditions directly to the other simulation (Copy Simulation A’s Inputs to Simulation B’s Inputs), (2) run the simulation with the provided input conditions and generate output plots (Update Simulation A and Plots [Press after Finishing Changing Simulation Inputs]), and (3) export the finished simulation data to a comma-separated variable (.csv) file for use in external programs (Simulation A Chemical Concentration Data Download [.csv file]).

Plot preferences and initial conditions summary table area.

After entering the conditions and running a simulation, the CFD-WBA’s next area controls which chemicals are displayed on generated output plots and provides a summary table of the simulation initial conditions (Figure 6). In the left side of this area, the user may toggle on and off the chemicals (total chlorine, monochloramine, dichloramine, trichloramine, free chlorine, and free ammonia) they wish to display through the provided checkboxes. Once their selection is made, they may press the Update Plots for Simulation A button to immediately update the plots. After a simulation is completed, a summary of the initial conditions used in the simulation is also created in the right portion of this area for reference.

Figure 6.

Figure 6

Chloramine formation and decay application screenshot: plot preferences and initial conditions summary table areas

Output plot area.

The CFD-WBA generates three plot types for each simulation that are selected by tabs associated with each plot type (Figures 7 and 8). The first tab (Individual Chemicals, Figure 7) displays a series of plots showing single chemical concentrations over time, the second tab (Composite Chemicals, Figure 8, Panel A) displays a composite plot of all selected chemicals on the same plot over time, and the third tab (Chlorine to Nitrogen Ratios, Figure 8, Panel B) displays a plot showing the Cl2:N and chlorine to ammonia (Cl2:NH3) mass ratios over time.

Figure 7.

Figure 7

Chloramine formation and decay application screenshot: output plot area with individual chemicals tab selecteda

a Simulation A is pH 7, and Simulation B is pH 9. All other initial conditions are the same (4 mg Cl2/L free chlorine, 4.75:1 Cl2:N mass ratio, 150 mg/L as CaCO3 total alkalinity, 25 °C, and 0 mg C/L total organic carbon).

Figure 8.

Figure 8

Chloramine formation and decay application screenshota: output plot area with (A) composite chemicals or (B) chlorine to nitrogen ratios tab selected

A.

B.

a Simulation A is pH 7, and Simulation B is pH 9. All other initial conditions are the same (4 mg Cl2/L free chlorine, 4.75:1 Cl2:N mass ratio, 150 mg/L as CaCO3 total alkalinity, 25 °C, and 0 mg C/L total organic carbon).

CHLORINE BREAKPOINT CURVE APPLICATION

In addition to the CFD-WBA, a second WBA was specifically developed to simulate and generate chlorine breakpoint curves under various conditions. The chlorine breakpoint curve web–based simulator (BP-WBA) is based on the same underlying model implementation as the CFD-WBA but has three main differences: the BP-WBA (1) does not include the organic matter chloramine demand reactions of Duirk et al. (2005), (2) provides a different user interface (i.e., Internet web page) specific for the generation of chlorine breakpoint curves that may be accessed at https://usepaord.shinyapps.io/Breakpoint-Curve/, and (3) has only two chemical addition scenarios where the water is assumed to initially contain either (1) only free ammonia and free chlorine is added or (2) only free chlorine and free ammonia is added. In either scenario, no inorganic chloramine concentrations initially exist. The first scenario is a typical implementation of breakpoint chlorination where a water initially contains free ammonia. The second scenario represents a chloramination situation by adding free ammonia into a water already containing free chlorine to show the impact of selection of Cl2:N ratios, illustrating the impact of over– or under– feeding ammonia. The BP-WBA’s web page areas are subsequently discussed.

Header and simulation input areas.

The BP-WBA contains a header describing the WBA and provides hyperlinks to source articles (Figure 9, part A). Below the header area is a simulation input area (Figure 9, part B), allowing the user to specify the initial free ammonia or free chlorine concentration, total alkalinity, pH, and temperature. The BP-WBA input area also contains the three buttons found in the CFD-WBA input area, allowing the user to copy inputs from one simulation to the other, run the simulation, and download simulation concentration data. When a BP-WBA simulation is initiated, the BP-WBA uses the simulation inputs and conducts a series of simulations for Cl2:N mass ratios from 0 to 15 in 0.2 increments (76 total simulations). Each simulation is run for a fixed 240-minute reaction time.

Figure 9.

Figure 9

Chlorine breakpoint curve application screenshot: header (part A) and simulation input (part B) areas

Output plot area.

The BP-WBA output plot area produces a chlorine breakpoint curve based on the user–selected reaction time with the provided slider (0 to 240 minutes; Figure 10). The ability to generate chlorine breakpoint curves associated with various reaction times is important as any chlorine breakpoint curve has an associated reaction time, whether or not it is explicitly stated. The user may also animate the chlorine breakpoint curve by pressing the provided play button, causing the chlorine breakpoint curve to step between 0 and 240–minute reaction times in one-minute increments and thus allowing the user to visualize the impact of reaction time on the corresponding chlorine breakpoint curve. As with the CFD-WBA, the user may also select which chemicals to show on the chlorine breakpoint curve plot using the provided checkboxes.

Figure 10.

Figure 10

Chlorine breakpoint curve application screenshot: output plot area displaying 15-minute reaction chlorine breakpoint curvesa

a Simulation A is pH 7, and Simulation B is pH 9. All other initial conditions are the same (1 mg N/L free ammonia, 150 mg/L as CaCO3 total alkalinity, and 25 °C).

EXAMPLE SIMULATIONS

To provide an example of both the CFD-WBA and BP-WBA, example simulations were conducted with each WBA.

Inorganic chloramine formation and decay application.

For the CFD-WBA, the chemical addition scenario of simultaneously adding free chlorine and free ammonia is presented in Figure 4 and Figures 6 through 8. The initial conditions (4 mg Cl2/L free chlorine, 4.75:1 Cl2:N mass ratio, 150 mg/L as CaCO3 total alkalinity, 25 °C, 0 mg/L TOC, and 10 day simulation time) of Simulation A and B are 0identical, except pH (pH 7 in A and pH 9 in B; Figure 5). To assist in simulation input entry, the user may input Simulation A’s conditions, press the provided Copy Simulation A’s Inputs to Simulation B’s Inputs button, and then change Simulation B’s pH from 7 to 9 with the provided slider. Entering simulation inputs in this manner allows the user to enter and compare the impact of changing a single variable (e.g., pH in this instance) on inorganic chloramine formation and decay.

For Simulation A (pH 7; Figure 7), initial inorganic chloramine formation (Table 1, Reactions 1 and 3) is complete within one minute, leading to initial concentrations of 4.0 mg Cl2/L total chlorine, 3.8 mg Cl2/L monochloramine (95% of total chlorine), and 0.2 mg Cl2/L dichloramine (5% of total chlorine). After this initial formation, the monochloramine concentration decreases as it converts to dichloramine (Table 1, Reaction 2 then 3 or Reaction 5), but because dichloramine is somewhat stable at pH 7 (Table 1, Reaction 7), dichloramine concentration initially increases, resulting in a 0.51 mg Cl2/L maximum dichloramine concentration (15% of total chlorine) at 13 hours and eventually reaching dichloramine’s maximum percent of total chlorine (16%) at 22 hours. One practical aspect of this simulation is that the peak dichloramine concentration would not occur until several hours after initial inorganic chloramine formation. Depending on system hydraulics and presence of inorganic chloramine demand reactions in an actual system, a drinking water utility operating under these conditions and sampling shortly after inorganic chloramine formation may believe that dichloramine formation is relatively minor, but the peak dichloramine concentration may occur out in the drinking water distribution system.

Simulation B (pH 9; Figure 7) shows a different behavior for inorganic chloramine formation and stability. At pH 9, initial dichloramine formation is relatively slow (Table 1, Reaction 3) and any dichloramine that forms quickly decays (Table 1, Reaction 7); therefore, monochloramine initially represents the entire 4 mg Cl2/L total chlorine concentration. Because monochloramine must still pass through dichloramine to decay and dichloramine forms slowly at pH 9 (Table 1, Reaction 2 then 3 or Reaction 5), total chlorine is more stable at pH 9 than at pH 7. After 10 days, the simulated total chlorine residual is 0.84 (79% loss) and 3.2 (20% loss) mg Cl2/L for Simulations A and B, respectively.

Another practical example of these kinetic–based simulations is how they differ from calculations made if one assumes that inorganic chloramine chemistry is an equilibrium rather than kinetically–controlled system. For example, Oldenburg et al. (2002) used an equilibrium assumption for inorganic chloramine chemistry while interpreting pH’s impact on chloramine inactivation of the pure culture ammonia-oxidizing bacteria Nitrosomonas europaea during batch experiments. Specifically, dichloramine was proposed to be responsible for the increased inactivation rate as pH decreased. Based on the assumption that the three inorganic chloramine species were in equilibrium with each other, Oldenburg et al. (2002) estimated that 58% and 5% of their chloramine was present as dichloramine at pHs 7 and 9, respectively. Based on the above simulations, this equilibrium assumption does not appear to be appropriate and highlights the importance of considering the kinetics of inorganic chloramines versus making equilibrium assumptions as one may greatly overestimate the anticipated dichloramine concentration (e.g., 58% versus 5% initially with a maximum of 16% for pH 7) when interpreting the results.

Chlorine breakpoint curve application.

For the BP-WBA, Simulation A and B initial conditions (1 mg N/L initial free ammonia concentration, 150 mg/L as CaCO3 total alkalinity, and 25 °C) are once again set identical, except pH (pH 7 in A and pH 9 in B; Figure 9, part B).

For Simulation A (pH 7), the chlorine breakpoint curves for 15, 30, 60, and 240-minute reaction times (Figure 10 and Figure 11) have the characteristic breakpoint curve shape with the curves changing slightly with time. After 240 minutes, the breakpoint occurs at an approximate 8.6:1 Cl2:N mass ratio where a 0.15 mg Cl2/L total chlorine residual remains. For Cl2:N ratios between 5:1 and 8.6:1, there is a noticeable dichloramine concentration as dichloramine formation exceeds dichloramine loss, allowing dichloramine to accumulate. Beyond the breakpoint, trichloramine concentration is simulated to increase as the applied Cl2:N mass ratio increases.

Figure 11.

Figure 11

Chlorine breakpoint curve application screenshots: chlorine breakpoint curves for various reaction timesa

Simulation A Simulation B

a Simulation A is pH 7, and Simulation B is pH 9. All other initial conditions are the same (1 mg N/L free ammonia, 150 mg/L as CaCO3 total alkalinity, and 25 °C).

Compared to Simulation A (pH 7), Simulation B (pH 9) shows a much slower breakpoint reaction occurring and essentially no measurable dichloramine and trichloramine concentrations. At pH 9, dichloramine formation is relatively slow while dichloramine loss is relatively fast, causing any formed dichloramine to be immediately lost and unable to accumulate to a noticeable concentration. Simulation B also shows that monochloramine and free chlorine are both at measurable concentrations above approximately a 5:1 Cl2:N mass ratio after 60 minutes of reaction. After 240 minutes, the breakpoint for Simulation B again occurs at an approximate 8.6:1 Cl2:N mass ratio where a 0.57 mg Cl2/L total chlorine residual remains (0.33 mg Cl2/L monochloramine and 0.24 mg Cl2/L free chlorine). The changing breakpoint curve with time and slower breakpoint reactions at high pH are well–documented in the literature (Black & Veatch Corporation 2010).

SUMMARY

Two WBAs for simulating inorganic chloramine chemistry were developed to provide drinking water practitioners (e.g., water treatment operators, engineers, students, and regulators) a learning tool to explore inorganic chloramine chemistry. The major assumptions made in developing the WBAs include: (1) inorganic chloramine formation and decay is simulated by reaction schemes presented by Jafvert and Valentine (1992) and Vikesland et al. (2001); (2) for the CFD-WBA, the natural organic matter reactions of Duirk et al. (2005) were implemented in a simplistic manner to illustrate an example chloramine demand reaction and no other chloramine demand reactions are included; (3) batch (equivalent to plug-flow) hydraulics, (4) chemical additions are immediately and completely mixed with no localized concentration gradients, (5) wall reactions are ignored, and (6) pH is held constant at the user–supplied value. Recognizing these assumptions and setting the TOC concentration to zero, simulations represent a “best–case scenario” for inorganic chloramine stability in the distribution system.

The user requires no modeling or software experience to use the WBAs. Rather, the user proceeds to the respective web page link, selects the desired simulation conditions, and presses a button to initiate simulations and produce output plots showing chemical concentrations over time or generating a chlorine breakpoint curve. When completed, the simulation data may be exported and used offline as the user requires.

Because the WBAs are provided as web pages, future updates can be immediately applied and distributed as the WBAs only require program updates on the web server. The WBAs may be expanded and updated in the future to incorporate additional chemistries (e.g., nitrite and bromide).

ACKNOWLEDGEMENTS

The author thanks Alicia Diehl and Matthew Alexander for WBA testing and providing valuable feedback that led to improving the WBA functionality and usability. I also thank Gerald E. Speitel Jr. for reviewing the manuscript and providing helpful comments. The USEPA through the Office of Research and Development funded and managed this research. It has been subjected to the Agency’s peer and administrative review and has been approved for external publication. Any opinions expressed are those of the author and do not necessarily reflect the views of the Agency; therefore, no official endorsement should be inferred. Any mention of trade names or commercial products does not constitute endorsement or recommendation.

ABOUT THE AUTHOR

David G. Wahman is currently a research environmental engineer in the U.S. EPA’s Office of Research and Development in Cincinnati, Ohio. He is a registered Professional Engineer with over 20 years of experience. He received his B.S. in Civil Engineering from Rose–Hulman Institute of Technology and an M.S.E. in Environmental and Water Resources Engineering and Ph.D. in Civil Engineering from The University of Texas at Austin. Following graduation, he conducted a Post–Doctoral fellowship at the USEPA before accepting a permanent position. His research interests include disinfectant water chemistry, distribution system water quality, and distribution system nitrification with a special interest in applying molecular based tools, microelectrodes, and modeling to understand drinking water treatment and distribution system issues.

REFERENCES

  1. American Water Works Association, 2013. (2nd ed.). Nitrification Prevention and Control in Drinking Water (AWWA Manual M56). American Water Works Association, Denver, Colorado. [Google Scholar]
  2. AWWA Water Quality and Technology Division Disinfection Systems Committee, 2008a. Committee Report: Disinfection Survey, Part 1 - Recent Changes, Current Practices, and Water Quality. Journal American Water Works Association, 100:10:76. [Google Scholar]
  3. AWWA Water Quality and Technology Division Disinfection Systems Committee, 2008b. Committee Report: Disinfection Survey, Part 2 - Alternatives, Experiences, and Future Plans. Journal American Water Works Association, 100:11:110. [Google Scholar]
  4. Bailey E, 2014. Shinybs: Twitter Bootstrap Components for Shiny. R package version 0.20.
  5. Bates RG & Pinching GD, 1950. Dissociation Constant of Aqueous Ammonia at 0 to 50c; from E.M.F. Studies of the Ammonium Salt of a Weak Acid. Journal of the American Chemical Society, 72:3:1393. [Google Scholar]
  6. Black & Veatch Corporation, 2010. (5th ed.). White’s Handbook of Chlorination and Alternative Disinfectants. John Wiley & Sons, Inc., Hoboken, New Jersey. [Google Scholar]
  7. Crittenden JC, Trussell RR, Hand DW, Howe KJ & Tchobanoglous G, 2005. (2nd ed.). Water Treatment: Principles and Design. John Wiley & Sons, Hoboken, N.J. [Google Scholar]
  8. Duirk SE, 2003. Mechanisms and Modeling of Monochloramine Loss, Natural Organic Matter Oxidation, and Disinfectant by-Product Formation in Water Doctoral disseration. Civil and Environmental Engineering, University of Iowa, Iowa City, IA. [Google Scholar]
  9. Duirk SE, 2006. Erratum to “Modeling Monochloramine Loss in the Presence of Natural Organic Matter”: [Water Research 39(14), 3418–3431]. Water Research, 40:4:851. [DOI] [PubMed] [Google Scholar]
  10. Duirk SE, Gombert B, Choi J & Valentine RL, 2002. Monochloramine Loss in the Presence of Humic Acid. Journal of Environmental Monitoring, 4:1:85. [DOI] [PubMed] [Google Scholar]
  11. Duirk SE, Gombert B, Croue JP & Valentine RL, 2005. Modeling Monochloramine Loss in the Presence of Natural Organic Matter. Water Research, 39:14:3418. [DOI] [PubMed] [Google Scholar]
  12. Granstrom ML, 1955. The Disproportionation of Monochloramine Doctoral dissertation. Harvard University, Cambridge, MA. [Google Scholar]
  13. Hand VC & Margerum DW, 1983. Kinetics and Mechanisms of the Decomposition of Dichloramine in Aqueous Solution. Inorganic Chemistry, 22:10:1449. [Google Scholar]
  14. Jafvert CT, 1985. A Unified Chlorine-Ammonia Speciation and Fate Model Doctoral dissertation. Civil and Environmental Engineering, The Univesity of Iowa, Iowa City, IA. [Google Scholar]
  15. Jafvert CT & Valentine RL, 1987. Dichloramine Decomposition in the Presence of Excess Ammonia. Water Research, 21:8:967. [Google Scholar]
  16. Jafvert CT & Valentine RL, 1992. Reaction Scheme for the Chlorination of Ammoniacal Water. Environmental Science & Technology, 26:3:577. [Google Scholar]
  17. Johnson DW & Margerum DW, 1991. Non-Metal Redox Kinetics: A Reexamination of the Mechanisms of the Reaction between Hypochlorite and Nitrite Ions. Inorganic Chemistry, 30:4848. [Google Scholar]
  18. Leao SF, 1981. Kinetics of Combined Chlorine: Reactions of Substitution and Redox Doctoral dissertation. University of California, Berkeley, CA. [Google Scholar]
  19. Luh J & Mariñas BJ, 2014. Kinetics of Bromochloramine Formation and Decomposition. Environmental Science & Technology, 48:5:2843. [DOI] [PubMed] [Google Scholar]
  20. Maestre JP, Wahman DG & Speitel GE Jr,, 2013. Monochloramine Cometabolism by Nitrosomonas Europaea under Drinking Water Conditions. Water Research, 47:13:4701. [DOI] [PubMed] [Google Scholar]
  21. Margerum DW, Gray E & Huffman RP, 1978. Chlorination and the Formation of N-Chloro Compounds in Water Treatment Organometals and Organometalloids: Occurrence and Fate in the Environment. American Chemical Society, Washington, D.C. [Google Scholar]
  22. Margerum DW, Schurter LM, Hobson J & Moore EE, 1994. Water Chlorination Chemistry: Nonmetal Redox Kinetics of Chloramine and Nitrite Ion. Environmental Science & Technology, 28:2:331. [DOI] [PubMed] [Google Scholar]
  23. Morris JC, 1966. The Acid Ionization Constant of HOCl from 5 to 35C. The Journal of Physical Chemistry, 70:12:3798. [Google Scholar]
  24. Morris JC & Isaac RA, 1983. A Critical Review of Kinetic and Thermodynamic Constants for the Aqueous Chlorine–Ammonia System Water Chlorination: Environemental Impact and Health Effects. Ann Arbor Science, Ann Arbor, MI. [Google Scholar]
  25. Oldenburg PS, Regan JM, Harrington GW & Noguera DR, 2002. Kinetics of Nitrosomonas Europaea Inactivation by Chloramine. Journal American Water Works Association, 94:10:100. [Google Scholar]
  26. Ozekin K, Valentine RL & Vikesland PJ, 1996. Modeling the Deomposition of Disinfecting Residuals of Chloramine Water Disinfection and Natural Organic Matter: Characterization and Control. ACS Books, Washington D.C. [Google Scholar]
  27. R Core Team, 2017. R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria. [Google Scholar]
  28. Regli S, Chen J, Messner M, Elovitz MS, Letkiewicz FJ, Pegram RA, Pepping TJ, Richardson SD & Wright JM, 2015. Estimating Potential Increased Bladder Cancer Risk Due to Increased Bromide Concentrations in Sources of Disinfected Drinking Waters. Environmental Science & Technology, 49:22:13094. [DOI] [PubMed] [Google Scholar]
  29. Reichert P, 1994. Aquasim – a Tool for Simulation and Data Analysis of Aquatic Systems. Water Science and Technology, 30:2:21. [Google Scholar]
  30. RStudio Inc., 2014. Shiny: Web Application Framework for R. R package version 0.10.2.1.
  31. Snoeyink VL & Jenkins D, 1980. Water Chemistry. John Wiley & Sons, Inc., New York, NY. [Google Scholar]
  32. Soetaert K, Petzoldt T & Setzer RW, 2010. Solving Differential Equations in R: Package Desolve. Journal of Statistical Software, 33:9:1.20808728 [Google Scholar]
  33. USEPA, 1998. National Primary Drinking Water Regulations: Disinfectants and Disinfection Byproducts; Final Rule. Federal Register, 63:241:69390. [Google Scholar]
  34. USEPA, 2005. Economic Analysis for the Final Stage 2 Disinfectants and Disinfection Byproducts Rule (EPA 815-R-05–010). USEPA, Washington, DC. [Google Scholar]
  35. USEPA, 2006. National Primary Drinking Water Regulations: Stage 2 Disinfectants and Disinfection Byproducts Rule; Final Rule. Federal Register, 71:2:388. [Google Scholar]
  36. Vikesland J, Ozekin P, Valentine K, R.L., 2001. Monochloramine Decay in Model and Distribution System Waters. Water Research, 35:7:1766. [DOI] [PubMed] [Google Scholar]
  37. Vikesland PJ, Ozekin K & Valentine RL, 1998. Effect of Natural Organic Matter on Monochloramine Decomposition: Pathway Elucidation through the Use of Mass and Redox Balances. Environmental Science & Technology, 32:10:1409. [Google Scholar]
  38. Vikesland PJ & Valentine RL, 2000. Reaction Pathways Involved in the Reduction of Monochloramine by Ferrous Iron. Environmental Science & Technology, 34:1:83. [Google Scholar]
  39. Vikesland PJ & Valentine RL, 2002a. Iron Oxide Surface-Catalyzed Oxidation of Ferrous Iron by Monochloramine: Implications of Oxide Type and Carbonate on Reactivity. Environmental Science & Technology, 36:3:512. [DOI] [PubMed] [Google Scholar]
  40. Vikesland PJ & Valentine RL, 2002b. Modeling the Kinetics of Ferrous Iron Oxidation by Monochloramine. Environmental Science & Technology, 36:4:662. [DOI] [PubMed] [Google Scholar]
  41. Wahman DG, Maestre JP & Speitel GE Jr, 2016. Monochloramine Cometabolism by Drinking Water Relevant Nitrifying Biofilm. Journal American Water Works Association, 108:7:E362. [Google Scholar]
  42. Wahman DG & Speitel GE, Jr,, 2012. The Relative Importance of Nitrite Oxidation by Hypochlorous Acid under Chloramination Conditions. Environmental Science & Technology, 46:11:6056. [DOI] [PubMed] [Google Scholar]
  43. Wahman DG, Speitel GE Jr & Katz LE, 2017. Bromamine Decomposition Revisited: A Holistic Approach for Analyzing Acid and Base Catalysis Kinetics. Environmental Science & Technology, 51:22:13205. [DOI] [PMC free article] [PubMed] [Google Scholar]
  44. Wickham H, 2007. Reshaping Data with the Reshape Package. Journal of Statistical Software, 21:12:1. [Google Scholar]
  45. Wickham H, 2009. Ggplot2: Elegant Graphics for Data Analysis. Springer, New York. [Google Scholar]
  46. Wickham H, 2014. Scales: Scale Functions for Graphics. R package version 0.2.4.

RESOURCES