Skip to content

Commit

Permalink
rectangular_prism
Browse files Browse the repository at this point in the history
  • Loading branch information
aprilnovak committed Jun 27, 2024
1 parent a079712 commit a6b5dee
Show file tree
Hide file tree
Showing 14 changed files with 183 additions and 183 deletions.
16 changes: 8 additions & 8 deletions test/tests/neutronics/feedback/temperature/csg_1/geometry.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version='1.0' encoding='utf-8'?>
<?xml version='1.0' encoding='UTF-8'?>
<geometry>
<cell id="1" material="1" region="1 -2 3 -4 6 -5" universe="1" />
<surface boundary="vacuum" coeffs="-50.0" id="1" name="minimum x" type="x-plane" />
<surface boundary="vacuum" coeffs="50.0" id="2" name="maximum x" type="x-plane" />
<surface boundary="vacuum" coeffs="-25.0" id="3" name="minimum y" type="y-plane" />
<surface boundary="vacuum" coeffs="25.0" id="4" name="maximum y" type="y-plane" />
<surface boundary="vacuum" coeffs="50.0" id="5" type="z-plane" />
<surface boundary="vacuum" coeffs="0.0" id="6" type="z-plane" />
<cell id="1" material="1" region="1 -2 3 -4 6 -5" universe="1"/>
<surface boundary="vacuum" coeffs="-50.0" id="1" name="minimum x" type="x-plane"/>
<surface boundary="vacuum" coeffs="50.0" id="2" name="maximum x" type="x-plane"/>
<surface boundary="vacuum" coeffs="-25.0" id="3" name="minimum y" type="y-plane"/>
<surface boundary="vacuum" coeffs="25.0" id="4" name="maximum y" type="y-plane"/>
<surface boundary="vacuum" coeffs="50.0" id="5" type="z-plane"/>
<surface boundary="vacuum" coeffs="0.0" id="6" type="z-plane"/>
</geometry>
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
mats = openmc.Materials([a0])
mats.export_to_xml()

prism = openmc.rectangular_prism(100.0, 50.0, boundary_type='vacuum')
prism = openmc.model.RectangularPrism(100.0, 50.0, boundary_type='vacuum')
top = openmc.ZPlane(z0=50.0, boundary_type='vacuum')
bot = openmc.ZPlane(z0=00.0, boundary_type='vacuum')

cell1 = openmc.Cell(region=prism & +bot & -top, fill=a0)
cell1 = openmc.Cell(region=-prism & +bot & -top, fill=a0)

geom = openmc.Geometry([cell1])
geom.export_to_xml()
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<materials>
<material depletable="true" id="1">
<density units="kg/m3" value="1000.0" />
<nuclide ao="1.0" name="U235" />
<density units="kg/m3" value="1000.0"/>
<nuclide ao="1.0" name="U235"/>
</material>
</materials>
20 changes: 10 additions & 10 deletions test/tests/neutronics/feedback/temperature/csg_2/geometry.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version='1.0' encoding='utf-8'?>
<?xml version='1.0' encoding='UTF-8'?>
<geometry>
<cell id="1" material="1" region="1 -2 3 -4 6 -5 -7" temperature="500.0" universe="1" />
<cell id="2" material="1" region="1 -2 3 -4 6 -5 7" temperature="800.0" universe="1" />
<surface boundary="vacuum" coeffs="-50.0" id="1" name="minimum x" type="x-plane" />
<surface boundary="vacuum" coeffs="50.0" id="2" name="maximum x" type="x-plane" />
<surface boundary="vacuum" coeffs="-25.0" id="3" name="minimum y" type="y-plane" />
<surface boundary="vacuum" coeffs="25.0" id="4" name="maximum y" type="y-plane" />
<surface boundary="vacuum" coeffs="50.0" id="5" type="z-plane" />
<surface boundary="vacuum" coeffs="0.0" id="6" type="z-plane" />
<surface coeffs="0.0" id="7" type="x-plane" />
<cell id="1" material="1" region="1 -2 3 -4 6 -5 -7" temperature="500.0" universe="1"/>
<cell id="2" material="1" region="1 -2 3 -4 6 -5 7" temperature="800.0" universe="1"/>
<surface boundary="vacuum" coeffs="-50.0" id="1" name="minimum x" type="x-plane"/>
<surface boundary="vacuum" coeffs="50.0" id="2" name="maximum x" type="x-plane"/>
<surface boundary="vacuum" coeffs="-25.0" id="3" name="minimum y" type="y-plane"/>
<surface boundary="vacuum" coeffs="25.0" id="4" name="maximum y" type="y-plane"/>
<surface boundary="vacuum" coeffs="50.0" id="5" type="z-plane"/>
<surface boundary="vacuum" coeffs="0.0" id="6" type="z-plane"/>
<surface coeffs="0.0" id="7" type="x-plane"/>
</geometry>
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
mats = openmc.Materials([a0])
mats.export_to_xml()

prism = openmc.rectangular_prism(100.0, 50.0, boundary_type='vacuum')
prism = openmc.model.RectangularPrism(100.0, 50.0, boundary_type='vacuum')
top = openmc.ZPlane(z0=50.0, boundary_type='vacuum')
bot = openmc.ZPlane(z0=00.0, boundary_type='vacuum')
split = openmc.XPlane(x0=0.0)

cell1 = openmc.Cell(region=prism & +bot & -top & -split, fill=a0)
cell2 = openmc.Cell(region=prism & +bot & -top & +split, fill=a0)
cell1 = openmc.Cell(region=-prism & +bot & -top & -split, fill=a0)
cell2 = openmc.Cell(region=-prism & +bot & -top & +split, fill=a0)

cell1.temperature = 500.0
cell2.temperature = 800.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<materials>
<material depletable="true" id="1">
<density units="kg/m3" value="1000.0" />
<nuclide ao="1.0" name="U235" />
<density units="kg/m3" value="1000.0"/>
<nuclide ao="1.0" name="U235"/>
</material>
</materials>
92 changes: 46 additions & 46 deletions test/tests/neutronics/feedback/triso/cache/geometry.xml
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
<?xml version='1.0' encoding='utf-8'?>
<?xml version='1.0' encoding='UTF-8'?>
<geometry>
<cell id="1" material="1" region="-5" temperature="1000.0" universe="1" />
<cell id="2" material="2" region="5" temperature="1000.0" universe="1" />
<cell fill="1" id="3" region="6 -7 1 -2 3 -4" universe="10" />
<cell id="4" material="1" region="-5" temperature="1000.0" universe="2" />
<cell id="5" material="2" region="5" temperature="1000.0" universe="2" />
<cell fill="2" id="6" region="7 -8 1 -2 3 -4" universe="10" />
<cell id="7" material="1" region="-5" temperature="1000.0" universe="3" />
<cell id="8" material="2" region="5" temperature="1000.0" universe="3" />
<cell fill="3" id="9" region="8 -9 1 -2 3 -4" universe="10" />
<cell id="10" material="1" region="-5" temperature="1000.0" universe="4" />
<cell id="11" material="2" region="5" temperature="1000.0" universe="4" />
<cell fill="4" id="12" region="9 -10 1 -2 3 -4" universe="10" />
<cell id="13" material="1" region="-5" temperature="1000.0" universe="5" />
<cell id="14" material="2" region="5" temperature="1000.0" universe="5" />
<cell fill="5" id="15" region="10 -11 1 -2 3 -4" universe="10" />
<cell id="16" material="1" region="-5" temperature="1000.0" universe="6" />
<cell id="17" material="2" region="5" temperature="1000.0" universe="6" />
<cell fill="6" id="18" region="11 -12 1 -2 3 -4" universe="10" />
<cell id="19" material="1" region="-5" temperature="1000.0" universe="7" />
<cell id="20" material="2" region="5" temperature="1000.0" universe="7" />
<cell fill="7" id="21" region="12 -13 1 -2 3 -4" universe="10" />
<cell id="22" material="1" region="-5" temperature="1000.0" universe="8" />
<cell id="23" material="2" region="5" temperature="1000.0" universe="8" />
<cell fill="8" id="24" region="13 -14 1 -2 3 -4" universe="10" />
<cell id="25" material="1" region="-5" temperature="1000.0" universe="9" />
<cell id="26" material="2" region="5" temperature="1000.0" universe="9" />
<cell fill="9" id="27" region="14 -15 1 -2 3 -4" universe="10" />
<cell id="28" material="1" region="-5 15 -16 1 -2 3 -4" temperature="1000.0" universe="10" />
<cell id="29" material="2" region="5 15 -16 1 -2 3 -4" temperature="1000.0" universe="10" />
<surface boundary="reflective" coeffs="-10.0" id="1" name="minimum x" type="x-plane" />
<surface boundary="reflective" coeffs="10.0" id="2" name="maximum x" type="x-plane" />
<surface boundary="reflective" coeffs="-10.0" id="3" name="minimum y" type="y-plane" />
<surface boundary="reflective" coeffs="10.0" id="4" name="maximum y" type="y-plane" />
<surface coeffs="0.0" id="5" type="x-plane" />
<surface boundary="reflective" coeffs="0.0" id="6" type="z-plane" />
<surface coeffs="10.0" id="7" type="z-plane" />
<surface coeffs="20.0" id="8" type="z-plane" />
<surface coeffs="30.0" id="9" type="z-plane" />
<surface coeffs="40.0" id="10" type="z-plane" />
<surface coeffs="50.0" id="11" type="z-plane" />
<surface coeffs="60.0" id="12" type="z-plane" />
<surface coeffs="70.0" id="13" type="z-plane" />
<surface coeffs="80.0" id="14" type="z-plane" />
<surface coeffs="90.0" id="15" type="z-plane" />
<surface boundary="reflective" coeffs="100.0" id="16" type="z-plane" />
<cell id="1" material="1" region="-5" temperature="1000.0" universe="1"/>
<cell id="2" material="2" region="5" temperature="1000.0" universe="1"/>
<cell fill="1" id="3" region="6 -7 1 -2 3 -4" universe="10"/>
<cell id="4" material="1" region="-5" temperature="1000.0" universe="2"/>
<cell id="5" material="2" region="5" temperature="1000.0" universe="2"/>
<cell fill="2" id="6" region="7 -8 1 -2 3 -4" universe="10"/>
<cell id="7" material="1" region="-5" temperature="1000.0" universe="3"/>
<cell id="8" material="2" region="5" temperature="1000.0" universe="3"/>
<cell fill="3" id="9" region="8 -9 1 -2 3 -4" universe="10"/>
<cell id="10" material="1" region="-5" temperature="1000.0" universe="4"/>
<cell id="11" material="2" region="5" temperature="1000.0" universe="4"/>
<cell fill="4" id="12" region="9 -10 1 -2 3 -4" universe="10"/>
<cell id="13" material="1" region="-5" temperature="1000.0" universe="5"/>
<cell id="14" material="2" region="5" temperature="1000.0" universe="5"/>
<cell fill="5" id="15" region="10 -11 1 -2 3 -4" universe="10"/>
<cell id="16" material="1" region="-5" temperature="1000.0" universe="6"/>
<cell id="17" material="2" region="5" temperature="1000.0" universe="6"/>
<cell fill="6" id="18" region="11 -12 1 -2 3 -4" universe="10"/>
<cell id="19" material="1" region="-5" temperature="1000.0" universe="7"/>
<cell id="20" material="2" region="5" temperature="1000.0" universe="7"/>
<cell fill="7" id="21" region="12 -13 1 -2 3 -4" universe="10"/>
<cell id="22" material="1" region="-5" temperature="1000.0" universe="8"/>
<cell id="23" material="2" region="5" temperature="1000.0" universe="8"/>
<cell fill="8" id="24" region="13 -14 1 -2 3 -4" universe="10"/>
<cell id="25" material="1" region="-5" temperature="1000.0" universe="9"/>
<cell id="26" material="2" region="5" temperature="1000.0" universe="9"/>
<cell fill="9" id="27" region="14 -15 1 -2 3 -4" universe="10"/>
<cell id="28" material="1" region="-5 15 -16 1 -2 3 -4" temperature="1000.0" universe="10"/>
<cell id="29" material="2" region="5 15 -16 1 -2 3 -4" temperature="1000.0" universe="10"/>
<surface boundary="reflective" coeffs="-10.0" id="1" name="minimum x" type="x-plane"/>
<surface boundary="reflective" coeffs="10.0" id="2" name="maximum x" type="x-plane"/>
<surface boundary="reflective" coeffs="-10.0" id="3" name="minimum y" type="y-plane"/>
<surface boundary="reflective" coeffs="10.0" id="4" name="maximum y" type="y-plane"/>
<surface coeffs="0.0" id="5" type="x-plane"/>
<surface boundary="reflective" coeffs="0.0" id="6" type="z-plane"/>
<surface coeffs="10.0" id="7" type="z-plane"/>
<surface coeffs="20.0" id="8" type="z-plane"/>
<surface coeffs="30.0" id="9" type="z-plane"/>
<surface coeffs="40.0" id="10" type="z-plane"/>
<surface coeffs="50.0" id="11" type="z-plane"/>
<surface coeffs="60.0" id="12" type="z-plane"/>
<surface coeffs="70.0" id="13" type="z-plane"/>
<surface coeffs="80.0" id="14" type="z-plane"/>
<surface coeffs="90.0" id="15" type="z-plane"/>
<surface boundary="reflective" coeffs="100.0" id="16" type="z-plane"/>
</geometry>
18 changes: 9 additions & 9 deletions test/tests/neutronics/feedback/triso/cache/materials.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?xml version='1.0' encoding='utf-8'?>
<materials>
<material depletable="true" id="1" name="fuel">
<density units="kg/m3" value="1000.0" />
<nuclide ao="0.0001" name="U235" />
<nuclide ao="0.4998105" name="O16" />
<nuclide ao="0.0001895" name="O17" />
<density units="kg/m3" value="1000.0"/>
<nuclide ao="0.0001" name="U235"/>
<nuclide ao="0.4998105" name="O16"/>
<nuclide ao="0.0001895" name="O17"/>
</material>
<material id="2" name="water">
<density units="kg/m3" value="100.0" />
<nuclide ao="1.99968852" name="H1" />
<nuclide ao="0.00031148" name="H2" />
<nuclide ao="0.999621" name="O16" />
<nuclide ao="0.000379" name="O17" />
<density units="kg/m3" value="100.0"/>
<nuclide ao="1.99968852" name="H1"/>
<nuclide ao="0.00031148" name="H2"/>
<nuclide ao="0.999621" name="O16"/>
<nuclide ao="0.000379" name="O17"/>
</material>
</materials>
4 changes: 2 additions & 2 deletions test/tests/neutronics/feedback/triso/cache/settings.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version='1.0' encoding='utf-8'?>
<?xml version='1.0' encoding='UTF-8'?>
<settings>
<run_mode>eigenvalue</run_mode>
<particles>1000</particles>
<batches>10</batches>
<inactive>5</inactive>
<source strength="1.0">
<source particle="neutron" strength="1.0" type="independent">
<space type="box">
<parameters>-10.0 -10.0 0.0 10.0 10.0 100.0</parameters>
</space>
Expand Down
8 changes: 4 additions & 4 deletions test/tests/neutronics/feedback/triso/cache/unit_cell.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
water.add_element('O', 1.0)
water.set_density('kg/m3', 100.0)

