Commit graph

34 commits

Author SHA1 Message Date
Perry
2d5c50080c
Allow the use of substeps for CRAM (#3908)
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2026-04-22 18:24:34 -05:00
Jonathan Shimwell
db426b66ca
Materials name persist when running depletion simulation (#3738)
Co-authored-by: GuySten <guyste@post.bgu.ac.il>
Co-authored-by: GuySten <62616591+GuySten@users.noreply.github.com>
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2026-01-27 06:06:36 +00:00
Paul Romano
f544d02e49
Don't write reaction rates in depletion results by default, remove per-stage data for multistage integrators (#3609) 2025-11-19 12:26:57 -05:00
Paul Romano
9fee6534b6
Prepare for NumPy 2.0 (#2845) 2024-03-26 12:00:06 -04:00
Jonathan Shimwell
2536cae11b
allowing stepresult to save to a path (#2567)
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2023-06-21 12:07:15 +00:00
Paul Romano
8bfb1889b9 Rename deplete.ResultsList -> deplete.Results 2022-06-03 09:04:00 -05:00
Paul Romano
aacf3c4938 Rename deplete.Results -> deplete.StepResult 2022-06-03 09:03:59 -05:00
Paul Romano
0b77cc7edc Allow normal instantiation of ResultsList (instead of from_hdf5) 2022-06-03 09:03:57 -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
e2ae3c7401 Change power to source_rate throughout deplete module 2020-08-03 07:38:35 -05:00
Andrew Johnson
133bffcb28
Expand integrator.solver test: lambda, named solver 2020-05-14 08:16:08 -04:00
Andrew Johnson
a253bcccb1
Add tests for configurable integrator solver 2020-05-09 15:27:32 -04:00
Paul Romano
70e914d245 Fix failing tests 2020-02-11 10:12:34 -06:00
Paul Romano
85264aa38c Support minutes and hours for depletion timesteps rather than years 2020-02-11 07:08:53 -06:00
Paul Romano
8771987bf4 Add unit test checking depletion timestep units for all integrators 2020-02-11 06:44:05 -06:00
Andrew Johnson
dbd24035a3
Refactor depletion unit tests with parametrization
Removed unit test files for test_deplete_*py that pertained to a
single integrator type only. Similarly removed tests where the
integrators are used to perform simple restart analysis.
These tests are still present, but done with two parametrized tests.
Each of the integrators has the exact same solution in the unit tests
with and without restarting,by nature of their design.
This and the near-fixture like way the tests
are structured allowed these tests to be easily parametrized provided
1) integrator, 2) reference solutions for atoms 1 and 2.

Exact results for each integrator in the unit test are contained
inside a collections.namedtuple, along with the Integrator class.
These named tuples are placed in a dictionary in
tests/dummy_operator.py that can be easily iterated over to provide
access to a name of the scheme, e.g. "predictor", and the tuple of
integrator, results for atom 1, and results for atom 2.
Exact results for atoms 1 and 2 should be provided using the depletion
matrix produced by the tests.dummy_operator.DummyOperator for two
time steps of 0.75 seconds.
2019-08-22 10:05:23 -05:00
Andrew Johnson
becda0c2c2
Merge branch 'develop' into bug-restart-mpi 2019-08-07 13:50:42 -05:00
Andrew Johnson
1bd663daf6
Rename integrator classes to be PEP8 complaint
Changes:
- EPC_RK4_Integrator -> EPCRK4Integrator
- SI_Integrator -> SIIntegrator
- SI_CELI_Integrator -> SICELIIntegrator
- SI_LEQI_Integrator -> SICELIIntegrator
2019-08-07 08:55:40 -05:00
Andrew Johnson
0fdef55d42
Create ResultsList from file using from_hdf5
The new class method ResultsList.from_hdf5 should be
used to load in results data, rather than passing
the file name into the __init__ method. __init__
passes directly to list.__init__ now.

The motivation for this is to resolve the depletion
restart with MPI bug #1275. To do this, each Operator
will create it's own ResultsList and distribute reaction
rates and densities according to what materials are burned
on this process. Rather than use a normal list, this Operator
expects the various accessor methods like get_atoms to be
present on self.prev_res
2019-08-05 16:09:49 -05:00
Andrew Johnson
b1ea5b8942
Add type and value checking to Integrators
- SI_Integrator must be passed positive integer.
- Number of powers computed must be equal to the
  number of time steps

Added unit test to ensure that the right errors are raised.
2019-07-30 15:56:24 -05:00
Andrew Johnson
51add8f6e9
Clean up changes introduced by Integrators
Remove some unused imports, redeclared __init__,
long lines, etc.
2019-07-30 13:21:04 -05:00
Andrew Johnson
98957fb473
Store OperatorResults.k as uncertainties.ufloat
This allows the propagation of the uncertainty through
the SIE iterations, and alows the expressions for updating
k to be preserved. The OperatorResult.k was previous stored
as a tuple of two floats. The interface into the depletion_results
file is not changed, as the Results.save method, which writes the
OperatorResult data, breaks the ufloat into k and uncertainties.

Documentation has been updated on the OperatorResult.
2019-07-26 10:31:24 -05:00
Andrew Johnson
c6e65061d1
Update depletion tests for eigenvalue uncertainties
Update results list unit test to ensure that the
correct uncertainties are pulled from the depletion_results file

Update basic integrator unit test to test writing and retrieving
eigenvalues and associated uncertainties
2019-07-02 14:52:10 -05:00
guillaume
9de6108ac0 BUG fix, indexing of nuclides in reactionrates arrays was being ignored + cleaned debugging lines + added plots to examples 2018-06-03 21:21:39 -04:00
guillaume
d4ff02d2a2 first round of adapting tests 2018-05-30 13:39:04 -04:00
Paul Romano
92697ec06e Introduce ResultsList class to replace scattered functions 2018-02-21 15:36:27 -06:00
Paul Romano
f3758e5330 Fix broken tests on Py3.4, 3.5 2018-02-20 09:30:50 -06:00
Paul Romano
5c4ea0d640 Replace Chain.index_reaction with Chain.reactions.
Now the ReactionRates controls all the indexing needed to build a depletion
matrix. Got all tests fixed here too. Decided to add get/set methods on
ReactionRates which take strings.
2018-02-17 14:31:04 -06:00
Paul Romano
8a41bac17a Removing a few attributes on OpenMCOperator 2018-02-15 14:31:03 -06:00
Paul Romano
998a562a33 Have Operator() return a namedtuple (simplifies integrators quite a bit) 2018-02-15 09:47:37 -06:00
Paul Romano
730623246f Rename results.h5 -> depletion_results.h5. Use /materials in HDF5 file 2018-02-14 15:36:00 -06:00
Paul Romano
dba919c610 Convert deplete unit tests to use pytest 2018-02-14 11:24:24 -06:00
Paul Romano
8549f22e14 Move depletion tests into normal regression/unit test directories 2018-02-13 15:08:05 -06:00
Renamed from tests/deplete_tests/test_integrator.py (Browse further)