ndiffusion.KEigenSolver¶
- class ndiffusion.KEigenSolver¶
Matrix-free 1-D multigroup neutron diffusion k-eigenvalue solver.
Solves A phi = (1/k) B phi using power iteration. The A operator is applied implicitly via per-group Thomas (TDMA) solves inside a Gauss-Seidel sweep over energy groups. No full NxN matrix is ever assembled.
bc is the outer (right) Robin BC per group and bc_left the inner (left) one, reflective by default. A cylinder or sphere starting at r = 0 must keep bc_left reflective.
- __init__(self: ndiffusion._core.KEigenSolver, mats: ndiffusion._core.Materials, medium_map: numpy.ndarray[int32], edges_x: numpy.ndarray[float64], geom: ndiffusion._core.Geometry, bc: collections.abc.Sequence[ndiffusion._core.BoundaryCondition], epsilon: SupportsFloat | SupportsIndex = 1e-08, max_outer: SupportsInt | SupportsIndex = 200, max_inner: SupportsInt | SupportsIndex = 1000, verbose: bool = False, bc_left: collections.abc.Sequence[ndiffusion._core.BoundaryCondition] = []) None¶
Methods
__init__(self, mats, medium_map, edges_x, ...)solve(self)Run power iteration and return a DiffusionResult.
Attributes
- property n_cells¶
- property n_groups¶
- solve(self: ndiffusion._core.KEigenSolver) ndiffusion._core.DiffusionResult¶
Run power iteration and return a DiffusionResult.