66 if ( alloc_stat /= 0)
call raise_exception(
'Allocation of "rrate_reaclib" failed.',&
67 "init_reaclib_rates",380001)
89 character(len=7) :: tmp
91 if (verbose_level .ge. 1)
then
94 if (verbose_level .ge. 2)
then
95 if (
nrea .gt. 0)
write(*,
"(A)")
""
96 if (
nrea .gt. 0)
write(*,
"(A)")
" Reaclib rates: "
97 if (
nrea .gt. 0)
write(*,
"(A)")
" |----------------|"
99 if (
nrea .gt. 0)
write(*,
"(A)")
" | Total :"//adjustr(tmp)//
" |"
101 if (
n_ng .gt. 0)
write(*,
"(A)")
" | (n,g) :"//adjustr(tmp)//
" |"
103 if (
n_gn .gt. 0)
write(*,
"(A)")
" | (g,n) :"//adjustr(tmp)//
" |"
105 if (
n_pg .gt. 0)
write(*,
"(A)")
" | (p,g) :"//adjustr(tmp)//
" |"
107 if (
n_gp .gt. 0)
write(*,
"(A)")
" | (g,p) :"//adjustr(tmp)//
" |"
109 if (
n_ag .gt. 0)
write(*,
"(A)")
" | (a,g) :"//adjustr(tmp)//
" |"
111 if (
n_ga .gt. 0)
write(*,
"(A)")
" | (g,a) :"//adjustr(tmp)//
" |"
113 if (
n_an .gt. 0)
write(*,
"(A)")
" | (a,n) :"//adjustr(tmp)//
" |"
115 if (
n_na .gt. 0)
write(*,
"(A)")
" | (n,a) :"//adjustr(tmp)//
" |"
117 if (
n_an .gt. 0)
write(*,
"(A)")
" | (a,p) :"//adjustr(tmp)//
" |"
119 if (
n_na .gt. 0)
write(*,
"(A)")
" | (p,a) :"//adjustr(tmp)//
" |"
121 if (
n_pn .gt. 0)
write(*,
"(A)")
" | (p,n) :"//adjustr(tmp)//
" |"
123 if (
n_np .gt. 0)
write(*,
"(A)")
" | (n,p) :"//adjustr(tmp)//
" |"
125 if (
n_bm .gt. 0)
write(*,
"(A)")
" | beta- :"//adjustr(tmp)//
" |"
127 if (
n_bp .gt. 0)
write(*,
"(A)")
" | beta+ :"//adjustr(tmp)//
" |"
129 if (
n_ec .gt. 0)
write(*,
"(A)")
" | EC :"//adjustr(tmp)//
" |"
131 if (
n_ad .gt. 0)
write(*,
"(A)")
" | a-dec.:"//adjustr(tmp)//
" |"
133 if (
n_ne .gt. 0)
write(*,
"(A)")
" | n emis:"//adjustr(tmp)//
" |"
135 if (
n_pe .gt. 0)
write(*,
"(A)")
" | p emis:"//adjustr(tmp)//
" |"
137 if (
n_o .gt. 0)
write(*,
"(A)")
" | other :"//adjustr(tmp)//
" |"
138 if (
nrea .gt. 0)
write(*,
"(A)")
" |----------------|"
139 if (
nrea .gt. 0)
write(*,
"(A)")
""
158 character(len=*),
intent(in) :: path
160 integer :: alloc_stat
173 if (.not.
allocated(
rrate))
then
175 if ( alloc_stat /= 0)
call raise_exception(
'Allocation of "rrate" failed.',&
176 "read_binary_reaclib_reaction_data",380001)
197 character(len=*),
intent(in) :: path
235 real(r_kind),
intent(out) :: rat_calc
241 rat_calc = rat_calc +rrate%param(j)*
t9_pow(j)
244 if (rat_calc .gt. dlog(
infty))
then
246 if (verbose_level .ge. 2)
then
247 print*,
"Warning, rate overflow! Rate was "
250 rat_calc = dlog(
infty)
253 rat_calc = dexp(rat_calc)
274 integer,
intent(inout) :: rrate_length
276 integer :: alloc_stat
277 integer :: new_length
280 new_length = rrate_length+
nrea
281 if (
nrea .ne. 0)
then
282 if (.not.
allocated(rrate_array))
then
284 allocate(rrate_array(
nrea),stat=alloc_stat)
285 if ( alloc_stat /= 0)
call raise_exception(
'Allocation of "rrate_array" failed.',&
286 "merge_reaclib_rates",380001)
290 allocate(rrate_tmp(rrate_length),stat=alloc_stat)
291 if ( alloc_stat /= 0)
call raise_exception(
'Allocation of "rrate_tmp" failed.',&
292 "merge_reaclib_rates",380001)
293 rrate_tmp(1:rrate_length) = rrate_array(1:rrate_length)
296 deallocate(rrate_array)
297 allocate(rrate_array(new_length),stat=alloc_stat)
298 if ( alloc_stat /= 0)
call raise_exception(
'Allocation of "rrate_array" failed.',&
299 "merge_reaclib_rates",380001)
300 rrate_array(1:rrate_length) = rrate_tmp(1:rrate_length)
303 deallocate(rrate_tmp)
309 rrate_length = new_length
350 character(5),
dimension(6) :: parts
351 integer,
dimension(6) :: parts_index
352 real(
r_kind),
dimension(9) :: params
358 integer :: group_index
375 read(reaclib,
my_format(1), iostat = read_stat) &
376 grp, parts(1:6), src, res, rev, q
377 if (read_stat /= 0)
exit outer_loop
379 read(reaclib,
"(4E13.6)") params(1:4)
380 read(reaclib,
"(5E13.6)") params(5:9)
383 if ((src.eq.
'ms99').or.(src.eq.
'mp01').or.(src.eq.
'sfis').or.(src.eq.
'fiss')) cycle outer_loop
395 if (parts(j) .eq.
' ')
exit inner_loop
396 parts_index(j) =
benam(parts(j))
398 if (parts_index(j) .eq. 0) cycle outer_loop
409 elseif (res ==
"w")
then
411 elseif (res ==
"s")
then
413 elseif (res ==
"p")
then
415 elseif ((res ==
" ") .or. (res ==
"n"))
then
418 call raise_exception(
'Flag within reaclib not known! (res = "'//res//
'"). '//&
419 'Source flag was '//trim(adjustl(src))//
'.',&
420 "read_reaclib",380003)
425 elseif (rev ==
" ")
then
428 call raise_exception(
'Flag within reaclib not known! (rev = "'//rev//
'"). '//&
429 'Source flag was '//trim(adjustl(src))//
'.',&
430 "read_reaclib",380004)
467 integer,
intent(in) :: length
470 real(r_kind),
dimension(net_size) :: av_Q
471 real(r_kind),
dimension(net_size) :: heat_f
472 real(r_kind),
dimension(net_size) :: rate
473 real(r_kind) :: rate_tmp
480 if (reac_rate_array(i)%is_weak)
then
482 if ((reac_rate_array(i)%reac_type ==
rrt_betm) .or. (reac_rate_array(i)%reac_type ==
rrt_betp))
then
483 rate_tmp = dexp(reac_rate_array(i)%param(1))
485 av_q(reac_rate_array(i)%parts(1)) = av_q(reac_rate_array(i)%parts(1)) + reac_rate_array(i)%q_value*rate_tmp
486 rate(reac_rate_array(i)%parts(1)) = rate(reac_rate_array(i)%parts(1)) + rate_tmp
493 if (rate(i) .gt. 0)
then
494 av_q(i) = av_q(i)/rate(i)
502 if ((av_q(i) .gt. 0) .and. (
qnuloss(i) .ne. -1))
then
513 if (reac_rate_array(i)%is_weak)
then
515 if ((reac_rate_array(i)%reac_type ==
rrt_betm) .or. (reac_rate_array(i)%reac_type ==
rrt_betp) .or. &
516 (reac_rate_array(i)%reac_type ==
rrt_ec))
then
517 reac_rate_array(i)%nu_frac = heat_f(reac_rate_array(i)%parts(1))
519 reac_rate_array(i)%nu_frac = 0
574 integer :: group_index
575 integer,
dimension(6) :: parts_index
581 integer :: neutron_c_r
582 integer :: neutron_c_p
583 integer :: proton_c_r
584 integer :: proton_c_p
591 parts_index = rr_tmp%parts
592 group_index = rr_tmp%group
595 if (rr_tmp%is_weak)
then
596 neutron_c_r = 0 ; neutron_c_r = 0 ; proton_c_r = 0
601 if (parts_index(i) .le. 0) cycle
602 if (parts_index(i) .eq.
ineu)
then
603 neutron_c_r = neutron_c_r +1
604 else if (parts_index(i) .eq.
ipro)
then
605 proton_c_r = proton_c_r +1
606 else if (parts_index(i) .eq.
ihe4)
then
607 alpha_c_r = alpha_c_r +1
609 zsum_r = zsum_r +
isotope(parts_index(i))%p_nr
610 nsum_r = nsum_r +
isotope(parts_index(i))%n_nr
614 neutron_c_p = 0 ; neutron_c_p = 0 ; proton_c_p = 0
620 if (parts_index(i) .le. 0) cycle
621 if (parts_index(i) .eq.
ineu)
then
622 neutron_c_p = neutron_c_p +1
623 else if (parts_index(i) .eq.
ipro)
then
624 proton_c_p = proton_c_p +1
625 else if (parts_index(i) .eq.
ihe4)
then
626 alpha_c_p = alpha_c_p +1
628 zsum_p = zsum_p +
isotope(parts_index(i))%p_nr
629 nsum_p = nsum_p +
isotope(parts_index(i))%n_nr
633 if (rr_tmp%source .eq.
' ec')
then
637 elseif ((zsum_p .eq. zsum_r) .and. (neutron_c_p .gt. 0))
then
641 elseif ((zsum_p .eq. zsum_r) .and. (proton_c_p .gt. 0))
then
645 elseif ((zsum_p .eq. zsum_r) .and. (alpha_c_p .gt. 0))
then
649 elseif ((zsum_p-1 .eq. zsum_r) .and. (nsum_p+1 .eq. nsum_r))
then
653 elseif ((zsum_p+1 .eq. zsum_r) .and. (nsum_p-1 .eq. nsum_r))
then
657 rr_tmp%reac_type =
rrt_o
662 else if ((group_index.eq.4) .and. &
668 else if (((group_index.eq.2)).and.&
674 else if ((group_index.eq.4).and. &
680 else if (((group_index.eq.2)).and.&
686 else if ((group_index.eq.4).and.&
692 else if (((group_index.eq.2)).and.&
698 else if ( (group_index.eq.5).and.&
706 else if ( (group_index.eq.5).and.&
714 else if ( (group_index.eq.5).and.&
722 else if ( (group_index.eq.5).and.&
730 else if ( (group_index.eq.5).and.&
738 else if ( (group_index.eq.5).and.&
746 rr_tmp%reac_type =
rrt_o
774 character(5),
dimension(6) :: parts
775 integer,
dimension(6) :: parts_index
776 real(
r_kind),
dimension(9) :: params
787 read(reaclib,
my_format(1), iostat = read_stat) &
788 grp, parts(1:6), src, res, rev, q
790 if (read_stat /= 0)
exit
791 read(reaclib,
"(4E13.6)") params(1:4)
792 read(reaclib,
"(5E13.6)") params(5:9)
794 if ((src.eq.
'ms99').or.(src.eq.
'mp01').or.(src.eq.
'sfis').or.(src.eq.
'fiss')) cycle outer
799 if (grp.ne.0) cycle outer
802 if (parts(j) .eq.
' ')
exit inner
803 parts_index(j) =
benam(parts(j))
805 if (parts_index(j) .eq. 0) cycle outer