mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Merge branch 'master' into cmfd
This commit is contained in:
commit
41f0038525
4 changed files with 39 additions and 17 deletions
|
|
@ -197,7 +197,6 @@ module ace_header
|
|||
|
||||
! Information for URR probability table use
|
||||
logical :: use_ptable ! in URR range with probability tables?
|
||||
logical :: recalculate ! indicate whether we need to recalculate ptables
|
||||
end type NuclideMicroXS
|
||||
|
||||
!===============================================================================
|
||||
|
|
|
|||
|
|
@ -168,11 +168,9 @@ contains
|
|||
! probability tables, we need to determine cross sections from the table
|
||||
|
||||
if (urr_ptables_on .and. nuc % urr_present) then
|
||||
if (micro_xs(index_nuclide) % recalculate) then
|
||||
if (p % E > nuc % urr_data % energy(1) .and. &
|
||||
p % E < nuc % urr_data % energy(nuc % urr_data % n_energy)) then
|
||||
call calculate_urr_xs(p, index_nuclide)
|
||||
end if
|
||||
if (p % E > nuc % urr_data % energy(1) .and. &
|
||||
p % E < nuc % urr_data % energy(nuc % urr_data % n_energy)) then
|
||||
call calculate_urr_xs(p, index_nuclide)
|
||||
end if
|
||||
end if
|
||||
|
||||
|
|
@ -365,10 +363,6 @@ contains
|
|||
micro_xs(index_nuclide) % fission
|
||||
end if
|
||||
|
||||
! As long as the energy of the neutron doesn't change, we don't need to
|
||||
! recalculate probability table data
|
||||
micro_xs(index_nuclide) % recalculate = .false.
|
||||
|
||||
end subroutine calculate_urr_xs
|
||||
|
||||
!===============================================================================
|
||||
|
|
|
|||
|
|
@ -66,9 +66,6 @@ contains
|
|||
! Initialize number of events to zero
|
||||
n_event = 0
|
||||
|
||||
! Set recalculate ptables to true by default
|
||||
micro_xs(:) % recalculate = .true.
|
||||
|
||||
! find energy index, interpolation factor
|
||||
do while (p % alive)
|
||||
|
||||
|
|
@ -200,10 +197,6 @@ contains
|
|||
! Reset number of particles banked during collision
|
||||
p % n_bank = 0
|
||||
|
||||
! Since a collision has occurred, we need to recalculate probability tables
|
||||
! for any nuclide
|
||||
micro_xs(:) % recalculate = .true.
|
||||
|
||||
end subroutine collision
|
||||
|
||||
!===============================================================================
|
||||
|
|
|
|||
36
src/utils/core_map.py
Executable file
36
src/utils/core_map.py
Executable file
|
|
@ -0,0 +1,36 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as pyplot
|
||||
|
||||
# Get filename and file object
|
||||
filename = sys.argv[1]
|
||||
axial_level = int(sys.argv[2])
|
||||
fh = open(filename,'r')
|
||||
|
||||
# Read size of mesh
|
||||
words = fh.readline().split()
|
||||
nx, ny, nz = [int(item) for item in words]
|
||||
|
||||
# Read values
|
||||
value_dict = {}
|
||||
for line in fh:
|
||||
words = line.split()
|
||||
i, j, k = [int(item) for item in words[:3]]
|
||||
value = float(words[3])
|
||||
value_dict[i,j,k] = value
|
||||
|
||||
# Set up matrix
|
||||
matrix = np.array([[value_dict[i+1,j+1,axial_level] for i in range(nx)]
|
||||
for j in range(ny)])
|
||||
|
||||
# Make figure
|
||||
pyplot.pcolor(matrix)
|
||||
pyplot.colorbar()
|
||||
pyplot.xlim([0,nx])
|
||||
pyplot.ylim([0,ny])
|
||||
pyplot.xticks([])
|
||||
pyplot.yticks([])
|
||||
pyplot.show()
|
||||
Loading…
Add table
Add a link
Reference in a new issue