mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Update operator.py
This commit is contained in:
parent
ecbc05ce14
commit
b23488325d
1 changed files with 7 additions and 2 deletions
|
|
@ -309,7 +309,12 @@ class Operator(TransportOperator):
|
|||
# Assign distribmats to cells
|
||||
for cell in self.geometry.get_all_material_cells().values():
|
||||
if cell.fill in distribmats and cell.num_instances > 1:
|
||||
cell.fill = [cell.fill.clone()
|
||||
mat = cell.fill
|
||||
if mat.volume is None:
|
||||
raise RuntimeError("Volume not specified for depletable "
|
||||
"material with ID={}.".format(mat.id))
|
||||
mat.volume /= mat.num_instances
|
||||
cell.fill = [mat.clone()
|
||||
for i in range(cell.num_instances)]
|
||||
|
||||
def _get_burnable_mats(self):
|
||||
|
|
@ -341,7 +346,7 @@ class Operator(TransportOperator):
|
|||
if mat.volume is None:
|
||||
raise RuntimeError("Volume not specified for depletable "
|
||||
"material with ID={}.".format(mat.id))
|
||||
volume[str(mat.id)] = mat.volume/mat.num_instances
|
||||
volume[str(mat.id)] = mat.volume
|
||||
self.heavy_metal += mat.fissionable_mass
|
||||
|
||||
# Make sure there are burnable materials
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue