@@ -1416,7 +1419,7 @@ SIREPO.app.directive('geometry3d', function(appState, openmcService, plotting, p
},
template: `
`,
diff --git a/sirepo/package_data/static/js/radia.js b/sirepo/package_data/static/js/radia.js
index 16e7b6d218..fd48b68b59 100644
--- a/sirepo/package_data/static/js/radia.js
+++ b/sirepo/package_data/static/js/radia.js
@@ -2236,7 +2236,7 @@ SIREPO.app.directive('radiaViewerContent', function(appState, geometry, panelSta
template: `
-
+
diff --git a/sirepo/package_data/static/js/sirepo-plotting-vtk.js b/sirepo/package_data/static/js/sirepo-plotting-vtk.js
index 409a636f17..279c4beaf0 100644
--- a/sirepo/package_data/static/js/sirepo-plotting-vtk.js
+++ b/sirepo/package_data/static/js/sirepo-plotting-vtk.js
@@ -1918,7 +1918,6 @@ SIREPO.app.directive('vtkDisplay', function(appState, utilities, $window) {
modelName: '@',
resetDirection: '@',
resetSide: '@',
- showBorder: '@',
},
templateUrl: '/static/html/vtk-display.html' + SIREPO.SOURCE_CACHE_KEY,
controller: function($scope, $element) {
diff --git a/sirepo/package_data/static/json/openmc-schema.json b/sirepo/package_data/static/json/openmc-schema.json
index e20cb10306..eebfe33440 100644
--- a/sirepo/package_data/static/json/openmc-schema.json
+++ b/sirepo/package_data/static/json/openmc-schema.json
@@ -51,6 +51,12 @@
["sum", "sum"],
["macro", "macro"]
],
+ "Estimator": [
+ ["default", "Default"],
+ ["analog", "Analog"],
+ ["tracklength", "Track Length"],
+ ["collision", "Collision"]
+ ],
"EnrichmentType": [
["none", ""],
["ao", "ao"],
@@ -379,7 +385,7 @@
},
"meshFilter": {
"_super": ["_", "model", "filter"],
- "dimension": ["Mesh cell count", "Point3D", [10, 10, 10]],
+ "dimension": ["Mesh cell count", "Size3D", [10, 10, 10]],
"lower_left": ["Mesh lower left [cm]", "Point3D", [-5.0, -5.0, -5.0]],
"upper_right": ["Mesh upper right [cm]", "Point3D", [5.0, 5.0, 5.0]]
},
@@ -530,7 +536,8 @@
"filter4": ["Filter", "Filter", {"_type": "None"}],
"filter5": ["Filter", "Filter", {"_type": "None"}],
"scores": ["Scores", "SimpleListEditor", [], "", "tallyScore"],
- "nuclides": ["Nuclides", "SimpleListEditor", [], "List of nuclides to use when scoring results", "nuclide"]
+ "nuclides": ["Nuclides", "SimpleListEditor", [], "List of nuclides to use when scoring results", "nuclide"],
+ "estimator": ["Estimator", "Estimator", "default", "If Default is selected, OpenMC will automatically select an appropriate estimator based on the tally filters and scores with a preference for \"tracklength\"."]
},
"tallyReport": {
"axis": ["Slice axis", "Axis", "y"],
@@ -884,6 +891,7 @@
"advanced": [
["Main", [
"name",
+ "estimator",
"scores"
]],
["Filters", [
diff --git a/sirepo/package_data/template/openmc/parameters.py.jinja b/sirepo/package_data/template/openmc/parameters.py.jinja
index 6f46ba6a3a..3ed9e90614 100644
--- a/sirepo/package_data/template/openmc/parameters.py.jinja
+++ b/sirepo/package_data/template/openmc/parameters.py.jinja
@@ -14,21 +14,16 @@ def create_geometry():
auto_geom_ids=True,
)
{% if reflectivePlanes_useReflectivePlanes == '1' %}
- # creates an edge of universe boundary surface
- vac_surf = openmc.Sphere(r=10000, boundary_type="vacuum")
{{ planes }}
univ = openmc.Cell(
- region=-vac_surf {{ region }},
- fill=univ,
+ region={{ region }},
+ fill=univ.bounded_universe(),
)
openmc.Geometry([univ]).export_to_xml()
{% elif hasGraveyard %}
openmc.Geometry(univ).export_to_xml()
{% else %}
- graveyard = openmc.Sphere(r=10000, boundary_type="vacuum")
- root = openmc.Universe()
- root.add_cells([openmc.Cell(region=-graveyard, fill=univ)])
- openmc.Geometry(root).export_to_xml()
+ openmc.Geometry(univ.bounded_universe()).export_to_xml()
{% endif %}
diff --git a/sirepo/sim_data/openmc.py b/sirepo/sim_data/openmc.py
index 659b112f5a..edc5b96b5e 100644
--- a/sirepo/sim_data/openmc.py
+++ b/sirepo/sim_data/openmc.py
@@ -109,6 +109,7 @@ def _fix_val(model, field):
dm.energyAnimation.tally = dm.openmcAnimation.tally
dm.energyAnimation.score = dm.openmcAnimation.score
for t in dm.settings.tallies:
+ cls.update_model_defaults(t, "tally")
for i in range(1, sch.constants.maxFilters + 1):
f = t[f"filter{i}"]
y = f._type
diff --git a/sirepo/template/openmc.py b/sirepo/template/openmc.py
index 68b73d4afc..5068c54b0d 100644
--- a/sirepo/template/openmc.py
+++ b/sirepo/template/openmc.py
@@ -892,9 +892,14 @@ def _generate_tally(tally, volumes):
openmc.ParticleFilter([{'"' + '","'.join(v.value for v in f.bins) + '"'}]),
"""
else:
- raise AssertionError("filter not yet implemented: {}".format(f._type))
+ raise AssertionError("Unknown filter selected: {}".format(f._type))
+ if not len(tally.scores):
+ raise AssertionError(f"Tally {tally.name} has no scores defined")
res += f"""]
t{tally._index + 1}.scores = [{','.join(["'" + s.score + "'" for s in tally.scores])}]
+"""
+ if tally.estimator != "default":
+ res += f"""t{tally._index + 1}.estimator = "{tally.estimator}"
"""
if len(tally.nuclides):
res += f"""
@@ -1121,10 +1126,12 @@ def _prep_standard_material_cache():
def _region(data):
res = ""
for i, p in enumerate(data.models.reflectivePlanes.planesList):
+ if res:
+ res += " & "
if p.inside == "1":
- res += f"& +p{i + 1} "
+ res += f"+p{i + 1}"
else:
- res += f"& -p{i + 1} "
+ res += f"-p{i + 1}"
return res