Commit graph

22 commits

Author SHA1 Message Date
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
5adc3b5816
Document special and abstract methods for Integrators 2019-08-07 09:13:14 -05:00
Andrew Johnson
18c4d5f432
Document init parameters and attributes for Integrators 2019-08-07 09:01:43 -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
b9683dbdba
Merge branch 'develop' into integrator-class
Need new travis.yml to pass CI
2019-07-30 15:58:49 -05:00
Andrew Johnson
62865b3a55
Documentation fixes for pin func, depletion helpers 2019-07-29 15:57:29 -05:00
Andrew Johnson
1f3e7fdac1
Remove si_leqi in favor of SI_LEQI_Integrator
The depletion function openmc.deplete.si_leqi has been
removed in favor of the SI_LEQI_Integrator class. The same
depletion scheme can be obtained with the following commands:

   >>> leqi = openmc.deplete.SI_LEQI_Integrator(operator, dt, power)
   >>> leqi.integrate()

The expression can be onlined for compactness.

The si_celi_inner function has been removed completely now,
as the SI_CELI iteration is performed by directly calling
SI_CELI_Integrator.__call__ through the SI_LEQI_Integrator.
This is similar to how the LEQIIntegrator handles the initial steps.

Tests have been updated to use this class, and the class has been
added to the documentation. No pure-function integration
schemes exist anymore.
2019-07-29 10:34:59 -05:00
Andrew Johnson
d28546bcd6
Add SI_Integrator, SI_CELI_Integrator classes; remove si_celi
The si_celi depletion function has been removed. The
SI-CELI method can be implemented with
    >>> from openmc.deplete import SI_CELI_Integrator
    >>> SI_CELI_Integrator(op, dt, power, stages).integrate()

The stages parameter is optional, and defaults to 10 to
be consistent with the previous default for si_celi.

The SI_CELI_Integrator inherits from the new abstract base class
SI_Integrator. There are a few differences in how the SI-based
methods perform the integration.

- The initial, t=0.0, i=0, no restart transport solution is scaled
  by the number of stages.
- The SI methods also do not perform a new transport solution at
  each successive iteration [t>0, i>0]. Instead, the reaction
  rates are pulled from the last stage of the previous step.
- There is no final transport solution once all the depletion
  steps have been taken. The final reaction rates are saved as
  those from the last stage of the last depletion step.

The si_celi function has been removed from documentation and testing,
and replaced with the SI_CELI_Integrator.
2019-07-26 16:58:51 -05:00
Andrew Johnson
39b4d8a1fe
Remove epc_rk4 for EPC_RK4_Integrator class
The function openmc.deplete.epc_rk4 has been removed
in favor of openmc.deplete.EPC_RK4_Integrator. The scheme
can be used with::

    >>> from openmc.deplete import EPC_RK4_Integrator
    >>> EPC_RK4_Integrator(op, dt, power).integrate()

epc_rk4 has been removed from the documentation, and the
EPC_RK4_Integrator class has been added to the depletion
API documentation
2019-07-26 09:49:58 -05:00
Andrew Johnson
9f41dce1d2
Return energy in J/s/source neutron for EnergyHelper
Addressing comments in review for #1278

- Documentation cleanup
- Better naming convention regarding ReactionRateHelper
  results cache
- The power in Operator tally unpacking and normalizing is
  no longer converted to eV/s, since the EnergyHelper.energy
  property is now returned in J/s/source neutron
2019-07-23 08:32:31 -05:00
Andrew Johnson
dae48b77e0
Remove cf4 function for deplete.CF4Integrator
The function openmc.deplete.cf4 has been removed in favor
of openmc.deplete.CF4Integrator. The CF4 integration scheme
can be peformed with

>>> from openmc.deplete import CF4Integrator
>>> CF4Integrator(operator, time, power).integrate()
2019-07-17 17:18:56 -05:00
Andrew Johnson
769f903dbc
Remove celi, leqi functions for CELIIntegrator, LEQIIntegrator
The depletion functions openmc.deplete.celi and
openmc.deplete.leqi hvae been removed in favor of a class-based
approach. The following syntax will replicate the behavior
of the integration schemes:

>>> from openmc.deplete import CELIIntegrator
>>> celi = CELIIntegrator(operator, time, power)
>>> celi.integrate()

The expression can be reduced to a single line:

>>> LEQIIntegrator(operator, time, power).integrate()
2019-07-17 16:46:30 -05:00
Andrew Johnson
f0bb600271
Remove predictor function for deplete.PredictorIntegrator
The depletion function openmc.deplete.predictor has been removed
in favor of a class-based approach. The following syntax will
replicate the behavior of the predictor integration scheme:

>>> from openmc.deplete import PredictorIntegrator
>>> predictor = PredictorIntegrator(operator, time, power)
>>> predictor.integrate()`

The expression can be reduced to a single line:

>>> PredictorIntegrator(operator, time, power).integrate()
2019-07-17 13:39:05 -05:00
Andrew Johnson
f432be0c05
Remove cecm function for deplete.CECMIntegrator
The cecm function has been removed from the python api.
In order to use the cecm integration scheme,
the following class based approach is now expected:

>>> from openmc.deplete import CECMIntegrator
>>> cecm = CECMIntegrator(operator, timesteps, power)
>>> cecm.integrate()

if the integrator is not needed, this above expression can be
one-lined with

>>> CECMIntegrator(operator, timesteps, power).integrate()

Unit tests have been updated to no longer use the cecm function,
and cecm has been removed from documentation.
The CECMIntegrator has been added to documentation.
2019-07-16 11:07:49 -05:00
Andrew Johnson
9cbbc6e6b9
Document abstract and concrete operator helpers 2019-07-05 13:37:12 -05:00
liangjg
760baa43d6 address review comments from @paulromano 2019-01-31 12:01:55 -05:00
liangjg
6f3aeed89a fix test error 2019-01-23 16:53:31 -05:00
liangjg
952bddb61e update doc of openmc.deplete and openmc.Model.deplete 2019-01-21 00:00:05 -05:00
Paul Romano
5993a59196 Address first round of comments on #976 2018-02-27 07:22:27 -06:00
Paul Romano
92697ec06e Introduce ResultsList class to replace scattered functions 2018-02-21 15:36:27 -06:00
Paul Romano
6fac1367ec Improve depletion reference documentation 2018-02-20 14:43:26 -06:00
Paul Romano
a9df0465f0 Start cleaning up documentation 2018-02-19 22:51:53 -06:00