Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for DAGMC export to other neutronics codes #233

Open
shimwell opened this issue Apr 6, 2022 · 5 comments
Open

Adding support for DAGMC export to other neutronics codes #233

shimwell opened this issue Apr 6, 2022 · 5 comments

Comments

@shimwell
Copy link
Member

shimwell commented Apr 6, 2022

OpenMC is the default code for the DAGMC export function but it can be useful to support other codes.

DAGMC geometry tags are slightly different

in openmc we can use material strings, these strings come from the shape name

mat:steel

in MCNP we add the density of the material and use a material integer

mat:1/rho:0.023

in Shift we use an integer

mat:0

To add this support we can add another argument to shape.export_dagmc_h5m and reactor.export_dagmc_h5m.

I'm going to get this started by adding some unit tests

@shimwell
Copy link
Member Author

shimwell commented Apr 6, 2022

@shimwell
Copy link
Member Author

shimwell commented Apr 6, 2022

Another complication is that we currently export graveyard free geometries and openmc can support this by filling a CSG universe with a DAGMC geometry. However I don't think Shift or MCNP allow graveyard free geometries.

There is a method of creating a graveyard in the paramak which can be called by the export_dgamc_h5m method which could help here

@jbae11
Copy link

jbae11 commented Apr 6, 2022

[i] is integer, [f] is float
MCNP:

  • all volumes must belong to a group
  • normal materials: mat:[i]/rho:[f]
  • vacuums:mat:Vacuum
  • graveyard: mat:Graveyard

Shift

  • normal matierals: mat:[i]
  • graveyard: mat:graveyard (note the lowercase g..)

So given this maybe two changes can make this easiest:

  1. Have flags for other formats:
    • convert material names to list of numbers: (e.g. new_mat_list = list(range(len(set(mat_list)))))
    • names are replaces by numbers, and suffixes if required
  2. Have Paramak do graveyards
    • the above format will dictate the graveyard:
      • none for openmc, mat:Graveyard for MCNP, mat:graveyard for Shift.

@shimwell
Copy link
Member Author

shimwell commented Apr 6, 2022

thanks for this info, I think this PR covers the various tag options that are needed apart from the graveyard. I shall merge it in and then get started on the graveyard

@shimwell
Copy link
Member Author

the default graveyard size is 20000cm which requires a lot of triangles to mesh using the current meshing algorithm.

uses currently have to use the reactor.graveyard_size to reduce the size of the graveyard so that it can be meshed in a reasonable time. Option to fix this are reduce the default mesh size or use a different meshing algorithm as mentioned here fusion-energy/brep_to_h5m#5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants