Articles
Understanding water chemistry with PHREEQC
What is PHREEQC?
PHREEQC is a powerful computer program created by the U.S. Geological Survey [as free and open-source software]. It’s designed to model water chemistry—basically, it helps scientists (as well as aquarists who love diving deep into water chemistry) understand how different chemicals behave in water.
It can simulate things like:
- pH changes
- Mineral dissolving or forming (incl. precipitates formation)
- Mixing of different water sources
- Gas exchange (like CO₂ or oxygen)
- Redox reactions (how substances gain or lose electrons)
It’s mostly used in geology, environmental science, and water treatment, but it can be surprisingly useful for aquarists too!
How can PHREEQC help an aquarist?
If you’re serious about maintaining a healthy aquarium, especially for sensitive species or planted tanks, PHREEQC can help you:
- Balance Water Chemistry
- Simulate how adding substances (like buffers, salts, or fertilizers) will affect pH, hardness, and alkalinity.
- Predict how your water will react when mixed with tap water, RO water, or other sources.
- Prevent Mineral Problems
- Avoid unwanted precipitation (like calcium carbonate, ferrihydrite, or goethite).
- Ensure minerals like calcium and magnesium stay dissolved and available for plants.
- Optimize CO₂ Levels
- Model how CO₂ injection affects pH and carbonate balance—great for planted tanks.
- Track Nutrients and Metals
- Understand how trace elements (like iron, copper, or zinc) behave in your tank.
- Prevent toxicity or deficiency by simulating dosing strategies.
- Plan Water Changes
- Predict how water changes will affect your tank’s chemistry before you do them.
Is It Easy to Use?
PHREEQC isn’t exactly plug-and-play—it’s more like a scientific calculator for water chemistry. But there are user-friendly interfaces (like PhreeqcI) and guides (especially AI) available, and once you get the hang of it, it’s incredibly powerful.
If you’re a data-loving aquarist or enjoy experimenting with water parameters, PHREEQC can be your secret weapon for precision and stability.
Next, I'll give you a beginner-friendly example of how to use it for your aquarium setup.
Beginner-friendly PHREEQC Example
Scenario Overview
- Goal: Simulate water chemistry in a planted tank with CO₂ injection.
- Water type: Soft (low hardness), slightly acidic (pH ~6.0).
- CO₂ level: 10 mg/ℓ (≈ 0.227 mmol/ℓ).
- Temperature: 25°C (typical aquarium temperature).
- Alkalinity: Low, but buffered to avoid pH crashes.
- Calcium & Magnesium: Present in low amounts for plant and shrimp health.
Software installation, Data entry and Run
- On usgs.gov download the most recent Graphical User Interface for PHREEQC.
- For example: phreeqci-3.8.6-17100.msi
- After installing the program, open it. You should see a program window similar to this:
Make sure you are on the "Input" tab.
- Enter the input data into the program:
You can copy and paste this into PhreeqcI:
SOLUTION 1 Planted Tank Setup temp 25 pH 5.6 # Give initial pH; actual pH will be computed units umol/L # All units need to be converted to µmol/ℓ N(-3) 24 as NH4 K 100 Ca 150 # Ca matching bicarbonate Mg 85 N(+5) 24 as NO3 P 3.5 as PO4-3 C(4) 300 as HCO3- # bicarbonate at 300 µmol/ℓ S(6) 85 as SO4-2 Cl 100 EQUILIBRIUM_PHASES CO2(g) -2.16 # Equivalent to 10 mg/ℓ CO2 SOLUTION_MODIFY 1 pe 4.0 # Fix redox state (preserve NH4+/NO3- balance) END SAVE SOLUTION 1 ENDWhat this input does?
- SOLUTION 1 Planted Tank Setup
- Defines a water “solution” named Planted Tank Setup.
- Sets temperature to 25 °C and gives an initial pH guess of 5.6. PHREEQC will adjust to the true pH once all reactions equilibrate.
- Switches concentration units to micromoles per liter (µmol/ℓ). Every ion below must be entered in µmol/ℓ.
- Ion and Nutrient Composition
- N(-3) 24 as NH₄⁺ → 24 µmol/ℓ ammonium
- K 100 → 100 µmol/ℓ potassium
- Ca 150 and Mg 85 → low hardness typical of soft water
- N(+5) 24 as NO₃⁻ → 24 µmol/ℓ nitrate
- P 3.5 as PO₄³⁻ → phosphate for plant nutrition
- C(4) 300 as HCO₃⁻ → 300 µmol/ℓ bicarbonate buffering capacity
- S(6) 85 as SO₄²⁻ and Cl 100 → sulfate and chloride background ions
- PS: I understand that determining these values can be difficult for most aquarists. However, there is nothing easier than asking AI for help these days. Simply enter the concentrations of all the compounds you add to the input (demineralized!) water and ask it to convert them to µmol/ℓ and break down all the compounds into individual cations and anions.
- EQUILIBRIUM_PHASES CO₂(g) –2.16
- Imposes equilibrium with CO₂ gas at log fCO₂ = –2.16 (≈10 mg/ℓ CO₂ in solution).
- PHREEQC uses Henry’s Law to adjust dissolved CO₂ and carbonate species.
- SOLUTION_MODIFY 1 pe 4.0
- Fixes the redox potential (pe) at 4.0 to lock in the NH₄⁺/NO₃⁻ ratio and prevent unintended redox shifts.
- SAVE SOLUTION 1
- Writes the final composition of Solution 1 to the output file or console for later review or use in chained calculations.
How to calculate the CO2(g) value to be used in the EQUILIBRIUM_PHASES section?
CO2 PhreeqcI log10(atm) Calculator
↗ This is the concentration of carbon dioxide dissolved in your aquarium.Uses Henry's constant (kH) = 3.3 × 10−2 mol/(ℓ·atm) at 25°C.
For CO2(aq) in mg/ℓ: atm = ((mg/ℓ) / 1000 / 44.01) / 0.033
For CO2(aq) in µmol/ℓ: atm = ((µmol/ℓ) / 1000000) / 0.033EQUILIBRIUM_PHASES CO2(g) # Equivalent to mg/ℓ CO2It should look like this now:
- SOLUTION 1 Planted Tank Setup
- Save the file, then click the "Run…" button:
- That's it.
Output Data Analysis
What to Look For in the Output
- Final pH – Compare against your target of ~5.6. A large shift indicates buffering or CO2 dosing needs adjustment.
- pe / Eh – Confirms your redox environment. A pe of 4.0 keeps ammonium stable; if it drifts, nitrification or denitrification may be simulated.
- Total Element Totals – C(4), N(-3), N(+5), P, K, Ca, Mg, Cl, S(6) in µmol/ℓ. Verify that none have “disappeared” (sign of precipitation).
- Speciation Breakdown – Look at species like CO2(aq), HCO3−, CO32−, NH4+, NO3−, H2PO4−, HPO42−. This tells you which forms dominate at your pH.
- Gas Partial Pressures – CO2(g) should remain at log fCO2 = –2.16. If it changes, your SOLUTION_MODIFY or EQUILIBRIUM_PHASES section may need tweaking.
- Mineral Saturation Indices (optional) – If you add a SELECTED_OUTPUT block for SI, watch values for calcite, vivianite, ferrihydrite, or phosphate minerals. SI > 0 means precipitation risk.
How to Interpret the Results
- A final pH around 5.7–5.8 means your 10 mg/ℓ CO2 and 300 µmol/ℓ HCO3− buffer are holding the tank slightly acidic. If pH is much lower, either raise alkalinity or reduce CO2 input.
- The speciation of carbonate will show most of your C(4) as dissolved CO2(aq) at this pH, with a smaller pool as HCO3−. That’s ideal for plant carbon uptake—CO2 and bicarbonate are both available.
- NH4+ vs NO3− speciation confirms that pe = 4.0 prevented oxidation of ammonium into nitrate. If NO3− were higher, you’d risk pH rises and nitrate spikes in the tank.
- Alkalinity (HCO3−) remains at 300 µmol/ℓ, providing a gentle pH buffer.
- If you added saturation indices, an SI < 0 for calcite and iron oxides shows you won’t see unwanted scale or rust-like precipitates on decor or equipment. SI > 0 would warn of clogging or nutrient lock-up.
By reviewing these outputs, you can fine-tune CO2 dosing, buffering capacity, and nutrient levels to keep your planted tank stable, lush, and free of unwanted precipitates.
PS: Again, if you have trouble understanding the resulting file yourself, simply upload it to AI and ask it to analyze it for you. For the best analysis results, it is of course advisable to state who you are and what you need it for, so that the AI knows what to focus on in the output.






