pyopensn.solver.UncollidedSolver
- class pyopensn.solver.UncollidedSolver
Generate and write uncollided flux moments for first-collision transport.
Wrapper of
opensn::UncollidedSolver.- Advance(self: pyopensn.solver.Solver) None
Advance the solver by one step.
Changes made to the problem since the last step are checked as in
Execute.Initializemust be called first. Solver classes that do not implement stepping leave the state unchanged and log thatAdvanceis unsupported.For MPI transport solvers, this is a collective operation and must be called on all ranks.
- Execute(self: pyopensn.solver.Solver) None
Execute the solver.
The problem’s current state and the solver’s requirements are checked first, so changes made to the problem after
Initialize(for example a mode switch orSetXSMap) are validated before they are used.Initializemust be called beforeExecute.For MPI transport solvers, this is a collective operation and must be called on all ranks.
- Initialize(self: pyopensn.solver.Solver) None
Initialize the solver.
Solvers check that the problem is in a supported state (for example, steady-state mode without external sources for the k-eigenvalue solvers) and raise
ValueErrorotherwise. Setup and post-setup validation must both succeed. CallingInitializeagain clears the previous initialized state first.For MPI transport solvers, this is a collective operation and must be called on all ranks.
- __init__(self: pyopensn.solver.UncollidedSolver, **kwargs) None
Construct an uncollided transport solver.
- Parameters:
problem (pyopensn.solver.UncollidedProblem) – Existing uncollided problem instance.
file_name (str) – Output HDF5 file containing uncollided flux moments, mesh and total cross-section metadata, and production/removal/outflow balance terms.
progress_interval (int, default=5) – Percentage interval for source-point progress reports. Reports include completed source points, elapsed time, and estimated remaining time. Set to zero to disable progress reporting. Valid values are integers in
[0, 100].
Notes
Initialize()requires exactly one MPI rank. The generated HDF5 file may then be reused by a serial or parallel collided calculation on the same mesh.Execute()uses the problem’s point sources as they are when it runs, including sources replaced afterInitialize().Internal threading in the current uncollided implementation is capped by the
OPENSN_NUM_THREADSenvironment variable and defaults to1when the variable is unset or invalid.