# Water Balance calculator, V1 frozen methodology Status: **frozen, 10 October 2026, rev 3.** Formulas, constants, the refusal list and the validation cases do not change during implementation. If an actual technical problem is found, report it before changing anything. Owner approved decisions 1-7 of the register in section 9 on 10 October 2026. Supersedes rev 2, which was audited and found to contain one reachable defect class (undefined logarithms) and one wrong model family (a step-table TDS constant grafted onto a chart equation it does not belong to). This document is a specification. It is not page copy and it is not a user interface. --- ## 0. Sources, and which page numbers mean what Three Wojtowicz papers are load-bearing. Each appeared first in the *Journal of the Swimming Pool and Spa Industry* and was later reprinted as a chapter in *The Chemistry and Treatment of Swimming Pool and Spa Water*. **The two carry different page numbers**, and an earlier draft of this audit mixed them. Journal pagination is authoritative below; book pagination is given in brackets. | Key | Paper | Journal | Book | |---|---|---|---| | **[A]** | "Swimming Pool Water Balance Part 1: Effect of Cyanuric Acid and Other Interferences on Carbonate Alkalinity Measurement" | JSPSI **Vol 1 No 1, pp. 7–13** | Chapter 4.1 | | **[B]** | "Swimming Pool Water Balance Part 2: Factors Affecting the Calcium Carbonate Saturation Index" | JSPSI **Vol 1 No 2, pp. 9–15** | Chapter 4.2 | | **[C]** | "A Revised and Updated Saturation Index Equation" | JSPSI **Vol 3 No 1, pp. 28–34** (2001) | Chapter 2.3, pp. 35–41 | For [C] the offset is exactly 7: *book page = journal page + 7*. Statements cited in earlier drafts as "p.37" and "p.40" are **book** pages; they are journal **p.30** and **p.33**. What lives where: - **[A]** — α₁′ = ([H⁺]/K₁′ + 1)⁻¹ with K₁′ = 1.47×10⁻⁷ "estimated at 80 °F and 0 TDS"; F = (CaCO₃/2H₃Cy)·α₁′ = 0.388·α₁′; Alk_carb = Alk_T − CA·F; **Table 2** (F vs pH, 7.0–8.2, at 80 °F and 1000 ppm TDS); **Table 3** (error from the flat ⅓ factor). - **[B]** — the legacy SI = pH + AF + CF + TF − 12.1, attributed to Van Waters & Rogers 1964 and stated to be "at 1000 ppm TDS"; the flat Alk_carb = Alk_T − ⅓·CA; and the warning quoted in refusal R6. - **[C]** — eq 25/26 (the revised SI), eq 27 (at 1000 ppm), eq 28 (TC in °C), eq 29 (TC in °F), Table 1 (Davies A), Table 2 (ionic strength correction), Table 3 (TC), Table 4 (constant term), Table 5 (worked SI values). Journal **p.30** [book 37] carries the TF polynomial and the derivation of −12.10; journal **p.31** [38] the equations; **p.32** [39] Tables 3 and 4; **p.33** [40] Table 5 and the C formula. Non-Wojtowicz material used for corroboration only, never as a coefficient source: Utah Admin Code R392-302-25; ANSI/APSP-11:2009 Table as reproduced by PHTA via ICC; Jandy AquaPure H0325600 and TruClear XL H0696800; the PrecisePool calculator evidence pack of 10 October 2026 (Taylor T-01…T-21, Orenda O-01…O-26). --- ## 1. Findings that decide the spec ### 1.1 The legacy chart equation is unsafe above 1000 ppm TDS, by its author's own account [C] journal p.33 [book 40]: > "Above 1000 ppm TDS the current equation predicts a greater degree of > saturation than actual. Thus, the current equation may indicate a positive > SI for a water with an actual negative SI." [C] Table 5 quantifies it: at 5000 ppm the legacy equation reads **0.24 high**. A Southern California salt pool at 3000–3500 ppm is squarely in that band. This is the single strongest reason to adopt the revised equation: the legacy one tells a salt-pool owner the water is fine when it is corrosive. ### 1.2 The familiar quadratic temperature polynomial belongs to the legacy system [C] journal p.30 [book 37]: > "The temperature correction factors … can be represented by the equation: > TF = −0.56 + 0.01827·°F − 0.000041·(°F)²." Wojtowicz wrote that as a *fit to the Van Waters & Rogers table*, while describing the equation he was replacing. It is not his recommendation, and it belongs with the −12.1 constant. **The negative sign is confirmed at source**; a proposal to change it to +0.56 was checked and is wrong by exactly 1.0 at every temperature. ### 1.3 12.1 is the 1000 ppm constant, not the sub-1000 constant [C] journal p.30 [book 37]: "If a TDS of 1000 ppm is assumed, then a factor of −12.10 is obtained." [B] says the same. The Utah and APSP step tables place 12.1 *below* 1000 ppm and 12.2 *at* 1000 — offset one rung from the source they extend. Another reason not to graft them on. ### 1.4 A fixed cyanurate pKa cannot reproduce the published table The pKa implied by [A] Table 2 **drifts** from 6.790 at pH 7.0 to 6.887 at pH 8.2, a spread of 0.052. The best single constant across all seven rows is pKa 6.7993 and still misses a row by **0.00501** — a whole rounding step. Interpolating the published table reproduces it exactly, by construction. **Therefore V1 interpolates Table 2 and does not fit a constant.** The closed form is retained as a documented cross-check only; it agrees with the table to 0.005 in the factor, worth 0.0027 SI at CYA 100. ### 1.5 The flat ⅓ factor is an approximation with a stated range [A]: "For convenience, an approximate factor of 1/3 can be employed … acceptable accuracy is obtained with the 1/3 factor in the pH range 7.4 to 8.0 up to 200 ppm CA … **Outside this range the actual factors in Table 2 should be used.**" V1 uses Table 2 everywhere and never the flat factor. --- ## 2. Method ### 2.1 Equations ``` F(pH) = [A] Table 2, linearly interpolated (pH 7.0 – 8.2) Alk_carb = Alk_T − F(pH) × CYA [A] TC = 0.0155 × °C [C] eq 28 C = −11.30 − 0.333 × log10(TDS) [C] journal p.33 SI = pH + log10(CH) + log10(Alk_carb) + TC + C [C] eq 25 ``` ### 2.2 Units, stated because getting them wrong is silent **Calcium hardness and carbonate alkalinity are BOTH ppm CaCO₃.** [C] abstract: "both calcium hardness and carbonate alkalinity are expressed in ppm CaCO₃." [C] eq 26 note: "in contrast to previous versions of the saturation index in which hardness was expressed as ppm Ca rather than CaCO₃." **There is no −0.4 on hardness.** That term belonged to the legacy form. The conversion is already inside −11.30. Adding it would shift every result by 0.4. ### 2.3 Reference conditions and limitations of the CYA factor [A] Table 2 is computed **at 80 °F and 1000 ppm TDS**. The underlying K₁′ = 1.47×10⁻⁷ is stated **at 80 °F and 0 TDS**; the gap between the two is the ionic-strength shift, which is why the table's implied pKa (≈6.79) sits below the theoretical 6.833. **V1 applies Table 2 at all supported temperatures (32–113 °F) and all supported TDS (500–5000 ppm). This is an approximation.** [A] publishes no temperature or TDS dependence for α₁′, so the size of the error outside 80 °F / 1000 ppm **is not quantified by any source we hold** and we do not estimate it. It is recorded in section 6 as the largest unquantified assumption in the method. Scale for judgement, not a bound: moving the pKa by 0.05 — roughly the drift visible within Table 2 itself — moves F by at most 0.011, which at CYA 100 moves SI by about 0.004. --- ## 3. Supported ranges Two different kinds of limit. They are labelled separately and must not be merged. ### 3.1 Published validation ranges (source-established) | Quantity | Range | Source | |---|---|---| | TDS | **500 – 5,000 ppm** | [C] Table 4 publishes no constant outside it | | pH | **7.0 – 8.2** | [A] Table 2's range | | Temperature | **32 – 113 °F** | [C] Table 3's range | Note the Davies approximation itself holds to ionic strength < 0.5 ([C] journal p.30 [37]), i.e. TDS ≈ 20,000 ppm. The tabulated range is far tighter and is the binding limit. ### 3.2 PrecisePool policy thresholds (chosen, not published) | Policy | Value | Reasoning | |---|---|---| | Carbonate alkalinity floor | **15 ppm** | σ(Alk_carb) ≈ 11 ppm from kit resolution makes the index's own uncertainty exceed ±0.3 below ≈16 ppm | | Borates present or unknown | refuse | no borate factor verified to a primary source | | Band shown | ±0.3 | Utah R392-302-25, Jandy TruClear XL Table 5, Taylor all use it | --- ## 4. Required inputs Absent means refused, not guessed. **No input is ever defaulted silently.** | Input | Unit | If absent | |---|---|---| | pH | — | Refused (R1) | | Water temperature | °F or °C, **unit stated explicitly** | Refused (R1) | | Calcium hardness | ppm CaCO₃ | Refused (R1) | | Total alkalinity | ppm CaCO₃ | Refused (R1) | | Cyanuric acid | ppm; **0 is a measurement, not a gap** | Refused (R1) | | Total dissolved solids | ppm, **measured TDS, not salinity** | Refused (R1) | | Borates | **yes / no / unknown — explicit three-state** | "unknown" refuses | --- ## 5. Refusals **R1 — Any missing input.** All six readings are required. CYA 0 is a measurement (an unstabilised pool) and computes; CYA blank is a gap and refuses. Evidence for why this matters: Taylor capture T-19 silently substitutes 3,500 ppm TDS when the box is blank and the sanitiser is Salt; T-20 silently substitutes 50 ppm borate. Neither substitution is announced. **R2 — Salinity used as, or added to, TDS.** A chlorine generator infers salinity from conductivity; TDS is total dissolved solids and includes hardness, alkalinity and cyanurate. They are different quantities. Jandy's own units display salinity in gpl and never claim it is TDS. **R3 — Borates present or unknown.** POLICY. Borate raises measured total alkalinity, so an uncorrected index reads **high** — the water is reported as more scaling than it is, which is the unsafe direction. Taylor capture T-20 implies ≈0.17 ppm alkalinity per ppm borate (50 ppm → −8.50 ppm), credited to Taylor booklet #2004B, which we do not hold. [A] remarks that the same ionisation treatment "can also be used for boric acid" but publishes no borate table. V1 asks, and refuses on *yes* and on *unknown*, rather than assuming zero. **R4 — Outside a published validation range** (section 3.1). The boundaries themselves compute; one step beyond refuses. **R5 — Logarithm domain.** CH ≤ 0, Alk_T ≤ 0, CYA < 0. **R6 — No carbonate alkalinity left.** Alk_carb ≤ 0. [B] names this case in words: "a pool with 100 ppm total alkalinity and 300 ppm cyanuric acid will essentially have no carbonate alkalinity … it could lead to severe corrosion and etching problems under the above conditions." Taylor's page code instead substitutes **0.01 ppm** and keeps going, producing a fabricated extreme. V1 stops. **R7 — Carbonate alkalinity below 15 ppm.** POLICY, see 3.2. Finite but hypersensitive: at Alk_carb = 10 a single 1 ppm step moves SI by 0.043. **R8 — Unknown chemical purity.** A calcium chloride product whose assay is not on the label gets no dose. **R9 — Temperature unit confusion.** POLICY. Range-check against the unit actually selected. Taylor capture T-18: 84 left in the box when the unit was switched to °C was read as 84 °C (183 °F) and returned **+0.97 "Scale-Forming"** with no warning. **R10 — Stale results.** POLICY. Recompute or clear on every input change. Taylor capture T-21 shows +0.16 from a 1,000 ppm run while the box reads 3,500. **R11 — Etching verdict on a non-cementitious surface.** Scaling can occur on any surface and inside a heater; dissolution of CaCO₃ requires CaCO₃ to dissolve. Show the number always; withhold only the etching verdict. **R12 — More than one chemical change per result**, and **no predicted post-dose SI**. The reader doses one thing, retests, and enters a measurement. A computed value may be displayed anywhere; it may be stored only where the thing reading it knows it is computed. --- ## 6. Uncertainty — two different numbers, never merged ### 6.1 Model-to-model difference (zero measurement error) | Comparison | Difference | |---|---| | This method vs Taylor's digital calculator | ≤ 0.015 across 600–3500 ppm | | This method vs Orenda | ≈ 0.13, from Orenda's documented different solubility constant and ion pairing | | Revised vs legacy equation | up to **0.24** at 5000 ppm ([C] Table 5) | ### 6.2 Measurement uncertainty — an ILLUSTRATIVE EXAMPLE **This is a worked example on assumed test-kit errors. It is not a universal accuracy guarantee and must not be published as one.** The assumed errors are not measured properties of any particular kit. At pH 7.6, Alk_carb 80, CH 250, 84 °F, TDS 1000, assuming ±0.1 pH, ±11 ppm alkalinity, ±25 ppm hardness, ±2 °F, ±200 ppm TDS: | source | contribution | |---|---| | pH | 0.100 | | carbonate alkalinity | 0.060 | | calcium hardness | 0.043 | | temperature | 0.017 | | TDS | 0.029 | | **combined in quadrature** | **±0.129** | pH contributes 78 percent of it. At a ±0.2 pH read the same example gives ±0.216. The lesson to publish is **"your pH test dominates the answer"**, not a number. 6.1 and 6.2 land near each other by coincidence and mean different things. --- ## 7. Dosing Independent mass balance, unrelated to the saturation index. At 8.33 lb/gal, consistent with `heating-v1.md`. | Product | lb per 10,000 gal per 10 ppm | Basis | |---|---|---| | Sodium bicarbonate (alkalinity) | **1.398** | MW 84.006 / eq CaCO₃ 50.043 | | Calcium chloride, anhydrous | **0.924** | MW 110.984 / 100.087 | | Calcium chloride dihydrate | **1.224** | MW 147.014 / 100.087; 75.49 % active | | Commercial 77 % calcium chloride | **1.200** | anhydrous ÷ 0.77 | Safeguards: one chemical per result (R12); purity from the label or refuse (R8); no predicted post-dose index (R12). Dosing output and index output never combine into a single "do this" plan. Lowering alkalinity or hardness is **not** dosed: alkalinity comes down only through acid additions that also move pH and cannot be separated in one dose; hardness comes down only by replacing water, which is `fill-refill-v1.md`. Acid demand to hit a target pH is refused (carried forward from the brief). --- ## 8. Validation `docs/water-balance-mirror.py` — **116 assertions, 0 failures.** The count was 112 when this section was first written. Four were added during implementation: three recording that the author computed Table 5 from Table 4's tabulated constants rather than from the C formula (the two differ by at most 0.0092, inside the paper's stated ±0.01), and one for the salinity control described in R2. - **[C] Table 5**, the author's own worked values, is the primary regression set: six rows at pH 7.5 / Alk_carb 100 / CH 300 / 84 °F, TDS 500–5000. All six reproduce to the paper's rounding (max deviation 0.0061). - [C] Table 3 (TC, 8 rows), Table 4 (C, 6 rows), eq 28 ≡ eq 29. - [A] Table 2 (7 rows, exact by interpolation) and Table 3 (18 cells). - pKa drift and the table-vs-closed-form gap, quantified. - Refusals R1–R8 including every boundary, plus the inside-the-boundary cases. - Dosing, with linearity in both volume and ppm. - Corroboration block: Taylor within 0.015, Orenda 0.117 below — marked comparison, not source. --- ## 9. Decision register | # | Decision | Status | Impact | |---|---|---|---| | 1 | Adopt [C] revised equation as the reference basis | **APPROVED** | 0.13 vs Orenda | | 2 | Interpolate [A] Table 2 rather than fit a pKa | **APPROVED** | 0.005 in F | | 3 | 15 ppm carbonate alkalinity floor | **APPROVED POLICY** | refusal boundary | | 4 | Refuse on borates yes *and* unknown | **APPROVED POLICY** | up to 0.06 | | 5 | Publish band ±0.3 | **APPROVED** | verdict wording | | 6 | Temperature-unit and stale-result guards | **APPROVED POLICY** | up to 0.8 | | 7 | Applying Table 2 outside 80 °F / 1000 ppm | **APPROVED, disclosed assumption** | unknown | | 8 | TruClear 11K thresholds | **Open** | display only | Item 7 is the largest open assumption in the method. No source we hold quantifies it. It is disclosed rather than estimated. --- ## 10. Known gaps 1. **No borate factor from a primary source.** Taylor credits booklet #2004B. Until that is read, R3 refuses. 2. **Table 2's temperature and TDS dependence is unpublished** (decision 7). 3. **TruClear 11K manual not obtained.** AquaPure H0325600 and TruClear XL H0696800 are held and differ from each other; the 11K is a third unit. 4. **Orenda's model is not reproducible from public documentation.** Its ≈0.13 offset is explained by its own support article but the constants are not published. It is cited as a difference, never as a target. 5. **Surface-specific verdict thresholds** beyond the ±0.3 band are not sourced. V1 shows the number and the band and does not grade severity.