yani 0.4.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.
yani-0.4.0/.gitignore ADDED
@@ -0,0 +1,3 @@
1
+ dist/
2
+ site/
3
+ __pycache__/
yani-0.4.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Jonathan Shimwell
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.
yani-0.4.0/PKG-INFO ADDED
@@ -0,0 +1,88 @@
1
+ Metadata-Version: 2.5
2
+ Name: yani
3
+ Version: 0.4.0
4
+ Summary: Yet Another Nuclide Inventory: transmutation and activation without transport
5
+ Project-URL: Homepage, https://github.com/fusion-neutronics/yani
6
+ Project-URL: Documentation, https://fusion-neutronics.github.io/yani/
7
+ Project-URL: Repository, https://github.com/fusion-neutronics/yani
8
+ Project-URL: Issues, https://github.com/fusion-neutronics/yani/issues
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: activation,fusion,inventory,neutronics,nuclear,transmutation
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Rust
16
+ Classifier: Topic :: Scientific/Engineering :: Physics
17
+ Requires-Python: >=3.10
18
+ Requires-Dist: yani-core==0.4.0
19
+ Description-Content-Type: text/markdown
20
+
21
+ # yani
22
+
23
+ **Y**et **A**nother **N**uclide **I**nventory: transmutation and activation
24
+ without transport. A material, an irradiation schedule and a neutron spectrum
25
+ in; inventories, activities, decay heat and decay photon spectra out. No
26
+ geometry, no transport, no Monte Carlo.
27
+
28
+ [Documentation](https://fusion-neutronics.github.io/yani/) |
29
+ [PyPI](https://pypi.org/project/yani/)
30
+
31
+ ```bash
32
+ pip install yani
33
+ ```
34
+
35
+ ```python
36
+ import yani
37
+
38
+ yani.cross_section_data = "endf-b8.1"
39
+ chain = "transmutation-endf-b8.1-sfr.arrow"
40
+ yani.transmutation_decay_data = chain
41
+ yani.transmutation_reactions = chain
42
+ yani.transmutation_fission_yields = chain
43
+
44
+ steel = yani.materials.pnnl.material("Steel, Stainless 316", volume=1000.0)
45
+ spectrum = yani.NeutronSource(
46
+ energy=yani.sources.Histogram([1e-5, 1e5, 1e6, 1.5e7], [1e12, 1e13, 1e14])
47
+ )
48
+ schedule = yani.PulseSchedule([
49
+ yani.Pulse(rate=1.11e14, duration=(1, "a"), source=spectrum),
50
+ yani.Cooldown(duration=(1, "d")),
51
+ ])
52
+
53
+ final = steel.transmute(schedule=schedule)[-1]
54
+ print(final.activity(), "Bq")
55
+ print(final.decay_heat(), "W")
56
+ ```
57
+
58
+ ## What it solves
59
+
60
+ The nuclide inventory under irradiation is the Bateman equations with reaction
61
+ terms, `dN/dt = A N`, solved as a matrix exponential `N(t) = exp(A t) N(0)` by
62
+ CRAM at order 48. The solver is Rust; the wheel needs no compiler and no
63
+ external toolchain.
64
+
65
+ ## What this repository contains
66
+
67
+ Documentation, packaging and release automation. The code lives in the
68
+ `yani-core` wheel this package depends on, which provides the `yani` module
69
+ itself, its type stubs and its docstrings. `pip install yani` pulls it in.
70
+
71
+ That arrangement is why there is no Python here: one source of truth for the
72
+ API, and no re-export layer that can drift from it.
73
+
74
+ ## Relationship to yamc
75
+
76
+ [yamc](https://github.com/fusion-neutronics/yamc) is a superset: everything here
77
+ plus neutron and photon transport, geometry, tallies and transport-coupled
78
+ transmutation. The two are **alternatives, not companions**. Installing both
79
+ puts two extension modules in one process, so `yamc.Material` and
80
+ `yani.Material` are distinct types and the nuclear-data configuration exists
81
+ twice.
82
+
83
+ Pick yani when you already have a spectrum. Pick yamc when the spectrum should
84
+ come from a transport solve.
85
+
86
+ ## License
87
+
88
+ MIT.
yani-0.4.0/README.md ADDED
@@ -0,0 +1,68 @@
1
+ # yani
2
+
3
+ **Y**et **A**nother **N**uclide **I**nventory: transmutation and activation
4
+ without transport. A material, an irradiation schedule and a neutron spectrum
5
+ in; inventories, activities, decay heat and decay photon spectra out. No
6
+ geometry, no transport, no Monte Carlo.
7
+
8
+ [Documentation](https://fusion-neutronics.github.io/yani/) |
9
+ [PyPI](https://pypi.org/project/yani/)
10
+
11
+ ```bash
12
+ pip install yani
13
+ ```
14
+
15
+ ```python
16
+ import yani
17
+
18
+ yani.cross_section_data = "endf-b8.1"
19
+ chain = "transmutation-endf-b8.1-sfr.arrow"
20
+ yani.transmutation_decay_data = chain
21
+ yani.transmutation_reactions = chain
22
+ yani.transmutation_fission_yields = chain
23
+
24
+ steel = yani.materials.pnnl.material("Steel, Stainless 316", volume=1000.0)
25
+ spectrum = yani.NeutronSource(
26
+ energy=yani.sources.Histogram([1e-5, 1e5, 1e6, 1.5e7], [1e12, 1e13, 1e14])
27
+ )
28
+ schedule = yani.PulseSchedule([
29
+ yani.Pulse(rate=1.11e14, duration=(1, "a"), source=spectrum),
30
+ yani.Cooldown(duration=(1, "d")),
31
+ ])
32
+
33
+ final = steel.transmute(schedule=schedule)[-1]
34
+ print(final.activity(), "Bq")
35
+ print(final.decay_heat(), "W")
36
+ ```
37
+
38
+ ## What it solves
39
+
40
+ The nuclide inventory under irradiation is the Bateman equations with reaction
41
+ terms, `dN/dt = A N`, solved as a matrix exponential `N(t) = exp(A t) N(0)` by
42
+ CRAM at order 48. The solver is Rust; the wheel needs no compiler and no
43
+ external toolchain.
44
+
45
+ ## What this repository contains
46
+
47
+ Documentation, packaging and release automation. The code lives in the
48
+ `yani-core` wheel this package depends on, which provides the `yani` module
49
+ itself, its type stubs and its docstrings. `pip install yani` pulls it in.
50
+
51
+ That arrangement is why there is no Python here: one source of truth for the
52
+ API, and no re-export layer that can drift from it.
53
+
54
+ ## Relationship to yamc
55
+
56
+ [yamc](https://github.com/fusion-neutronics/yamc) is a superset: everything here
57
+ plus neutron and photon transport, geometry, tallies and transport-coupled
58
+ transmutation. The two are **alternatives, not companions**. Installing both
59
+ puts two extension modules in one process, so `yamc.Material` and
60
+ `yani.Material` are distinct types and the nuclear-data configuration exists
61
+ twice.
62
+
63
+ Pick yani when you already have a spectrum. Pick yamc when the spectrum should
64
+ come from a transport solve.
65
+
66
+ ## License
67
+
68
+ MIT.
@@ -0,0 +1,46 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "yani"
7
+ # Kept in lockstep with yani-core: CI rewrites both this and the pin below from
8
+ # the release tag, and refuses to publish if that version is not on PyPI yet.
9
+ version = "0.4.0"
10
+ description = "Yet Another Nuclide Inventory: transmutation and activation without transport"
11
+ readme = "README.md"
12
+ requires-python = ">=3.10"
13
+ license = "MIT"
14
+ license-files = ["LICENSE"]
15
+ keywords = ["nuclear", "transmutation", "activation", "inventory", "fusion", "neutronics"]
16
+ classifiers = [
17
+ "Programming Language :: Rust",
18
+ "Programming Language :: Python :: 3",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Operating System :: OS Independent",
21
+ "Topic :: Scientific/Engineering :: Physics",
22
+ ]
23
+
24
+ # The whole distribution. `yani-core` is the compiled wheel and it provides the
25
+ # `yani` module itself, so this package deliberately ships no code: nothing to
26
+ # re-export, nothing to keep in sync, and no second copy of the type stubs.
27
+ # (`pip install pillow` giving `import PIL` is the same arrangement inverted.)
28
+ #
29
+ # The pin is exact. A range would let `pip install yani==0.4.0` resolve to a
30
+ # core wheel whose API does not match the docs published for 0.4.0.
31
+ dependencies = ["yani-core==0.4.0"]
32
+
33
+ [project.urls]
34
+ Homepage = "https://github.com/fusion-neutronics/yani"
35
+ Documentation = "https://fusion-neutronics.github.io/yani/"
36
+ Repository = "https://github.com/fusion-neutronics/yani"
37
+ Issues = "https://github.com/fusion-neutronics/yani/issues"
38
+
39
+ # Hatchling expects to find a package to build; there is none, and that is the
40
+ # point. Declaring an empty file set makes the metadata-only wheel explicit
41
+ # rather than a build error.
42
+ [tool.hatch.build.targets.wheel]
43
+ bypass-selection = true
44
+
45
+ [tool.hatch.build.targets.sdist]
46
+ include = ["README.md", "LICENSE", "pyproject.toml"]