Commit graph

79 commits

Author SHA1 Message Date
Jonathan Shimwell
84a413b130
Speed up reaction rate lookup for FluxCollapseHelper (#3724) 2026-01-13 15:34:07 -05:00
Jonathan Shimwell
9b7b33c7fa
Ruff comments on code (#2696)
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2023-09-26 03:37:19 +00:00
Paul Romano
98fe64dd5a
Make sure FluxCollapseHelper loads missing nuclide data (#2694) 2023-09-15 13:19:11 -04:00
Paul Romano
d21b653d32
Refactor MicroXS class and usage in IndependentOperator (#2595)
Co-authored-by: Jonathan Shimwell <drshimwell@gmail.com>
Co-authored-by: Olek <45364492+yardasol@users.noreply.github.com>
2023-08-31 10:55:21 -04:00
Paul Romano
787b3e0308
Use multiply_density in depletion reaction rate helper classes (#2559)
Co-authored-by: Andrew Johnson <drewejohnson@users.noreply.github.com>
2023-06-14 22:15:22 -07:00
Kalin Kiesling
e93dd66430
eliminate set/list redundancy
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2023-03-23 15:07:32 -05:00
Kalin Kiesling
5160417e3e load any nuclide requested that is not present in materials prior to constructing tally 2023-03-22 12:45:33 -05:00
josh
f5625c9229 Update documentation and formatting 2022-09-12 17:08:41 +00:00
josh
9ec20b507a Rename cache variable 2022-09-10 00:35:37 +00:00
josh
b8ffbe000b Add a basic cache system for the burnable material reaction rates tallies 2022-09-10 00:07:31 +00:00
yardasol
8969b9b4e9 remove unneeded parameter from update 2022-08-10 15:53:40 -05:00
Olek
4a06d14b15
Apply suggestions from code review
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2022-08-02 12:28:00 -05:00
yardasol
89d79310bb revert DepletionOperator to TransportOperator; doc updates 2022-08-01 12:44:28 -05:00
yardasol
3e81a86915 TransportOperator->DepletionOperator 2022-07-30 18:37:51 -05:00
yardasol
773757246b Operator->CoupledOperator
- update references in docstrings and docpages
- minor adjustments to related docs in deplete module files
- retain backwards compatiblity by exporint Operator alias
2022-07-30 16:46:31 -05:00
yardasol
511464b53b adjust top-level module descriptions 2022-07-30 15:59:28 -05:00
yardasol
4818a296d4 Made changes from paulromano's 2nd round of comments
- Syntax improvements and fixes
- removed `flux` parameter from Integrator
- Moved generate_1g_cross_sections to a top level function in
  flux_operator.py
- changed normalization modes: constant-flux -> source-rate;
  constant-power -> fission-q
- fixed regression tests (fission-q reference solution was bad before,
  but is now much more reasonable and comparable to the source-rate
  reference solution)
- added `nuc_units` parameter to the `from_nuclides` method.
- docstring fixes
- RST doc fixes
- spelling fixes
2022-07-27 13:30:56 -05:00
yardasol
0984b29f67 add machinery to do constant-power depletion with FluxDepletionOperator 2022-07-21 12:14:47 -05:00
yardasol
a5f15aec57 rearrange functions; move FluxTimesXSHelper to be inner class of
FluxDepletionOperator
We move FluxTimesXSHelper to be an inner class of FluxDepletionOperator
so we can avoid needing to copy the number and cross_sections
attributes.
2022-07-14 17:55:18 -05:00
yardasol
8f1db41458 overhaul FluxTimexXSHelper class 2022-07-13 15:55:48 -05:00
yardasol
5f8e1ff9d9 Address paulromano's comments
- various syntax adjustments and cleanups
- remove unneeded import statements
- add more information to new section in user's guide
- typo fixes
- remove dilute_initial
- move _validate_micro_xs_inputs back into the class as a static method
- update tests to reflect changes
2022-07-12 11:44:12 -05:00
yardasol
9a86f7bb41 move TalliedFissionYieldHelper from abc.py to helpers.py 2022-06-14 12:29:20 -05:00
Adam Nelson
e1365bd036
Applied suggested changes per @paulromano's code review
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2021-10-01 06:09:24 -05:00
agnelson
ad483b3fea Moved the dummy communicator to being within openmc vice openmc.deplete, added test of model.calculate_volumes and model.deplete, fixed issues identified from those tests, and added a DLL quieting method (still needs to be propagated to integrator.integrate 2021-09-30 11:18:35 -05:00
Paul Romano
f603644212 Add missing 'import sys' in helpers.py 2020-11-02 15:26:08 -06:00
Jonathan Shimwell
975fb850d6
rename varible as suggested in review
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2020-10-19 13:33:02 +01:00
Jonathan Shimwell
1c01fe751d added helpful dict with reaction names as keys 2020-10-08 17:08:24 +01:00
Paul Romano
ce6bfa47b2
Apply @pshriwise suggestions from code review
Co-authored-by: Patrick Shriwise <pshriwise@gmail.com>
2020-09-17 22:18:20 -05:00
Paul Romano
18c132ab67 Update docstrings for reaction rate helper classes 2020-09-15 10:23:31 -05:00
Paul Romano
35f8f03f10 Combine flux and hybrid reaction rate helpers 2020-09-15 10:23:31 -05:00
Paul Romano
52bee7bee2 Allow hybrid rx helper to work with no reactions specified 2020-09-15 10:23:31 -05:00
Paul Romano
96a66789b1 Activate need_depletion_rx for reaction rate-based depletion only 2020-09-15 10:23:31 -05:00
Paul Romano
2466f1739e Implement hybrid depletion tallies 2020-09-15 10:23:31 -05:00
Paul Romano
0a61bc0cbe Account for temperature in reaction rate calculation 2020-09-15 10:23:31 -05:00
Paul Romano
2e1e669e8a Build mapping to avoid O(N) lookup in FluxCollapseHelper.get_material_rates 2020-09-15 10:23:31 -05:00
Paul Romano
76fc6fb3e7 Implement FluxCollapseHelper that is used by Operator 2020-09-15 10:23:31 -05:00
Paul Romano
e266bd244b Move energy-related details to intermediate EnergyNormalizationHelper class 2020-08-03 14:43:33 -05:00
Paul Romano
06e598f38e Use tally mean in helpers rather than direct access to results 2020-08-03 07:38:36 -05:00
Paul Romano
baecead5da Start creating SourceRateHelper 2020-08-03 07:38:36 -05:00
Paul Romano
cdf58828af Remove unused arguments on NormalizationHelper classes 2020-08-03 07:38:32 -05:00
Paul Romano
bf8405f6cc Change EnergyHelper -> NormalizationHelper 2020-07-30 14:15:52 -05:00
Paul Romano
b4032229cb Ensure depletion fission yield modes work in parallel 2020-05-15 11:11:39 -05:00
Andrew Johnson
7a1a424d0f
Tally.writeable -> Tally.writable
Oops

Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
2019-09-26 20:34:11 -04:00
Andrew Johnson
72212f60a2
Use internal tallies to compute quantities for depletion
Tallies created by internal depletion helpers are marked
as internal using the openmc.lib.Tally.writeable property.
This is done to resolve issue #1327 where statepoint files could
grow to be quite large after tallying reaction rates across many
burnable materials for all nuclides of interest.

A check is added in the depletion regression test to ensure that
no additional tallies are loaded to the StatePoint.
2019-09-20 10:50:38 -05:00
Andrew Johnson
2ab3ad7b78
Minor tweaks to Operator, EnergyScoreHelper
Per reviewer comments
2019-09-17 12:18:51 -05:00
Andrew Johnson
6b386f8447
Use string score names for EnergyScoreHelper
Operator defaults to using "heating-local" if not running
in coupled photon transport.
2019-09-17 11:34:20 -05:00
Andrew Johnson
74e48521a8
Pass MT301 or MT901 to EnergyHelper from Operator
Depending on settings.photon_transport, obtain the total
system energy from the 301 [heating] or 901 [heating-local]
scores. The former is used in coupled neutron-photon transport,
as this does not include any energy from neutrons or
photons, assuming these particles deposit their energy along
their life. MT901 is used for neutron transport and is the default,
e.g. if scores is None. This score includes energy from
prompt and delayed photons taken from MT458 data.

Related PR: #1344 - Ability to generate KERMAs assuming local
photon energy deposition
2019-09-16 15:24:06 -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
Sterling Harper
c76b75ce33
Merge pull request #1345 from paulromano/capi-to-lib
Rename openmc.capi to openmc.lib
2019-09-16 09:28:02 -04:00
Paul Romano
bbb0b78383 Rename openmc.capi -> openmc.lib 2019-09-13 10:38:26 -05:00