Skip to content

Commit 9a07fdc

Browse files
authored
Merge pull request #28 from wdhawkins/spherical_benchmark_boundary_update
Updating spherical benchmarks to use new boundary interface
2 parents 40ddd89 + b6b99d7 commit 9a07fdc

6 files changed

Lines changed: 6 additions & 42 deletions

File tree

Six_1g_spherical_benchmarks/Problem_1.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
partitioner=PETScGraphPartitioner(type='parmetis'),
3333
)
3434
grid = meshgen.Execute()
35+
grid.SetUniformBoundaryID("sphere_surface")
3536

3637
# Get measured volumes
3738
volumes_per_block = grid.ComputeVolumePerBlockID()
@@ -103,12 +104,7 @@
103104
],
104105
scattering_order=0,
105106
boundary_conditions=[
106-
{"name": "xmin", "type": "isotropic", "group_strength": bsrc},
107-
{"name": "xmax", "type": "isotropic", "group_strength": bsrc},
108-
{"name": "ymin", "type": "isotropic", "group_strength": bsrc},
109-
{"name": "ymax", "type": "isotropic", "group_strength": bsrc},
110-
{"name": "zmin", "type": "isotropic", "group_strength": bsrc},
111-
{"name": "zmax", "type": "isotropic", "group_strength": bsrc},
107+
{"name": "sphere_surface", "type": "isotropic", "group_strength": bsrc},
112108
],
113109
)
114110

Six_1g_spherical_benchmarks/Problem_2.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,6 @@
6868
],
6969
scattering_order=0,
7070
volumetric_sources=[mg_src],
71-
boundary_conditions=[
72-
{"name": "xmin", "type": "vacuum"},
73-
{"name": "xmax", "type": "vacuum"},
74-
{"name": "ymin", "type": "vacuum"},
75-
{"name": "ymax", "type": "vacuum"},
76-
{"name": "zmin", "type": "vacuum"},
77-
{"name": "zmax", "type": "vacuum"}
78-
],
7971
)
8072

8173
ss_solver = SteadyStateSourceSolver(problem=phys)

Six_1g_spherical_benchmarks/Problem_3.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,6 @@
6565
],
6666
scattering_order=0,
6767
volumetric_sources=[mg_src],
68-
boundary_conditions=[
69-
{"name": "xmin", "type": "vacuum"},
70-
{"name": "xmax", "type": "vacuum"},
71-
{"name": "ymin", "type": "vacuum"},
72-
{"name": "ymax", "type": "vacuum"},
73-
{"name": "zmin", "type": "vacuum"},
74-
{"name": "zmax", "type": "vacuum"},
75-
],
7668
)
7769

7870
ss_solver = SteadyStateSourceSolver(problem=phys)

Six_1g_spherical_benchmarks/Problem_4.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
partitioner=PETScGraphPartitioner(type='parmetis'),
3232
)
3333
grid = meshgen.Execute()
34+
grid.SetUniformBoundaryID("sphere_surface")
3435

3536
# Create XS
3637
num_groups = 1
@@ -67,12 +68,7 @@
6768
],
6869
scattering_order=0,
6970
boundary_conditions=[
70-
{"name": "xmin", "type": "isotropic", "group_strength": bsrc},
71-
{"name": "xmax", "type": "isotropic", "group_strength": bsrc},
72-
{"name": "ymin", "type": "isotropic", "group_strength": bsrc},
73-
{"name": "ymax", "type": "isotropic", "group_strength": bsrc},
74-
{"name": "zmin", "type": "isotropic", "group_strength": bsrc},
75-
{"name": "zmax", "type": "isotropic", "group_strength": bsrc},
71+
{"name": "sphere_surface", "type": "isotropic", "group_strength": bsrc},
7672
],
7773
)
7874

Six_1g_spherical_benchmarks/Problem_5.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
partitioner=PETScGraphPartitioner(type='parmetis'),
3232
)
3333
grid = meshgen.Execute()
34+
grid.SetUniformBoundaryID("sphere_surface")
3435

3536
# Create XS
3637
num_groups = 1
@@ -67,12 +68,7 @@
6768
],
6869
scattering_order=0,
6970
boundary_conditions=[
70-
{"name": "xmin", "type": "isotropic", "group_strength": bsrc},
71-
{"name": "xmax", "type": "isotropic", "group_strength": bsrc},
72-
{"name": "ymin", "type": "isotropic", "group_strength": bsrc},
73-
{"name": "ymax", "type": "isotropic", "group_strength": bsrc},
74-
{"name": "zmin", "type": "isotropic", "group_strength": bsrc},
75-
{"name": "zmax", "type": "isotropic", "group_strength": bsrc},
71+
{"name": "sphere_surface", "type": "isotropic", "group_strength": bsrc},
7672
],
7773
)
7874

Six_1g_spherical_benchmarks/Problem_6.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,6 @@
6868
],
6969
scattering_order=0,
7070
volumetric_sources=[mg_src],
71-
boundary_conditions=[
72-
{"name": "xmin", "type": "vacuum"},
73-
{"name": "xmax", "type": "vacuum"},
74-
{"name": "ymin", "type": "vacuum"},
75-
{"name": "ymax", "type": "vacuum"},
76-
{"name": "zmin", "type": "vacuum"},
77-
{"name": "zmax", "type": "vacuum"},
78-
],
7971
)
8072

8173
ss_solver = SteadyStateSourceSolver(problem=phys)

0 commit comments

Comments
 (0)