water: Source water object of class "water" created by define_water
hcl: Amount of hydrochloric acid added in mg/L: HCl -> H + Cl
h2so4: Amount of sulfuric acid added in mg/L: H2SO4 -> 2H + SO4
h3po4: Amount of phosphoric acid added in mg/L: H3PO4 -> 3H + PO4
co2: Amount of carbon dioxide added in mg/L: CO2 (gas) + H2O -> H2CO3*
naoh: Amount of caustic added in mg/L: NaOH -> Na + OH
caoh2: Amount of lime added in mg/L: Ca(OH)2 -> Ca + 2OH
mgoh2: Amount of magneisum hydroxide added in mg/L: Mg(OH)2 -> Mg + 2OH
na2co3: Amount of soda ash added in mg/L: Na2CO3 -> 2Na + CO3
nahco3: Amount of sodium bicarbonate added in mg/L: NaHCO3 -> Na + H + CO3
caco3: Amount of calcium carbonate added (or removed) in mg/L: CaCO3 -> Ca + CO3
cacl2: Amount of calcium chloride added in mg/L: CaCl2 -> Ca2+ + 2Cl-
cl2: Amount of chlorine gas added in mg/L as Cl2: Cl2(g) + H2O -> HOCl + H + Cl
naocl: Amount of sodium hypochlorite added in mg/L as Cl2: NaOCl -> Na + OCl
nh4oh: Amount of ammonium hydroxide added in mg/L as N: NH4OH -> NH4 + OH
nh42so4: Amount of ammonium sulfate added in mg/L as N: (NH4)2SO4 -> 2NH4 + SO4
alum: Amount of hydrated aluminum sulfate added in mg/L: Al2(SO4)3*14H2O + 6HCO3 -> 2Al(OH)3(am) +3SO4 + 14H2O + 6CO2
ferricchloride: Amount of ferric Chloride added in mg/L: FeCl3 + 3HCO3 -> Fe(OH)3(am) + 3Cl + 3CO2
ferricsulfate: Amount of ferric sulfate added in mg/L: Fe2(SO4)3*8.8H2O + 6HCO3 -> 2Fe(OH)3(am) + 3SO4 + 8.8H2O + 6CO2
ach: Amount of aluminum chlorohydrate added in mg/L: Al2(OH)5Cl*2H2O + HCO3 -> 2Al(OH)3(am) + Cl + 2H2O + CO2
softening_correction: Set to TRUE to correct post-softening pH (caco3 must be < 0). Default is FALSE. Based on WTP model equation 5-62
Returns
A water class object with updated pH, alkalinity, and ions post-chemical addition.
Details
The function takes an object of class "water" created by define_water and user-specified chemical additions and returns a new object of class "water" with updated water quality. Units of all chemical additions are in mg/L as chemical (not as product).
chemdose_ph works by evaluating all the user-specified chemical additions and solving for what the new pH must be using uniroot to satisfy the principle of electroneutrality in pure water while correcting for the existing alkalinity of the water that the chemical is added to. Multiple chemicals can be added simultaneously or each addition can be modeled independently through sequential doses.