Skip to content

Commit

Permalink
run_depcode() -> run_depletion_step()
Browse files Browse the repository at this point in the history
- adjust docstrings
- associated changes in other files
  • Loading branch information
yardasol committed Nov 7, 2022
1 parent 053b64a commit 93c0a1c
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 28 deletions.
2 changes: 2 additions & 0 deletions doc/releasenotes/v0.5.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ Python API Changes
- ``read_depcode_step_param()`` → ``read_neutronics_parameters()``
- ``param`` → ``neutronics_parameters``
- ``read_dep_comp()`` → ``read_depleted_materials()``
- ``run_depcode()`` → ``run_depletion_step()``

- ``DepcodeSerpent`` → ``SerpentDepcode``

Expand All @@ -130,6 +131,7 @@ Python API Changes
- ``param`` → ``neutronics_parameters``
- ``read_dep_comp()`` → ``read_depleted_materials()``
- ``create_nuclide_name_map_zam_to_serpent()`` → ``map_nuclide_code_zam_to_serpent()``
- ``run_depcode()`` → ``run_depletion_step()``

- ``OpenMCDepcode`` is a ``Depcode`` subclass that interfaces with ``openmc``. This class implements the following functions
- ``run_depcode()``
Expand Down
4 changes: 2 additions & 2 deletions saltproc/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ def read_depleted_materials(self, read_at_end=False):
"""

@abstractmethod
def run_depcode(self, cores, nodes):
"""Runs depletion code as a subprocess with the given parameters.
def run_depletion_step(self, cores, nodes):
"""Runs a depletion step as a subprocess with the given parameters.
Parameters
----------
Expand Down
2 changes: 1 addition & 1 deletion saltproc/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def run():
simulation.sim_depcode.write_depcode_input(msr,
dep_step,
simulation.restart_flag)
depcode.run_depcode(cores, nodes)
depcode.run_depletion_step(cores, nodes)
if dep_step == 0 and simulation.restart_flag is False: # First step
# Read general simulation data which never changes
simulation.store_run_init_info()
Expand Down
4 changes: 2 additions & 2 deletions saltproc/openmc_depcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ def read_depleted_materials(self, read_at_end=False):
"""

def run_depcode(self, cores, nodes):
"""Runs OpenMC depletion simulation as a subprocess with the given
def run_depletion_step(self, cores, nodes):
"""Runs a depletion step in OpenMC as a subprocess with the given
parameters.
Parameters
Expand Down
25 changes: 4 additions & 21 deletions saltproc/serpent_depcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,9 @@ def replace_burnup_parameters(
current_depstep))
return template_data

def run_depcode(self, cores, nodes):
"""Runs Serpent2 as a subprocess with the given parameters.
def run_depletion_step(self, cores, nodes):
"""Runs a depletion step in Serpent2 as a subprocess with the given
parameters.
Parameters
----------
Expand All @@ -422,25 +423,7 @@ def run_depcode(self, cores, nodes):
"""

if self.exec_path.startswith('/projects/sciteam/bahg/'): # check if BW
args = (
'aprun',
'-n',
str(nodes),
'-d', str(cores),
self.exec_path,
'-omp',
str(cores),
self.iter_inputfile)
elif self.exec_path.startswith('/apps/exp_ctl/'): # check if Falcon
args = (
'mpiexec',
self.exec_path,
self.iter_inputfile,
'-omp',
str(18))
else:
args = (self.exec_path, '-omp', str(cores), self.iter_inputfile)
args = (self.exec_path, '-omp', str(cores), self.iter_inputfile)
print('Running %s' % (self.codename))
try:
subprocess.check_output(
Expand Down
4 changes: 2 additions & 2 deletions tests/integration_tests/run_no_reprocessing/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def runsim_no_reproc(simulation, reactor, nsteps):
reactor,
dep_step,
False)
simulation.sim_depcode.run_depcode(
simulation.sim_depcode.run_depletion_step(
simulation.core_number,
simulation.node_number)
# Read general simulation data which never changes
Expand All @@ -94,7 +94,7 @@ def runsim_no_reproc(simulation, reactor, nsteps):
# Finish of First step
# Main sequence
else:
simulation.sim_depcode.run_depcode(
simulation.sim_depcode.run_depletion_step(
simulation.core_number,
simulation.node_number)
mats = simulation.sim_depcode.read_depleted_materials(
Expand Down

0 comments on commit 93c0a1c

Please sign in to comment.