mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Ability to plot 2D mesh tallies.
This commit is contained in:
parent
b504ae4777
commit
c88615bdd7
1 changed files with 8 additions and 3 deletions
|
|
@ -47,11 +47,16 @@ for t in sp.tallies:
|
|||
if 'mesh' not in t.filters:
|
||||
continue
|
||||
|
||||
# Get Mesh object
|
||||
# Get Mesh object and determine size
|
||||
m = sp.meshes[t.filters['mesh'].bins[0] - 1]
|
||||
nx, ny, nz = m.dimension
|
||||
ns = t.total_score_bins * t.total_filter_bins / (nx*ny*nz)
|
||||
if len(m.dimension) == 2:
|
||||
nx, ny = m.dimension
|
||||
nz = 1
|
||||
else:
|
||||
nx, ny, nz = m.dimension
|
||||
|
||||
# Calculate number of score bins
|
||||
ns = t.total_score_bins * t.total_filter_bins / (nx*ny*nz)
|
||||
assert n_bins == nx*ny*nz*ns
|
||||
|
||||
# Create lists for tallies
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue