ELEC · Practical Guide 12 — Apply speciation to the observed pH series
Apply a saved ideal NH₃ fraction definition to the observed pH dataset. Check the output fractions and confirm that the original sampling times are retained.
ELEC project · Practical GX-TXT guide 12 of 16.
Reproduction target: GX-TXT DEV112-P013. The original screenshots and recorded results document the historical ELEC session. A rerun on P013 has yet to be verified.
Module: Dataset Expression
Learning objective: Apply speciation definitions to observed pH
Prerequisites / input: Observed pH Dataset and saved NH₃ definition
Expected output: Time-aligned ideal NH₃ fractions
Scientific background and reference results
Chemical fractions depend on pH and equilibrium assumptions. Dataset Expression applies a saved definition to observed rows, retaining original time; it does not turn these fractions into measurements of rates or gas loss.
Step-by-step procedure
- Open Dataset Expression and select
hal_fig3b_100rpm_bulk_ph_n_present_01.measurement_1.curves. Bind pH to variabley [1]and retain original coordinatex [min]. - Choose the ideal γ=1 INI file as Saved definition file. Verify formula
1/(1+10^(pKaN-pH)/gammaNH4), pH as seriesy [1],pKaN=9.251 [1]andgammaNH4=1 [1]. Set Retain source coordinate tox [min], output1and no selection. Check the definition and bindings before applying: the definition file and input Dataset have separate roles. - Evaluate and publish with a new ID. Historical ideal output is
hal_fig3b_100rpm_n_present_alpha_nh3_ideal_01: each fraction corresponds to the same row’s pH and retains its time. - The three previously produced Cl₂, HOCl and OCl fractions use the same original rows. Repeating their evaluation requires the respective retained definitions and verification of symbols, bindings and units; undocumented formulas are not substituted here. Fractions are dimensionless. The NH₃ fraction concerns only NH₃/(NH₃+NH₄⁺), rather than the whole TNT830 signal, which can include chloramines.
- To use initial nitrogen
10 mg N/Las molarity, divide the N mass by14.0067 g/molafter making mass and volume units consistent. Do not dividemg N/Lby the whole NH₃ molecule’s molar mass. Keep γ=1 and γ=0.78 scenarios distinct.


Evaluations are pointwise and conditional. Dedicated fraction plots had not been published at closure; existing Datasets do not establish their completion. P013 is NOT_RUN.
Working materials
Figure 3 digitized datasets (CSV) · Model and constraint datasets (CSV) · ELEC working files (ZIP)
Other steps of this project
- ELEC 02 — Model hierarchy: effective kinetics, transfer and identifiability
- ELEC 03 — From fits to constraints: what does the chlorine balance reveal?
- ELEC 01 — What does the experiment measure? Nitrogen, chlorine and pH
- ELEC 07 — Sources, conclusions and tests that could distinguish the mechanisms
- ELEC 04 — Kinetics, speciation and transport: from local reaction to reactor response
- ELEC 06 — Where the numbers came from: GX-TXT, GNU Octave and reproducibility