mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Refactored Lattice into HexLattice and RectLattice classes
This commit is contained in:
parent
444ecfa070
commit
8c7a4ef9a9
5 changed files with 458 additions and 212 deletions
|
|
@ -105,17 +105,17 @@ root.add_cell(cell1)
|
|||
univ4.add_cell(cell2)
|
||||
|
||||
# Instantiate nested Lattices
|
||||
lattice1 = openmc.Lattice(lattice_id=4, name='4x4 assembly')
|
||||
lattice1 = openmc.RectLattice(lattice_id=4, name='4x4 assembly')
|
||||
lattice1.set_dimension([2, 2])
|
||||
lattice1.set_lower_left([-1., -1.])
|
||||
lattice1.set_width([1., 1.])
|
||||
lattice1.set_pitch([1., 1.])
|
||||
lattice1.set_universes([[univ1, univ2],
|
||||
[univ2, univ3]])
|
||||
|
||||
lattice2 = openmc.Lattice(lattice_id=6, name='4x4 core')
|
||||
lattice2 = openmc.RectLattice(lattice_id=6, name='4x4 core')
|
||||
lattice2.set_dimension([2, 2])
|
||||
lattice2.set_lower_left([-2., -2.])
|
||||
lattice2.set_width([2., 2.])
|
||||
lattice2.set_pitch([2., 2.])
|
||||
lattice2.set_universes([[univ4, univ4],
|
||||
[univ4, univ4]])
|
||||
|
||||
|
|
|
|||
|
|
@ -98,10 +98,10 @@ univ3.add_cells([cell6, cell7])
|
|||
root.add_cell(cell1)
|
||||
|
||||
# Instantiate a Lattice
|
||||
lattice = openmc.Lattice(lattice_id=5)
|
||||
lattice = openmc.RectLattice(lattice_id=5)
|
||||
lattice.set_dimension([4, 4])
|
||||
lattice.set_lower_left([-2., -2.])
|
||||
lattice.set_width([1., 1.])
|
||||
lattice.set_pitch([1., 1.])
|
||||
lattice.set_universes([[univ1, univ2, univ1, univ2],
|
||||
[univ2, univ3, univ2, univ3],
|
||||
[univ1, univ2, univ1, univ2],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue