mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Merge pull request #1399 from rockfool/triso_lattice
TRISO geometry genetration improvement
This commit is contained in:
commit
4ba8568f08
1 changed files with 7 additions and 3 deletions
|
|
@ -827,13 +827,17 @@ def create_triso_lattice(trisos, lower_left, pitch, shape, background):
|
|||
triso_locations = {idx: [] for idx in indices}
|
||||
for t in trisos:
|
||||
for idx in t.classify(lattice):
|
||||
if idx in sorted(triso_locations):
|
||||
if idx in triso_locations:
|
||||
# Create copy of TRISO particle with materials preserved and
|
||||
# different cell/surface IDs
|
||||
t_copy = copy.deepcopy(t)
|
||||
t_copy = copy.copy(t)
|
||||
t_copy.id = None
|
||||
t_copy.fill = t.fill
|
||||
t_copy._surface.id = None
|
||||
t_copy._surface = openmc.Sphere(r=t._surface.r,
|
||||
x0=t._surface.x0,
|
||||
y0=t._surface.y0,
|
||||
z0=t._surface.z0)
|
||||
t_copy.region = -t_copy._surface
|
||||
triso_locations[idx].append(t_copy)
|
||||
else:
|
||||
warnings.warn('TRISO particle is partially or completely '
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue