mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 21:25:36 -04:00
removed SCORE_DIFFUSION tally from the code, code will report a fatal if used for a while
This commit is contained in:
parent
d2ea58baf6
commit
64ff677d2c
7 changed files with 16 additions and 46 deletions
|
|
@ -170,14 +170,9 @@ contains
|
|||
! get p1 scatter rr and convert to p1 scatter xs
|
||||
cmfd % p1scattxs(h,i,j,k) = t % results(3,score_index) % sum / flux
|
||||
|
||||
! extract diffusion coefficient tally
|
||||
cmfd % diffusion(h,i,j,k) = t % results(4,score_index) % sum / flux
|
||||
|
||||
! calculate diffusion coefficient
|
||||
! cmfd % diffcof(h,i,j,k) = ONE/(3.0_8*cmfd%totalxs(h,i,j,k))
|
||||
cmfd % diffcof(h,i,j,k) = ONE/(3.0_8*(cmfd % totalxs(h,i,j,k) - &
|
||||
cmfd % p1scattxs(h,i,j,k)))
|
||||
! cmfd % diffcof(h,i,j,k) = cmfd % diffusion(h,i,j,k)
|
||||
|
||||
else if (ital == 2) then
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ module cmfd_header
|
|||
|
||||
! diffusion coefficient
|
||||
real(8), allocatable :: diffcof(:,:,:,:)
|
||||
real(8), allocatable :: diffusion(:,:,:,:)
|
||||
|
||||
! current
|
||||
real(8), allocatable :: current(:,:,:,:,:)
|
||||
|
|
@ -102,7 +101,6 @@ contains
|
|||
if (.not. allocated(this % scattxs)) allocate(this % scattxs(ng,ng,nx,ny,nz))
|
||||
if (.not. allocated(this % nfissxs)) allocate(this % nfissxs(ng,ng,nx,ny,nz))
|
||||
if (.not. allocated(this % diffcof)) allocate(this % diffcof(ng,nx,ny,nz))
|
||||
if (.not. allocated(this % diffusion)) allocate(this%diffusion(ng,nx,ny,nz))
|
||||
|
||||
! allocate dtilde and dhat
|
||||
if (.not. allocated(this % dtilde)) allocate(this % dtilde(6,ng,nx,ny,nz))
|
||||
|
|
@ -129,7 +127,6 @@ contains
|
|||
this % scattxs = ZERO
|
||||
this % nfissxs = ZERO
|
||||
this % diffcof = ZERO
|
||||
this % diffusion = ZERO
|
||||
this % dtilde = ZERO
|
||||
this % dhat = ZERO
|
||||
this % hxyz = ZERO
|
||||
|
|
@ -155,7 +152,6 @@ contains
|
|||
if (allocated(this % scattxs)) deallocate(this % scattxs)
|
||||
if (allocated(this % nfissxs)) deallocate(this % nfissxs)
|
||||
if (allocated(this % diffcof)) deallocate(this % diffcof)
|
||||
if (allocated(this % diffusion)) deallocate(this % diffusion)
|
||||
if (allocated(this % current)) deallocate(this % current)
|
||||
if (allocated(this % flux)) deallocate(this % flux)
|
||||
if (allocated(this % dtilde)) deallocate(this % dtilde)
|
||||
|
|
|
|||
|
|
@ -364,7 +364,7 @@ contains
|
|||
if (i == 1) then
|
||||
|
||||
! set label
|
||||
t % label = "CMFD flux, total, scatter-1, diffusion"
|
||||
t % label = "CMFD flux, total, scatter-1"
|
||||
|
||||
! set tally estimator to analog
|
||||
t % estimator = ESTIMATOR_ANALOG
|
||||
|
|
@ -378,12 +378,12 @@ contains
|
|||
t % filters = filters(1:n_filters)
|
||||
|
||||
! allocate scoring bins
|
||||
allocate(t % score_bins(4))
|
||||
t % n_score_bins = 4
|
||||
t % n_user_score_bins = 4
|
||||
allocate(t % score_bins(3))
|
||||
t % n_score_bins = 3
|
||||
t % n_user_score_bins = 3
|
||||
|
||||
! allocate scattering order data
|
||||
allocate(t % scatt_order(4))
|
||||
allocate(t % scatt_order(3))
|
||||
t % scatt_order = 0
|
||||
|
||||
! set macro_bins
|
||||
|
|
@ -391,7 +391,6 @@ contains
|
|||
t % score_bins(2) = SCORE_TOTAL
|
||||
t % score_bins(3) = SCORE_SCATTER_N
|
||||
t % scatt_order(3) = 1
|
||||
t % score_bins(4) = SCORE_DIFFUSION
|
||||
|
||||
else if (i == 2) then
|
||||
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ module constants
|
|||
EVENT_FISSION = 3
|
||||
|
||||
! Tally score type
|
||||
integer, parameter :: N_SCORE_TYPES = 15
|
||||
integer, parameter :: N_SCORE_TYPES = 14
|
||||
integer, parameter :: &
|
||||
SCORE_FLUX = -1, & ! flux
|
||||
SCORE_TOTAL = -2, & ! total reaction rate
|
||||
|
|
@ -258,14 +258,13 @@ module constants
|
|||
SCORE_SCATTER_N = -5, & ! arbitrary scattering moment
|
||||
SCORE_SCATTER_PN = -6, & ! system for scoring 0th through nth moment
|
||||
SCORE_TRANSPORT = -7, & ! transport reaction rate
|
||||
SCORE_DIFFUSION = -8, & ! diffusion coefficient
|
||||
SCORE_N_1N = -9, & ! (n,1n) rate
|
||||
SCORE_ABSORPTION = -10, & ! absorption rate
|
||||
SCORE_FISSION = -11, & ! fission rate
|
||||
SCORE_NU_FISSION = -12, & ! neutron production rate
|
||||
SCORE_KAPPA_FISSION = -13, & ! fission energy production rate
|
||||
SCORE_CURRENT = -14, & ! partial current
|
||||
SCORE_EVENTS = -15 ! number of events
|
||||
SCORE_N_1N = -8, & ! (n,1n) rate
|
||||
SCORE_ABSORPTION = -9, & ! absorption rate
|
||||
SCORE_FISSION = -10, & ! fission rate
|
||||
SCORE_NU_FISSION = -11, & ! neutron production rate
|
||||
SCORE_KAPPA_FISSION = -12, & ! fission energy production rate
|
||||
SCORE_CURRENT = -13, & ! partial current
|
||||
SCORE_EVENTS = -14 ! number of events
|
||||
|
||||
! Maximum scattering order supported
|
||||
integer, parameter :: SCATT_ORDER_MAX = 10
|
||||
|
|
|
|||
|
|
@ -1964,10 +1964,9 @@ contains
|
|||
! Set tally estimator to analog
|
||||
t % estimator = ESTIMATOR_ANALOG
|
||||
case ('diffusion')
|
||||
t % score_bins(j) = SCORE_DIFFUSION
|
||||
|
||||
! Set tally estimator to analog
|
||||
t % estimator = ESTIMATOR_ANALOG
|
||||
message = "Diffusion score no longer supported for tallies, &
|
||||
please remove"
|
||||
call fatal_error()
|
||||
case ('n1n')
|
||||
t % score_bins(j) = SCORE_N_1N
|
||||
|
||||
|
|
|
|||
|
|
@ -823,8 +823,6 @@ contains
|
|||
j = j + n - 1
|
||||
case (SCORE_TRANSPORT)
|
||||
string = trim(string) // ' transport'
|
||||
case (SCORE_DIFFUSION)
|
||||
string = trim(string) // ' diffusion'
|
||||
case (SCORE_N_1N)
|
||||
string = trim(string) // ' n1n'
|
||||
case (SCORE_ABSORPTION)
|
||||
|
|
@ -1493,7 +1491,6 @@ contains
|
|||
score_names(abs(SCORE_SCATTER_N)) = ""
|
||||
score_names(abs(SCORE_SCATTER_PN)) = ""
|
||||
score_names(abs(SCORE_TRANSPORT)) = "Transport Rate"
|
||||
score_names(abs(SCORE_DIFFUSION)) = "Diffusion Coefficient"
|
||||
score_names(abs(SCORE_N_1N)) = "(n,1n) Rate"
|
||||
score_names(abs(SCORE_ABSORPTION)) = "Absorption Rate"
|
||||
score_names(abs(SCORE_FISSION)) = "Fission Rate"
|
||||
|
|
|
|||
|
|
@ -218,21 +218,6 @@ contains
|
|||
! total/scatter macro
|
||||
score = (macro_total - mu*macro_scatt)*(ONE/macro_scatt)
|
||||
|
||||
case (SCORE_DIFFUSION)
|
||||
! Skip any event where the particle didn't scatter
|
||||
if (p % event /= EVENT_SCATTER) cycle SCORE_LOOP
|
||||
|
||||
! Temporarily store the scattering cross section
|
||||
score = material_xs % total - material_xs % absorption
|
||||
|
||||
! Since this only gets tallied at every scattering event, the
|
||||
! flux estimator is 1/Sigma_s. Therefore, the diffusion
|
||||
! coefficient times flux is 1/(3*Sigma_s*(Sigma_t -
|
||||
! mu*Sigma_s)).
|
||||
|
||||
score = last_wgt / (3.0_8 * score * (material_xs % total - &
|
||||
mu * score))
|
||||
|
||||
case (SCORE_N_1N)
|
||||
! Skip any event where the particle didn't scatter
|
||||
if (p % event /= EVENT_SCATTER) cycle SCORE_LOOP
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue