-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinfinite_medium.py
More file actions
32 lines (23 loc) · 950 Bytes
/
infinite_medium.py
File metadata and controls
32 lines (23 loc) · 950 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
"""Infinite-medium UO2 eigenvalue OpenMC model."""
from __future__ import annotations
import openmc
BENCHMARK_NAME = "InfiniteMediumEigenvalue"
def build_model() -> openmc.Model:
fuel = openmc.Material(name="UO2 fuel")
fuel.add_element("U", 1, enrichment=4.5)
fuel.add_element("O", 2)
fuel.set_density("g/cm3", 10.5)
boundary = openmc.Sphere(r=100.0, boundary_type="vacuum")
cell = openmc.Cell(name="fuel cell", fill=fuel, region=-boundary)
geometry = openmc.Geometry([cell])
source = openmc.IndependentSource()
source.space = openmc.stats.Point((0.0, 0.0, 0.0))
source.angle = openmc.stats.Isotropic()
source.energy = openmc.stats.delta_function(2.0e6)
settings = openmc.Settings()
settings.batches = 20
settings.inactive = 5
settings.particles = 1000
settings.run_mode = "eigenvalue"
settings.source = source
return openmc.Model(geometry=geometry, settings=settings)