Hello @Jarret,
One way to do it is by simply adding lines in Integrator.integrate()
function in deplete/abc.py
. Probably will be something like this:
for i, (dt, source_rate) in enumerate(self):
if output and comm.rank == 0:
print(f"[openmc.deplete] t={t} s, dt={dt} s, source={source_rate}")
tickTransport = perf_counter()
# Solve transport equation (or obtain result from restart)
if i > 0 or self.operator.prev_res is None:
n, res = self._get_bos_data_from_operator(i, source_rate, n)
else:
n, res = self._get_bos_data_from_restart(source_rate, n)
tockTransport = perf_counter()
# Solve Bateman equations over time interval
proc_time, n_list, res_list = self(n, res.rates, dt, source_rate, i)
# Insert BOS concentration, transport results
n_list.insert(0, n)
res_list.insert(0, res)
# Remove actual EOS concentration for next step
n = n_list.pop()
tockDepletion = perf_counter()
print(f"Transport time = {tockTransport-tickTransport}s\nDepletion time = {tockDepletion - tockTransport}s")
StepResult.save(self.operator, n_list, res_list, [t, t + dt],
source_rate, self._i_res + i, proc_time, path)
t += dt