Commit graph

9 commits

Author SHA1 Message Date
GuySten
f007c85a50
Check for positive radii (#3813) 2026-02-19 08:36:12 +00:00
Paul Romano
a99f15aa75 Changes in model/funcs.py from PullRequest Inc. review 2020-04-01 14:13:01 -05:00
Sterling Harper
862524c26a Fix Material try/catch and unit test assertion 2019-09-05 22:39:24 -04:00
Andrew Johnson
768949a972
Add support for non-Materials to be used in pin function
Anything that can be filled by a cell can be passed to
openmc.model.pin, including Universes and lattices.
Checks are included for the volume division, as not
all supported items, like Lattice instances, have volume
attributes.

A test was added to check this capability, where a universe
is used as one of the interior elements for the pin.

Various cosmetic changes to address reviewer comments.
2019-07-12 17:08:47 -05:00
Andrew Johnson
0cebc507a9
Add support for Universe kwargs to openmc.model.pin 2019-07-12 16:45:48 -05:00
Andrew Johnson
044ac4ce2a
Option to divide material volumes by pin divisions 2019-07-09 20:23:54 -05:00
Andrew Johnson
50ea1ed02a
Function based pin construction
Function openmc.model.funcs.pin has replaced the class-based
openmc.model.pin.Pin

Subdivision functionality is maintained by passing a dictionary
of integer ring indexes -> number of divisions to the function

Tests have been updated accordingly and are parametrized
against surface type: X, Y, and Z cylinders
2019-07-05 16:52:24 -05:00
Andrew Johnson
e67abde622
Use match argument in calls to pytest.raises when testing pin 2019-07-01 09:29:56 -05:00
Andrew Johnson
1475e25bf3
Add Universe subclass openmc.model.Pin
Designed to facilitate building universe that represent
pins, or concentric cylinders of materials. Can be built
by passing surfaces and materials, or radii and materials.
Places last material spanning region out to infinity from
the last surface.

Supports subdividing rings into equal volume slices of
unique [cloned] materials, useful for depletion.

Unit tests added for failure modes as well as basic operation
2019-06-30 15:14:14 -05:00