Make sure boundary_type is passed as a keyword argument

This commit is contained in:
Paul Romano 2020-03-20 15:20:25 -05:00
parent 3e995e0df6
commit d8ef73d037
8 changed files with 32 additions and 32 deletions

View file

@ -253,8 +253,8 @@ def hexagonal_prism(edge_length=1., orientation='y', origin=(0., 0.),
x, y = origin
if orientation == 'y':
right = XPlane(x + sqrt(3.)/2*l, boundary_type)
left = XPlane(x - sqrt(3.)/2*l, boundary_type)
right = XPlane(x + sqrt(3.)/2*l, boundary_type=boundary_type)
left = XPlane(x - sqrt(3.)/2*l, boundary_type=boundary_type)
c = sqrt(3.)/3.
# y = -x/sqrt(3) + a

View file

@ -25,12 +25,12 @@ class AsymmetricLatticeTestHarness(PyAPITestHarness):
[water, water, water]]
# Create bounding surfaces
min_x = openmc.XPlane(-32.13, 'reflective')
max_x = openmc.XPlane(+32.13, 'reflective')
min_y = openmc.YPlane(-32.13, 'reflective')
max_y = openmc.YPlane(+32.13, 'reflective')
min_z = openmc.ZPlane(0, 'reflective')
max_z = openmc.ZPlane(+32.13, 'reflective')
min_x = openmc.XPlane(-32.13, boundary_type='reflective')
max_x = openmc.XPlane(+32.13, boundary_type='reflective')
min_y = openmc.YPlane(-32.13, boundary_type='reflective')
max_y = openmc.YPlane(+32.13, boundary_type='reflective')
min_z = openmc.ZPlane(0, boundary_type='reflective')
max_z = openmc.ZPlane(+32.13, boundary_type='reflective')
# Define root universe
root_univ = openmc.Universe(universe_id=0, name='root universe')

View file

@ -298,12 +298,12 @@ def generate_geometry(n_rings, n_wedges):
lattice.outer = all_water_u
# Bound universe
x_low = openmc.XPlane(-pitch*n_pin/2, 'reflective')
x_high = openmc.XPlane(pitch*n_pin/2, 'reflective')
y_low = openmc.YPlane(-pitch*n_pin/2, 'reflective')
y_high = openmc.YPlane(pitch*n_pin/2, 'reflective')
z_low = openmc.ZPlane(-10, 'reflective')
z_high = openmc.ZPlane(10, 'reflective')
x_low = openmc.XPlane(-pitch*n_pin/2, boundary_type='reflective')
x_high = openmc.XPlane(pitch*n_pin/2, boundary_type='reflective')
y_low = openmc.YPlane(-pitch*n_pin/2, boundary_type='reflective')
y_high = openmc.YPlane(pitch*n_pin/2, boundary_type='reflective')
z_low = openmc.ZPlane(-10, boundary_type='reflective')
z_high = openmc.ZPlane(10, boundary_type='reflective')
# Compute bounding box
lower_left = [-pitch*n_pin/2, -pitch*n_pin/2, -10]

View file

@ -44,11 +44,11 @@ def make_model():
model.materials += [m1, m2, m3, m4]
# Geometry
x0 = openmc.XPlane(-10, 'vacuum')
x0 = openmc.XPlane(-10, boundary_type='vacuum')
x1 = openmc.XPlane(-5)
x2 = openmc.XPlane(0)
x3 = openmc.XPlane(5)
x4 = openmc.XPlane(10, 'vacuum')
x4 = openmc.XPlane(10, boundary_type='vacuum')
root_univ = openmc.Universe()

View file

@ -54,12 +54,12 @@ class TRISOTestHarness(PyAPITestHarness):
inner_univ = openmc.Universe(cells=[c1, c2, c3, c4, c5])
# Define box to contain lattice and to pack TRISO particles in
min_x = openmc.XPlane(-0.5, 'reflective')
max_x = openmc.XPlane(0.5, 'reflective')
min_y = openmc.YPlane(-0.5, 'reflective')
max_y = openmc.YPlane(0.5, 'reflective')
min_z = openmc.ZPlane(-0.5, 'reflective')
max_z = openmc.ZPlane(0.5, 'reflective')
min_x = openmc.XPlane(-0.5, boundary_type='reflective')
max_x = openmc.XPlane(0.5, boundary_type='reflective')
min_y = openmc.YPlane(-0.5, boundary_type='reflective')
max_y = openmc.YPlane(0.5, boundary_type='reflective')
min_z = openmc.ZPlane(-0.5, boundary_type='reflective')
max_z = openmc.ZPlane(0.5, boundary_type='reflective')
box_region = +min_x & -max_x & +min_y & -max_y & +min_z & -max_z
box = openmc.Cell(region=box_region)

View file

@ -108,11 +108,11 @@ def mixed_lattice_model(uo2, water):
[empty_univ, u]
]
xmin = openmc.XPlane(-d, 'periodic')
xmax = openmc.XPlane(d, 'periodic')
xmin = openmc.XPlane(-d, boundary_type='periodic')
xmax = openmc.XPlane(d, boundary_type='periodic')
xmin.periodic_surface = xmax
ymin = openmc.YPlane(-d, 'periodic')
ymax = openmc.YPlane(d, 'periodic')
ymin = openmc.YPlane(-d, boundary_type='periodic')
ymax = openmc.YPlane(d, boundary_type='periodic')
main_cell = openmc.Cell(fill=rect_lattice,
region=+xmin & -xmax & +ymin & -ymax)

View file

@ -27,20 +27,20 @@ def complex_cell(run_in_tmpdir, mpi_intracomm):
model.materials = (u235, u238, zr90, n14)
s1 = openmc.XPlane(-10.0, 'vacuum')
s1 = openmc.XPlane(-10.0, boundary_type='vacuum')
s2 = openmc.XPlane(-7.0)
s3 = openmc.XPlane(-4.0)
s4 = openmc.XPlane(4.0)
s5 = openmc.XPlane(7.0)
s6 = openmc.XPlane(10.0, 'vacuum')
s6 = openmc.XPlane(10.0, boundary_type='vacuum')
s7 = openmc.XPlane(0.0)
s11 = openmc.YPlane(-10.0, 'vacuum')
s11 = openmc.YPlane(-10.0, boundary_type='vacuum')
s12 = openmc.YPlane(-7.0)
s13 = openmc.YPlane(-4.0)
s14 = openmc.YPlane(4.0)
s15 = openmc.YPlane(7.0)
s16 = openmc.YPlane(10.0, 'vacuum')
s16 = openmc.YPlane(10.0, boundary_type='vacuum')
s17 = openmc.YPlane(0.0)
c1 = openmc.Cell(fill=u235)

View file

@ -67,7 +67,7 @@ def test_plane_from_points():
def test_xplane():
s = openmc.XPlane(3., 'reflective')
s = openmc.XPlane(3., boundary_type='reflective')
assert s.x0 == 3.
assert s.boundary_type == 'reflective'
@ -441,7 +441,7 @@ def test_cone():
assert_infinite_bb(s)
# evaluate method
# cos^2(theta) * ((p - p1))**2 - (d @ (p - p1))^2
# cos^2(theta) * ((p - p1))**2 - (d @ (p - p1))^2
# The argument r2 for cones is actually tan^2(theta) so that
# cos^2(theta) = 1 / (1 + r2)
#