Commit graph

396 commits

Author SHA1 Message Date
Paul Romano
eca7919127 Add WeightWindows to API docs 2022-01-08 15:19:33 -06:00
Paul Romano
24b741f2b3 Initial implementation of time filter 2022-01-05 07:43:42 -06:00
Paul Romano
cd803764c5 Add torus bounding_box methods and fix docstrings 2021-12-22 11:47:37 -05:00
Olaf Schumann
c0bcc3f1ca Renamed Rational to Power Law 2021-10-11 19:48:35 +00:00
Olaf Schumann
557a5c66b2 Add rational distribution to documentation 2021-10-05 20:06:02 +00:00
Paul Romano
e0284d93fc Change examples link in docs/source/pythonapi/index.rst 2021-07-22 09:32:13 -05:00
Amelia J Trainer
ab32931870 Merge branch 'develop' into collisionFilter 2021-04-07 11:22:43 -04:00
Amelia Trainer
d1d4553661 addressed some of the requested changes from PR 2021-03-25 14:21:58 -04:00
Paul Romano
0ef1f95978 Fix broken links, use https over http, replace redirects 2021-03-17 07:31:47 -05:00
Adam Nelson
5a94e66bf3 Merge remote-tracking branch 'upstream/develop' into mt_mgxs 2020-10-29 08:34:17 -05:00
Adam Nelson
d2c00b4f1b Added tests and fixed code accordingly 2020-10-22 14:13:32 -05:00
Paul Romano
441d081dd5 Implement write_source_file function 2020-10-14 15:46:58 -05:00
Miriam
c50306904b Added DiffusionCoefficient class to mgxs.py
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.
2020-09-23 16:35:22 +00:00
Paul Romano
35f8f03f10 Combine flux and hybrid reaction rate helpers 2020-09-15 10:23:31 -05:00
Paul Romano
13dadf9c24 Merge branch 'develop' into ccfe-spp-2 2020-09-10 06:34:37 -05:00
Paul Romano
60c3a9dc4e
Merge pull request #1606 from mkreher13/transient-rewrite
Added classes to mgxs.py
2020-08-24 15:49:41 -05:00
Paul Romano
6d90853d0b Add function for getting naturally-occurring isotopes 2020-08-14 15:05:01 -05:00
Miriam
4e4c559616 Updated documentation
Added current to mgxs.rst and cleaned up descriptions in Current & MeshSurfaceCurrent class
2020-08-05 22:57:02 +00:00
Paul Romano
bf8405f6cc Change EnergyHelper -> NormalizationHelper 2020-07-30 14:15:52 -05:00
Paul Romano
3d35cd3f0f Add documentation of chain.REACTIONS module variable 2020-07-29 06:41:10 -05:00
Paul Romano
0ce9490187 Remove (incomplete) Box composite surface 2020-07-08 21:21:51 -05:00
Paul Romano
df7b525306 Add docstrings to composite surface classes 2020-07-06 10:32:10 -05:00
Andrew Johnson
8b0cd34fb5
Apply suggestions from code review
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2020-06-26 06:52:23 -04:00
Andrew Johnson
89259e310e
Allow Integrators to deplete w/o multiprocessing
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"
2020-06-25 13:22:36 -04:00
Patrick Shriwise
670f9d0609
Merge pull request #1558 from paulromano/effective-dose
Add function for getting effective dose coefficients from ICRP-116
2020-05-26 17:01:34 -05:00
Andrew Johnson
46e98e4a01
Move deplete function to dedicated pool module; removed timed_deplete 2020-05-09 15:01:49 -04:00
Paul Romano
698df9294a Implement openmc.data.dose_coefficients function based on ICRP-116 data 2020-05-08 11:47:26 -05:00
Patrick Shriwise
b9c31d904e Some updates to the current documentation for accuracy. 2020-03-19 14:15:26 -05:00
Paul Romano
04308b7677 Rewrite of openmc-ace-to-hdf5, moving some functionality to ace.py 2020-01-27 09:46:50 -06:00
Paul Romano
9787e9e8c0 Merge branch 'develop' into cell-instance-filter 2020-01-09 07:26:43 -06:00
Ethan Peterson
96c7427eaf Adding CylindricalIndependent source type
ammended docstrings to mention local reference frame
2020-01-06 19:47:10 -05:00
Paul Romano
aa89604f78 Add CellInstanceFilter to documentation 2019-12-12 06:59:01 -06:00
Ethan Peterson
15c7148331 Adding SphericalIndependent source type
Applied suggestions from code review

Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
2019-11-11 10:50:38 -05:00
Paul Romano
5b195b6e9f Various fixes and updates in documentation 2019-10-04 14:00:22 -05:00
Paul Romano
e869d8eef1 Fix documentation build (deplete module was causing issues) 2019-10-04 12:48:23 -05:00
Paul Romano
c18f845712 Fix broken links in documentation 2019-10-04 09:33:20 -05:00
Andrew Johnson
d112eddbc3
openmc.deplete.cram.IPFCramSolver accepts coefficients at init
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
2019-09-26 20:31:04 -04:00
Andrew Johnson
df387e87dc
Document concrete and abstract depletion solvers 2019-09-19 16:51:38 -05:00
Paul Romano
384954b099
Merge pull request #1352 from drewejohnson/dep-namespace-cleanup
Cleaner depletion module documentation and namespace
2019-09-19 09:42:12 -05:00
Andrew Johnson
7a2b52dd84
Apply suggestions from code review
Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
2019-09-19 08:05:30 -05:00
Andrew Johnson
72471d249f
Expand openmc.deplete documentation: minimal example and ABCs
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.
2019-09-17 14:56:31 -05:00
Andrew Johnson
2428702fb6
Improved documentation for depletion module
* __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
2019-09-17 13:38:23 -05:00
Andrew Johnson
016fc0e43e
Use energy deposition score for depletion
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)
2019-09-16 14:04:12 -05:00
Paul Romano
bbb0b78383 Rename openmc.capi -> openmc.lib 2019-09-13 10:38:26 -05:00
Andrew Johnson
aa86aa5262
Improve documentation for FissionYieldHelpers
Add a separate section in the documentation describing
the helpers.

