mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Merge pull request #498 from samuelshaner/last-energy-fix
changed p % E to p % last_E for collision and analog tallies
This commit is contained in:
commit
88400a72c9
4 changed files with 61 additions and 41 deletions
|
|
@ -1507,7 +1507,7 @@ The ``<tally>`` element accepts the following sub-elements:
|
|||
|
||||
:inverse-velocity:
|
||||
The flux-weighted inverse velocity where the velocity is in units of
|
||||
meters per second.
|
||||
centimeters per second.
|
||||
|
||||
.. note::
|
||||
The ``analog`` estimator is actually identical to the ``collision``
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ contains
|
|||
real(8) :: macro_total ! material macro total xs
|
||||
real(8) :: macro_scatt ! material macro scatt xs
|
||||
real(8) :: uvw(3) ! particle direction
|
||||
real(8) :: E ! particle energy
|
||||
type(Material), pointer :: mat
|
||||
type(Reaction), pointer :: rxn
|
||||
type(Nuclide), pointer :: nuc
|
||||
|
|
@ -128,6 +129,14 @@ contains
|
|||
|
||||
|
||||
case (SCORE_INVERSE_VELOCITY)
|
||||
|
||||
! make sure the correct energy is used
|
||||
if (t % estimator == ESTIMATOR_TRACKLENGTH) then
|
||||
E = p % E
|
||||
else
|
||||
E = p % last_E
|
||||
end if
|
||||
|
||||
if (t % estimator == ESTIMATOR_ANALOG) then
|
||||
! All events score to an inverse velocity bin. We actually use a
|
||||
! collision estimator in place of an analog one since there is no way
|
||||
|
|
@ -139,12 +148,16 @@ contains
|
|||
else
|
||||
score = p % last_wgt
|
||||
end if
|
||||
|
||||
! Score the flux weighted inverse velocity with velocity in units of
|
||||
! cm/s
|
||||
score = score / material_xs % total &
|
||||
/ (sqrt(TWO * p % E / (MASS_NEUTRON_MEV)) * C_LIGHT)
|
||||
/ (sqrt(TWO * E / (MASS_NEUTRON_MEV)) * C_LIGHT * 100.0_8)
|
||||
|
||||
else
|
||||
! For inverse velocity, we need no cross section
|
||||
score = flux / (sqrt(TWO * p % E / (MASS_NEUTRON_MEV)) * C_LIGHT)
|
||||
! For inverse velocity, we don't need a cross section. The velocity is
|
||||
! in units of cm/s.
|
||||
score = flux / (sqrt(TWO * E / (MASS_NEUTRON_MEV)) * C_LIGHT * 100.0_8)
|
||||
end if
|
||||
|
||||
|
||||
|
|
@ -425,6 +438,13 @@ contains
|
|||
|
||||
case (SCORE_DELAYED_NU_FISSION)
|
||||
|
||||
! make sure the correct energy is used
|
||||
if (t % estimator == ESTIMATOR_TRACKLENGTH) then
|
||||
E = p % E
|
||||
else
|
||||
E = p % last_E
|
||||
end if
|
||||
|
||||
! Set the delayedgroup filter index and the number of delayed group bins
|
||||
dg_filter = t % find_filter(FILTER_DELAYEDGROUP)
|
||||
|
||||
|
|
@ -460,11 +480,11 @@ contains
|
|||
d = t % filters(dg_filter) % int_bins(d_bin)
|
||||
|
||||
! Compute the yield for this delayed group
|
||||
yield = yield_delayed(nuc, p % E, d)
|
||||
yield = yield_delayed(nuc, E, d)
|
||||
|
||||
! Compute the score and tally to bin
|
||||
score = p % absorb_wgt * yield * micro_xs(p % event_nuclide) &
|
||||
% fission * nu_delayed(nuc, p % E) / &
|
||||
% fission * nu_delayed(nuc, E) / &
|
||||
micro_xs(p % event_nuclide) % absorption
|
||||
call score_fission_delayed_dg(t, d_bin, score, score_index)
|
||||
end do
|
||||
|
|
@ -474,7 +494,7 @@ contains
|
|||
! by multiplying the absorbed weight by the fraction of the
|
||||
! delayed-nu-fission xs to the absorption xs
|
||||
score = p % absorb_wgt * micro_xs(p % event_nuclide) &
|
||||
% fission * nu_delayed(nuc, p % E) / &
|
||||
% fission * nu_delayed(nuc, E) / &
|
||||
micro_xs(p % event_nuclide) % absorption
|
||||
end if
|
||||
end if
|
||||
|
|
@ -528,11 +548,11 @@ contains
|
|||
d = t % filters(dg_filter) % int_bins(d_bin)
|
||||
|
||||
! Compute the yield for this delayed group
|
||||
yield = yield_delayed(nuc, p % E, d)
|
||||
yield = yield_delayed(nuc, E, d)
|
||||
|
||||
! Compute the score and tally to bin
|
||||
score = micro_xs(i_nuclide) % fission * yield &
|
||||
* nu_delayed(nuc, p % E) * atom_density * flux
|
||||
* nu_delayed(nuc, E) * atom_density * flux
|
||||
call score_fission_delayed_dg(t, d_bin, score, score_index)
|
||||
end do
|
||||
cycle SCORE_LOOP
|
||||
|
|
@ -540,7 +560,7 @@ contains
|
|||
|
||||
! If the delayed group filter is not present, compute the score
|
||||
! by multiplying the delayed-nu-fission macro xs by the flux
|
||||
score = micro_xs(i_nuclide) % fission * nu_delayed(nuc, p % E)&
|
||||
score = micro_xs(i_nuclide) % fission * nu_delayed(nuc, E)&
|
||||
* atom_density * flux
|
||||
end if
|
||||
|
||||
|
|
@ -572,11 +592,11 @@ contains
|
|||
nuc => nuclides(i_nuc)
|
||||
|
||||
! Get the yield for the desired nuclide and delayed group
|
||||
yield = yield_delayed(nuc, p % E, d)
|
||||
yield = yield_delayed(nuc, E, d)
|
||||
|
||||
! Compute the score and tally to bin
|
||||
score = micro_xs(i_nuc) % fission * yield &
|
||||
* nu_delayed(nuc, p % E) * atom_density_ * flux
|
||||
* nu_delayed(nuc, E) * atom_density_ * flux
|
||||
call score_fission_delayed_dg(t, d_bin, score, score_index)
|
||||
end do
|
||||
end do
|
||||
|
|
@ -596,7 +616,7 @@ contains
|
|||
|
||||
! Accumulate the contribution from each nuclide
|
||||
score = score + micro_xs(i_nuc) % fission &
|
||||
* nu_delayed(nuclides(i_nuc), p % E) * atom_density_ * flux
|
||||
* nu_delayed(nuclides(i_nuc), E) * atom_density_ * flux
|
||||
end do
|
||||
end if
|
||||
end if
|
||||
|
|
|
|||
|
|
@ -19,11 +19,11 @@ tally 2:
|
|||
1.976462E-02
|
||||
1.953328E-04
|
||||
tally 3:
|
||||
1.687894E-02
|
||||
5.776176E-05
|
||||
1.686299E-02
|
||||
5.765477E-05
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
0.000000E+00
|
||||
1.061803E-02
|
||||
2.308636E-05
|
||||
1.061240E-02
|
||||
2.305936E-05
|
||||
|
|
|
|||
|
|
@ -1,29 +1,29 @@
|
|||
k-combined:
|
||||
9.903196E-01 4.279617E-02
|
||||
tally 1:
|
||||
1.049628E-03
|
||||
2.261930E-07
|
||||
4.056389E-04
|
||||
3.411247E-08
|
||||
2.243766E-03
|
||||
1.069671E-06
|
||||
6.354432E-04
|
||||
8.370608E-08
|
||||
1.049628E-05
|
||||
2.261930E-11
|
||||
4.056389E-06
|
||||
3.411247E-12
|
||||
2.243766E-05
|
||||
1.069671E-10
|
||||
6.354432E-06
|
||||
8.370608E-12
|
||||
tally 2:
|
||||
1.048031E-03
|
||||
2.263789E-07
|
||||
4.276093E-04
|
||||
4.136358E-08
|
||||
2.667795E-03
|
||||
1.528407E-06
|
||||
6.199140E-04
|
||||
7.840402E-08
|
||||
1.029200E-05
|
||||
2.180706E-11
|
||||
4.353200E-06
|
||||
4.363747E-12
|
||||
2.211790E-05
|
||||
1.055892E-10
|
||||
6.086777E-06
|
||||
7.589579E-12
|
||||
tally 3:
|
||||
1.048031E-03
|
||||
2.263789E-07
|
||||
4.276093E-04
|
||||
4.136358E-08
|
||||
2.667795E-03
|
||||
1.528407E-06
|
||||
6.199140E-04
|
||||
7.840402E-08
|
||||
1.029200E-05
|
||||
2.180706E-11
|
||||
4.353200E-06
|
||||
4.363747E-12
|
||||
2.211790E-05
|
||||
1.055892E-10
|
||||
6.086777E-06
|
||||
7.589579E-12
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue