Surface dose calculation

I want to calculate the dose rate on the detector surface, but I have got an error. I would be very happy if you can help me.


det_rect_prism = openmc.model.rectangular_prism(1.3, 1.3, origin=(0.0, 0.0))
det_zmin = openmc.ZPlane(z0=-2.0, boundary_type=‘transmission’)
det_zmax = openmc.ZPlane(z0=+2.0, boundary_type=‘transmission’)

detector_cell = openmc.Cell(fill=cesium_iodide, region=det_rect_prism & +det_zmin & -det_zmax)


environment = -sphere & ~det_rect_prism & +source
environment_cell = openmc.Cell(fill=air, region=environment)

universe = openmc.Universe(cells=[environment_cell, detector_cell, source_cell])


Source

source = openmc.Source()
source.space = openmc.stats.Point(xyz=(5, 0, 0))
source.angle = openmc.stats.Isotropic()
source.energy = openmc.stats.Discrete([0.661e6], [1])
source.particle = ‘photon’
source.strength = 1

Settings

settings = openmc.Settings()
settings.run_mode = ‘fixed source’
settings.source = source
settings.batches = 20
settings.particles = 100000
settings.export_to_xml()

Particle and energy filters

photon_particle_filter = openmc.ParticleFilter([‘photon’])
energies, dose_coeffs = openmc.data.dose_coefficients(‘photon’, ‘AP’)
dose_filter = openmc.EnergyFunctionFilter(energies, dose_coeffs)

Surface filter for detector

detector_surface_filter = openmc.SurfaceFilter(det_rect_prism)

Tallies

tallies = openmc.Tallies()

Dose on the surface of the detector

dose_surface_tally = openmc.Tally(name=‘dose_surface’)
dose_surface_tally.filters = [
photon_particle_filter,
detector_surface_filter,
dose_filter
]
dose_surface_tally.scores = [‘current’]

tallies.append(dose_surface_tally)

Run the simulation

model = openmc.model.Model(
geometry=geometry,
materials=materials,
settings=settings,
tallies=tallies
)

results_filename = model.run()

Open the results file

sp = openmc.StatePoint(results_filename)

Access the tally using pandas dataframes

tally = sp.get_tally(name=‘dose_surface’)
df = tally.get_pandas_dataframe()

tally_result = df[‘mean’].sum()
tally_std_dev = df[‘std. dev.’].sum()

Convert from the tally output units of pSv cm² to pSv by dividing by the surface area of the surface

dose_in_pSv = tally_result

source_activity = 152780 # in decays per second (Bq)
emission_rate = 1 # the number of gammas emitted per decay which is approximately 1 for Cs137
gamma_per_second = source_activity * emission_rate
dose_rate_in_pSv = dose_in_pSv * gamma_per_second
dose_rate_in_μSv = dose_rate_in_pSv * 0.0036

Print results

print('The surface dose = ', dose_rate_in_μSv, ‘micro Sv per second’)

Print results

print('The surface dose = ', dose_rate_in_pSv, ‘pico Sv per second’)