Methodology
How the numbers get made, and how you can check them.
Every air filing we prepare, and the permit behind it, rests on emission calculations. Every boiler, paint booth, crusher, generator, and storage tank has a potential to emit that has to be quantified before it can be permitted, and that number decides which rules apply, how long review takes, and what controls get installed. Before any of that, the facility’s existing permit has to be read correctly: which units it covers, which limits apply to each, and what has to be monitored and recorded. This page describes how the software behind our filing service reads a permit, how it produces the calculations, and how anyone can audit both. It is the reasoning behind every filing we hand you to sign.
The problem
Emission calculations are almost always produced by consultants – engineering firms that build the inventory in spreadsheets and process simulators and hand the operator a package to file. The agency on the other end is supposed to check that work. In practice, state air programs are understaffed and reviewing more applications than they can audit line by line. A reviewer confirms that the form is complete, the right subparts are cited, and the totals are internally consistent. Re-deriving a floating-roof tank’s standing loss from first principles, for every tank in every application, is not something a review queue has time for.
That leaves the calculation functionally unauditable by anyone outside the firm that produced it. The inputs live in a licensed simulator. The emission factors are transcribed by hand. The arithmetic is buried in spreadsheet cells. If a factor is wrong, or a value is entered wrong, the resulting document still looks exactly like a correct one. Nobody downstream – the operator paying for it, the agency approving it, the people living next to the site – is positioned to catch the error.
The approach
Subpart separates the part of the work that needs judgment from the part that needs to be exact.
The calculations live in a deterministic layer written in Python. Every emission factor, equation, and lookup comes from a public source – AP-42, material balances from the product’s own data sheet, the applicability tests written into each NSPS and NESHAP, the federal greenhouse-gas rules under Subpart W, the Peng-Robinson equation of state for vapor pressure – and every number the engine returns carries the citation, the factor, and the equation that produced it. Given the same inputs, it returns the same output every time, with a trail back to the regulation.
Around that sits a retrieval corpus of public material: the regulations themselves, and real permits already on file with agencies. That is what the system reads to answer questions about applicability and precedent.
The language model’s job is deliberately small. It transcribes and it routes. It reads the facility’s permit and copies out what the permit says; it reads what the operator describes, decides which calculation applies and which regulatory text is relevant, and asks for the inputs the deterministic layer needs. It does not generate emission factors and it does not do the math. Every number it proposes as an input is checked against the document or the human answer it cites, and refused if it isn’t there. The numbers come from the Python layer, the citations come from the corpus, and the model connects a facility’s paperwork and plain-language description to the right pieces of both.
Reading the permit
Everything we do for a site starts from its current air permit, so the permit has to be read the way a careful permit writer would read it. When a customer sends us a permit, the model reads the whole document, scanned pages included, and transcribes four things: the emission units, the control devices, every numeric limit (emission rates, concentrations, opacity, throughput, fuel use, hours and material content), and the monitoring, recordkeeping, reporting and testing requirements.
It transcribes; it does not infer. Every item it records carries the page it came from and the permit’s own words, and those words are checked against the text of that page by code, not by the model. A limit’s number has to appear in its quote. Wording the permit strikes through is kept on the record but never treated as an active limit. Numeric limits in the general conditions count as limits on the facility, because a facility has to meet them. A limit the permit states twice, in a condition and again in a summary table, is recorded once.
Then a second check runs that involves no model at all: it scans the permit’s text for wording that reads like a limit and lists any passage the transcription does not account for. Those passages, and every transcribed limit with its quote, go to a Subpart reviewer, who confirms the permit’s limits before they become the site’s. That confirmation is recorded. From then on the site’s filing calendar, its digital map, and every filing we prepare from them rest on limits a person has checked against the permit itself.
Why this architecture
The failure mode we designed against is the plausible wrong answer.
A model asked to produce an emission calculation directly will, when it does not know a factor, produce one anyway. It states an AP-42 value that is close but not correct, or applies an equation that fits the shape of the problem but not the case. The output reads as authoritative – units, a citation, a clean total – and is wrong in a way that survives a quick look. In a domain whose entire purpose is to produce a document that will be trusted and filed, that is the worst behavior available.
A deterministic layer removes that surface. The engine cannot invent a factor it does not have; it either cites a value or it stops. Because the calculation is code with a fixed method, it can be checked the way any calculation is checked: line by line, factor against source, against the regulation it claims to implement. The model can still be wrong about routing – it might reach for the wrong calculation – but a routing error is visible in a way a fabricated number is not, because the calculation it lands on shows its work.
What the validation establishes
Three separate things are tested, and they establish different claims. Kept apart on purpose, because conflating them is how software gets oversold.
The first is a suite of more than a thousand automated tests that run against the engine. These establish that the engine computes what the published methods specify: each equation implemented as written, each emission factor matching its source, each unit conversion correct, and the edge cases behaving. This is internal correctness. It says the engine faithfully carries out AP-42, Subpart W, and the referenced federal methods. It does not say those methods match any particular real facility.
The second is a set of comparisons against seven real permits filed with and reviewed by the Texas Commission on Environmental Quality, all of them oil and gas sites, where the engine started. Here the engine is given the same facility inputs a consultant used, and its output is compared to the numbers in the permit as filed. Across those seven, facility-wide totals reproduce the permit’s reported potential to emit within a few percent on the criteria pollutants and VOC, and the places where the engine and the permit diverge trace to a specific cause – most often a regulatory-basis choice, meaning which agency-approved factor to use, or a rule revision that changed a factor between the permit’s filing date and the current standard. Where the two disagree, we can say why.
These are different kinds of evidence. The tests establish that the method is implemented correctly. The seven permits establish that, on real applications produced independently by consultants and accepted by an agency, the engine lands where the accepted work landed. Seven is a small number, and we report it as one: corroboration on real cases, not a statistical guarantee across every facility that exists.
The third is the permit reader. It is tested against 22 issued permits from 12 states and 13 agencies: Title V and state permits for power plants, a cement plant, hospitals and a university, landfills, a data center, printing and coating lines, an automotive assembly plant, a feed mill, a rendering plant, a quarry and a wood products mill, from 7 to 118 pages, two of them scanned images with no text at all. Each permit has an answer key built by reading it page by page, and the reader’s output is scored against the key item by item, with part of the set held back and never examined while the reader was being tuned. On the permits scored so far it finds essentially every emission unit, and about nine in ten limits exactly as the key records them, attached to the same units; setting aside which unit a limit is attached to, it found 525 of 533. Ninety-nine percent of the quotes it records are found on the page it cites. The answer keys are themselves being re-checked, so these numbers will move, and we will report them as they do. They are the reason a person confirms every permit’s limits before we rely on them.
Limits
The engine covers the source families most permitted facilities hold: boilers and process heaters, stationary engines and turbines, surface coating, solvent cleaning and welding, stone crushing and aggregate handling, hot-mix asphalt plants, incinerators, storage tanks, flares and truck loading, and oil and gas production equipment, along with the NSPS and NESHAP subparts that apply to them. For the Colorado filings we take on first, the families that matter most are stone crushing and aggregate handling, hot-mix asphalt plants, and stationary engines. It grows one source family at a time. It does not yet cover every source category or every state-specific method, and where a unit falls outside what it covers, it says so rather than guessing.
We can also name where it is weakest. Composition-driven vapor pressure for heavy or aromatic-rich streams is approximated with a small catalog of surrogate components, and that approximation flattens on the heaviest condensates – the one place our TCEQ comparisons show a double-digit divergence rather than a low single-digit one. Agency-specific factor choices differ, and the engine’s default is one defensible choice among several. And it computes what it is given: a wrong throughput or the wrong stock gives a wrong answer, correctly derived. The engine makes a calculation auditable. It does not make the inputs true. That is why we work from your records rather than estimates, and why you review every filing before you sign it.
The permit reader has its own weak spots. It is least reliable on limits that don’t read like limits: a minimum water flow, a gas temperature, a share of wells, a fuel-oil allowance written as a formula. It sometimes attaches a limit to a group of units where the permit names one, or the reverse. Permits that nest units inside processes inside emission units, or that set limits by operating scenario, season or date, are only partly representable today. That is why its output is a draft a person confirms, never a record on its own.
Questions about the methodology, or want to see it run against one of your permits? Reach out – kade@subpart.net.