To continue in the effort of merging Sam Shaner's transient capability,
this next PR adds the class DiffusionCoefficient to mgxs.py. It uses
the TransportXS class, but has some unique features in get_condensed_xs()
requiring its own function. There won't be any other MGXS classes added
after this.
I updated the docstrings and the appropriate regression tests.
Since my system outputs different formatting for the
mgxs_library_distribcell test, it is possible this test will continue
to fail. However, I did my best to modify it by hand so that it will pass.
Through a discussion on the user's group
https://groups.google.com/forum/#!topic/openmc-users/xHKYV-EBgrY
it was determined that some computing environments don't support
calls to fork() that multiprocessing.Pool requires. This can
lead to the depletion hanging indefinitely.
Users can now configure the
openmc.deplete.pool.USE_MULTIPROCESSING boolean to control
the use of multiprocessing during depletion. The default state
is to use multiprocessing. Otherwise itertools.starmap will be
used to update the compositions "in serial"
Moved from deplete.abc into openmc.deplete.cram. CRAM16 and CRAM48
are aliases to __call__ methods for two instances of
IPFCramSolver: Cram16Solver and Cram48Solver, created using
16th and 48th order coefficients
Slight reformatting of the depletion documentation. The "Primary API"
is presented at the top, including integrators and the Operator.
This section is followed by a "Minimal Example" that demonstrates
how one might instantiate an Operator, and use it for depletion.
The comm communicator is moved into the "Internal Classes and Functions"
section, as the end-user is less likely to interact with this directly.
Lastly, a section on "Abstract Base Classes" is provided and expanded,
documenting the purpose of specific ABCs.
* __call__ methods for Operator documented
* CRAM16 and CRAM48 are closer to the top of the page
* Document deplete and timed_deplete functions
* Abstract integrators documented as part of abc submodule
* Abstract operator helpers documented as part of abc submodule
Introduce a new subclass of EnergyHelper, EnergyScoreHelper,
that computes the system energy using the energy-deposition score.
This energy is fed back to the Operator to normalize reaction rates.
The energy from the tally is only stored on the helper on the
MPI process 0 as to avoid scaling the system energy by the number
of processes. During the Operator unpacking, the energy reported
by each process is reduced, as the previous implementations took
fission reaction rates from the "local materials", e.g. the
materials each process is responsible for depleting.
The tally results are shared across all processes and only
contains a single quantity, the tallied energy deposition across
all materials.
This mode is controlled by passing the "energy_mode" argument passed
to the Operator. The two options are "fission-q" [default and previous
behavior] and "energy-deposition" [new features]. If energy_mode indicates using
the energy deposition score, the user-supplied fission-q dictionary is not used.
(cherry picked from commit d566f3080f)
Computes the effective fission yields for nuclides
with multiple sets of yields by
1) Tallying fission rate and energy-weighted fission rate
2) Determining average energy at which fission events occur
3) Interpolating [lin-lin] between adjacent fission yields based
on this average energy
Uses a second tally with an EnergyFunctionFilter to tally
E * sigma_f * phi.
Added unit tests with the proxy-style class that doesn't use the
C API to generate tallies but tests all other aspects of the
implementation. Tests cover three possible average energies
(below minimum supplied yield energy, above max supplied yield energy,
and between two)
The Operator uses fission_yield_mode="average" to select this helper.
The helper also has a from_operator class method.