mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
User able to set bounding cell id
This commit is contained in:
parent
0256fe90d4
commit
ff5490e3ba
1 changed files with 8 additions and 2 deletions
|
|
@ -767,19 +767,25 @@ class DAGMCUniverse(UniverseBase):
|
|||
|
||||
return +lower_x & -upper_x & +lower_y & -upper_y & +lower_z & -upper_z
|
||||
|
||||
def bounded_universe(self, **kwargs):
|
||||
def bounded_universe(self, bounding_cell_id=10000, **kwargs):
|
||||
"""Returns an openmc.Universe filled with this DAGMCUniverse and bounded
|
||||
with a cell. Defaults to a box cell with a vacuum surface however this
|
||||
can be changed using the kwargs which are passed directly to
|
||||
DAGMCUniverse.bounding_region().
|
||||
|
||||
Parameters
|
||||
----------
|
||||
bounding_cell_id : int
|
||||
The cell ID number to use for the bounding cell, defaults to 1000 to reduce
|
||||
the chance of overlapping ID numbers with the DAGMC geometry.
|
||||
|
||||
Returns
|
||||
-------
|
||||
openmc.Universe
|
||||
Universe instance
|
||||
"""
|
||||
|
||||
bounding_cell = openmc.Cell(fill=self, region=self.bounding_region(**kwargs))
|
||||
bounding_cell = openmc.Cell(fill=self, id=bounding_cell_id, region=self.bounding_region(**kwargs))
|
||||
return openmc.Universe(cells=[bounding_cell])
|
||||
|
||||
@classmethod
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue