0% found this document useful (0 votes)
104 views12 pages

PH Calculation With CO2 Addition

The document describes the algorithms for calculating pH, alkalinity, and total inorganic carbon that are incorporated into the WASP water quality modeling program. It was adapted from the QUAL2K documentation. The pH is calculated by solving a system of five equations for the chemical equilibrium of the inorganic carbon species in freshwater. Total inorganic carbon changes are modeled considering processes like carbon oxidation, respiration, photosynthesis, and reaeration. Alkalinity changes are also tracked considering biological and chemical processes that consume or produce alkalinity.

Uploaded by

Praveen Khatri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
104 views12 pages

PH Calculation With CO2 Addition

The document describes the algorithms for calculating pH, alkalinity, and total inorganic carbon that are incorporated into the WASP water quality modeling program. It was adapted from the QUAL2K documentation. The pH is calculated by solving a system of five equations for the chemical equilibrium of the inorganic carbon species in freshwater. Total inorganic carbon changes are modeled considering processes like carbon oxidation, respiration, photosynthesis, and reaeration. Alkalinity changes are also tracked considering biological and chemical processes that consume or produce alkalinity.

Uploaded by

Praveen Khatri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

1 Introduction

The pH, alkalinity and total inorganic carbon algorithms that are incorporated into WASP come
directly from QUAL2K & QUAL2Kw (Chapra, Pelletier and Tao, 2008). Every effort was made
to insure that the implementation of the pH calculation within WASP is consistent with
QUAL2K/.
The following sections were mostly taken from the QUAL2K documentation and where
appropriate the equations were modified to match the assumptions and kinetic implementations
in WASP.
2 pH Calculation
The following equilibrium, mass balance and electroneutrality equations define a freshwater
dominated by inorganic carbon (Stumm and Morgan 1996),

[HCO 3 ][H  ]
K1  (1)
[H 2 CO *3 ]

[CO 32 ][H  ]


K2  (2)
[HCO 3 ]

K w  [H  ][OH  ] (3)

cT  [H 2 CO *3 ]  [HCO 3 ]  [CO 32 ] (4)

Alk  [HCO 3 ]  2[CO 32 ]  [OH  ]  [H ] (5)

where K1, K2 and Kw are acidity constants, Alk = alkalinity [eq L1], H2CO3* = the sum of
dissolved carbon dioxide and carbonic acid, HCO3 = bicarbonate ion, CO32 = carbonate ion, H+
= hydronium ion, OH = hydroxyl ion, and cT = total inorganic carbon concentration [mole L1].
The brackets [ ] designate molar concentrations.
Note that the alkalinity is expressed in units of eq/L for the internal calculations. For input and
output, it is expressed as mgCaCO3/L. The two units are related by
Alk (mgCaCO 3 /L)  50,000 Alk (eq/L) (6)
The equilibrium constants are corrected for temperature by
Harned and Hamer (1933):

4787.3
pK w =  7.1321log10 (Ta )  0.010365Ta  22.80 (7)
Ta

Plummer and Busenberg (1982):

logK1 = 356.3094 0.06091964Ta  21834.37 / Ta


(8)
 126.8339log Ta  1,684,915/ Ta2

Plummer and Busenberg (1982):

logK 2 = 107.8871 0.03252849Ta  5151.79 / Ta


(9)
 38.92561log Ta  563,713.9 / Ta2
The nonlinear system of five simultaneous equations (1 through 5) can be solved numerically for
the five unknowns: [H2CO3*], [HCO3], [CO32], [OH], and {H+}. An efficient solution method
can be derived by combining Eqs. (1), (2) and (4) to define the quantities (Stumm and Morgan
1996)
[H  ]2
0  (10)
[H  ]2  K1[H  ] + K1 K 2

K1[H  ]
1  (11)
[H  ] 2  K1[H  ] + K1 K 2

K1 K 2
2  (12)
[H ]  K1[H  ] + K1 K 2
 2

where 0, 1, and 2 = the fraction of total inorganic carbon in carbon dioxide, bicarbonate, and
carbonate, respectively. Equations (3), (11), and (12) can be substituted into Eq. (4) to yield,
Kw
Alk = (1  2 2 )cT  
 [H  ] (13)
[H ]
Thus, solving for pH reduces to determining the root, {H+}, of
Kw
f ([H  ]) = (1  2 2 )cT  
 [H  ]  Alk (14)
[H ]
where pH is then calculated with
pH   log10[H  ] (15)

The root of Eq. (14) is determined with a numerical method. The user can choose bisection,
Newton-Raphson or Brent’s method (Chapra and Canale 2006, Chapra 2007) as specified on the
QUAL2K sheet. The Newton-Raphson is the fastest but can sometimes diverge. In contrast, the
bisection method is slower, but more reliable. Because it balances speed with reliability, Brent’s
method is the default.

2.1 Total Inorganic Carbon (cT)


Total inorganic carbon concentration increases due to fast carbon oxidation and plant respiration.
It is lost via plant photosynthesis. Depending on whether the water is undersaturated or
oversaturated with CO2, it is gained or lost via reaeration,
BotAlgResp
S cT  rcco FastCOxid  rcca PhytoResp rcca
H
(16)
BotAlgPhoto
 rcca PhytoPhoto rcca  CO2Reaer
H
where
CO2Reaer  kac (T )[CO2 ]s   0cT  (17)

where kac(T) = the temperature-dependent carbon dioxide reaeration coefficient [/d], and [CO2]s
= the saturation concentration of carbon dioxide [mole/L].
The stoichiometric coefficients are computed as1
 gC  moleC m3
rcca  rca     (18)
 mgA  12 gC 1000 L

1  gC  moleC m3
rcco     (19)
roc  gO 2  12 gC 1000 L

2.2 Carbon Dioxide Saturation


The CO2 saturation is computed with Henry’s law,
[CO 2 ]s  K H p CO 2 (20)

where KH = Henry's constant [mole (L atm)1] and pCO2 = the partial pressure of carbon dioxide
in the atmosphere [atm]. Note that the partial pressure is input as a constant or as an

1
The conversion, m3 = 1000 L is included because all mass balances express volume in m3, whereas total inorganic
carbon is expressed as mole/L.
environmental time function in units of ppm. The program internally converts ppm to atm using
the conversion: 106 atm/ppm.
The value of KH can be computed as a function of temperature by (Edmond and Gieskes 1970)
2385.73
pK H =   0.0152642Ta  14.0184 (21)
Ta

The partial pressure of CO2 in the atmosphere has been increasing, largely due to the combustion
of fossil fuels (Error! Reference source not found.). Values in 2007 are approximately 103.416
atm (= 383.7 ppm).

Figure 1 Concentration of carbon dioxide in the atmosphere as recorded at Mauna Loa


Observatory, Hawaii.
The CO2 reaeration coefficient can be computed from the oxygen reaeration rate by
0.25
 32 
k ac (20)     0.923 k a (20) (22)
 44 

2.3 Effect of Control Structures: CO2


As was the case for dissolved oxygen, carbon dioxide gas transfer in streams can be influenced
by the presence of control structures. WASP assumes that carbon dioxide behaves similarly to
dissolved oxygen. Thus, the inorganic carbon mass balance for the element immediately
downstream of the structure is written as
E'
cT ,i  i cT ,i 1  cT ,i  
dcT ,i Qi 1 Q Qab,i WcT ,i
 c'T ,i 1  i cT ,i   S cT ,i (23)
dt Vi Vi Vi Vi Vi

where c'T,i1 = the concentration of inorganic carbon entering the element [mgO2/L], where
CO 2,s,i 1   2 cT ,i 1
c'T ,i 1  (1   2 )cT ,i 1  CO 2,s,i 1  (24)
rd

where rd is calculated from the dam reaeration algorithm for dissolved oxygen.

2.4 Alkalinity (Alk)


As summarized in the present model accounts for changes in alkalinity due to several
mechanisms:
Table 1 Processes that effect alkalinity.

Process Utilize Create Alkalinity change

Nitrif NH4 NO3 Decrease

Denitr NO3 Increase

OPHydr SRP Decrease

ONHydr NH4 Increase

PhytoPhoto NH4 Decrease

NO3 Increase

SRP Increase

PhytoResp NH4 Increase

SRP Decrease

PhytoUpN NH4 Decrease

NO3 Increase

PhytoUpP SRP Increase

PhytoExcrN NH4 Increase

PhytoExcrP SRP Decrease

BotAlgUpN NH4 Decrease

NO3 Increase

BotAlgUpP SRP Increase


BotAlgExcrN NH4 Increase

BotAlgExcrP SRP Decrease

It should be noted that the alkalinity calculations in advanced eutrophication module of WASP
do not include the influences of metals.

2.5 Nitrification
Nitrification utilizes ammonium and creates nitrate. Hence, because a positive ion is taken up
and a negative ion is created, the alkalinity is decreased by two equivalents. The change in
alkalinity can be related to the nitrification rate by
2 eq moleN gN 50,000mgCaCO 3  gN 
S a , nitr   Nitrif  (25)
moleN 14.007gN 10 gN
6
1 eq  Ld 

