Commit graph

26 commits

Author SHA1 Message Date
Paul Romano
5fc289b99d
Automate workflow for mesh- or cell-based R2S calculations (#3508)
Co-authored-by: Ethan Peterson <eepeterson3@gmail.com>
Co-authored-by: Jonathan Shimwell <drshimwell@gmail.com>
2025-11-01 00:15:25 +00:00
Lorenzo Chierici
43437e9410
TransferRates (old msr continuous capabilities) (#2358)
---------

Co-authored-by: Jonathan Shimwell <drshimwell@gmail.com>
Co-authored-by: Olek <45364492+yardasol@users.noreply.github.com>
Co-authored-by: yardasol <yardasol@grinnell.edu>
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
Co-authored-by: Gavin Ridley <gavin.keith.ridley@gmail.com>
2023-04-27 22:11:17 -05:00
yardasol
467ae6b9fb operator.py -> coupled_operator.py 2022-07-30 16:55:36 -05:00
yardasol
3e827530ba make changes from @paulromano's 3rd review
- syntax fixes and adjustments
- change name of FluxDepletionOperator to IndependentOperator
- flux_operator.py -> independent_operator.py
- new class, MicroXS, for creating (for now) one-group microscopic
  cross section DataFrames. This class takes the functionality that was
  previously in static functions in IndependentOperator
- Associated changes to the test suite and online docs
2022-07-28 17:50:06 -05:00
yardasol
d69150db0c Merge branch 'refactor-deplete-operators' into transportoperator-subclass-notransport 2022-07-19 10:08:20 -05:00
yardasol
f5db4e3afb move reuasble code to new parent class; 1st pass
- new class OpenMCOperator to contain shared bits of code between the
  currently existing Operator class and the as-of-yet to be created
  FluxDepletionOperator class
- Operator is now a subclass of OpenMCOperator
- move _distribute method to OpenMCOperator
- move _get_burnable_mats, _extract_number, _set_number_from_mat,
  _set_number_from_results to OpenMCOperator
- split initial condition into openmc.lib dependent and non-dependent
  parts; dependent part goes to Operator, non-dependent part goes to
  OpenMCOperator
- move _update_materials to OpenMCOperator
- move _get_tally_nuclides to OpenMCOperator
- rename _unpack_tallies_and_normalize to _calculate_reaction_rates;
  move to OpenMCOperator
- move get_results_info to OpenMCOperator
2022-07-12 18:38:05 -05:00
yardasol
992d4c1661 add flux_operator to the __init__ module 2022-06-28 16:11:43 -05:00
Paul Romano
5421bf0b1f Rename results_list.py -> results.py 2022-06-03 09:04:00 -05:00
Paul Romano
bd7b33c636 Rename results.py stepresult.py 2022-06-03 09:04:00 -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
73cbdb6324 Allow depletion with MPI and serial HDF5 2020-05-15 14:39:22 -05:00
Paul Romano
e869d8eef1 Fix documentation build (deplete module was causing issues) 2019-10-04 12:48:23 -05:00
Andrew Johnson
b3c5d98454
Cleaner openmc.deplete namespace with __all__
Provide explicit __all__ lists for files in openmc/deplete
containing classes that should be brought into the "primary"
API. This prevents cluttering the openmc.deplete namespace
caused by the wildcard imports
```
from .nuclide import *
...
```

The abc, cram, and helpers modules are imported simply as
```
from . import abc
from . import cram
from . import helpers
```
2019-09-17 16:24:54 -05:00
Andrew Johnson
0bc7800a92
Move openmc.deplete.integrator into openmc.deplete
Much of the previous API is intact, with the major change
being CRAM functions are imported from openmc.deplete.cram
in the test_deplete_cram.

The integrator abstract classes are placed in
openmc/deplete/abc.py with all concrete classes going in to
openmc/deplete/integrators.py

Documentation updated accordingly
2019-08-07 11:04:37 -05:00
Andrew Johnson
2efc7e8b71
Fix issue with vector proc_time in reading depletion_summary
Previous changes made proc_time a vector, not an (N, 1) array.
The reading of this data was not updated accordingly, until now
2019-06-27 10:29:56 -05:00
Andrew Johnson
32cb3ddcf2
Merge branch 'develop' into dep-timings 2019-06-26 17:53:12 -05:00
Andrew Johnson
544cbd0c39
Use unittest.Mock for MPI when collecting proc_time 2019-06-26 17:52:27 -05:00
Andrew Johnson
830c0237a8
Clean up imports in openmc/deplete/__init__.py 2019-06-25 13:29:20 -05:00
Andrew Johnson
d55c77a65f
Pass depletion process time to deplete.Results.save
Method openmc.deplete.Results.save now accepts a new argument,
proc_time, to represent the time each process spent depleting
all materials. This value is summed across all processes to
get the total cpu time depleting. Time in transport simulations
should not be included.

The value written to depletion_results.h5 is
proc_time / (n_proc * n_burn_materials)
to get a look at the average time required to deplete a material.
A new dataset, "depletion time" is created in this file, and has
one fewer rows than other data set, like eigenvalues. This corresponds
to there being one fewer round of depletion simulations than transport.

The proc_time is also read in from the depletion file in the
class method Results.from_hdf5(), with one notable exception.
If data from the last step is requested, then the proc_time
attribute will be a numpy array of nans, reflecting the lack
of depletion data.
2019-06-21 09:38:48 -05:00
Andrew Johnson
6370b362c7
Check that hdf5 has MPI if performing depletion with MPI
Check added in openmc/depletion/__init__.py.
Without this check, the exporting of the Results to hdf5 will
hang, as the second process attempts to write to a file
that has already been opened on another process.
This error is only raised after a full transport calculation
has been run.
The check raises a more helpful error directly at the import
from openmc.deplete, prior to transport calculations.
2019-06-20 14:43:33 -05:00
Paul Romano
92697ec06e Introduce ResultsList class to replace scattered functions 2018-02-21 15:36:27 -06:00
Paul Romano
c9f8daa0ab Fix in ReactionRates class. More documentation updates 2018-02-19 23:17:50 -06:00
Paul Romano
b3106a6504 Make Operator a context manager. Smart handling of output_dir 2018-02-15 06:37:46 -06:00
Paul Romano
1ee27edc8c Rename DepletionChain -> Chain 2018-02-14 10:45:39 -06:00
Paul Romano
37f552a5dc Fix deplete imports 2018-02-13 15:08:05 -06:00
Paul Romano
f8764416d2 Copy OpenDeplete files from commit 2d804c227a 2018-02-13 15:08:05 -06:00