ndiffusion.FixedSourceSolver2D

class ndiffusion.FixedSourceSolver2D

Matrix-free 2-D multigroup neutron diffusion fixed-source solver on a structured Cartesian or RZ mesh.

Solves A phi = q where q is a user-supplied volumetric source. No fission or power iteration is performed.

source: (nx*ny, n_groups), or flat in the same row-major order. Robin BCs, one per group: bc_x on the right (x=nx) edge, bc_y on the top (y=ny), bc_x_left on the left (x=0) and bc_y_bottom on the bottom (y=0). The last two default to reflective; in RZ bc_y_bottom must stay reflective when the mesh starts on the axis.

__init__(self: ndiffusion._core.FixedSourceSolver2D, mats: ndiffusion._core.Materials, medium_map: numpy.ndarray[int32], edges_x: numpy.ndarray[float64], edges_y: numpy.ndarray[float64], geom: ndiffusion._core.Geometry2D, bc_x: collections.abc.Sequence[ndiffusion._core.BoundaryCondition], bc_y: collections.abc.Sequence[ndiffusion._core.BoundaryCondition], epsilon: SupportsFloat | SupportsIndex = 1e-08, max_inner: SupportsInt | SupportsIndex = 200, verbose: bool = False, bc_x_left: collections.abc.Sequence[ndiffusion._core.BoundaryCondition] = [], bc_y_bottom: collections.abc.Sequence[ndiffusion._core.BoundaryCondition] = []) → None

Methods

__init__(self, mats, medium_map, edges_x, ...)

solve(self, source)

Solve A*phi = source and return a FixedSourceResult.

Attributes

property n_cells
property n_groups
solve(self: ndiffusion._core.FixedSourceSolver2D, source: object) → ndiffusion._core.FixedSourceResult

Solve A*phi = source and return a FixedSourceResult.

source is flat or shaped (n_cells, n_groups), per unit volume.