Dear OpenMC team,
With reference to the thread Normalization of 'damage-energy' score results - #11 by abarun, i am currently trying to run a dagmc enabled model that calculates the dpa for the defect configuration. The execution stops after the call to openmc solver throwing the following error.
| The OpenMC Monte Carlo Code
Copyright | 2011-2022 MIT, UChicago Argonne LLC, and contributors
License | https://docs.openmc.org/en/latest/license.html
Version | 0.13.2
Git SHA1 | 030f73a8690ed19e91806e46c8caf338d252e74a
Date/Time | 2023-03-09 22:42:15
MPI Processes | 1
OpenMP Threads | 1
Reading settings XML file...
Reading cross sections XML file...
Reading materials XML file...
Reading geometry XML file...
Set overlap thickness = 0
Set numerical precision = 0.001
Loading file dagmc.h5m
Initializing the GeomQueryTool...
Using faceting tolerance: 0.001
Building acceleration data structures...
Implicit Complement assumed to be Vacuum
Writing from init_geometry !!!!!
n_cells:2
icell:0, Line 199
icell:0, Line 248
c->material_[0]:1
icell:0, Line 251
Writing from line 259: icell: 0
icell:1, Line 199
ERROR: No boundary conditions were applied to any surfaces!
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode -1.
NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
Traceback (most recent call last):
File "dpa.py", line 106, in <module>
sp_filename = model.run()
File "/home/ir-bala2/.local/lib/python3.7/site-packages/openmc/model/model.py", line 590, in run
event_based)
File "/home/ir-bala2/.local/lib/python3.7/site-packages/openmc/executor.py", line 280, in run
_run(args, output, cwd)
File "/home/ir-bala2/.local/lib/python3.7/site-packages/openmc/executor.py", line 118, in _run
raise RuntimeError(error_msg)
RuntimeError: No boundary conditions were applied to any surfaces! -------------------------------------------------------------------------- MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD with errorcode -1. NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes. You may or may not see output from other processes, depending on exactly when Open MPI kills them. ------------------------------------------
Not pretty clear on how to assign the boundary condition on dagmc surfaces. Eager to hear from you any advice on fixing this issue.
The python code used for this calculation is given below for your reference.
from IPython.display import HTML
HTML('<iframe width="560" height="315" src="https://youtube.com/embed/VLn59FSc4GA" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>')
"""This first stage sets up the geometry and materials for the simulation."""
import openmc
import json
import sys
import os
# MATERIALS
density_of_tungsten_in_g_per_cm3 = 19.3
my_material = openmc.Material(name='Tungsten')
my_material.set_density('g/cm3', density_of_tungsten_in_g_per_cm3)
my_material.add_element('W', 1.0, percent_type='wo')
mats = openmc.Materials([my_material])
# GEOMETRY
dag_univ = openmc.DAGMCUniverse(filename='dagmc.h5m')
geom = openmc.Geometry(root=dag_univ)
# SIMULATION SETTINGS
# Instantiate a Settings object
sett = openmc.Settings()
batches = 10
sett.batches = batches
sett.inactive = 0
sett.particles = 10000
sett.run_mode = 'fixed source'
# Create a DT point source
source = openmc.Source()
source.space = openmc.stats.Point((0, 0, 0))
source.angle = openmc.stats.Isotropic()
source.energy = openmc.stats.Discrete([14e6], [1])
sett.source = source
"""This sets up the damage energy tally using the MT number 444. A list of MT numbers including their reaction discription can be found [here](https://t2.lanl.gov/nis/endf/mts.html)."""
tallies = openmc.Tallies()
# added a cell tally for DPA to the tungsten vessel cell
material_filter = openmc.MaterialFilter(my_material)
reaction_tally = openmc.Tally(name='DPA')
reaction_tally.filters = [material_filter]
reaction_tally.scores = ['444'] # note use of 444 in string format
reaction_tally.nuclides = ['W180','W182','W183','W184','W186']
tallies.append(reaction_tally)
tallies.export_to_xml()
"""This runs the simulation."""
model = openmc.model.Model(geom, mats, sett, tallies)
os.system("rm *.h5")
#!rm *.h5
sp_filename = model.run()
Thanks and regards,
Arun