You Don't Have to Break the Bank to Tackle Odor and Corrosion Issues

Magnesium Hydroxide: Environmentally-Friendly and Cost-Effective Treatment for Odor and Corrosion in Sewer Lines

John Van Wingerden \ September 17, 2021

As the infrastructure in the United States continues to age, it has become increasingly apparent that improved understanding, maintenance, and treatment for sewer line odor and corrosion is extremely important.

By doing a simple internet image search using the words “sewer line corrosion” or “H2S corrosion” numerous photos of gas-phase corrosion are readily accessible, showing greatly diminished life of collection system infrastructure.  The most dramatic of these photos are of concrete pipe – showing that about the only thing remaining on the top section of pipe is the rebar (see the figure below from a Dec. 11, 2019 publication of Water & Wastes Digest called “Microbiologically Induced Corrosion”).

As can be seen, the bottom of the pipe is nearly unscathed, while the top section is nearly gone. To those in the wastewater conveyance industry, this photo is not uncommon. However, it is entirely preventable using cost-effective measures that both mitigate this problem in the collection system, as well as providing beneficial treatment to the downstream water reclamation facility (WRF).

In this article we plan to cover three primary topics related to odor and corrosion in sewer lines:

  • 1. The basic chemistry of how sewer line hydrogen sulfide (H2S) odors form and how this odor is directly related to gas-phase corrosion.
  • 2. The most prevalent treatments in the marketplace for sewer line odor and corrosion.
  • 3. The benefits of Magnesium Hydroxide for this application.

Basic Chemistry of Sewer Line Odor and Corrosion

When asked, “what is the root cause of odor in a sewer line?”, many wastewater operators reply, “Hydrogen Sulfide” or H2S.  

But in actuality H2S is the symptom of the problem – not the root cause.  H2S is simply a by-product of microbiological processes that can occur within the collection system.  Just like nearly everything else in the world of wastewater treatment, it’s all about the bugs and how they are maintained.  The root cause relates to how they are maintained.

The root cause of a typical sewer line odor problem is the presence of a septic or anaerobic condition that can exist under certain conditions.  The most typical reason for the existence of an anaerobic condition is low flow or long detention time.  A common example of this condition is the extremely low flow rate of sewage during the late evening and early morning hours that can occur each day in certain collection system pump stations.  Under these long detention time conditions, the residual oxygen in the water can be completely consumed by both chemical and microbiological activity, resulting in a water that contains no free O2.  When no free oxygen molecules are present bacteria can display a facultative behavior, allowing them to convert their activity from aerobic to anoxic and anaerobic – being able to metabolize ions such as nitrate (NO3) and sulfate (SO4-2) as sources of the O-atom needed for their continued growth and health.  These microbiologically-driven chemical reactions result in stripping the O-atoms from the ions, leaving behind molecular nitrogen (N2) and hydrogen sulfide (H2S).

2 NO3   🡪    N2

  SO4-2   ↔   H2S  

The microbiological reaction with nitrate (called denitrification when it occurs at the treatment plant) results in the release of nitrogen gas, which is odorless and noncorrosive – N2 is actually 80% of the atmosphere we breath every day.  Certainly not an odor problem.

However, it’s the microbiological reaction with sulfate (SO4-2) that forms the rotten-egg H2S odor.  Under these anaerobic conditions there are additional microbiological processes that generate acids (called volatile fatty acids).  As these acids are being formed, the pH of the wastewater can decline – called going “septic”.  For instance, it’s not uncommon to find restaurant grease traps covered with a thick layer of grease where the pH of the water beneath the cap is as low as 4 or 5.  Also, consider fire sprinkler lines.  While they are filled with fresh city drinking water, when flushed they exude a tremendous H2S odor from the microbiological conversion of sulfate into sulfide.  They also run black with corrosion product – what used to be the pipe wall!  This mechanism of odor and corrosion is not unlike what is happening in certain sewer lines when long detention times are the norm.


Hydrogen sulfide is also a weak acid in water that exists in two possible forms: H2S and HS.  

  H2S    ↔    HS

        volatile     nonvolatile

When the water is acidic (having pH < 7), the most prevalent species is H2S – the volatile, foul-smelling gas that we’re trying to avoid.  When the water is basic (pH > 7), the most dominant species is HS, which is nonvolatile (something to keep in mind as we dive further into this discussion).

