WIP: MCNP additions
This is an initial attempt to add some additional functionality to parsing MCNP inputs. Additions include:
- Changes to importance regex
- Support for read cards
- Support for & line continuations
- Reads lattices, cell tmp and cell vol
- Reads and generalizes thermal scattering inputs
Remaining work includes:
- Adding test cases
- Improvements in thermal scattering data management (the thermal scattering is appended to the material, which then requires the material card is input prior to the MT card in the MCNP input file).
- Missing function to write MT cards (only reads)
- Perhaps better generalization of lattice fill data. No specific Lattice class was made as lattices are essentially cells in MCNP
A similar extension to write this new data to OpenMC is in-progress and will be submitted as a separate future pull request.
Let me know if you have any comments / feedback as I work to address the remaining to-do items.
Thanks for this effort @rtswanson this is great, I'll take a look! Much appreciated!
This is amazing, sorry I'm 2 years out of date! I will find a way to get this merged in.
Well, sorry my commits were large, with no test cases. My repo is a little bit of a mess, and out of date with master. Also, I messed up so line-endings makes the diff look horrendous.
What I mentioned back in the original comment was including things like the lattices in OpenMC I drafted years ago - that's now in my fork here: https://github.com/rtswanson/csg2csg/commit/284811c11d24b8f8bf85249ee7587d9df180c888
I then added a little bit more to preserve temperature (reading the xsdir file, but using a new dependency of https://github.com/NuclearData/DataListing, which we might not want to require for something so simple - but it only looks for the DATAPATH env. var; doesn't check all of the other options): https://github.com/rtswanson/csg2csg/commit/8ee73671bb5f1e10cfb3228b1e4ecaeb89a1dadc
I also have started partial implementation of data (source) and tally conversion. But I need to go back and just rebase on top of master and clean up the commits to make these separate branches off of master (and maybe write some tests) before I push anything else.
I'll have time to start getting my commits cleaned up in a week or two.