boltzpmp 0.1.3__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.
@@ -0,0 +1,26 @@
1
+ # Changelog
2
+
3
+ ## 0.1.3 - 2026-08-15
4
+
5
+ - PyPI向けOIDC Trusted Publishingジョブを追加。
6
+ - 通常のPyPIインストール手順と公開先ごとのworkflow入力を文書化。
7
+
8
+ ## 0.1.2 - 2026-08-15
9
+
10
+ - TestPyPIとPyPIを分離して使用するuvインストール手順へ更新。
11
+
12
+ ## 0.1.1 - 2026-08-15
13
+
14
+ - LXCat Morgan databaseのAr電子衝突断面積セットによる6条件の収束・物理量検証を追加。
15
+ - 入力パーサー、分布、EEDF、主要物理量、反応速度係数の再現性を確認。
16
+ - 検証条件と生の測定結果を公開文書へ追加。
17
+ - 配布メタデータとパッケージ文書を更新。
18
+
19
+ ## 0.1.0 - 2026-08-15
20
+
21
+ - 配布名、import名、PyO3モジュール、Rust crateを `boltzpmp` 系へ統一。
22
+ - Rust数値コアとPyO3/Maturinによる `abi3-py310` Python拡張を追加。
23
+ - メッシュ、移流、衝突、DC、RFソルバーを実装。
24
+ - 固定fixtureによる数値回帰試験と物理試験を追加。
25
+ - 単一計算内のRayon並列と、独立DC計算を並列化する `solve_dc_sweep` を追加。
26
+ - Windows、Linux、macOS向けwheelとsdistのCIビルドを追加。
@@ -0,0 +1,223 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "boltzpmp-core"
7
+ version = "0.1.3"
8
+ dependencies = [
9
+ "rayon",
10
+ "thiserror",
11
+ ]
12
+
13
+ [[package]]
14
+ name = "boltzpmp-py"
15
+ version = "0.1.3"
16
+ dependencies = [
17
+ "boltzpmp-core",
18
+ "pyo3",
19
+ ]
20
+
21
+ [[package]]
22
+ name = "crossbeam-deque"
23
+ version = "0.8.7"
24
+ source = "registry+https://github.com/rust-lang/crates.io-index"
25
+ checksum = "5181e0de7b61eb03a81e347d6dd8797bae9da5146707b51077e2d71a54ec0ceb"
26
+ dependencies = [
27
+ "crossbeam-epoch",
28
+ "crossbeam-utils",
29
+ ]
30
+
31
+ [[package]]
32
+ name = "crossbeam-epoch"
33
+ version = "0.9.20"
34
+ source = "registry+https://github.com/rust-lang/crates.io-index"
35
+ checksum = "2d6914041f254d6e9176c01941b21115dcfb7089e55135a35411081bd106ef3f"
36
+ dependencies = [
37
+ "crossbeam-utils",
38
+ ]
39
+
40
+ [[package]]
41
+ name = "crossbeam-utils"
42
+ version = "0.8.22"
43
+ source = "registry+https://github.com/rust-lang/crates.io-index"
44
+ checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17"
45
+
46
+ [[package]]
47
+ name = "either"
48
+ version = "1.17.0"
49
+ source = "registry+https://github.com/rust-lang/crates.io-index"
50
+ checksum = "9e5e8f6c15a24b9a3ee5efec809ccd006d3b30e8b3bb63c39af737c7f87daa1d"
51
+
52
+ [[package]]
53
+ name = "heck"
54
+ version = "0.5.0"
55
+ source = "registry+https://github.com/rust-lang/crates.io-index"
56
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
57
+
58
+ [[package]]
59
+ name = "libc"
60
+ version = "0.2.189"
61
+ source = "registry+https://github.com/rust-lang/crates.io-index"
62
+ checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
63
+
64
+ [[package]]
65
+ name = "once_cell"
66
+ version = "1.21.4"
67
+ source = "registry+https://github.com/rust-lang/crates.io-index"
68
+ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
69
+
70
+ [[package]]
71
+ name = "portable-atomic"
72
+ version = "1.15.0"
73
+ source = "registry+https://github.com/rust-lang/crates.io-index"
74
+ checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"
75
+
76
+ [[package]]
77
+ name = "proc-macro2"
78
+ version = "1.0.107"
79
+ source = "registry+https://github.com/rust-lang/crates.io-index"
80
+ checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
81
+ dependencies = [
82
+ "unicode-ident",
83
+ ]
84
+
85
+ [[package]]
86
+ name = "pyo3"
87
+ version = "0.29.2"
88
+ source = "registry+https://github.com/rust-lang/crates.io-index"
89
+ checksum = "4688ddedf473e32662b9b067670129a8afb8c18e351482c70d62ba4a88171e8b"
90
+ dependencies = [
91
+ "libc",
92
+ "once_cell",
93
+ "portable-atomic",
94
+ "pyo3-build-config",
95
+ "pyo3-ffi",
96
+ "pyo3-macros",
97
+ ]
98
+
99
+ [[package]]
100
+ name = "pyo3-build-config"
101
+ version = "0.29.2"
102
+ source = "registry+https://github.com/rust-lang/crates.io-index"
103
+ checksum = "f41027e41b4bd03f6e60f9f417fe24a6341a6bb744edd62b6f709f2a52ea30e9"
104
+ dependencies = [
105
+ "target-lexicon",
106
+ ]
107
+
108
+ [[package]]
109
+ name = "pyo3-ffi"
110
+ version = "0.29.2"
111
+ source = "registry+https://github.com/rust-lang/crates.io-index"
112
+ checksum = "e591a95526fead067432c3b3a33fc74770b87b1e04e73671090d9c2055a2b327"
113
+ dependencies = [
114
+ "libc",
115
+ "pyo3-build-config",
116
+ ]
117
+
118
+ [[package]]
119
+ name = "pyo3-macros"
120
+ version = "0.29.2"
121
+ source = "registry+https://github.com/rust-lang/crates.io-index"
122
+ checksum = "73225868fc1cd84eef2c3c230ddb91273bf1de46aeb8a4248da76d32a0924a1c"
123
+ dependencies = [
124
+ "proc-macro2",
125
+ "pyo3-macros-backend",
126
+ "quote",
127
+ "syn 2.0.119",
128
+ ]
129
+
130
+ [[package]]
131
+ name = "pyo3-macros-backend"
132
+ version = "0.29.2"
133
+ source = "registry+https://github.com/rust-lang/crates.io-index"
134
+ checksum = "571575aa3749fa6216757dd47d2a3e7ef360f329a40f0666a9fbd14889024952"
135
+ dependencies = [
136
+ "heck",
137
+ "proc-macro2",
138
+ "quote",
139
+ "syn 2.0.119",
140
+ ]
141
+
142
+ [[package]]
143
+ name = "quote"
144
+ version = "1.0.47"
145
+ source = "registry+https://github.com/rust-lang/crates.io-index"
146
+ checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
147
+ dependencies = [
148
+ "proc-macro2",
149
+ ]
150
+
151
+ [[package]]
152
+ name = "rayon"
153
+ version = "1.12.0"
154
+ source = "registry+https://github.com/rust-lang/crates.io-index"
155
+ checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d"
156
+ dependencies = [
157
+ "either",
158
+ "rayon-core",
159
+ ]
160
+
161
+ [[package]]
162
+ name = "rayon-core"
163
+ version = "1.13.0"
164
+ source = "registry+https://github.com/rust-lang/crates.io-index"
165
+ checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91"
166
+ dependencies = [
167
+ "crossbeam-deque",
168
+ "crossbeam-utils",
169
+ ]
170
+
171
+ [[package]]
172
+ name = "syn"
173
+ version = "2.0.119"
174
+ source = "registry+https://github.com/rust-lang/crates.io-index"
175
+ checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
176
+ dependencies = [
177
+ "proc-macro2",
178
+ "quote",
179
+ "unicode-ident",
180
+ ]
181
+
182
+ [[package]]
183
+ name = "syn"
184
+ version = "3.0.3"
185
+ source = "registry+https://github.com/rust-lang/crates.io-index"
186
+ checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3"
187
+ dependencies = [
188
+ "proc-macro2",
189
+ "quote",
190
+ "unicode-ident",
191
+ ]
192
+
193
+ [[package]]
194
+ name = "target-lexicon"
195
+ version = "0.13.5"
196
+ source = "registry+https://github.com/rust-lang/crates.io-index"
197
+ checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
198
+
199
+ [[package]]
200
+ name = "thiserror"
201
+ version = "2.0.20"
202
+ source = "registry+https://github.com/rust-lang/crates.io-index"
203
+ checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f"
204
+ dependencies = [
205
+ "thiserror-impl",
206
+ ]
207
+
208
+ [[package]]
209
+ name = "thiserror-impl"
210
+ version = "2.0.20"
211
+ source = "registry+https://github.com/rust-lang/crates.io-index"
212
+ checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af"
213
+ dependencies = [
214
+ "proc-macro2",
215
+ "quote",
216
+ "syn 3.0.3",
217
+ ]
218
+
219
+ [[package]]
220
+ name = "unicode-ident"
221
+ version = "1.0.24"
222
+ source = "registry+https://github.com/rust-lang/crates.io-index"
223
+ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
@@ -0,0 +1,16 @@
1
+ [workspace]
2
+ members = ["rust/boltzpmp-core", "rust/boltzpmp-py"]
3
+ resolver = "2"
4
+
5
+ [workspace.package]
6
+ version = "0.1.3"
7
+ edition = "2024"
8
+ license = "MIT"
9
+ authors = ["TK"]
10
+ repository = "https://github.com/Reasonia-TK/boltzpmp"
11
+
12
+ [workspace.dependencies]
13
+ boltzpmp-core = { path = "rust/boltzpmp-core" }
14
+ pyo3 = { version = "0.29", features = ["abi3-py310"] }
15
+ rayon = "1.11"
16
+ thiserror = "2"
boltzpmp-0.1.3/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 TK (github.com/Syb04)
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,143 @@
1
+ Metadata-Version: 2.4
2
+ Name: boltzpmp
3
+ Version: 0.1.3
4
+ Classifier: License :: OSI Approved :: MIT License
5
+ Classifier: Programming Language :: Python :: 3
6
+ Classifier: Programming Language :: Rust
7
+ Classifier: Topic :: Scientific/Engineering :: Physics
8
+ Requires-Dist: numpy>=1.22
9
+ Requires-Dist: pytest>=8 ; extra == 'test'
10
+ Requires-Dist: maturin>=1.10,<2.0 ; extra == 'test'
11
+ Provides-Extra: test
12
+ License-File: LICENSE
13
+ Summary: Rust-accelerated electron Boltzmann solver by the propagator method
14
+ Author: TK
15
+ License-Expression: MIT
16
+ Requires-Python: >=3.10
17
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
18
+ Project-URL: Homepage, https://github.com/Reasonia-TK/boltzpmp
19
+ Project-URL: Issues, https://github.com/Reasonia-TK/boltzpmp/issues
20
+ Project-URL: Repository, https://github.com/Reasonia-TK/boltzpmp
21
+
22
+ # boltzpmp
23
+
24
+ `boltzpmp` は、プロパゲータ法で電子ボルツマン方程式を解く、Rustで高速化された
25
+ Pythonパッケージです。DC・RF電場における電子エネルギー分布、平均エネルギー、
26
+ ドリフト速度、反応速度係数を計算できます。
27
+
28
+ ## インストール
29
+
30
+ Python 3.10以降が必要です。
31
+
32
+ ```powershell
33
+ uv pip install boltzpmp
34
+ ```
35
+
36
+ ## クイックスタート
37
+
38
+ ```python
39
+ import boltzpmp as bp
40
+
41
+ mixture = bp.load_argon()
42
+ solver = bp.PMSolver(
43
+ mixture,
44
+ eps_max_eV=25.0,
45
+ d_eps_eV=0.2,
46
+ n_theta=90,
47
+ )
48
+
49
+ result = solver.solve_dc(EN_Td=10.0)
50
+ print(result.mean_energy)
51
+ print(result.drift_velocity)
52
+ print(result.rate_coefficients)
53
+ ```
54
+
55
+ RF周期定常計算も同じソルバーから実行できます。
56
+
57
+ ```python
58
+ result = solver.solve_rf(EN_rms_Td=10.0, freq_Hz=13.56e6)
59
+ print(result.mean_energy_rms, result.drift_velocity_rms)
60
+ ```
61
+
62
+ 独立した換算電場点は、Rust計算中にPythonインタープリタを解放して並列実行できます。
63
+
64
+ ```python
65
+ results = bp.solve_dc_sweep(
66
+ solver,
67
+ [0.5, 1.0, 2.0, 5.0, 10.0],
68
+ max_workers=4,
69
+ scheme="upwind",
70
+ )
71
+ ```
72
+
73
+ 計算点の並列化には `solve_dc_sweep` を使用してください。単一計算内の並列化は
74
+ `PMSolver(..., parallel=True)` で明示的に有効化できます。
75
+
76
+ ## LXCat断面積による検証
77
+
78
+ 2026-08-15に、LXCatのMorgan databaseから取得したAr電子衝突断面積セットを使い、
79
+ 1、10、50、100 Tdのupwind計算と、10、100 Tdの自動ブレンディング計算を検証しました。
80
+ 6条件すべてが収束し、Python参照実装との比較は次の結果でした。
81
+
82
+ | 指標 | 最大誤差 | 合格基準 |
83
+ |---|---:|---:|
84
+ | 状態分布のL1差 | `3.52e-14` | `1e-5` |
85
+ | EEDFの相対L1差 | `3.55e-14` | `1e-5` |
86
+ | 主要物理量の相対差 | `3.63e-14` | `1e-5` |
87
+ | 反応速度係数の相対差 | `4.06e-14` | `1e-5` |
88
+
89
+ 入力ファイルのSHA-256は
90
+ `29c903d91e68bb0895f45b763c8c982ef09c2b2e0636fc75fd0545dc7d69abc3` です。
91
+ 条件、収束ステップ数、各物理量、生の誤差は
92
+ [`VALIDATION.md`](https://github.com/Reasonia-TK/boltzpmp/blob/main/VALIDATION.md) と
93
+ [`reference/lxcat_morgan_argon_validation.json`](https://github.com/Reasonia-TK/boltzpmp/blob/main/reference/lxcat_morgan_argon_validation.json)
94
+ に記録しています。
95
+
96
+ ## 開発とテスト
97
+
98
+ Windows PowerShellでは次のコマンドを実行します。
99
+
100
+ ```powershell
101
+ $env:UV_CACHE_DIR = Join-Path (Get-Location) '.uv-cache'
102
+ uv run --with maturin maturin develop --release
103
+ uv run --extra test pytest -q
104
+ cargo test --workspace
105
+ ```
106
+
107
+ 実データ検証は、断面積ファイルとPython参照実装の場所を指定して再実行できます。
108
+
109
+ ```powershell
110
+ $env:UV_CACHE_DIR = Join-Path (Get-Location) '.uv-cache'
111
+ uv run --with scipy --extra test python benchmarks\validate_lxcat.py `
112
+ 'C:\path\to\Ar-cross-sections.txt' `
113
+ --reference-source 'C:\path\to\python-reference' `
114
+ --output reference\lxcat_morgan_argon_validation.json
115
+ ```
116
+
117
+ 現在のテスト構成はRust単体テスト4件、Python API・物理テスト15件です。
118
+
119
+ ## パッケージ公開
120
+
121
+ `.github/workflows/wheels.yml` を手動実行すると、Windows、Linux、macOS向けwheelと
122
+ sdistを作成します。全ビルド成功後、選択した公開先へOIDC Trusted Publishingで
123
+ 配布します。
124
+
125
+ | workflow入力 | 公開先 | GitHub Environment |
126
+ |---|---|---|
127
+ | `publish_testpypi` | TestPyPI | `testpypi` |
128
+ | `publish_pypi` | PyPI | `pypi` |
129
+
130
+ TestPyPI版を確認する場合は、依存パッケージと本体の取得先を分けます。
131
+
132
+ ```powershell
133
+ uv pip install "numpy>=1.22"
134
+ uv pip install --no-deps --index-url https://test.pypi.org/simple/ boltzpmp
135
+ ```
136
+
137
+ Trusted PublisherにはOwner `Reasonia-TK`、Repository `boltzpmp`、Workflow
138
+ `wheels.yml` と、公開先に対応するEnvironmentを設定します。
139
+
140
+ ## ライセンス
141
+
142
+ MIT License
143
+
@@ -0,0 +1,121 @@
1
+ # boltzpmp
2
+
3
+ `boltzpmp` は、プロパゲータ法で電子ボルツマン方程式を解く、Rustで高速化された
4
+ Pythonパッケージです。DC・RF電場における電子エネルギー分布、平均エネルギー、
5
+ ドリフト速度、反応速度係数を計算できます。
6
+
7
+ ## インストール
8
+
9
+ Python 3.10以降が必要です。
10
+
11
+ ```powershell
12
+ uv pip install boltzpmp
13
+ ```
14
+
15
+ ## クイックスタート
16
+
17
+ ```python
18
+ import boltzpmp as bp
19
+
20
+ mixture = bp.load_argon()
21
+ solver = bp.PMSolver(
22
+ mixture,
23
+ eps_max_eV=25.0,
24
+ d_eps_eV=0.2,
25
+ n_theta=90,
26
+ )
27
+
28
+ result = solver.solve_dc(EN_Td=10.0)
29
+ print(result.mean_energy)
30
+ print(result.drift_velocity)
31
+ print(result.rate_coefficients)
32
+ ```
33
+
34
+ RF周期定常計算も同じソルバーから実行できます。
35
+
36
+ ```python
37
+ result = solver.solve_rf(EN_rms_Td=10.0, freq_Hz=13.56e6)
38
+ print(result.mean_energy_rms, result.drift_velocity_rms)
39
+ ```
40
+
41
+ 独立した換算電場点は、Rust計算中にPythonインタープリタを解放して並列実行できます。
42
+
43
+ ```python
44
+ results = bp.solve_dc_sweep(
45
+ solver,
46
+ [0.5, 1.0, 2.0, 5.0, 10.0],
47
+ max_workers=4,
48
+ scheme="upwind",
49
+ )
50
+ ```
51
+
52
+ 計算点の並列化には `solve_dc_sweep` を使用してください。単一計算内の並列化は
53
+ `PMSolver(..., parallel=True)` で明示的に有効化できます。
54
+
55
+ ## LXCat断面積による検証
56
+
57
+ 2026-08-15に、LXCatのMorgan databaseから取得したAr電子衝突断面積セットを使い、
58
+ 1、10、50、100 Tdのupwind計算と、10、100 Tdの自動ブレンディング計算を検証しました。
59
+ 6条件すべてが収束し、Python参照実装との比較は次の結果でした。
60
+
61
+ | 指標 | 最大誤差 | 合格基準 |
62
+ |---|---:|---:|
63
+ | 状態分布のL1差 | `3.52e-14` | `1e-5` |
64
+ | EEDFの相対L1差 | `3.55e-14` | `1e-5` |
65
+ | 主要物理量の相対差 | `3.63e-14` | `1e-5` |
66
+ | 反応速度係数の相対差 | `4.06e-14` | `1e-5` |
67
+
68
+ 入力ファイルのSHA-256は
69
+ `29c903d91e68bb0895f45b763c8c982ef09c2b2e0636fc75fd0545dc7d69abc3` です。
70
+ 条件、収束ステップ数、各物理量、生の誤差は
71
+ [`VALIDATION.md`](https://github.com/Reasonia-TK/boltzpmp/blob/main/VALIDATION.md) と
72
+ [`reference/lxcat_morgan_argon_validation.json`](https://github.com/Reasonia-TK/boltzpmp/blob/main/reference/lxcat_morgan_argon_validation.json)
73
+ に記録しています。
74
+
75
+ ## 開発とテスト
76
+
77
+ Windows PowerShellでは次のコマンドを実行します。
78
+
79
+ ```powershell
80
+ $env:UV_CACHE_DIR = Join-Path (Get-Location) '.uv-cache'
81
+ uv run --with maturin maturin develop --release
82
+ uv run --extra test pytest -q
83
+ cargo test --workspace
84
+ ```
85
+
86
+ 実データ検証は、断面積ファイルとPython参照実装の場所を指定して再実行できます。
87
+
88
+ ```powershell
89
+ $env:UV_CACHE_DIR = Join-Path (Get-Location) '.uv-cache'
90
+ uv run --with scipy --extra test python benchmarks\validate_lxcat.py `
91
+ 'C:\path\to\Ar-cross-sections.txt' `
92
+ --reference-source 'C:\path\to\python-reference' `
93
+ --output reference\lxcat_morgan_argon_validation.json
94
+ ```
95
+
96
+ 現在のテスト構成はRust単体テスト4件、Python API・物理テスト15件です。
97
+
98
+ ## パッケージ公開
99
+
100
+ `.github/workflows/wheels.yml` を手動実行すると、Windows、Linux、macOS向けwheelと
101
+ sdistを作成します。全ビルド成功後、選択した公開先へOIDC Trusted Publishingで
102
+ 配布します。
103
+
104
+ | workflow入力 | 公開先 | GitHub Environment |
105
+ |---|---|---|
106
+ | `publish_testpypi` | TestPyPI | `testpypi` |
107
+ | `publish_pypi` | PyPI | `pypi` |
108
+
109
+ TestPyPI版を確認する場合は、依存パッケージと本体の取得先を分けます。
110
+
111
+ ```powershell
112
+ uv pip install "numpy>=1.22"
113
+ uv pip install --no-deps --index-url https://test.pypi.org/simple/ boltzpmp
114
+ ```
115
+
116
+ Trusted PublisherにはOwner `Reasonia-TK`、Repository `boltzpmp`、Workflow
117
+ `wheels.yml` と、公開先に対応するEnvironmentを設定します。
118
+
119
+ ## ライセンス
120
+
121
+ MIT License
@@ -0,0 +1,74 @@
1
+ # boltzpmp 検証記録
2
+
3
+ ## 目的
4
+
5
+ 公開API、数値計算、配布物が再現可能な条件で正しく動作することを確認します。
6
+ 検証は単体テスト、物理テスト、実データ比較、wheel/sdistの導入確認で構成します。
7
+
8
+ ## Ar電子衝突断面積セット
9
+
10
+ 2026-08-15に次の入力を使用しました。
11
+
12
+ | 項目 | 値 |
13
+ |---|---|
14
+ | 気体 | Ar 100% |
15
+ | データ源 | Morgan database, LXCat |
16
+ | 取得日 | 2026-07-11 |
17
+ | SHA-256 | `29c903d91e68bb0895f45b763c8c982ef09c2b2e0636fc75fd0545dc7d69abc3` |
18
+ | 過程 | 弾性1、励起2、電離1 |
19
+
20
+ パーサーは4過程と各データ点を読み込み、Python参照実装と過程種別、しきい値、
21
+ 質量比、エネルギー点、断面積値が一致することを確認しました。
22
+
23
+ ## 計算条件
24
+
25
+ | 項目 | 値 |
26
+ |---|---:|
27
+ | 圧力 | 133 Pa |
28
+ | 気体温度 | 273 K |
29
+ | 最大エネルギー | 60 eV |
30
+ | エネルギー刻み | 0.5 eV |
31
+ | 角度分割 | 48 |
32
+ | 収束許容値 | `1e-5` |
33
+ | 最大ステップ数 | 1,000,000 |
34
+ | 判定間隔 | 200ステップ |
35
+
36
+ upwindは100、50、10、1 Tdを高電場側からwarm startで計算しました。自動
37
+ ブレンディングは100、10 Tdを独立に計算しました。
38
+
39
+ ## 結果
40
+
41
+ 6条件はすべて収束し、収束ステップ数とブレンディング係数も参照計算と一致しました。
42
+
43
+ | 指標 | 最大値 | 合格基準 |
44
+ |---|---:|---:|
45
+ | 規格化誤差 | `1.15e-14` | `1e-12` |
46
+ | EEPF末端比 | `1.31e-14` | `1e-6` |
47
+ | 状態分布のL1差 | `3.52e-14` | `1e-5` |
48
+ | EEDFの相対L1差 | `3.55e-14` | `1e-5` |
49
+ | 主要物理量の最大相対差 | `3.63e-14` | `1e-5` |
50
+ | 反応速度係数の最大相対差 | `4.06e-14` | `1e-5` |
51
+
52
+ 平均エネルギー、ドリフト速度、電離速度係数は換算電場に対して単調に増加しました。
53
+ 全6条件の合計実行時間では、この実行のRust計算はPython参照計算の約2.56倍の速度でした。
54
+
55
+ ブレンディング100 Tdで状態値に最大値比 `-1.23e-16` の負値がありましたが、
56
+ 両実装で一致する浮動小数点丸めの範囲で、判定基準 `-1e-14` を満たしています。
57
+
58
+ 各条件の収束ステップ、計算値、反応ごとの速度係数、実行時間は
59
+ [`reference/lxcat_morgan_argon_validation.json`](https://github.com/Reasonia-TK/boltzpmp/blob/main/reference/lxcat_morgan_argon_validation.json)
60
+ を参照してください。
61
+
62
+ ## 再実行
63
+
64
+ Windows PowerShellで次を実行します。
65
+
66
+ ```powershell
67
+ $env:UV_CACHE_DIR = Join-Path (Get-Location) '.uv-cache'
68
+ uv run --with scipy --extra test python benchmarks\validate_lxcat.py `
69
+ 'C:\path\to\Ar-cross-sections.txt' `
70
+ --reference-source 'C:\path\to\python-reference' `
71
+ --output reference\lxcat_morgan_argon_validation.json
72
+ ```
73
+
74
+ 成功時は終了コード0となり、JSONの `passed` と全 `checks` が `true` になります。