pH System Modeling and Control

  • Share
  • Share

PH ScaleWhen dealing with acids and bases, the subject of pH and pH control often comes up. In this post we'll discuss some methods of modelling acidic and basic streams and talk a little about the practical difficulties in controlling pH in the real world.

pH, you’ll hopefully recall, is a logarithmic measure of the activity of hydrogen ions in a solution. For plain water a pH of approximately 7 is “neutral” or natural water, with lower numbers being acidic and higher numbers basic.




 Modeling Mixtures of Acids and Bases

For simple mixtures of acids and bases, this online calculator lets you predict the pH of a mixture. Before starting the calculator, you must either know the concentrations of the acid and base in the total solution after mixing (see their example Case #1), or the concentrations and flowrates of the acidic and basic streams before mixing (see Case #2).

WebQC pH Solver

Let's try this out! For example, say I have a mixture containing 0.1 mol/L of HCl and of NaOH:


HCL pKa=-7.0 c=0.1

NaOH pKb=0.2 c=0.1


[H+] = 1.0763310243078E-7
[OH-] = 9.2908220372361E-8
pH = 6.9680541413824
pOH = 7.0319458586176

So this stream would be very slightly acidic (ph<7), but very close to neutral.

pKa and pKb are “dissociation constants” which you need to look up in a reference. Where can you get pKa and pKb values? The Chembuddy program documentation is one source.

By the way, Chembuddy program is pretty convenient and not that expensive at all. They also have good documentation if you want to try these equations by hand.

For example, if you wanted to double-check the pHsolver or try work by hand, for "strong" acids and bases try Chembuddy's Equation 11.13, or a simpler and almost as accurate Equation 14.2. In either case you will know all the variables in the equation except for the [H+], which you can solve by re-arranging the equation or by guess-and-check iteration:

Fast procedure for these equastions: Assume a value for [H+]. Substitute it in to the left and right side of the equation, and calculate the value of Left Side – Right Side. You want LS-RS=0. Keep iterating different values of [H+] until you’re there. If you use a computer program like Excel’s goal seek you might try multiplying by a million or more before running the goal seek, since you’re trying to get accuracy in the 10^(-14) range. Once you have a value of [H+] that makes LS-RS=0, then you can calculate the other variables such as pH = -log[H+].

If you have  just a single chemical to consider, or just want to look up some pKa and pKB values, the Wolfram Alpha pH Widget is another resource for you.

Simulation Software

In addition to tools like pHsolver and Chembuddy mentioned above, you can also turn to process simulators like Hysys, PRO-II, UniSim, etc.

To do so, recall that when you use a simulation program there are different fluid packages (also known as thermodynamic methods). Each package uses different calculation strategies to handle the prediction of the properties of each stream. When considering pH, you need fluid packages specially designed for pH problems, called “Electrolyte” fluid packages.

For most Aspentech products, my experience is you have to buy the package “OLI_Electrolyte” as a separate add-on to your contract. OLI_Electrolyte will usually show up in your list of fluid options, but it will only work once you’ve paid extra for it. (The extra fee helps pay the company OLI who made the calculations; Aspentech is basically giving you a platform to run OLI’s models).

UniSim Design I haven't use in years, but I imagine the still use a very similar set-up to Aspentech.

For SimSci products like PRO-II, there are a wide variety of electrolyte models built in to the software. Each model handles a small selection of acid-base species. You need to crack open the manual and do some research to find a model that handles all the different chemical species in your situation.

One problem you may encounter is defining the streams: you know you want “200 gpm of water, and the water is at pH 3.0 due to HCl,” but how much HCl does that mean? There is no easy way to just type in the pH you want. To get around this, you may need to first try mixing the water with solid HCl, and have an “adjuster” or “controller” type of operation iterate the HCl added to define your initial stream. “Vary the input flowrate of HCl until the outlet stream has pH = 3.0.” Once the solver finishes, then can you bring your mixed stream into the simulation and solve your other problems.

pH Control

pH can be surprisingly difficult to control. It seems simple: why not just install a pH probe and have an injection pump add acids and/or bases into your process stream?

One reason pH control is so difficult is the logarithmic nature of the pH measurement. The logarithms amplify changes near the neutral point of your solution: every step further from the neutral point will be “10 times bigger” than the step before it.

For example, if you have a strong acid AND a strong base in water, pHs near 7.0 are very difficult to target: small nudges in concentration can very easily send you to pHs of 6.0 or 8.0. However, as the pH gets very high (towards 14) or low (towards 1) it takes much larger changes to affect the pH of the system, literally many 1000's of times larger.

If you see a wide range of pH values this can create a major challenge for designing and tuning your controls: your system behavior and sensitivity can vary tremendously depending on what pH you are at. It is very hard to get a pump and control valve and control programming that can handle the extremes and the middle. The result is that if you need to take a system from a very high or low pH toward neutrality, you may need to use several steps, and multiple mixing tanks, to achieve your results. E.g. one mixing system for pH 1 to 5, and another from 5 to 7. And because of the sensitivity involved, mixing your fluid well and placing your pH probe in the correct spot downstream of your mixer is crucial.

Here are some readings on the subject

Luckily, there are pH skid vendors available who can help you with pre-designed systems for almost any size and incoming pH situation.

Print Friendly, PDF & Email

About admin

I own and run

This entry was posted in Instrumentation & Controls, Simulation & Thermodynamics and tagged , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published.

98 ÷ = 98