Finite-volume diffusion solves¶
The functions below execute Morana’s cell-centered finite-volume
diffusion method. Pass a complete ProblemConfiguration or
ProblemConfigurationSnapshot explicitly to each function. A mutable
configuration is captured as an immutable snapshot at solve entry; a supplied
snapshot is used directly. The completed result retains that same snapshot as
provenance.
finite_volume ¶
Finite-volume multigroup diffusion solve entry points.
solve_fixed_source ¶
solve_fixed_source(
configuration: (
ProblemConfiguration | ProblemConfigurationSnapshot
),
settings: FixedSourceSettings | None = None,
) -> Result
Solve the layered multigroup hex-z fixed-source problem.
The optional configured volumetric source and additive boundary terms form
the right-hand side. The solver applies the configured direct or GMRES
policy to the coupled loss-minus-fission system,
accepts only negative flux roundoff within
flux_nonnegativity_tolerance, and checks the relative linear
residual against settings.linear_solve’s relative-residual
tolerance. The completed result has keff=None and one
linear-solve report. A mutable configuration is snapshotted at entry; a
supplied snapshot is retained directly as result provenance. Calculation
uses that immutable snapshot directly.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
configuration
|
ProblemConfiguration | ProblemConfigurationSnapshot
|
Mutable problem definition or immutable snapshot to solve. |
required |
settings
|
FixedSourceSettings | None
|
Immutable fixed-source controls. |
None
|
Returns:
| Type | Description |
|---|---|
Result
|
Completed flux, balance, convergence, and provenance data. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If configuration is neither |
ValueError
|
If the active domain, material data, boundary coverage, or configured source is invalid; a linear system or preconditioner is unusable; or flux and residual numerical checks fail. |
solve_keff ¶
solve_keff(
configuration: (
ProblemConfiguration | ProblemConfigurationSnapshot
),
normalization: (
FissionSourceNormalization | PowerNormalization
),
settings: KeffSettings | None = None,
) -> Result
Solve a physically normalized fission eigenvalue diffusion problem.
A configured positive fission-source rate or recoverable thermal-power
target scales the exposed result after convergence; it does not alter
the returned keff. Power normalization requires
kappa_sigma_f for every fissionable active material. The solver
verifies that requirement before it assembles finite-volume operators
or prepares an inner linear solve. The solver
starts from a positive unit-fission-source vector, then requires all
three effective convergence criteria—multiplication-factor change,
volume-weighted flux change, and relative eigenvalue-equation
residual—to meet their explicit tolerances within
max_outer_iterations. A mutable configuration is snapshotted at entry;
a supplied snapshot is retained directly as result provenance. Calculation
uses that immutable snapshot directly.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
configuration
|
ProblemConfiguration | ProblemConfigurationSnapshot
|
Mutable problem definition or immutable snapshot to solve. |
required |
normalization
|
FissionSourceNormalization | PowerNormalization
|
Immutable target fission-neutron source rate or recoverable thermal power for the completed result. |
required |
settings
|
KeffSettings | None
|
Optional immutable criticality numerical controls. |
None
|
Returns:
| Type | Description |
|---|---|
Result
|
Completed physically normalized flux, multiplication factor, balance, convergence, and provenance data. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If configuration is neither |
ValueError
|
If an independent source is configured; the active domain, material data, fission production, power data, or exposed boundary data is ineligible; the loss matrix is singular; or an inner solve, flux, or residual fails numerical checking. |
RuntimeError
|
If power iteration does not satisfy all three convergence criteria
within |