Interestingly, when sewage is confined within a force main the SO4-2 🡪 H2S process can be catalytic – meaning that sulfate can be microbiologically converted into H2S, which in subsequent microbiological reactions within the pipe can be converted back into sulfate, and then back into H2S, and so on.  Unfortunately, in most cases the reactions that convert H2S back into SO4-2 can cause accelerated corrosion within the system.  

Within a force main or any enclosed section of the sewer line where the gas cannot escape, H2S can be converted into SO4-2 by the activity of thiobacillus bacteria or by simple chemical oxidation reactions in the pipe.  In this reaction, a most common initial species formed is sulfuric acid (H2SO4), which can very rapidly react with the pipe wall (concrete or steel) to cause corrosion, and releasing SO4-2 back into the water to be converted again into H2S by sulfate reducing bacteria (SRBs).  Again, recall the stinky black water when a fire sprinkler system is flushed – corrosion accelerated by the microbiologically-driven catalytic cycle of SO4-2 to H2S to SO4-2, and so on.

A simple phrase sums it up for collection systems:
“if it stinks, it corrodes”

Odor and corrosion are intimately linked through the oxidation-reduction chemistry of sulfate and H2S, driven mostly by microorganisms.  So, while H2S is not the root cause of the problem, it most certainly is a terrible symptom.

In summary, the longer the detention time of the wastewater in the pipe → the lower the oxygen level → the more anaerobic the conditions → which allow microorganisms to generate acids, one of which is H2S → that depress the pH → making H2S more volatile → allowing H2S to escape into the gas-phase to cause corrosion.

Odor and Corrosion Control Treatments

There are numerous methods used in the industry to address collection system or lift station odor complaints and corrosive destruction of infrastructure.  Some of the methods are focused on the odor aspect only, such as sealing manhole lids or filtering the H2S using scrubbers.  While these approaches may succeed in eliminating the odor complaints, they do little or nothing to address the corrosion that is still occurring within the system.

Of the chemical treatment methods, the most dominant in the industry fall into the following categories:


Numerous products have been developed to take advantage of the microbiologically driven reduction of nitrate into odor-free, corrosion-free nitrogen gas (denitrification).  These products containing nitrate salts (typically calcium nitrate) are fed into collection systems as an alternative oxygen source, directing bacteria in the biomass to preferentially select NO3 instead of SO4-2, resulting in the minimization of odor.  Being a relatively “green” and inexpensive technology, his treatment approach has found strong acceptance in the marketplace.  One primary concern is that the overall nitrogen level in the system is increased due to the need to feed at a much higher dose than stoichiometric in order to achieve odor reduction performance.  This excessive dose of nitrate can be a concern for the treatment plant, especially if they have recently received new reduced limits on the amount of nitrogen they can discharge.  In addition, this treatment approach fosters the growth of biomass in the system, which may diminish pumping capacity of the system and require the occasional costs to “pig” (mechanically clean) the line.

Shock Treatment

This approach typically involves slug dosing a highly caustic chemical (such as Caustic Soda) to drive the pH up to an extreme level, or slug dosing of a strong oxidizer (such as Bleach) to drive the biocide concentration up to an extreme level.  In either case, this approach provides a short-term benefit by causing large amounts of biomass to slough off the pipe.  However, with no continued treatment the biomass and corresponding odor rapidly return causing the need for another dose.  This observation of rapid microorganism recovery teaches us how incredibly resilient these organisms are.  Consider the drinking water distribution system, where biofilms have been shown to survive and build despite the maintenance of a continuous residual of chlorine or chloramine.  Ask yourself, why do we get “brown water” downstream from a location where a city worker has accidentally bumped a drinking water pipe?  If we’ve been putting clean drinking water into what was originally a clean pipe, shouldn’t the pipe remain clean?  Should be able to bump it all day without consequence.  Not, so.  Microorganisms are incredibly resilient!





Another well used odor control method is to cause the precipitation of H2S into a mineral that becomes a part of the suspended solids being carried along in the system.  The most common precipitating agents used are iron salts, such as ferric chloride or ferrous sulfate, resulting in the formation of iron sulfide precipitates.  The biggest benefits of this treatment are that iron salts are relatively inexpensive and they react rapidly with H2S to give a quick knock-down of odor.  On the negative side, these highly acidic products can be very hazardous for operators to handle, can depress the wastewater pH flowing to the treatment plant, and can cause a significant increase in suspended solids entering the plant.


As was stated at the beginning of this discussion, the root cause of the odor and corrosion problem is a lack of oxygen in the system that results in anaerobic conditions.  Therefore, numerous technologies have been invented to treat the collection system with a source of oxygen with a goal of maintaining a residual of dissolved oxygen in the system.  The biggest benefit of this approach is that it does not involve the purchase of chemical (unless the oxygen source is liquid O2).  The struggles with this technology have been with the capital and maintenance costs of the oxygenation systems, along with the need to control the dose of oxygen so that not too much nor too little is being added.  Too much gaseous oxygen can result in tripping and clogging of air release valves or water hammer and pump cavitation.  In addition, numerous treatment plants rely on the presence of acids (volatile fatty acids, VFAs) generated by the anaerobic microorganisms as readily available food for the treatment process.  Maintenance of a DO residual in the collection system negates the formation of VFAs.




pH Adjustment

Another way to control gas-phase odor and corrosion from H2S is to not allow it to escape from the water-phase in the first place.  This can be done by simply adjusting the pH of the water in the alkaline direction.  As was mentioned previously, hydrogen sulfide is a weak acid always in equilibrium with its counter-anion, HS.  By boosting the pH in the collection system, the equilibrium shifts in favor of HS, which is a non-volatile ion.  Being nonvolatile, it does not leave the water-phase, completely mitigating odor and gas-phase corrosion.  In addition, the added pH and alkalinity is typically beneficial for the downstream treatment plant.

Magnesium Hydroxide for pH Control


There are numerous chemical methods to increase the pH of water.  However, many of those chemical options have severe negative implications:

  • Caustic Soda (NaOH):  can provide extremely rapid increase in pH, but can be difficult to control pH spikes or loss in pH when underfed.  Not a strong alkalinity buffer.  Also, highly hazardous for operators to store, handle, and feed.
  • Soda Ash (Na2CO3):  can provide rapid increase in pH along with buffering benefit, but typically fed as a powder involving cumbersome and dirty feed systems.  It also adds 2 moles of sodium per dissolved molecule to the treated water, with sodium and TDS levels becoming an increasing effluent concern.
  • Lime (Ca(OH)2):  can provide rapid increase in pH along with buffering benefit, but can result in calcium carbonate scale formation that can restrict flow and minimize pumping capacity.  Is also hazardous and cumbersome to handle and feed.  For these reasons, calcium-based products are less desirable for feed into a collection system.

Unlike the other alkaline additives, magnesium hydroxide (Mg(OH)2) does not provide a rapid pH increase.  Instead, it dissolves relatively slowly in water and provides a powerful, long-lasting buffer.  In addition, it is completely nonhazardous – commonly called “milk of magnesia” – allowing operators the confidence to handle and feed without safety concerns.  


Replacing a sodium-based additive (NaOH or Na2CO3) with a magnesium additive is a significant improvement in TDS, and the Mg2+ ion is beneficial for aquatic and terrestrial life (Mg2+ is the core element of chlorophyll which drives photosynthesis).  Finally, no other liquid alkaline additive can release a larger amount of hydroxide (OH) into the water from a single dose than a 60% Mg(OH)2 product.  For instance, as shown by the following stoichiometric equations, a feed of 60 lbs of 60% Mg(OH)2 will release the same number of moles of hydroxide (OH-) as 100 lbs of 50% NaOH:


The following graphs provide real-world data demonstrating effective H2S mitigation from the feed of magnesium hydroxide into collection systems.  Figure 1 provides data from an Australian odor control application of a 60% Mg(OH)2 product named ACTI-Mag (from Calix ltd.), showing a dramatic drop in H2S.  Dosing was into a lift station about 10 miles from the treatment plant, resulting in excellent odor and corrosion control in the force main, along with a reduction in the need to clean the lift station for build-up of fats, oils, and greases (FOGs).  Because of the increased pH and alkalinity entering the treatment plant, they were able to eliminate lime usage and reduce the amount of alum being fed for phosphorous reduction.


Figure 2 (above) provides data from an odor control application in Washington State, where the feed of two chemicals (calcium nitrate for force main odor control and caustic soda for pH and alkalinity control at the treatment plant) was replaced with a 60% Mg(OH)2 product name AMALGAM-60 (from IER).  The result was improved H2S reduction along with a boost in pH and alkalinity passing through the treatment plant to provide the necessary support for nitrification.  In addition to the reduction in chemical usage and cost, energy savings was observed in aeration.  They were able to maintain the system odor-free due to the increased pH and alkalinity in the aerobic digester, allowing them to run their blowers at a lower setting.

Warning: Invalid argument supplied for foreach() in /home/customer/www/ on line 538


Consistent with the Australian study, they also observed the cleaning effect of magnesium hydroxide as evidenced by the increased flow rate of the lift pump from an initial value of 100-105 gpm up to 130-135 gpm after a few weeks of treatment (Figure 3, above).  Such an increase in the absence of any mechanical cleaning, nor any other significant change in their collection system was unprecedented.

A negative aspect of magnesium hydroxide is the fact that it is a slurried product that needs to be agitated in storage in order to ensure reliable feed.  In order to overcome this concern, magnesium hydroxide feed systems have been designed with optimized agitated storage tanks, along with simplified and robust chemical metering systems.  Because of the reduced chemical usage as compared to other alkaline products, as mention with the calculations above, the cost to install a proper magnesium hydroxide feed system is readily overcome with reduced overall chemical usage.

AMALGAM for odor and corrosion control

AMALGAM-60 (60% Mg(OH)2) has a higher neutralizing value per pound than any other alkaline additive.  This translates into a 40% reduction in chemical usage when compared with caustic soda, while being significantly safer for operators to handle and more nutritive for the microorganisms being maintained – making it the most cost-effective option for hydrogen sulfide gas (H2S) control in sewers.

Find out more about AMALGAM


The root cause of odor and corrosion in sewer lines is low flow conditions that result in an anaerobic environment for certain time periods within the system.  Under such conditions, the microorganisms generate acids, one of which is hydrogen sulfide.  These depress the pH, allowing the volatile acid gases to escape from the water and cause accelerated gas-phase corrosion.  Therefore, the feed of an alkaline additive into the low-flow section of the collection system can result in converting the acids into their counter anions, which are nonvolatile.  Since they cannot escape into the gas-phase, odor or corrosion are effectively eliminated.  Through the choice of magnesium hydroxide as the alkali, there is a further benefit of biomass removal and increased pump capacity in the collection system.

The beauty of this odor control approach is that the boost in pH and alkalinity in the collection system is also beneficial for the downstream treatment plant, whereas some odor control treatments can have a detrimental impact downstream.  Increases in the influent pH and alkalinity help to stabilize these parameters as the wastewater passes through the plant, especially in the face of increasing needs for nitrogen removal.  In essence, the plant is gaining a free treatment allowing for lower chemical costs, perhaps fully eliminating the need to feed a highly hazardous chemical such as caustic soda, with an additional benefit of energy savings from reduction in aeration blower operation.

Finally, the safe, environmentally-friendly, and nonhazardous nature of magnesium hydroxide, coupled with the lower usage rate compared to any other alkaline additive, makes this the most optimum choice for collection system odor and corrosion control.

CALL US: 800-331-3314

Or use the form below, we’ll be in touch soon.

  • This field is for validation purposes and should be left unchanged.
Follow us on:


January 18, 2024
ALKA-Mag+ Mg(OH)2: alternative to caustic soda for wastewater treatment – with IER’s Lufkin TX facility

A safe and cost-effective alternative to the use of sodium hydroxide [caustic soda, NaOH] for wastewater alkalinity and pH adjustment

January 06, 2024
IER News Issue 12 – January 2024

A Letter from Doug Kelley, President of IER Hi everyone! I hope everybody had a very relaxing and Merry Christmas!

January 06, 2024
Introducing Gunnar Walter Delivery Specialist – Centralia WA

Before coming to work at IER Gunnar lived in San Francisco where he waited tables during the day, and in


  • Hidden
  • Hidden
  • This field is for validation purposes and should be left unchanged.