ndiffusion.FixedSourceSolverUnstructured2D¶
- class ndiffusion.FixedSourceSolverUnstructured2D¶
Matrix-free 2-D multigroup neutron diffusion fixed-source solver on an unstructured polygonal mesh.
Solves A phi = q using point SOR with relaxation factor omega (omega = 1 is plain Gauss-Seidel).
source: (n_cells, n_groups), or flat in the same row-major order. Source values are volumetric; the solver multiplies by cell_area internally to form the volume-integrated RHS.
bc has size n_bc_types * n_groups; bc[tag*G+g] is the BC for tag ‘tag’, group g.
- __init__(self: ndiffusion._core.FixedSourceSolverUnstructured2D, mats: ndiffusion._core.Materials, mesh: ndiffusion._core.UnstructuredMesh2D, bc: collections.abc.Sequence[ndiffusion._core.BoundaryCondition], epsilon: SupportsFloat | SupportsIndex = 1e-08, max_inner: SupportsInt | SupportsIndex = 200, omega: SupportsFloat | SupportsIndex = 1.0, verbose: bool = False) None¶
Methods
__init__(self, mats, mesh, bc[, epsilon, ...])solve(self, source)Solve A*phi = source and return a FixedSourceResult.
Attributes
- property n_cells¶
- property n_groups¶
- solve(self: ndiffusion._core.FixedSourceSolverUnstructured2D, 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.