From 20ce641eb32f60ddedda92180158f464647a98ac Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Thu, 5 Sep 2019 14:05:23 -0500 Subject: [PATCH] Upgrade pincell depletion python examples Relied on function-based depletion rather than the new classes. Now uses ResultsList.from_hdf5 to obtain the results information --- examples/python/pincell_depletion/restart_depletion.py | 5 +++-- examples/python/pincell_depletion/run_depletion.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/python/pincell_depletion/restart_depletion.py b/examples/python/pincell_depletion/restart_depletion.py index d5a0e2234..013a2469e 100644 --- a/examples/python/pincell_depletion/restart_depletion.py +++ b/examples/python/pincell_depletion/restart_depletion.py @@ -61,14 +61,15 @@ op = openmc.deplete.Operator(geometry, settings_file, chain_file, previous_results) # Perform simulation using the predictor algorithm -openmc.deplete.integrator.predictor(op, time_steps, power) +integrator = openmc.deplete.PredictorIntegrator(op, time_steps, power) +integrator.integrate() ############################################################################### # Read depletion calculation results ############################################################################### # Open results file -results = openmc.deplete.ResultsList("depletion_results.h5") +results = openmc.deplete.ResultsList.from_hdf5("depletion_results.h5") # Obtain K_eff as a function of time time, keff = results.get_eigenvalue() diff --git a/examples/python/pincell_depletion/run_depletion.py b/examples/python/pincell_depletion/run_depletion.py index 5a018cda1..9933edd48 100644 --- a/examples/python/pincell_depletion/run_depletion.py +++ b/examples/python/pincell_depletion/run_depletion.py @@ -132,14 +132,15 @@ settings_file.entropy_mesh = entropy_mesh op = openmc.deplete.Operator(geometry, settings_file, chain_file) # Perform simulation using the predictor algorithm -openmc.deplete.integrator.predictor(op, time_steps, power) +integrator = openmc.deplete.PredictorIntegrator(op, time_steps, power) +integrator.integrate() ############################################################################### # Read depletion calculation results ############################################################################### # Open results file -results = openmc.deplete.ResultsList("depletion_results.h5") +results = openmc.deplete.ResultsList.from_hdf5("depletion_results.h5") # Obtain K_eff as a function of time time, keff = results.get_eigenvalue()