I’m trying to run and plot the example for the SFR, I altered it a bit. but I’m having trouble running the .plot() function specifically for
main_in_u.plot(origin = (0,0,0), pixels=(500, 500), width = (30.,30.), color_by = ‘material’)
main_out_u.plot(origin = (0,0,0), pixels=(500, 500), width = (30.,30.), color_by = ‘material’)
main_u.plot(origin = (0,0,0), pixels=(1000, 1000), width = (660.,660.), color_by = ‘material’)
but I get the error code:
Traceback (most recent call last):
File “//Library/CloudStorage/OneDrive-/openMC - code research/openMC/SFR - openmc copy.py”, line 140, in
main_in_u.plot(origin= (0,0,0), pixels=(500,500), width=(30,30), color_by=‘material’)
File “//anaconda3/envs/openmc-env/lib/python3.12/site-packages/openmc/universe.py", line 446, in plot
model.plot_geometry(False, cwd=tmpdir, openmc_exec=openmc_exec)
File "//anaconda3/envs/openmc-env/lib/python3.12/site-packages/openmc/model/model.py”, line 828, in plot_geometry
openmc.plot_geometry(output=output, openmc_exec=openmc_exec)
File “//anaconda3/envs/openmc-env/lib/python3.12/site-packages/openmc/executor.py", line 154, in plot_geometry
_run(args, output, cwd)
File "//anaconda3/envs/openmc-env/lib/python3.12/site-packages/openmc/executor.py”, line 125, in _run
raise RuntimeError(error_msg)
RuntimeError: OpenMC aborted unexpectedly.
Process finished with exit code 1
Then, trying to fix the problem, I did:
geom_main_in = openmc.Geometry(main_in_u)
Export the geometry to XML
geom_main_in.export_to_xml()
Plot the geometry
openmc.plot_geometry()
but I got the same error code.
If I comment out these three plots, I am able to run the code fully through and get k values.
please help!! I have uploaded by code below.
SFR - openmc copy.py (8.7 KB)