-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpair_production.py
More file actions
39 lines (30 loc) · 1.28 KB
/
pair_production.py
File metadata and controls
39 lines (30 loc) · 1.28 KB
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
38
39
"""Photon transport OpenMC model stressing pair production."""
import openmc
import numpy as np
import openmc
BENCHMARK_NAME = "PairProduction"
def build_model() -> openmc.Model:
lead = openmc.Material(name="lead")
lead.set_density("g/cm3", 11.34)
lead.add_element("Pb", 1.0)
# Geometry is a single lead sphere. The radius is not so large that
# secondary photons continue to scatter many times before escaping.
sphere = openmc.Sphere(r=20, boundary_type="vacuum")
geometry = openmc.Geometry([openmc.Cell(fill=lead, region=-sphere)])
# Isotropic point source of 10 MeV photons at the origin. Pair production
# dominates at very high energies
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(1.0e9)
source.particle = "photon"
# Settings with fixed source run and uniform source
settings = openmc.Settings()
settings.batches = 10
settings.particles = 100_000
settings.run_mode = "fixed source"
settings.source = source
settings.photon_transport = True
settings.electron_treatment = "led"
settings.atomic_relaxation = False
return openmc.Model(geometry=geometry, settings=settings)