2.6 Denitrification
Denitrification utilizes nitrate and creates nitrogen gas. Hence, because a negative ion is taken up
and a neutral compound is created, the alkalinity is increased by one equivalent. The change in
alkalinity can be related to the denitrification rate by
1 eq moleN gN 50,000mgCaCO 3  gN 
S a, denitr  Denitr  (26)
moleN 14.007gN 106 gN 1 eq  Ld 
where the r’s are ratios that translate the processes into the corresponding amount of alkalinity.
The stoichiometric coefficients are derived from nutrient algorithms in WASP.

2.7 Organic P Hydrolysis


Hydrolysis of organic P results in the creation of inorganic phosphate. Depending on the pH, the
phosphate will either have 1 (pH  2 to 7) or 2 (pH  7 to 12) negative charges. Hence, because
negative ions are being created, the alkalinity is decreased by one or two equivalents,
respectively. The change in alkalinity can be related to the P hydrolysis rate by2,
S a ,OPh 
eq moleP gP 50,000mgCaCO 3  gP  (27)
 ( H 2 PO 4  2 HPO 4  3 PO 4 ) OPHydr 
moleP 30.974gP 10 gP
6
1 eq  Ld 
where
K p1[H ]2
 H 2 PO 4  (28)
[H ]3  K p1[H ]2 + K p1K p 2 [H ] + K p1K p 2 K p 3

2
Note that although it will almost always be negligible, Eq. (193) PO43– for completeness.
K p1K p 2 [H ]
 HPO 4  (29)
[H ]3  K p1[H ]2 + K p1K p 2 [H ] + K p1K p 2 K p 3

K p1K p 2 K p 3
 PO 4  (30)
[H ]  K p1[H ] + K p1K p 2 [H ] + K p1K p 2 K p 3
 3  2

where Kp1 = 10–2.15, Kp2 = 10–7.2, and Kp3 = 10–12.35.

2.8 Organic N Hydrolysis


Hydrolysis of organic N results in the creation of ammonia. Depending on the pH, the ammonia
will either be in the form of ammonium ion with a single positive charge (pH < 9) or neutral
ammonia gas (pH > 9). Hence, when the positive ions are created, the alkalinity is increased by
one equivalent. The change in alkalinity can be related to the N hydrolysis rate by
1 eq moleN gN 50,000mgCaCO 3  gN 
S a,ONh  Fi ONHydr  (31)
moleN 14.007gN 10 gN
6
1 eq  Ld 

2.9 Phytoplankton Photosynthesis


Phytoplankton photosynthesis takes up nitrogen as either ammonia or nitrate and phosphorus as
inorganic phosphate. If ammonia is the primary nitrogen source, this leads to a decrease in
alkalinity because the uptake of the positively charged ammonium ions is much greater than the
uptake of the negatively charged phosphate ions. If nitrate is the primary nitrogen source, this
leads to an increase in alkalinity because both nitrate and phosphate are negatively charged.
The following representation relates the change in alkalinity to phytoplankton photosynthesis
depending on the nutrient sources as well as their speciation as governed by the pH,
50,000mgCaCO 3
S a ,PhytP 
1 eq
 1 eq moleN gN
  rna Pap Fi
 moleN 14.007gN 10 gN
6

 
 rna 1  Pap
1 eq moleN gN
moleN 14.007gN 10 gN
6
(32)

1 eq moleP gP 
 rpa ( H 2 PO 4  2 HPO 4  3 PO 4 ) 
moleP 30.974gP 10 gP 
6

 gA 
 PhytoPhoto
 
 Ld 

2.10 Phytoplankton Nutrient Uptake


Phytoplankton takes up nitrogen as either ammonia or nitrate and phosphorus as inorganic
phosphate. The following representation relates the change in alkalinity to phytoplankton uptake
rates depending on the nutrient sources as well as their speciation as governed by the pH,
50,000mgCaCO 3
S a , PUp 
1 eq
 PhytoUpN(gN/L/d)

  Pap Fi  (1  Pap ) 
1 eq moleN gN
moleN 14.007gN 10 gN
6
 (33)
 H (m)
1 eq moleP gP PhytoUpP(gP/L/d) 
 ( H 2 PO 4  2 HPO 4  3 PO 4 )  
moleP 30.974gP 10 gP
6
H (m) 

2.11 Phytoplankton Nutrient Excretion


Phytoplankton excretes ammonia and inorganic phosphate. The following representation relates
the change in alkalinity to phytoplankton excretion rates including the effect of pH on the
nutrient’s speciation,
50,000 mgCaCO 3
S a , PEx 
1 eq
 1 eq moleN gN PhytoExN(gN/L/d)
 Fi 
 moleN 14.007 gN 10 gN
