Again, you should have only a single call to pack_spheres
that generates the pebble locations for both fuel/moderator pebbles. Then your pack
variable, which is a list, needs to include both TRISO(..., fill=fuel_spheres_univ)
and TRISO(..., fill=moderator_spheres_univ)
wherever you want fuel and moderator pebbles to show up. It is up to you how you want to split up the pebble locations that are returned by pack_spheres
. For example if you wanted to randomly pick fuel/moderator with probability 0.5:
pebbles = openmc.model.pack_spheres(...)
pack = []
for c in pebbles:
if random.random() < 0.5:
pack.append(openmc.model.TRISO(fill=fuel_spheres_univ, ...))
else:
pack.append(openmc.model.TRISO(fill=moderator_spheres_univ, ...))
This is just one way you could go about it.