-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjetson2d_mc_ww.py
More file actions
37 lines (25 loc) · 972 Bytes
/
jetson2d_mc_ww.py
File metadata and controls
37 lines (25 loc) · 972 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
"""Monte Carlo benchmark (with weight windows) for the Jetson 2D model.
Runs a fixed-source continuous-energy simulation using pre-generated weight
windows from a FW-CADIS random ray solve.
"""
from __future__ import annotations
from pathlib import Path
import openmc
from ._jetson2d import MC_CUSTOM_METRICS, build_base_model
BENCHMARK_NAME = "Jetson2dMcWw"
CUSTOM_METRICS = MC_CUSTOM_METRICS
_WW_PATH = Path(__file__).parent / "weight_windows.h5"
def build_model() -> openmc.Model:
model, mesh, plasma_cell = build_base_model()
# Load pre-generated weight windows
model.settings.weight_windows_file = _WW_PATH
model.settings.weight_window_checkpoints = {
"collision": True,
"surface": True,
}
model.settings.survival_biasing = False
model.settings.weight_windows_on = True
# Adjusted particle counts for variance-reduced run
model.settings.batches = 50
model.settings.particles = 1000
return model