6
H (m)
1 eq moleP gP PhytoExP(gP/L/d) 
 ( H 2 PO 4  2 HPO 4  3 PO 4 )  
moleP 30.974 gP 10 gP
6
H (m) 
(34)

2.12 Bottom Algae Nutrient Uptake


Bottom algae take up nitrogen as either ammonia or nitrate and phosphorus as inorganic
phosphate. The following representation relates the change in alkalinity to bottom algae uptake
rates depending on the nutrient sources as well as their speciation as governed by the pH,

50,000mgCaCO 3
S a ,BAUp 
1 eq
 BotAlgUpN(mgN/m 2 /d)
  Pab Fi  (1  Pab ) 
1 eq moleN gN
 
 moleN 14.007gN 106 gN H (m)
1 eq moleP gP BotAlgUpP(mgP/m2 /d) 
 ( H 2 PO 4  2 HPO 4  3 PO 4 )  
moleP 30.974gP 106 gP 
H (m) 
(35)

2.13 Bottom Algae Nutrient Excretion


Bottom algae excrete ammonia and inorganic phosphate. The following representation relates the
change in alkalinity to bottom algae excretion rates including the effect of pH on the nutrient’s
speciation,
50,000mgCaCO 3
S a , BAEx 
1 eq
 1 eq moleN gN BotAlgExN(mgN/m 2 /d)
 Fi 
 moleN 14.007gN 106 gN
 H (m)
1 eq moleP gP BotAlgExP(mgP/m2 /d) 
 ( H 2 PO 4  2 HPO 4  3 PO 4 )  
moleP 30.974gP 106 gP 
H (m) 
(36)

3 Model Input
The data required to support the application of the advanced eutrophication model to predict pH
is described below.

3.1 Systems
For the inclusion of pH calculations within the WASP Framework two additional state variables
(Total Inorganic Carbon and Alkalinity) were added to the advanced eutrophication model. The
user would be advised to set their simulation option to By-Pass if pH calculations are not needed
(Figure 2).

Figure 2 WASP State Variables for pH Calculation


Note: If you are upgrading a previous advanced eutrophication WASP input file (WIF) to the
new module there is several steps you will need to do.
 Set the Simulation Option on the System Screen (shown above to simulate)
 You will need to go into the Flow and Exchange screen and click okay (this causes the
interface to add the new state variable (Total Inorganic Carbon and Alkalinity) to the
boundary conditions screen.
 Go to the boundary conditions screen and set you pH and alkalinity concentrations
coming into your model network.
 Complete the required information given below to calculate pH.

3.2 Time Functions


Figure 3 illustrates the new environmental time function to provide a time variable partial
pressure for atmospheric CO2. If the user specifies a time function and constant as specified in
Section 3.3, the environmental time function will be used. Note the user selects which time
functions will be considered and must check the “used” radio button for the information to be
passed to the model. For each time function being defined the user must provide a time series of
data that consists of at least two points.

Figure 3 Time Function for CO2 Atmospheric Partial Pressure

3.3 Constants
Figure 4 illustrates where the user specifies the only constant needed for the pH calculation (if
not specified as a time function). The CO2 atmospheric partial pressure constant is specified in
the advance eutrophication module by selecting Constants and the Global Constants group. To
switch between the constant groups, chose using the drop down picklist. Note the user is
specifies the values for the constants, but also needs to check the “Used” radio button. Failing to
check this box will keep the interface for sending this information to the model. If a time
function as described in Section 3.2 provides data for CO2 atmospheric partial pressure it
supersedes the value specified here.

Figure 4 Constant Atmospheric Partial Pressure for CO2

3.4 Output Variables


Output variables from the pH/alkalinity and total inorganic carbon calculation in the advanced
eutrophication module are listed in Figure 5. An output variable for total inorganic carbon (state
variable), Alkalinity (state variable), pH (calculated) and unionized ammonia (calculated) have been
added as output. Variables checked in the “Output” box will be available to the WASP graphical
post-processing software. For each variable with a checked “CSV” box, WASP will produce a
separate comma-delimited file containing output for all segments and all output times. In this
example, checked CSV output variables are related directly or indirectly to the benthic algal
simulation.
Figure 5 WASP Output Variables for pH Calculation

4 References
Chapra, S.C., Pelletier, G.J. and Tao, H. 2008. QUAL2K: A Modeling Framework for
Simulating River and Stream Water Quality, Version 2.11: Documentation and Users Manual.
Civil and Environmental Engineering Dept., Tufts University, Medford, MA.,
[email protected]

You might also like