I am trying to import a CAD geometry for an OpenMC simulation with the following lines of code:
#geometry
h5m_filepath=“msre_simple.h5m”
dag_univ = openmc.DAGMCUniverse(h5m_filepath)
geom = openmc.Geometry(root=dag_univ)
geom.export_to_xml()
When I begin to use Openmc.Plot() I get this error:
What do you guys recommend?
Hi @AnthonyB08! Thanks for trying out CAD in OpenMC.
It appears that DAGMC/MOAB is claiming something is wrong with your .h5m
file. Are you able to transport particles on the model or does this happen only with the plotter?
Best,
Patrick
@pshriwise
It gives the same error when running openmc.run() as seen in the snapshot
I am trying to run this repository : GitHub - openmsr/msre: detailed cad model of the msre
in the docker folder with the notebook file MSRE.ipynb.
Huh, that’s odd. If you’re using the file from the repo, they are in fact MOAB files, but it seems that the file you have might not be formed correctly. This would be unusual, particularly since I just pulled that repository and the file seemed alright to me. When you have a chance, could you run h5ls -r msre_simple.h5m
and place the output here?
@pshriwise sorry for delay, but here is the output
It’s awfully suspicious to me that an HDF5 utility can’t read that file. Could you try getting a fresh copy of that file from the repo?
@pshriwise my HDF5 was installed from the package manager , see link below.
https://svalinn.github.io/DAGMC/install/dependencies.html
I will take the time to install HDF5 source though.
I’m thinking the problem has to do with the file more than the HDF5 installation. Did you try getting a fresh copy of msre_simple.h5m?
@pshriwise I can get a fresh copy. I also tried with a . STL file that I custom-made,I have read DAGMC/HDF5 is compatible with this extension as well as the .h5m, but I believe I got a similar error.
I also attempted to run a notebook from OpenMC’s unstructured mesh documentation. The documentation here asks the user to download the .h5m file.
https://docs.openmc.org/en/v0.12.2/examples/unstructured-mesh-part-ii.html
When I do download the file, it works but when running openmc() the program returns this error :
It might be worth noting I am attempting to run all of this with Ubuntu WSL-2
Well that error suggests that you cannot write to the directory where the run is taking place, are you running in some root folder? You can change permissions for the current folder using chmod u+xrw <../folder-name>
@paulromano Thank you very much, this is a good link ! I am very new to openmc. I learned this during undergrad but my expertise is in CFD. So now I am trying to expand into neutron transport so I can conduct multi-physics analysis.
1 Like
Hi @AnthonyB08, cool that you’re trying openmsr.
Were you able to open the .h5m files? Please note that they are large data files so you should be using git LFS to download those.
Lorenzo