mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Remove fission_q_prompt/recov on Fortran side
This commit is contained in:
parent
3a1c4623b3
commit
84b8d64b9d
3 changed files with 43 additions and 69 deletions
|
|
@ -904,6 +904,16 @@ extern "C" double nuclide_nu_c(Nuclide* nuc, double E, int emission_mode, int gr
|
|||
return nuc->nu(E, static_cast<Nuclide::EmissionMode>(emission_mode - 1), group);
|
||||
}
|
||||
|
||||
extern "C" double nuclide_fission_q_prompt(Nuclide* nuc, double E)
|
||||
{
|
||||
return nuc->fission_q_prompt_ ? (*nuc->fission_q_prompt_)(E) : 0.0;
|
||||
}
|
||||
|
||||
extern "C" double nuclide_fission_q_recov(Nuclide* nuc, double E)
|
||||
{
|
||||
return nuc->fission_q_recov_ ? (*nuc->fission_q_recov_)(E) : 0.0;
|
||||
}
|
||||
|
||||
extern "C" void nuclide_load_multipole(Nuclide* nuc, hid_t group)
|
||||
{
|
||||
nuc->multipole_ = std::make_unique<WindowedMultipole>(group);
|
||||
|
|
|
|||
|
|
@ -76,10 +76,6 @@ module nuclide_header
|
|||
! that ENDF-102 does not assign any MT values above 891.
|
||||
integer :: reaction_index(891)
|
||||
|
||||
! Fission energy release
|
||||
class(Function1D), allocatable :: fission_q_prompt ! fragments and prompt neutrons, gammas
|
||||
class(Function1D), allocatable :: fission_q_recov ! fragments, neutrons, gammas, betas
|
||||
|
||||
type(C_PTR) :: ptr
|
||||
|
||||
contains
|
||||
|
|
@ -198,6 +194,20 @@ module nuclide_header
|
|||
real(C_DOUBLE), value :: E
|
||||
logical(C_BOOL) :: b
|
||||
end function
|
||||
|
||||
function nuclide_fission_q_prompt(ptr, E) result(q) bind(C)
|
||||
import C_PTR, C_DOUBLE
|
||||
type(C_PTR), value :: ptr
|
||||
real(C_DOUBLE), value :: E
|
||||
real(C_DOUBLE) :: q
|
||||
end function
|
||||
|
||||
function nuclide_fission_q_recov(ptr, E) result(q) bind(C)
|
||||
import C_PTR, C_DOUBLE
|
||||
type(C_PTR), value :: ptr
|
||||
real(C_DOUBLE), value :: E
|
||||
real(C_DOUBLE) :: q
|
||||
end function
|
||||
end interface
|
||||
|
||||
contains
|
||||
|
|
@ -426,43 +436,6 @@ contains
|
|||
end do
|
||||
call close_group(rxs_group)
|
||||
|
||||
! Read fission energy release data if present
|
||||
if (object_exists(group_id, 'fission_energy_release')) then
|
||||
fer_group = open_group(group_id, 'fission_energy_release')
|
||||
|
||||
! Q-PROMPT
|
||||
fer_dset = open_dataset(fer_group, 'q_prompt')
|
||||
call read_attribute(temp_str, fer_dset, 'type')
|
||||
if (temp_str == 'Polynomial') then
|
||||
allocate(Polynomial :: this % fission_q_prompt)
|
||||
call this % fission_q_prompt % from_hdf5(fer_dset)
|
||||
call close_dataset(fer_dset)
|
||||
else if (temp_str == 'Tabulated1D') then
|
||||
allocate(Tabulated1D :: this % fission_q_prompt)
|
||||
call this % fission_q_prompt % from_hdf5(fer_dset)
|
||||
call close_dataset(fer_dset)
|
||||
else
|
||||
call fatal_error('Unrecognized fission prompt energy release format.')
|
||||
end if
|
||||
|
||||
! Q-RECOV
|
||||
fer_dset = open_dataset(fer_group, 'q_recoverable')
|
||||
call read_attribute(temp_str, fer_dset, 'type')
|
||||
if (temp_str == 'Polynomial') then
|
||||
allocate(Polynomial :: this % fission_q_recov)
|
||||
call this % fission_q_recov % from_hdf5(fer_dset)
|
||||
call close_dataset(fer_dset)
|
||||
else if (temp_str == 'Tabulated1D') then
|
||||
allocate(Tabulated1D :: this % fission_q_recov)
|
||||
call this % fission_q_recov % from_hdf5(fer_dset)
|
||||
call close_dataset(fer_dset)
|
||||
else
|
||||
call fatal_error('Unrecognized fission recoverable energy release format.')
|
||||
end if
|
||||
|
||||
call close_group(fer_group)
|
||||
end if
|
||||
|
||||
! Create derived cross section data
|
||||
call this % create_derived()
|
||||
|
||||
|
|
|
|||
|
|
@ -992,12 +992,11 @@ contains
|
|||
! calculate fraction of absorptions that would have resulted in
|
||||
! fission scaled by Q-value
|
||||
associate (nuc => nuclides(p % event_nuclide))
|
||||
if (micro_xs(p % event_nuclide) % absorption > ZERO .and. &
|
||||
allocated(nuc % fission_q_prompt)) then
|
||||
if (micro_xs(p % event_nuclide) % absorption > ZERO) then
|
||||
if (score_bin == SCORE_FISS_Q_PROMPT) then
|
||||
xs = nuc % fission_q_prompt % evaluate(p % last_E)
|
||||
xs = nuclide_fission_q_prompt(nuc % ptr, p % last_E)
|
||||
else if (score_bin == SCORE_FISS_Q_RECOV) then
|
||||
xs = nuc % fission_q_recov % evaluate(p % last_E)
|
||||
xs = nuclide_fission_q_recov(nuc % ptr, p % last_E)
|
||||
end if
|
||||
|
||||
score = p % absorb_wgt * xs * flux &
|
||||
|
|
@ -1012,13 +1011,11 @@ contains
|
|||
! particle's weight entering the collision as the estimate for
|
||||
! the fission energy production rate
|
||||
associate (nuc => nuclides(p % event_nuclide))
|
||||
if (micro_xs(p % event_nuclide) % absorption > ZERO .and. &
|
||||
allocated(nuc % fission_q_prompt)) then
|
||||
|
||||
if (micro_xs(p % event_nuclide) % absorption > ZERO) then
|
||||
if (score_bin == SCORE_FISS_Q_PROMPT) then
|
||||
xs = nuc % fission_q_prompt % evaluate(p % last_E)
|
||||
xs = nuclide_fission_q_prompt(nuc % ptr, p % last_E)
|
||||
else if (score_bin == SCORE_FISS_Q_RECOV) then
|
||||
xs = nuc % fission_q_recov % evaluate(p % last_E)
|
||||
xs = nuclide_fission_q_recov(nuc % ptr, p % last_E)
|
||||
end if
|
||||
|
||||
score = p % last_wgt * xs * flux &
|
||||
|
|
@ -1031,16 +1028,13 @@ contains
|
|||
else
|
||||
if (i_nuclide > 0) then
|
||||
associate (nuc => nuclides(i_nuclide))
|
||||
if (allocated(nuc % fission_q_prompt)) then
|
||||
|
||||
if (score_bin == SCORE_FISS_Q_PROMPT) then
|
||||
xs = nuc % fission_q_prompt % evaluate(E)
|
||||
else if (score_bin == SCORE_FISS_Q_RECOV) then
|
||||
xs = nuc % fission_q_recov % evaluate(E)
|
||||
end if
|
||||
|
||||
score = micro_xs(i_nuclide) % fission * atom_density * flux * xs
|
||||
if (score_bin == SCORE_FISS_Q_PROMPT) then
|
||||
xs = nuclide_fission_q_prompt(nuc % ptr, E)
|
||||
else if (score_bin == SCORE_FISS_Q_RECOV) then
|
||||
xs = nuclide_fission_q_recov(nuc % ptr, E)
|
||||
end if
|
||||
|
||||
score = micro_xs(i_nuclide) % fission * atom_density * flux * xs
|
||||
end associate
|
||||
else
|
||||
if (p % material /= MATERIAL_VOID) then
|
||||
|
|
@ -1049,17 +1043,14 @@ contains
|
|||
i_nuc = materials(p % material) % nuclide(l)
|
||||
|
||||
associate (nuc => nuclides(i_nuc))
|
||||
if (allocated(nuc % fission_q_prompt)) then
|
||||
|
||||
if (score_bin == SCORE_FISS_Q_PROMPT) then
|
||||
xs = nuc % fission_q_prompt % evaluate(E)
|
||||
else if (score_bin == SCORE_FISS_Q_RECOV) then
|
||||
xs = nuc % fission_q_recov % evaluate(E)
|
||||
end if
|
||||
|
||||
score = score + micro_xs(i_nuc) % fission * atom_density_ &
|
||||
* flux * xs
|
||||
if (score_bin == SCORE_FISS_Q_PROMPT) then
|
||||
xs = nuclide_fission_q_prompt(nuc % ptr, E)
|
||||
else if (score_bin == SCORE_FISS_Q_RECOV) then
|
||||
xs = nuclide_fission_q_recov(nuc % ptr, E)
|
||||
end if
|
||||
|
||||
score = score + micro_xs(i_nuc) % fission * atom_density_ &
|
||||
* flux * xs
|
||||
end associate
|
||||
end do
|
||||
end if
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue