labqc.emissions¶
Flue-gas emission conversions for combustion testing.
Concentrations from a gas analyser are usually in ppm (by volume) at the measured oxygen level. Emission limits, for example in EN 303-5 for solid-fuel boilers, are stated in mg/m3 of dry flue gas at standard conditions (273.15 K, 101.325 kPa) and a reference oxygen level (10% O2 for EN 303-5).
UNITS
module-attribute
¶
UNITS = ('ppm', 'mg/m3', 'mg/m3 actual')
Input units for correct_emission: ppm by volume, mg/m3 at standard conditions
(273.15 K, 101.325 kPa), or mg/m3 at the measured temperature and pressure.
EmissionResult
dataclass
¶
Each step of correct_emission, in mg/m3 at standard conditions.
Source code in src/labqc/emissions.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | |
ppm_to_mg_m3 ¶
ppm_to_mg_m3(ppm: float, gas: str) -> float
ppm by volume to mg/m3 at 273.15 K and 101.325 kPa.
Source code in src/labqc/emissions.py
30 31 32 | |
to_reference_o2 ¶
to_reference_o2(concentration: float, o2_measured: float, o2_ref: float = 10.0) -> float
Correct a dry concentration to a reference oxygen level.
C_ref = C_meas * (20.9 - O2_ref) / (20.9 - O2_meas)
Source code in src/labqc/emissions.py
39 40 41 42 43 44 45 46 | |
wet_to_dry ¶
wet_to_dry(concentration_wet: float, water_vol_fraction: float) -> float
Convert a wet-basis concentration to dry basis.
Source code in src/labqc/emissions.py
49 50 51 52 53 | |
to_temperature_pressure ¶
to_temperature_pressure(concentration: float, t_c: float, p_kpa: float) -> float
Convert mg/m3 measured at t_c (degC) and p_kpa to standard conditions.
Source code in src/labqc/emissions.py
56 57 58 | |
register_gas ¶
register_gas(name: str, molar_mass: float, overwrite: bool = False) -> None
Add a gas to MOLAR_MASS (g/mol) so the ppm <-> mg/m3 conversions accept it.
Refuses to change a gas already in the table unless overwrite=True.
Source code in src/labqc/emissions.py
61 62 63 64 65 66 67 68 69 70 71 72 | |
corrected_uncertainty ¶
corrected_uncertainty(concentration: float, u_concentration: float, o2_measured: float, u_o2: float, o2_ref: float = 10.0, coverage: float = 0.95, k: float | None = None) -> tuple[float, Result]
Uncertainty of a concentration corrected to reference O2 (GUM first order).
Propagates the standard uncertainties of the measured concentration and of the measured O2 through to_reference_o2 with labqc.uncertainty.propagate. Returns (C_ref, Result); the Result table shows which of the two dominates. The O2 term grows quickly as O2_meas approaches 20.9 %, because the correction factor's denominator shrinks.
Source code in src/labqc/emissions.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | |
percent_of_limit ¶
percent_of_limit(value: float, limit: float) -> float
value as a percentage of an emission limit.
Source code in src/labqc/emissions.py
104 105 106 107 108 | |
correct_emission ¶
correct_emission(value: float, gas: str, unit: str = 'ppm', o2_measured: float = 10.0, o2_ref: float = 10.0, water_vol_fraction: float = 0.0, t_c: float | None = None, p_kpa: float | None = None, limit: float | None = None) -> EmissionResult
Convert one analyser reading to mg/m3, dry, standard conditions, reference O2.
unit "ppm" uses the gas molar mass; "mg/m3" is already at standard
conditions; "mg/m3 actual" is converted from t_c (degC) and p_kpa.
water_vol_fraction > 0 converts a wet reading to dry. With limit
(mg/m3 at the reference O2) the result also gives the % of the limit.
Source code in src/labqc/emissions.py
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | |