reactorcheck 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- reactorcheck-0.2.0/.github/workflows/ci.yml +72 -0
- reactorcheck-0.2.0/.github/workflows/release.yml +64 -0
- reactorcheck-0.2.0/.gitignore +15 -0
- reactorcheck-0.2.0/CHANGELOG.md +27 -0
- reactorcheck-0.2.0/CITATION.cff +10 -0
- reactorcheck-0.2.0/CONTRIBUTING.md +16 -0
- reactorcheck-0.2.0/LICENSE +21 -0
- reactorcheck-0.2.0/PKG-INFO +195 -0
- reactorcheck-0.2.0/README.md +136 -0
- reactorcheck-0.2.0/docs/assets/composition-result.png +0 -0
- reactorcheck-0.2.0/docs/assets/example-result.png +0 -0
- reactorcheck-0.2.0/docs/assets/social-preview.png +0 -0
- reactorcheck-0.2.0/docs/dependency-licenses.md +22 -0
- reactorcheck-0.2.0/docs/interchange.md +20 -0
- reactorcheck-0.2.0/docs/scientific-definitions.md +94 -0
- reactorcheck-0.2.0/examples/synthetic_composition.csv +13 -0
- reactorcheck-0.2.0/examples/synthetic_composition.xlsx +0 -0
- reactorcheck-0.2.0/examples/synthetic_composition_config.json +56 -0
- reactorcheck-0.2.0/examples/synthetic_config.json +52 -0
- reactorcheck-0.2.0/examples/synthetic_reactor.csv +13 -0
- reactorcheck-0.2.0/pyproject.toml +87 -0
- reactorcheck-0.2.0/schemas/reactorcheck-interchange.experimental.schema.json +80 -0
- reactorcheck-0.2.0/scripts/generate_example_assets.py +69 -0
- reactorcheck-0.2.0/src/reactorcheck/__init__.py +21 -0
- reactorcheck-0.2.0/src/reactorcheck/__main__.py +5 -0
- reactorcheck-0.2.0/src/reactorcheck/calculations.py +142 -0
- reactorcheck-0.2.0/src/reactorcheck/cli.py +74 -0
- reactorcheck-0.2.0/src/reactorcheck/composition.py +115 -0
- reactorcheck-0.2.0/src/reactorcheck/gui.py +563 -0
- reactorcheck-0.2.0/src/reactorcheck/gui_controller.py +51 -0
- reactorcheck-0.2.0/src/reactorcheck/io.py +209 -0
- reactorcheck-0.2.0/src/reactorcheck/models.py +180 -0
- reactorcheck-0.2.0/src/reactorcheck/plotting.py +50 -0
- reactorcheck-0.2.0/src/reactorcheck/py.typed +1 -0
- reactorcheck-0.2.0/src/reactorcheck/qc.py +134 -0
- reactorcheck-0.2.0/src/reactorcheck/service.py +511 -0
- reactorcheck-0.2.0/src/reactorcheck/species.py +111 -0
- reactorcheck-0.2.0/src/reactorcheck/steady.py +94 -0
- reactorcheck-0.2.0/src/reactorcheck/units.py +88 -0
- reactorcheck-0.2.0/tests/conftest.py +20 -0
- reactorcheck-0.2.0/tests/gui_widget_smoke.py +40 -0
- reactorcheck-0.2.0/tests/test_calculations.py +69 -0
- reactorcheck-0.2.0/tests/test_composition.py +260 -0
- reactorcheck-0.2.0/tests/test_io_cli_gui.py +128 -0
- reactorcheck-0.2.0/tests/test_project_metadata.py +30 -0
- reactorcheck-0.2.0/tests/test_service.py +65 -0
- reactorcheck-0.2.0/tests/test_species.py +37 -0
- reactorcheck-0.2.0/tests/test_steady.py +49 -0
- reactorcheck-0.2.0/tests/test_units.py +34 -0
- reactorcheck-0.2.0/tests/test_version.py +21 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
quality:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.12"
|
|
20
|
+
cache: pip
|
|
21
|
+
- run: python -m pip install --upgrade pip
|
|
22
|
+
- run: python -m pip install -e ".[dev]"
|
|
23
|
+
- run: ruff check .
|
|
24
|
+
- run: mypy src
|
|
25
|
+
|
|
26
|
+
test:
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
strategy:
|
|
29
|
+
fail-fast: false
|
|
30
|
+
matrix:
|
|
31
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@v4
|
|
34
|
+
- uses: actions/setup-python@v5
|
|
35
|
+
with:
|
|
36
|
+
python-version: ${{ matrix.python-version }}
|
|
37
|
+
cache: pip
|
|
38
|
+
- run: python -m pip install --upgrade pip
|
|
39
|
+
- run: python -m pip install -e ".[dev]"
|
|
40
|
+
- run: pytest
|
|
41
|
+
- name: CLI smoke
|
|
42
|
+
run: >-
|
|
43
|
+
reactorcheck analyze examples/synthetic_reactor.csv
|
|
44
|
+
--config examples/synthetic_config.json
|
|
45
|
+
--output /tmp/reactorcheck.xlsx
|
|
46
|
+
--plot /tmp/reactorcheck.png
|
|
47
|
+
|
|
48
|
+
package-and-gui:
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
steps:
|
|
51
|
+
- uses: actions/checkout@v4
|
|
52
|
+
- uses: actions/setup-python@v5
|
|
53
|
+
with:
|
|
54
|
+
python-version: "3.12"
|
|
55
|
+
cache: pip
|
|
56
|
+
- run: sudo apt-get update && sudo apt-get install -y python3-tk xvfb
|
|
57
|
+
- run: python -m pip install --upgrade pip build
|
|
58
|
+
- run: python -m build
|
|
59
|
+
- run: python -m pip install dist/*.whl
|
|
60
|
+
- run: reactorcheck --version
|
|
61
|
+
- name: Installed-package analysis smoke
|
|
62
|
+
working-directory: /tmp
|
|
63
|
+
run: >-
|
|
64
|
+
reactorcheck analyze "$GITHUB_WORKSPACE/examples/synthetic_reactor.csv"
|
|
65
|
+
--config "$GITHUB_WORKSPACE/examples/synthetic_config.json"
|
|
66
|
+
--output /tmp/installed.xlsx
|
|
67
|
+
- name: GUI widget/backend wiring smoke
|
|
68
|
+
run: >-
|
|
69
|
+
xvfb-run -a python tests/gui_widget_smoke.py
|
|
70
|
+
examples/synthetic_composition.csv
|
|
71
|
+
examples/synthetic_composition_config.json
|
|
72
|
+
/tmp/gui-wired.xlsx
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
name: Release package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
build:
|
|
9
|
+
if: github.event.release.prerelease == false
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
- uses: actions/setup-python@v5
|
|
16
|
+
with:
|
|
17
|
+
python-version: "3.12"
|
|
18
|
+
cache: pip
|
|
19
|
+
- run: sudo apt-get update && sudo apt-get install -y python3-tk xvfb
|
|
20
|
+
- run: python -m pip install --upgrade pip build twine
|
|
21
|
+
- run: python -m build
|
|
22
|
+
- run: twine check dist/*
|
|
23
|
+
- name: Clean wheel install
|
|
24
|
+
run: |
|
|
25
|
+
python -m venv /tmp/reactorcheck-release-venv
|
|
26
|
+
/tmp/reactorcheck-release-venv/bin/python -m pip install dist/*.whl
|
|
27
|
+
/tmp/reactorcheck-release-venv/bin/python -m pip check
|
|
28
|
+
- name: Installed import, CLI, and example smoke
|
|
29
|
+
env:
|
|
30
|
+
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
|
31
|
+
run: |
|
|
32
|
+
/tmp/reactorcheck-release-venv/bin/python -c "import os, reactorcheck; expected=os.environ['RELEASE_TAG'].removeprefix('v'); assert reactorcheck.__version__ == expected, (reactorcheck.__version__, expected)"
|
|
33
|
+
/tmp/reactorcheck-release-venv/bin/reactorcheck --help
|
|
34
|
+
/tmp/reactorcheck-release-venv/bin/reactorcheck analyze \
|
|
35
|
+
examples/synthetic_composition.csv \
|
|
36
|
+
--config examples/synthetic_composition_config.json \
|
|
37
|
+
--output /tmp/reactorcheck-release-example.xlsx
|
|
38
|
+
- name: Installed GUI wiring smoke
|
|
39
|
+
run: |
|
|
40
|
+
xvfb-run -a /tmp/reactorcheck-release-venv/bin/python \
|
|
41
|
+
tests/gui_widget_smoke.py \
|
|
42
|
+
examples/synthetic_composition.csv \
|
|
43
|
+
examples/synthetic_composition_config.json \
|
|
44
|
+
/tmp/reactorcheck-release-gui.xlsx
|
|
45
|
+
- uses: actions/upload-artifact@v4
|
|
46
|
+
with:
|
|
47
|
+
name: python-package-distributions
|
|
48
|
+
path: dist/
|
|
49
|
+
if-no-files-found: error
|
|
50
|
+
|
|
51
|
+
publish:
|
|
52
|
+
needs: build
|
|
53
|
+
runs-on: ubuntu-latest
|
|
54
|
+
environment:
|
|
55
|
+
name: pypi
|
|
56
|
+
url: https://pypi.org/p/reactorcheck
|
|
57
|
+
permissions:
|
|
58
|
+
id-token: write
|
|
59
|
+
steps:
|
|
60
|
+
- uses: actions/download-artifact@v4
|
|
61
|
+
with:
|
|
62
|
+
name: python-package-distributions
|
|
63
|
+
path: dist/
|
|
64
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes follow [Keep a Changelog](https://keepachangelog.com/) and
|
|
4
|
+
versions follow semantic versioning.
|
|
5
|
+
|
|
6
|
+
## [0.2.0] - Unreleased
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- Explicit internal-standard reconstruction from mole fraction, percent, or ppm
|
|
11
|
+
composition channels with hand-calculated scientific regressions.
|
|
12
|
+
- Independent raw/normalized treatment and wet/dry water-basis settings.
|
|
13
|
+
- GUI controls, CLI/config support, composition QC, and full reconstruction
|
|
14
|
+
provenance for the mole-fraction workflow.
|
|
15
|
+
- PyPI Trusted Publishing release workflow preparation; no publication has been
|
|
16
|
+
performed.
|
|
17
|
+
|
|
18
|
+
## [0.1.0] - 2026-08-23
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- CSV/XLSX mapping, explicit species formulas, and Pint-backed unit validation.
|
|
23
|
+
- Conversion, two selectivity bases, yield consistency, element/mass recovery,
|
|
24
|
+
product rate, STY, GHSV, and WHSV.
|
|
25
|
+
- Multi-variable steady-state candidates, manual override, structured QC,
|
|
26
|
+
provenance-aware Excel/CSV export, figures, CLI, and connected Tk GUI.
|
|
27
|
+
- Hand-calculated scientific regressions and independent CI/package smoke checks.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use ReactorCheck, please cite this software."
|
|
3
|
+
title: "ReactorCheck"
|
|
4
|
+
type: software
|
|
5
|
+
version: 0.2.0
|
|
6
|
+
license: MIT
|
|
7
|
+
repository-code: "https://github.com/hdkim99/ReactorCheck"
|
|
8
|
+
authors:
|
|
9
|
+
- family-names: "Kim"
|
|
10
|
+
given-names: "Hyun Dong"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Install `.[dev]`, create a focused branch, and run `ruff check .`, `mypy src`,
|
|
4
|
+
`pytest`, and `python -m build` before opening a pull request. Keep scientific
|
|
5
|
+
equations in the core, never in GUI callbacks. New equations require a definition,
|
|
6
|
+
units, assumptions, a hand-calculated or synthetic regression case, and physical
|
|
7
|
+
edge cases. Do not weaken assertions to conceal a scientific disagreement; record
|
|
8
|
+
whether the cause is implementation, test, definition, unit, model, or environment.
|
|
9
|
+
|
|
10
|
+
Use small Conventional Commit-style changes such as `feat:`, `fix:`, `test:`, and
|
|
11
|
+
`docs:`. Synthetic data must be redistributable. Never commit private experimental
|
|
12
|
+
data, credentials, or personally identifying metadata.
|
|
13
|
+
|
|
14
|
+
After changing the public composition example, run
|
|
15
|
+
`python scripts/generate_example_assets.py` and inspect both PNG files before
|
|
16
|
+
committing the regenerated XLSX/visual assets.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Hyun Dong Kim
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: reactorcheck
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Unit-aware catalytic reactor analysis from compositions or measured species flows.
|
|
5
|
+
Project-URL: Homepage, https://github.com/hdkim99/ReactorCheck
|
|
6
|
+
Project-URL: Repository, https://github.com/hdkim99/ReactorCheck
|
|
7
|
+
Project-URL: Issues, https://github.com/hdkim99/ReactorCheck/issues
|
|
8
|
+
Project-URL: Documentation, https://github.com/hdkim99/ReactorCheck#readme
|
|
9
|
+
Author: Hyun Dong Kim
|
|
10
|
+
License: MIT License
|
|
11
|
+
|
|
12
|
+
Copyright (c) 2026 Hyun Dong Kim
|
|
13
|
+
|
|
14
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
15
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
16
|
+
in the Software without restriction, including without limitation the rights
|
|
17
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
18
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
19
|
+
furnished to do so, subject to the following conditions:
|
|
20
|
+
|
|
21
|
+
The above copyright notice and this permission notice shall be included in all
|
|
22
|
+
copies or substantial portions of the Software.
|
|
23
|
+
|
|
24
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
25
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
26
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
27
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
28
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
29
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
30
|
+
SOFTWARE.
|
|
31
|
+
License-File: LICENSE
|
|
32
|
+
Keywords: catalysis,chemical-engineering,internal-standard,mole-fraction,reactor,scientific-software
|
|
33
|
+
Classifier: Development Status :: 3 - Alpha
|
|
34
|
+
Classifier: Intended Audience :: Science/Research
|
|
35
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
36
|
+
Classifier: Programming Language :: Python :: 3
|
|
37
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
38
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
39
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
40
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
41
|
+
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
42
|
+
Classifier: Typing :: Typed
|
|
43
|
+
Requires-Python: >=3.10
|
|
44
|
+
Requires-Dist: matplotlib>=3.7
|
|
45
|
+
Requires-Dist: numpy>=1.24
|
|
46
|
+
Requires-Dist: openpyxl>=3.1
|
|
47
|
+
Requires-Dist: pandas>=2.0
|
|
48
|
+
Requires-Dist: pint>=0.23
|
|
49
|
+
Provides-Extra: dev
|
|
50
|
+
Requires-Dist: build>=1.2; extra == 'dev'
|
|
51
|
+
Requires-Dist: mypy>=1.10; extra == 'dev'
|
|
52
|
+
Requires-Dist: pandas-stubs>=2.0; extra == 'dev'
|
|
53
|
+
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
|
|
54
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
55
|
+
Requires-Dist: ruff>=0.5; extra == 'dev'
|
|
56
|
+
Requires-Dist: twine>=5.1; extra == 'dev'
|
|
57
|
+
Requires-Dist: types-openpyxl>=3.1; extra == 'dev'
|
|
58
|
+
Description-Content-Type: text/markdown
|
|
59
|
+
|
|
60
|
+
# ReactorCheck
|
|
61
|
+
|
|
62
|
+
**Turn reactor compositions or measured species flows into auditable catalytic metrics and QC.**
|
|
63
|
+
|
|
64
|
+
[](https://github.com/hdkim99/ReactorCheck/actions/workflows/ci.yml)
|
|
65
|
+
[](https://www.python.org/)
|
|
66
|
+
[](LICENSE)
|
|
67
|
+
|
|
68
|
+

|
|
69
|
+
|
|
70
|
+
ReactorCheck reads CSV/XLSX reactor data, reconstructs outlet molar flows from
|
|
71
|
+
an explicitly confirmed internal standard or accepts direct measured flows, and
|
|
72
|
+
runs both paths through one unit-aware scientific core. Results include reaction
|
|
73
|
+
metrics, material closure, steady-state candidates, structured QC, calculation
|
|
74
|
+
settings, and source provenance.
|
|
75
|
+
|
|
76
|
+
| Input | Explicit method | Verified output |
|
|
77
|
+
|---|---|---|
|
|
78
|
+
| CO/H2/CH3OH/N2 dry mole % | `F_out,i = y_i/y_N2 × F_N2,feed` | CO conversion 0.500 |
|
|
79
|
+
| N2 feed = 1 mol/h | N2 declared nonreactive by the user | CH3OH C-selectivity 1.000 |
|
|
80
|
+
| Feed CO/H2 = 1/2 mol/h | normalized dry composition | C/H/O balance 100% |
|
|
81
|
+
| Raw mapped sum | tolerance-based QC, never silently hidden | settings + provenance workbook |
|
|
82
|
+
|
|
83
|
+
## Install
|
|
84
|
+
|
|
85
|
+
Python 3.10 or newer is required. Tk is needed only for the desktop GUI.
|
|
86
|
+
PyPI publication is prepared but has not been performed; install the current
|
|
87
|
+
public source directly:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
python -m pip install "git+https://github.com/hdkim99/ReactorCheck.git"
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## 30-second composition quickstart
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
git clone https://github.com/hdkim99/ReactorCheck.git
|
|
97
|
+
cd ReactorCheck
|
|
98
|
+
python -m pip install -e .
|
|
99
|
+
reactorcheck analyze examples/synthetic_composition.csv \
|
|
100
|
+
--config examples/synthetic_composition_config.json \
|
|
101
|
+
--output reactorcheck-composition.xlsx \
|
|
102
|
+
--plot reactorcheck-composition.png
|
|
103
|
+
reactorcheck-gui
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
The synthetic CO hydrogenation example is available as both
|
|
107
|
+
[`CSV`](examples/synthetic_composition.csv) and
|
|
108
|
+
[`XLSX`](examples/synthetic_composition.xlsx). Its hand calculation reconstructs
|
|
109
|
+
CO/H2/CH3OH/N2 outlet flows of 0.5/1.0/0.5/1.0 mol/h.
|
|
110
|
+
|
|
111
|
+
The backward-compatible direct-flow example remains available:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
reactorcheck analyze examples/synthetic_reactor.csv \
|
|
115
|
+
--config examples/synthetic_config.json \
|
|
116
|
+
--output reactorcheck-direct.xlsx
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Supported scope in 0.2.0
|
|
120
|
+
|
|
121
|
+
| Capability | Status | Notes |
|
|
122
|
+
|---|---|---|
|
|
123
|
+
| CSV and XLSX input | Supported | One table/first sheet per analysis |
|
|
124
|
+
| Editable column/species mapping | Supported | JSON, CLI suggestions, and GUI |
|
|
125
|
+
| Direct molar/standard-volume flows | Supported | Explicit ideal-gas standard T/P |
|
|
126
|
+
| Mole fraction + internal standard | Supported | `fraction`, `%`/`mol%`, `ppm`/`ppmv` |
|
|
127
|
+
| Raw vs normalized treatment | Supported | Raw and used fractions are both retained |
|
|
128
|
+
| Wet/dry water basis | Supported | Independent from normalization; H2O rules are explicit |
|
|
129
|
+
| Conversion, molar/carbon selectivity, yield | Supported | One reference reactant basis |
|
|
130
|
+
| Element/measured-mass recovery | Supported | Derived from explicit formulas |
|
|
131
|
+
| Rate, mass STY, GHSV, WHSV | Supported | Definitions and units are explicit |
|
|
132
|
+
| Multi-variable steady state + override | Supported | Candidate detection, not physical proof |
|
|
133
|
+
| QC, plot, Excel/CSV export | Supported | Settings and provenance included |
|
|
134
|
+
| Multi-reactant conversion/selectivity basis | Planned | No implicit combined denominator in 0.2 |
|
|
135
|
+
|
|
136
|
+
## Scientific safeguards
|
|
137
|
+
|
|
138
|
+
ReactorCheck never chooses an internal standard or infers that it is inert. A
|
|
139
|
+
composition configuration must name the standard, provide its feed flow, set an
|
|
140
|
+
actual JSON boolean confirmation, and record a written assumption. Missing,
|
|
141
|
+
zero, negative, or non-finite standard fractions stop reconstruction. Wet/dry
|
|
142
|
+
water basis and raw/normalized treatment are independent settings; the ambiguous
|
|
143
|
+
single `composition.basis` key is rejected rather than guessed.
|
|
144
|
+
|
|
145
|
+
Raw composition sums are always retained and checked against a configured
|
|
146
|
+
tolerance. Normalization does not change the internal-standard ratio, a property
|
|
147
|
+
covered by scientific regression tests. See
|
|
148
|
+
[`docs/scientific-definitions.md`](docs/scientific-definitions.md) and the complete
|
|
149
|
+
[`composition configuration`](examples/synthetic_composition_config.json).
|
|
150
|
+
|
|
151
|
+
## Outputs
|
|
152
|
+
|
|
153
|
+
Excel export contains `summary`, `processed`, `qc`, `settings`, and `provenance`
|
|
154
|
+
sheets. Composition analyses preserve raw/used mole fractions, sums, source
|
|
155
|
+
columns/units, inlet sources, reference reactant, water basis, normalization,
|
|
156
|
+
internal-standard feed, reconstruction equation, and the user's assumption text.
|
|
157
|
+
|
|
158
|
+
## Limitations
|
|
159
|
+
|
|
160
|
+
- Version 0.2 uses one configured reference reactant; multi-reactant aggregate
|
|
161
|
+
bases and stoichiometric selectivity coefficients are planned, not inferred.
|
|
162
|
+
- Internal-standard reconstruction assumes `F_std,out = F_std,in` exactly as the
|
|
163
|
+
user declares; ReactorCheck cannot prove nonreactivity from composition data.
|
|
164
|
+
- Dry-basis data cannot reconstruct water flow. H2O must not be mapped as an
|
|
165
|
+
outlet composition on a dry basis.
|
|
166
|
+
- Element and measured-mass closure cover mapped species only.
|
|
167
|
+
- Standard-volume conversion uses the ideal-gas equation at explicit T/P.
|
|
168
|
+
- The steady-state detector identifies statistical candidates only.
|
|
169
|
+
|
|
170
|
+
## Related tools
|
|
171
|
+
|
|
172
|
+
These are independent repositories; interoperability is planned through public
|
|
173
|
+
tabular/JSON schemas rather than shared private code.
|
|
174
|
+
|
|
175
|
+
- [Ordifile](https://github.com/hdkim99/ordifile) — instrument-data standardization
|
|
176
|
+
- [ReactorCheck](https://github.com/hdkim99/ReactorCheck) — this reactor-analysis tool
|
|
177
|
+
- [TPxLab](https://github.com/hdkim99/TPxLab) — temperature-programmed analysis
|
|
178
|
+
- [OperandoMerge](https://github.com/hdkim99/OperandoMerge) — heterogeneous timeline alignment
|
|
179
|
+
|
|
180
|
+
## Development
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
python -m pip install -e ".[dev]"
|
|
184
|
+
ruff format --check .
|
|
185
|
+
ruff check .
|
|
186
|
+
mypy src
|
|
187
|
+
pytest
|
|
188
|
+
python -m build
|
|
189
|
+
twine check dist/*
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Synthetic example data are MIT-licensed with the project. See
|
|
193
|
+
[CONTRIBUTING.md](CONTRIBUTING.md) and [CITATION.cff](CITATION.cff).
|
|
194
|
+
The 1280×640 [`social-preview.png`](docs/assets/social-preview.png) is the current
|
|
195
|
+
repository social-preview candidate and is generated from the same real example.
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# ReactorCheck
|
|
2
|
+
|
|
3
|
+
**Turn reactor compositions or measured species flows into auditable catalytic metrics and QC.**
|
|
4
|
+
|
|
5
|
+
[](https://github.com/hdkim99/ReactorCheck/actions/workflows/ci.yml)
|
|
6
|
+
[](https://www.python.org/)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
ReactorCheck reads CSV/XLSX reactor data, reconstructs outlet molar flows from
|
|
12
|
+
an explicitly confirmed internal standard or accepts direct measured flows, and
|
|
13
|
+
runs both paths through one unit-aware scientific core. Results include reaction
|
|
14
|
+
metrics, material closure, steady-state candidates, structured QC, calculation
|
|
15
|
+
settings, and source provenance.
|
|
16
|
+
|
|
17
|
+
| Input | Explicit method | Verified output |
|
|
18
|
+
|---|---|---|
|
|
19
|
+
| CO/H2/CH3OH/N2 dry mole % | `F_out,i = y_i/y_N2 × F_N2,feed` | CO conversion 0.500 |
|
|
20
|
+
| N2 feed = 1 mol/h | N2 declared nonreactive by the user | CH3OH C-selectivity 1.000 |
|
|
21
|
+
| Feed CO/H2 = 1/2 mol/h | normalized dry composition | C/H/O balance 100% |
|
|
22
|
+
| Raw mapped sum | tolerance-based QC, never silently hidden | settings + provenance workbook |
|
|
23
|
+
|
|
24
|
+
## Install
|
|
25
|
+
|
|
26
|
+
Python 3.10 or newer is required. Tk is needed only for the desktop GUI.
|
|
27
|
+
PyPI publication is prepared but has not been performed; install the current
|
|
28
|
+
public source directly:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
python -m pip install "git+https://github.com/hdkim99/ReactorCheck.git"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## 30-second composition quickstart
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
git clone https://github.com/hdkim99/ReactorCheck.git
|
|
38
|
+
cd ReactorCheck
|
|
39
|
+
python -m pip install -e .
|
|
40
|
+
reactorcheck analyze examples/synthetic_composition.csv \
|
|
41
|
+
--config examples/synthetic_composition_config.json \
|
|
42
|
+
--output reactorcheck-composition.xlsx \
|
|
43
|
+
--plot reactorcheck-composition.png
|
|
44
|
+
reactorcheck-gui
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The synthetic CO hydrogenation example is available as both
|
|
48
|
+
[`CSV`](examples/synthetic_composition.csv) and
|
|
49
|
+
[`XLSX`](examples/synthetic_composition.xlsx). Its hand calculation reconstructs
|
|
50
|
+
CO/H2/CH3OH/N2 outlet flows of 0.5/1.0/0.5/1.0 mol/h.
|
|
51
|
+
|
|
52
|
+
The backward-compatible direct-flow example remains available:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
reactorcheck analyze examples/synthetic_reactor.csv \
|
|
56
|
+
--config examples/synthetic_config.json \
|
|
57
|
+
--output reactorcheck-direct.xlsx
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Supported scope in 0.2.0
|
|
61
|
+
|
|
62
|
+
| Capability | Status | Notes |
|
|
63
|
+
|---|---|---|
|
|
64
|
+
| CSV and XLSX input | Supported | One table/first sheet per analysis |
|
|
65
|
+
| Editable column/species mapping | Supported | JSON, CLI suggestions, and GUI |
|
|
66
|
+
| Direct molar/standard-volume flows | Supported | Explicit ideal-gas standard T/P |
|
|
67
|
+
| Mole fraction + internal standard | Supported | `fraction`, `%`/`mol%`, `ppm`/`ppmv` |
|
|
68
|
+
| Raw vs normalized treatment | Supported | Raw and used fractions are both retained |
|
|
69
|
+
| Wet/dry water basis | Supported | Independent from normalization; H2O rules are explicit |
|
|
70
|
+
| Conversion, molar/carbon selectivity, yield | Supported | One reference reactant basis |
|
|
71
|
+
| Element/measured-mass recovery | Supported | Derived from explicit formulas |
|
|
72
|
+
| Rate, mass STY, GHSV, WHSV | Supported | Definitions and units are explicit |
|
|
73
|
+
| Multi-variable steady state + override | Supported | Candidate detection, not physical proof |
|
|
74
|
+
| QC, plot, Excel/CSV export | Supported | Settings and provenance included |
|
|
75
|
+
| Multi-reactant conversion/selectivity basis | Planned | No implicit combined denominator in 0.2 |
|
|
76
|
+
|
|
77
|
+
## Scientific safeguards
|
|
78
|
+
|
|
79
|
+
ReactorCheck never chooses an internal standard or infers that it is inert. A
|
|
80
|
+
composition configuration must name the standard, provide its feed flow, set an
|
|
81
|
+
actual JSON boolean confirmation, and record a written assumption. Missing,
|
|
82
|
+
zero, negative, or non-finite standard fractions stop reconstruction. Wet/dry
|
|
83
|
+
water basis and raw/normalized treatment are independent settings; the ambiguous
|
|
84
|
+
single `composition.basis` key is rejected rather than guessed.
|
|
85
|
+
|
|
86
|
+
Raw composition sums are always retained and checked against a configured
|
|
87
|
+
tolerance. Normalization does not change the internal-standard ratio, a property
|
|
88
|
+
covered by scientific regression tests. See
|
|
89
|
+
[`docs/scientific-definitions.md`](docs/scientific-definitions.md) and the complete
|
|
90
|
+
[`composition configuration`](examples/synthetic_composition_config.json).
|
|
91
|
+
|
|
92
|
+
## Outputs
|
|
93
|
+
|
|
94
|
+
Excel export contains `summary`, `processed`, `qc`, `settings`, and `provenance`
|
|
95
|
+
sheets. Composition analyses preserve raw/used mole fractions, sums, source
|
|
96
|
+
columns/units, inlet sources, reference reactant, water basis, normalization,
|
|
97
|
+
internal-standard feed, reconstruction equation, and the user's assumption text.
|
|
98
|
+
|
|
99
|
+
## Limitations
|
|
100
|
+
|
|
101
|
+
- Version 0.2 uses one configured reference reactant; multi-reactant aggregate
|
|
102
|
+
bases and stoichiometric selectivity coefficients are planned, not inferred.
|
|
103
|
+
- Internal-standard reconstruction assumes `F_std,out = F_std,in` exactly as the
|
|
104
|
+
user declares; ReactorCheck cannot prove nonreactivity from composition data.
|
|
105
|
+
- Dry-basis data cannot reconstruct water flow. H2O must not be mapped as an
|
|
106
|
+
outlet composition on a dry basis.
|
|
107
|
+
- Element and measured-mass closure cover mapped species only.
|
|
108
|
+
- Standard-volume conversion uses the ideal-gas equation at explicit T/P.
|
|
109
|
+
- The steady-state detector identifies statistical candidates only.
|
|
110
|
+
|
|
111
|
+
## Related tools
|
|
112
|
+
|
|
113
|
+
These are independent repositories; interoperability is planned through public
|
|
114
|
+
tabular/JSON schemas rather than shared private code.
|
|
115
|
+
|
|
116
|
+
- [Ordifile](https://github.com/hdkim99/ordifile) — instrument-data standardization
|
|
117
|
+
- [ReactorCheck](https://github.com/hdkim99/ReactorCheck) — this reactor-analysis tool
|
|
118
|
+
- [TPxLab](https://github.com/hdkim99/TPxLab) — temperature-programmed analysis
|
|
119
|
+
- [OperandoMerge](https://github.com/hdkim99/OperandoMerge) — heterogeneous timeline alignment
|
|
120
|
+
|
|
121
|
+
## Development
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
python -m pip install -e ".[dev]"
|
|
125
|
+
ruff format --check .
|
|
126
|
+
ruff check .
|
|
127
|
+
mypy src
|
|
128
|
+
pytest
|
|
129
|
+
python -m build
|
|
130
|
+
twine check dist/*
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Synthetic example data are MIT-licensed with the project. See
|
|
134
|
+
[CONTRIBUTING.md](CONTRIBUTING.md) and [CITATION.cff](CITATION.cff).
|
|
135
|
+
The 1280×640 [`social-preview.png`](docs/assets/social-preview.png) is the current
|
|
136
|
+
repository social-preview candidate and is generated from the same real example.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Dependency and license review
|
|
2
|
+
|
|
3
|
+
ReactorCheck uses MIT, BSD, or similarly permissive dependencies compatible with
|
|
4
|
+
the project's MIT license. Runtime metadata should be rechecked before every
|
|
5
|
+
release.
|
|
6
|
+
|
|
7
|
+
| Dependency | Purpose | Upstream license family |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| NumPy | array calculations | BSD-3-Clause |
|
|
10
|
+
| pandas | tabular IO/model | BSD-3-Clause |
|
|
11
|
+
| Pint | unit registry/conversion | BSD-3-Clause |
|
|
12
|
+
| Matplotlib | figures | PSF-based permissive license |
|
|
13
|
+
| openpyxl | XLSX read/write | MIT |
|
|
14
|
+
| Hatchling | package build backend | MIT |
|
|
15
|
+
| pytest | tests | MIT |
|
|
16
|
+
| Ruff | lint | MIT |
|
|
17
|
+
| mypy | static typing | MIT |
|
|
18
|
+
|
|
19
|
+
Tkinter is Python's standard binding to Tcl/Tk and is not bundled by this wheel.
|
|
20
|
+
No GPL-only runtime dependency is required. This file is an engineering review,
|
|
21
|
+
not legal advice.
|
|
22
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Interchange and provenance
|
|
2
|
+
|
|
3
|
+
ReactorCheck is independent software; it does not currently import Ordifile or
|
|
4
|
+
OperandoMerge internal APIs. Its stable v0.1 interchange is transparent tabular
|
|
5
|
+
data plus JSON settings:
|
|
6
|
+
|
|
7
|
+
- `experiment_time_s`: canonical elapsed time while the original time remains.
|
|
8
|
+
- `flow_in_<species>_mol_h`, `flow_out_<species>_mol_h`: normalized flows.
|
|
9
|
+
- calculated columns include metric, species/basis, and unit in their names.
|
|
10
|
+
- `provenance` records source file, source column/unit, formula, inlet source, and
|
|
11
|
+
standard-state settings.
|
|
12
|
+
- `settings.json` or the Excel `settings` sheet records the complete calculation
|
|
13
|
+
configuration and selected steady-state intervals.
|
|
14
|
+
|
|
15
|
+
Future interoperability should version a public schema rather than introduce a
|
|
16
|
+
shared private Python package.
|
|
17
|
+
|
|
18
|
+
An explicitly experimental, non-stable schema candidate is provided at
|
|
19
|
+
[`schemas/reactorcheck-interchange.experimental.schema.json`](../schemas/reactorcheck-interchange.experimental.schema.json).
|
|
20
|
+
Its identifier is `0.2-draft`; it is not a 1.0 compatibility promise.
|