ndiffusion.materials¶
Named cross-section sets and the published benchmarks that use them.
Two kinds of thing live here.
Builders turn compact tabular data into a Materials. Most
two-group reactor benchmarks are quoted as rows of
(D1, D2, Sa1, Sa2, S12, nuSf1, nuSf2), so two_group() takes exactly
that, and one_group() covers the simple cases used for sanity checks.
Benchmarks bundle a published cross-section table with its reference
eigenvalue and, where the loading is a map rather than a shape, a painter for
ndiffusion.assign_materials(). Geometry is deliberately not bundled:
mesh and materials are separate concerns, so the same table can be run on
whatever mesh you like.
mats = nd.materials.BIBLIS.materials() nd.assign_materials(mesh, nd.materials.BIBLIS.layout()) assert abs(solve(mesh, mats) - nd.materials.BIBLIS.reference_keff) < 1e-3
Module Attributes
reflector | core | reflector on [-279.5, 279.5] cm. |
|
2-D TWIGL seed/blanket quarter core, 80 x 80 cm. |
|
2-D IAEA PWR stepped quarter core. |
|
2-D BIBLIS full-core PWR, eight compositions on a 17 x 17 assembly map. |
|
Every published benchmark, by short name. |
Functions
|
Painter reading material indices from a rectangular assembly map. |
|
Single-group Materials, optionally repeated over n_mat materials. |
|
Materials from rows of |
Classes
|
A published cross-section table with its reference eigenvalue. |
- ndiffusion.materials.one_group(D=1.0, sigma_a=0.1, nusigf=0.0, n_mat=1)[source]¶
Single-group Materials, optionally repeated over n_mat materials.
Accepts scalars (broadcast to every material) or per-material sequences.
- ndiffusion.materials.two_group(rows, axial_buckling=0.0)[source]¶
Materials from rows of
(D1, D2, Sa1, Sa2, S12, nuSf1, nuSf2).The convention every benchmark here shares: fission neutrons are born fast (
chi = (1, 0)), scattering is down only (S12), and the removal cross section isSigma_a,gplus the out-scatter from group g.
- ndiffusion.materials.from_assembly_map(amap, pitch, origin=None, void=0, offset=1)[source]¶
Painter reading material indices from a rectangular assembly map.
Core loadings are usually published as a grid of composition numbers, one per assembly. amap is that grid, row 0 at the top as printed. Entries equal to void fall outside the core; they paint as material 0, so carve those assemblies out of the geometry rather than relying on this.
- Parameters:
amap (2-D sequence of int) – Composition per assembly.
pitch (float) – Assembly width in cm.
origin ((float, float) or None) – Position of the map’s center. Defaults to the origin.
void (int) – Map entry meaning “outside the core”.
offset (int) – Subtracted from non-void entries to give a 0-based material index.
- class ndiffusion.materials.Benchmark(name, rows, reference_keff, axial_buckling, assembly_map, pitch, source)[source]¶
A published cross-section table with its reference eigenvalue.
Geometry is not included - the same table runs on any mesh. Where the core loading is a published assembly map,
layout()turns it into a painter.- layout(origin=None)[source]¶
Painter from the published assembly map.
- Raises:
ValueError – If this benchmark’s loading is a shape rather than a map; those are built from
ndiffusion.layoutspainters instead.
- ndiffusion.materials.RINGHALS = ('Ringhals-4 1-D slab', [(1.4376, 0.3723, 0.0115, 0.1019, 0.0151, 0.0057, 0.1425), (1.3116, 0.2624, -0.0098, 0.0284, 0.0238, 0.0, 0.0)], 1.0037, 0.0, None, None, 'Yu et al., arXiv:2411.15693, Table 2')¶
reflector | core | reflector on [-279.5, 279.5] cm. Core half-width 161.25 cm. Note the negative fast absorption in the reflector, which is how the published table folds in the transverse leakage.
- Type:
1-D Ringhals-4 slab
- ndiffusion.materials.TWIGL = ('TWIGL 2-D quarter core', [(1.4, 0.4, 0.01, 0.15, 0.01, 0.007, 0.2), (1.3, 0.5, 0.008, 0.05, 0.01, 0.003, 0.06)], 0.9133, 0.0, None, None, 'Yu et al., arXiv:2411.15693, Table 4')¶
2-D TWIGL seed/blanket quarter core, 80 x 80 cm.
- ndiffusion.materials.IAEA = ('IAEA PWR 2-D quarter core', [(1.5, 0.4, 0.01, 0.08, 0.02, 0.0, 0.135), (1.5, 0.4, 0.01, 0.085, 0.02, 0.0, 0.135), (1.5, 0.4, 0.01, 0.13, 0.02, 0.0, 0.135), (2.0, 0.3, 0.0, 0.01, 0.04, 0.0, 0.0)], 1.0296, 8e-05, None, 20.0, 'Yu et al., arXiv:2411.15693, Table 6')¶
2-D IAEA PWR stepped quarter core. The axial buckling stands in for the finite core height.
- ndiffusion.materials.BIBLIS = ('BIBLIS 2-D full core', [(1.436, 0.3635, 0.0095042, 0.0750058, 0.017754, 0.0058708, 0.096067), (1.4366, 0.3636, 0.0096785, 0.078436, 0.017621, 0.0061908, 0.10358), (1.32, 0.2772, 0.0026562, 0.071596, 0.023106, 0.0, 0.0), (1.4389, 0.3638, 0.010363, 0.091408, 0.017101, 0.0074527, 0.13236), (1.4381, 0.3665, 0.010003, 0.084828, 0.01729, 0.0061908, 0.10358), (1.4385, 0.3665, 0.010132, 0.087314, 0.017192, 0.0064285, 0.10911), (1.4389, 0.3679, 0.010165, 0.088024, 0.017125, 0.0061908, 0.10358), (1.4393, 0.368, 0.010294, 0.09051, 0.017027, 0.0064285, 0.10911)], 1.02535, 0.0, [[0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0], [0, 0, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 0, 0], [0, 3, 3, 4, 4, 8, 1, 1, 1, 1, 1, 8, 4, 4, 3, 3, 0], [0, 3, 4, 4, 5, 1, 7, 1, 7, 1, 7, 1, 5, 4, 4, 3, 0], [3, 3, 4, 5, 2, 8, 2, 8, 1, 8, 2, 8, 2, 5, 4, 3, 3], [3, 4, 8, 1, 8, 2, 8, 2, 6, 2, 8, 2, 8, 1, 8, 4, 3], [3, 4, 1, 7, 2, 8, 1, 8, 2, 8, 1, 8, 2, 7, 1, 4, 3], [3, 4, 1, 1, 8, 2, 8, 1, 8, 1, 8, 2, 8, 1, 1, 4, 3], [3, 4, 1, 7, 1, 6, 2, 8, 1, 8, 2, 6, 1, 7, 1, 4, 3], [3, 4, 1, 1, 8, 2, 8, 1, 8, 1, 8, 2, 8, 1, 1, 4, 3], [3, 4, 1, 7, 2, 8, 1, 8, 2, 8, 1, 8, 2, 7, 1, 4, 3], [3, 4, 8, 1, 8, 2, 8, 2, 6, 2, 8, 2, 8, 1, 8, 4, 3], [3, 3, 4, 5, 2, 8, 2, 8, 1, 8, 2, 8, 2, 5, 4, 3, 3], [0, 3, 4, 4, 5, 1, 7, 1, 7, 1, 7, 1, 5, 4, 4, 3, 0], [0, 3, 3, 4, 4, 8, 1, 1, 1, 1, 1, 8, 4, 4, 3, 3, 0], [0, 0, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 0, 0], [0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0]], 23.1226, 'FEMFFUSION validation report, Vidal-Ferrandiz et al. 2023; data from Nakata & Martin, Nucl. Sci. Eng. 85 (1983)')¶
2-D BIBLIS full-core PWR, eight compositions on a 17 x 17 assembly map. Composition 3 (index 2) is the non-fissile reflector; 0 marks the void outside the core outline.
- ndiffusion.materials.BENCHMARKS = {'biblis': ('BIBLIS 2-D full core', [(1.436, 0.3635, 0.0095042, 0.0750058, 0.017754, 0.0058708, 0.096067), (1.4366, 0.3636, 0.0096785, 0.078436, 0.017621, 0.0061908, 0.10358), (1.32, 0.2772, 0.0026562, 0.071596, 0.023106, 0.0, 0.0), (1.4389, 0.3638, 0.010363, 0.091408, 0.017101, 0.0074527, 0.13236), (1.4381, 0.3665, 0.010003, 0.084828, 0.01729, 0.0061908, 0.10358), (1.4385, 0.3665, 0.010132, 0.087314, 0.017192, 0.0064285, 0.10911), (1.4389, 0.3679, 0.010165, 0.088024, 0.017125, 0.0061908, 0.10358), (1.4393, 0.368, 0.010294, 0.09051, 0.017027, 0.0064285, 0.10911)], 1.02535, 0.0, [[0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0], [0, 0, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 0, 0], [0, 3, 3, 4, 4, 8, 1, 1, 1, 1, 1, 8, 4, 4, 3, 3, 0], [0, 3, 4, 4, 5, 1, 7, 1, 7, 1, 7, 1, 5, 4, 4, 3, 0], [3, 3, 4, 5, 2, 8, 2, 8, 1, 8, 2, 8, 2, 5, 4, 3, 3], [3, 4, 8, 1, 8, 2, 8, 2, 6, 2, 8, 2, 8, 1, 8, 4, 3], [3, 4, 1, 7, 2, 8, 1, 8, 2, 8, 1, 8, 2, 7, 1, 4, 3], [3, 4, 1, 1, 8, 2, 8, 1, 8, 1, 8, 2, 8, 1, 1, 4, 3], [3, 4, 1, 7, 1, 6, 2, 8, 1, 8, 2, 6, 1, 7, 1, 4, 3], [3, 4, 1, 1, 8, 2, 8, 1, 8, 1, 8, 2, 8, 1, 1, 4, 3], [3, 4, 1, 7, 2, 8, 1, 8, 2, 8, 1, 8, 2, 7, 1, 4, 3], [3, 4, 8, 1, 8, 2, 8, 2, 6, 2, 8, 2, 8, 1, 8, 4, 3], [3, 3, 4, 5, 2, 8, 2, 8, 1, 8, 2, 8, 2, 5, 4, 3, 3], [0, 3, 4, 4, 5, 1, 7, 1, 7, 1, 7, 1, 5, 4, 4, 3, 0], [0, 3, 3, 4, 4, 8, 1, 1, 1, 1, 1, 8, 4, 4, 3, 3, 0], [0, 0, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 0, 0], [0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0]], 23.1226, 'FEMFFUSION validation report, Vidal-Ferrandiz et al. 2023; data from Nakata & Martin, Nucl. Sci. Eng. 85 (1983)'), 'iaea': ('IAEA PWR 2-D quarter core', [(1.5, 0.4, 0.01, 0.08, 0.02, 0.0, 0.135), (1.5, 0.4, 0.01, 0.085, 0.02, 0.0, 0.135), (1.5, 0.4, 0.01, 0.13, 0.02, 0.0, 0.135), (2.0, 0.3, 0.0, 0.01, 0.04, 0.0, 0.0)], 1.0296, 8e-05, None, 20.0, 'Yu et al., arXiv:2411.15693, Table 6'), 'ringhals': ('Ringhals-4 1-D slab', [(1.4376, 0.3723, 0.0115, 0.1019, 0.0151, 0.0057, 0.1425), (1.3116, 0.2624, -0.0098, 0.0284, 0.0238, 0.0, 0.0)], 1.0037, 0.0, None, None, 'Yu et al., arXiv:2411.15693, Table 2'), 'twigl': ('TWIGL 2-D quarter core', [(1.4, 0.4, 0.01, 0.15, 0.01, 0.007, 0.2), (1.3, 0.5, 0.008, 0.05, 0.01, 0.003, 0.06)], 0.9133, 0.0, None, None, 'Yu et al., arXiv:2411.15693, Table 4')}¶
Every published benchmark, by short name.