import paramak, openmc
my_reactor = paramak.Reactor(
shapes_and_components='manifest.json'
)
my_reactor.method = 'pymoab'
coords = openmc.stats.Point((0, 0, 0))
energy = openmc.stats.Discrete([1.41E7], [1.0])
source = openmc.Source(space=coords, energy=energy)
my_model = paramak.NeutronicsModel(
geometry=my_reactor,
source=source,
materials={'my_material': 'eurofer'},
mesh_tally_3d=['flux', 'heating'],
mesh_3d_corners=[(-1, -1, -1), (1, 1, 1)] # needed for now as the dimensions are not yet found automatically using this method
)
my_model.simulate()
Types of changes
[ ] Bugfix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Code refactoring
[ ] Documentation Update (if none of the other choices apply)
[ ] New tests
Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.
[ ] Pep8 applied
[ ] Unit tests pass locally with my changes
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] I have added necessary documentation (if appropriate)
Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...
Proposed changes
This adds
Shape().from_stp_file
to the Shape class and makes use of this method in theReactor.export_h5m_with_pymoab
method.This allows pymoab to be used as a method when making a reactor from a manifest.json file.
Previously this was only possible with the "trelis" method.
This means one can take a stp file(s) and run a neutronics simulation in the following manner ...
assuming you have a
manifest.json
like thisTypes of changes
Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...