Reword purpose of mat_indexes in generate_tallies
2019-08-15 09:18:56 -05:00
Andrew Johnson
454e6cc6b6
Add AveragedFissionYieldHelper operator helper
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.
2019-08-14 17:39:57 -05:00
Andrew Johnson
f82dc83473
Add FissionYieldCutoffHelper for weighting yields by a cutoff energy
This helper performs the following tasks to weight fission yields:
1) Determine a set of "fast" and "thermal" yields
based on a user specified cutoff energy,
2) Tally fission rates above and below the cutoff, and
3) Compute the effective yield by weighting the fast and
thermal yields by the fraction of fast and thermal fissions
for all nuclides in all burnable materials.

The user is allowed to specify the cutoff energy and energies
preferred for the fast and thermal yields. By default, the
cutoff is 112 eV, chosen as it is the logarithmic mean of
0.0253 eV and 500 keV. These two values are the default energies
for thermal and fast yields.

Tests are added to check for failure in constructing this
helper (thermal energy > cutoff, non-real values passed, etc.),
selection of yields given a range of user data, and
a proxy class that emulates a variety of thermal and fast splits
to check the eventual computed yield libraries.
2019-08-13 16:38:24 -05:00
Andrew Johnson
ca435b0bda
Add TalliedFissionYieldHelper abstract helper
Designed to be subclassed by helpers that aim to compute
effective fission yields with tallied data.
Constructs a tally in all burnable materials, scoring the
fission rate in all nuclides that have non-zero density
(as reported by the Operator) and have multiple sets of yields.
For nuclides with non-zero densities and a single set of
yields, those yields are assumed to be constant across incident
neutron energies.

The unpack method is now abstract, as each subclass should have
its own data layout, some with different energy structures
perhaps?? Maybe some weighting functions?
2019-08-13 16:20:55 -05:00
Andrew Johnson
d8b9f5db54
Add ConstantFissionYieldHelper concrete class
Given a requested energy, will take fission yields from that
energy on all nuclides and hold them as constant throughout
the simulation. If the requested energy is not found for a specific
nuclide, then the closest energy is used. The default is to
take the thermal 0.0253 eV yields.

This is now the helper attached to the Operator. The user can
select what energy of yields they would like to use.
2019-08-13 16:01:50 -05:00
Andrew Johnson
2cfbb21858
Provide abstract FissionYieldHelper class
API used by the Operator:
- generate_tallies
- weighted_yields [abstract]
- update_nuclides_from_operator
- unpack

generate_tallies and unpack are empty methods, provided
so that a consistent API can be found on helpers
with tallies.

Sorts nuclides into two dictionaries: those with a single
set of fission yields, and those with multiple sets.
The former can is exposed through the
constant_yields property, returning a copy of the fission
yield dictionary {parent: {product: yield}}

The Operator now looks for/uses the weighted_yields and
update_nuclides_from_operator methods instead of the old
compute_yields and set_fissionable_nuclides methods
2019-08-13 15:30:14 -05:00