mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Remove manual ID specification
This commit is contained in:
parent
65e182b6f9
commit
aada8cd26a
1 changed files with 9 additions and 10 deletions
|
|
@ -23,16 +23,15 @@ def model(request):
|
|||
# - Innermost sphere to bank surface sources
|
||||
# - Second shell to tally cell flux
|
||||
# - Outermost sphere as vacuum boundary
|
||||
sph_1 = openmc.Sphere(r=1.0, surface_id=1) # Surface to bank/write sources.
|
||||
sph_2 = openmc.Sphere(r=2.0, surface_id=2)
|
||||
sph_3 = openmc.Sphere(r=2.5, surface_id=3)
|
||||
sph_4 = openmc.Sphere(r=4.0, surface_id=4, boundary_type='vacuum')
|
||||
cell_1 = openmc.Cell(1, region=-sph_1)
|
||||
cell_2 = openmc.Cell(2, region=+sph_1&-sph_2)
|
||||
cell_3 = openmc.Cell(3, region=+sph_2&-sph_3) # Cell to tally flux.
|
||||
cell_4 = openmc.Cell(4, region=+sph_3&-sph_4)
|
||||
root = openmc.Universe(universe_id=1,
|
||||
cells=[cell_1, cell_2, cell_3, cell_4])
|
||||
sph_1 = openmc.Sphere(r=1.0) # Surface to bank/write sources.
|
||||
sph_2 = openmc.Sphere(r=2.0)
|
||||
sph_3 = openmc.Sphere(r=2.5)
|
||||
sph_4 = openmc.Sphere(r=4.0, boundary_type='vacuum')
|
||||
cell_1 = openmc.Cell(region=-sph_1)
|
||||
cell_2 = openmc.Cell(region=+sph_1&-sph_2)
|
||||
cell_3 = openmc.Cell(region=+sph_2&-sph_3) # Cell to tally flux.
|
||||
cell_4 = openmc.Cell(region=+sph_3&-sph_4)
|
||||
root = openmc.Universe(cells=[cell_1, cell_2, cell_3, cell_4])
|
||||
openmc_model.geometry = openmc.Geometry(root)
|
||||
|
||||
# Settings
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue