EnviroSim is pleased to announce the latest issue of “The BioWin Advantage” e-tech newsletter. This release discusses Illustrating pH Modeling in BioWin - Titrations of Acids and Bases.
pH is an important factor in simulating the performance of biological wastewater treatment processes, including activated sludge and anaerobic digestion. For example, pH impacts the species distribution of the weak acid systems (carbonate, ammonia, phosphate, acetate, propionate, etc.) which impacts the rate of many reactions, including:
- Biological activity, which can be severely limited outside an optimal pH range
- Chemical precipitation reactions when metal salts such as alum or ferric chloride are added for chemical phosphorus removal
- Spontaneous precipitation of magnesium and calcium phosphates (struvite, HDP, HAP) and,
- Stripping of ammonia at high pH.
BioWin was the first wastewater treatment process simulator to incorporate plant-wide pH modeling. The pH model in BioWin was formulated to include all of the major acid-base systems and strong ions typically found in municipal wastewater. The pH model is based on:
- Equilibrium modeling of the phosphate, carbonate, ammonium, volatile fatty acid systems and typical ions in wastewater (Mg2+, Ca2+, NO3-, etc.).
- Incorporation of activity coefficients based on the ionic strength of the solution.
- Gas-liquid transfer of ammonia and carbon dioxide.
- Biological activity affecting compounds included in the model (e.g. CO2, NO2-, NO3-, and many others)
Details on the formulation of the model can be found in the BioWin manual (Model Reference > Biological/Chemical Models > Modeling of pH and Alkalinity) along with the paper ‘Formulation of a General Model for simulation of pH in Wastewater Treatment Processes’ by Fairlamb et al. (2003) found in the supplemental files.
In this issue we will explore the pH model in BioWin via its application to clean-water acid-base titrations.
Activating pH Calculations in BioWin
pH calculations can be switched on and off as required for a specific system. Clicking on the Model options button (or via Project > Parameters > Current Project Options on the Model Options tab) opens a dialog (see figure below) where the user can separately activate pH calculations and pH dependency of the activated sludge system. When Include pH calculations (otherwise pH of 7.0 assumed) is checked, the pH in all units and streams is calculated. When Include pH calculations (otherwise pH of 7.0 assumed) is unchecked, a pH of 7 is assumed and used in all process calculations. In addition to switching on or off pH calculations, users can also switch on and off the dependency of the activated sludge kinetic equations on pH. For example, when Apply pH limitations in activated sludge kinetic equations is checked, pH dependency is accounted for in process calculations. Note in anaerobic digesters pH dependency is always applied.
Titration of Acids and Bases
In this example we will investigate several titrations including:
- Titration of a strong base (NaOH) by a strong acid (HCl)
- Titration of a strong acid (HCl) by a strong base (NaOH)
- Titration of a weak acid (CH3COOH) by a strong base (NaOH)
- Titration of a weak base (NH3) by a strong acid (HCl)
- Titration of a weak acid (CH3COOH) by a weak base (NH3)
To simulate titration of acids and bases in clean water a configuration consisting of a variable volume reactor to represent a titration vessel, and a stream influent with a constant flow to represent the standard solution was used, as shown in the configurations below.
Specifying the Concentrations of Acids and Bases in BioWin
A concentration of 0.1 N is used for all of the acids and bases. To specify the concentration of a strong acid incorporating an anion that BioWin does not explicitly track, the concentration of the “Other Anions” variable is adjusted in the stream influent element. In this example, the anion (Cl in the case of HCl) concentration is set to 100 meq/L which is equivalent to 100 mmol/L and hence 0.1 N HCl. BioWin calculates the pH and the composition of the HCl solution – BioWin adds the hydrogen ions required to balance out the chlorine anions specified. To specify the concentration of a strong base incorporating a cation that BioWin does not explicitly track, the concentration of the “Other Cations” variable is adjusted in the stream influent element. In this example, the cation concentration (Na in the case of NaOH) is specified as 100 meq/L which is equivalent to 100 mmol/L and hence 0.1 N NaOH. BioWin calculates the pH and composition of the NaOH solution by adding the required hydroxide anions to balance out the sodium cations.
To specify a concentration of the weak acid acetic acid (CH3COOH) in BioWin, a concentration can be entered for the state variable acetate. To specify a concentration of the weak base ammonia (NH3) in BioWin, a concentration can be entered for the state variable ammonia. Note: the acetate state variable has units of mg COD/L while the state variable ammonia has units of mg N/L. The required concentrations of acetate and ammonia (taking care of the appropriate unit conversions) can be calculated since we know the molarity required for the solution:
Setting up the Configuration
In these examples, standard solution is added via the stream influent elements at a flow of 1 L/minute or 1440 L/d to 50 L of acid or base in the titration vessel. A variable volume bioreactor with a total volume of 200 L is used to simulate the titration vessel. The initial volume (50 L) of acid or base in the titration vessel is specified on the Initial Values tab of the variable volume element’s property dialog box. This is achieved by entering an Initial liquid hold-up to 25 % of full (since 0.25 x 200 L = 50 L). The Initial Concentrations are set to User Defined so that the concentration of acid or base can be input as the appropriate state variable. The screen shot below shows the Initial Values tab for the case of ammonia as the analyte in the titration vessel.
The following table summarizes the parameters for the example simulations.
Running the Simulation
A dynamic simulation was run from seed conditions to ensure that the desired user-defined initial values were set in the titration vessel. The simulation was run for 0.08 days. Since the standard solution is added at a rate of 1440 L/d or 1 L/minute, the volume of standard solution added directly corresponds to the simulation time. For example, a simulation time of 0.08 days corresponds to 115.2 minutes and hence the addition of 115.2 L of standard solution.
Time series plots showing the results of the titration simulations can be found in the Album of the BioWin files that accompany this newsletter; some example plots are shown below. In order to illustrate the accuracy of BioWin’s pH model, the simulated results (represented by the solid lines in the figures below) are plotted against data from a standard chemistry text (Mortimer, 1975) (represented by the points in the figures below).
Note: The x-axis of a titration curve is generally reported as the volume of standard solution added. When we add a time series plot to the BioWin album the bottom axis is reported in units of time (hours:minutes). As mentioned above, since standard solution is added at a rate of 1 L/minute (1440 L/d) the bottom axis directly translates into the volume of standard solution added in litres. For example, at time 00:50 (0 hours, 50 minutes) the volume of standard solution added is 50 L, at time 1:00 (1 hour) the volume of standard solution added is 60 L, at time 1:40 (1 hour, 40 minutes) the volume of standard solution added is 100 L, and so on. In the example plots shown below, the bottom axis was manually edited from units of time (hours:minutes) into the corresponding volume added in mL. The following steps describe how to manually edit the bottom axis; the figure below shows an example of the chart editor midway through editing:
- Right click on the graph and select Edit Axes…
- In the Chart Editor select the Bottom Axis from the list Axes:
- Select the Items tab which contains a list of the bottom axis labels
- Uncheck Automatic to edit the list
- Select a time (hh:mm) from the list. The Value and Text associated with this time will be displayed in the respective text boxes.
- Edit the Text from hh:mm to the corresponding corresponding volume
- Click the Font tab below to edit the appearance of the text (optional)
- Click Close
The model predictions provide an excellent match to the reported data. These results verify that the acid-base equilibrium chemistry is correctly formulated in the pH model. Any slight discrepancies in the fit are due to the model’s use of activity coefficients and slightly different equilibrium constants to those reported in the text (the equilibrium constants used in BioWin are listed in the BioWin manual).
pH plays a fundamental role in all biological processes, including the activated sludge and anaerobic digestion process. A general pH model like BioWin’s should include all of the major acid-base systems and strong ions typically found in municipal wastewaters. This will allow the model to calculate the pH throughout the activated sludge plant, including the liquid and solids lines.
The ability to model pH allows the model to be used as a tool to investigate a number of factors, such as:
- Gas phase modeling which is important for modeling anaerobic digestion and precipitation processes. Calculation of gas transfer rates (e.g. CO2 and ammonia) requires knowledge of the species ionization states and consequently the pH of the system.
- Inhibition of biological activity at low and high pH.
- pH dependent equilibrium modeling of aluminum and ferric dosing for phosphorus precipitation, including hydroxide sludge formation.
- pH dependent modeling of the spontaneous precipitation of struvite and calcium phosphates, integrated into the biological model matrix. Accurate prediction of struvite precipitation also requires modeling of magnesium concentrations, both the soluble magnesium and that stored in organisms.
We trust that you found this technical topic both interesting and informative. Please feel free to contact us at email@example.com (Subject: The BioWin Advantage) with your comments on this article or suggestions for future articles.
Thank you, and good modeling.
The EnviroSim Team
Fairlamb, M., Jones, R., Takács, I., and Bye, C. (2003). Formulation of a General Model for Simulation of pH in Wastewater Treatment Processes. Proceedings of WEFTEC, 2003, Los Angeles, California.
Mortimer, C.E. (1975). Chemistry: A Conceptual Approach, 3rd Ed. Toronto: D. Van Nostrand Company.
To subscribe to "The BioWin Advantage" please click here.
This section contains earlier editions of BioWin Advantage