mit-crpg / opendeplete

A depletion framework for OpenMC
MIT License
14 stars 5 forks source link

Add support for distribmats #6

Closed cjosey closed 8 years ago

cjosey commented 8 years ago

This pull request replaces the old mandatory flat layout with support for nested geometries via distribmats.

All a user needs to do now to do depletion is:

  1. Form a geometry in which all separate regions have a unique material.
  2. Fill those materials and give materials names.
  3. Compute a volume for each cell and create a dictionary mapping a material ID to a volume.
  4. Create a table mapping material names to cross sections / S(a,b) data / whether or not to burn.

It is hoped that 4 can be removed, and 3 can be automated if the user is alright with stochastic volumes. My code will then extract from the OpenMC geometry the number densities, and perform depletion.

The new version precisely matches the old version's output bit for bit, assuming:

  1. The same seed is used.
  2. Nuclides are loaded in the exact same order.
  3. Number densities in both simulations are truncated to the ~10th digit.

The last one is due to tiny numerical differences between the number densities written to openmc.materials and those read from them.

Also, I'm going to start doing pull requests from now on (even if I'll just accept them immediately), as OpenDeplete is starting to grow, and I can't call myself the only developer anymore. The alerts will be beneficial to other devs.