outer = openmc.rectangular_prism(l, l, boundary_type='reflective')
outer = openmc.model.RectangularPrism(l, l, boundary_type='reflective')
split = openmc.XPlane(x0=0.0)
axial_coords = np.linspace(0.0, h, n + 1)

Expand All @@ -59,9 +59,9 @@
layer = +axial_planes[i] & -axial_planes[i + 1]

if (i == n - 1):
fuel_cell = openmc.Cell(region=-split & layer & outer, fill=fuel)
fuel_cell = openmc.Cell(region=-split & layer & -outer, fill=fuel)
fuel_cell.temperature = T
water_cell = openmc.Cell(region=+split & layer & outer, fill=water)
water_cell = openmc.Cell(region=+split & layer & -outer, fill=water)
water_cell.temperature = T
c.append(fuel_cell)
c.append(water_cell)
Expand All @@ -71,7 +71,7 @@
water_cell = openmc.Cell(region=+split, fill=water)
water_cell.temperature = T
univ = openmc.Universe(cells=[fuel_cell, water_cell])
c.append(openmc.Cell(region=layer & outer, fill=univ))
c.append(openmc.Cell(region=layer & -outer, fill=univ))

U = openmc.Universe(cells=c)
model.geometry = openmc.Geometry(U)
Expand Down
Loading

0 comments on commit a6b5dee

Please sign in to comment.