mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 13:15:39 -04:00
Update example Python inputs, fix exporting to XML for <cell>
This commit is contained in:
parent
6beee729cb
commit
f093429ced
7 changed files with 46 additions and 61 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import openmc
|
||||
from openmc.region import Intersection
|
||||
|
||||
|
||||
###############################################################################
|
||||
|
|
@ -67,20 +68,16 @@ cell7 = openmc.Cell(cell_id=301, name='cell 7')
|
|||
cell8 = openmc.Cell(cell_id=302, name='cell 8')
|
||||
|
||||
# Register Surfaces with Cells
|
||||
cell1.add_surface(left, halfspace=+1)
|
||||
cell1.add_surface(right, halfspace=-1)
|
||||
cell1.add_surface(bottom, halfspace=+1)
|
||||
cell1.add_surface(top, halfspace=-1)
|
||||
cell2.add_surface(left, halfspace=+1)
|
||||
cell2.add_surface(right, halfspace=-1)
|
||||
cell2.add_surface(bottom, halfspace=+1)
|
||||
cell2.add_surface(top, halfspace=-1)
|
||||
cell3.add_surface(fuel1, halfspace=-1)
|
||||
cell4.add_surface(fuel1, halfspace=+1)
|
||||
cell5.add_surface(fuel2, halfspace=-1)
|
||||
cell6.add_surface(fuel2, halfspace=+1)
|
||||
cell7.add_surface(fuel3, halfspace=-1)
|
||||
cell8.add_surface(fuel3, halfspace=+1)
|
||||
cell1.region = Intersection(left.positive, right.negative,
|
||||
bottom.positive, top.negative)
|
||||
cell2.region = Intersection(left.positive, right.negative,
|
||||
bottom.positive, top.negative)
|
||||
cell3.region = fuel1.negative
|
||||
cell4.region = fuel1.positive
|
||||
cell5.region = fuel2.negative
|
||||
cell6.region = fuel2.positive
|
||||
cell7.region = fuel3.negative
|
||||
cell8.region = fuel3.positive
|
||||
|
||||
# Register Materials with Cells
|
||||
cell3.fill = fuel
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue