With math, there are typically multiple ways to solve a problem. What I did, since you have 100 gallons and wish to change 20 gallons.....80% will be "old" water while 20% will be "new" water. So
(7 x 0.8) + (7.8 x 0.2) = 7.16 dKH
That's actually exactly the formula I started out with. Just in case anyone wants to check my math:
Cf = (Ct x Pt) + (Cn x Pn)
Where Cf = final concentration, Ct = tank concentration, Pt = percentage of tank water, Cn = concentration of new water, and Pn = percentage of the new water. I wanted to figure out the exact change, which can be expressed as follows:
Cd = Cf - Ct
Where Cd is the concentration difference (in our case, 0.16 dKh), Cf is the final concentration (7.16 dKh), Ct is the initial tank concentration (7 dKh in our case). Since Cf can be expressed as the equation above, you can substitute that in when solving for Cd (concentration difference):
Cd = [(CnPn) + (CtPt)] - Ct
I refined the equation further. Pn and Pt (the water change amount and the tank water left) are related: if you take out 25%, 75% will be left from the tank. If you take out 50%, 50% will be left from the tank. So Pt (the percentage of tank water left) can be defined as 1 - Pn, or 100% - the percentage of the water change:
Cd = [(CnPn) + (Ct x [1 - Pn])] - Ct
When simplified, you get:
Cd = CnPn + Ct - CtPn - Ct
The two Ct terms cancel out, and you can factor a Pn out of two of the terms, and that's how I got my equation:
Cd = Pn(Cn - Ct)
Cd = difference in concentration
Pn = Percentage of new water (water change %)
Cn = Concentration of new water
Ct = Concentration of tank water
It's worth saying that both of these formulas work just fine. It all depends how you want to see the output!
