mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Fixed two errors in surface current tallies.
This commit is contained in:
parent
73ae7cb2bb
commit
1f0e6a3831
2 changed files with 19 additions and 14 deletions
|
|
@ -248,11 +248,13 @@ contains
|
|||
! forward slightly so that if the mesh boundary is on the surface, it is
|
||||
! still processed
|
||||
|
||||
! TODO: Find a better solution to score surface currents than physically
|
||||
! moving the particle forward slightly
|
||||
if (tallies_on) then
|
||||
! TODO: Find a better solution to score surface currents than
|
||||
! physically moving the particle forward slightly
|
||||
|
||||
p % coord0 % xyz = p % coord0 % xyz + TINY_BIT * p % coord0 % uvw
|
||||
call score_surface_current(p)
|
||||
p % coord0 % xyz = p % coord0 % xyz + TINY_BIT * p % coord0 % uvw
|
||||
call score_surface_current(p)
|
||||
end if
|
||||
|
||||
! Display message
|
||||
if (verbosity >= 10 .or. trace) then
|
||||
|
|
@ -274,9 +276,12 @@ contains
|
|||
! Score surface currents since reflection causes the direction of the
|
||||
! particle to change -- artificially move the particle slightly back in
|
||||
! case the surface crossing in coincident with a mesh boundary
|
||||
p % coord0 % xyz = p % coord0 % xyz - TINY_BIT * p % coord0 % uvw
|
||||
call score_surface_current(p)
|
||||
p % coord0 % xyz = p % coord0 % xyz + TINY_BIT * p % coord0 % uvw
|
||||
|
||||
if (tallies_on) then
|
||||
p % coord0 % xyz = p % coord0 % xyz - TINY_BIT * p % coord0 % uvw
|
||||
call score_surface_current(p)
|
||||
p % coord0 % xyz = p % coord0 % xyz + TINY_BIT * p % coord0 % uvw
|
||||
end if
|
||||
|
||||
! Copy particle's direction cosines
|
||||
u = p % coord0 % uvw(1)
|
||||
|
|
|
|||
|
|
@ -662,7 +662,7 @@ contains
|
|||
bins(TS_SURFACE) = OUT_TOP
|
||||
bins(1:3) = ijk0 + 1
|
||||
score_index = sum((bins - 1) * t % stride) + 1
|
||||
call add_to_score(t % scores(score_index, 1), p % last_wgt)
|
||||
call add_to_score(t % scores(score_index, 1), p % wgt)
|
||||
end if
|
||||
end do
|
||||
else
|
||||
|
|
@ -672,7 +672,7 @@ contains
|
|||
bins(TS_SURFACE) = IN_TOP
|
||||
bins(1:3) = ijk0 + 1
|
||||
score_index = sum((bins - 1) * t % stride) + 1
|
||||
call add_to_score(t % scores(score_index, 1), p % last_wgt)
|
||||
call add_to_score(t % scores(score_index, 1), p % wgt)
|
||||
end if
|
||||
end do
|
||||
end if
|
||||
|
|
@ -686,7 +686,7 @@ contains
|
|||
bins(TS_SURFACE) = OUT_FRONT
|
||||
bins(1:3) = ijk0 + 1
|
||||
score_index = sum((bins - 1) * t % stride) + 1
|
||||
call add_to_score(t % scores(score_index, 1), p % last_wgt)
|
||||
call add_to_score(t % scores(score_index, 1), p % wgt)
|
||||
end if
|
||||
end do
|
||||
else
|
||||
|
|
@ -696,7 +696,7 @@ contains
|
|||
bins(TS_SURFACE) = IN_FRONT
|
||||
bins(1:3) = ijk0 + 1
|
||||
score_index = sum((bins - 1) * t % stride) + 1
|
||||
call add_to_score(t % scores(score_index, 1), p % last_wgt)
|
||||
call add_to_score(t % scores(score_index, 1), p % wgt)
|
||||
end if
|
||||
end do
|
||||
end if
|
||||
|
|
@ -710,7 +710,7 @@ contains
|
|||
bins(TS_SURFACE) = OUT_RIGHT
|
||||
bins(1:3) = ijk0 + 1
|
||||
score_index = sum((bins - 1) * t % stride) + 1
|
||||
call add_to_score(t % scores(score_index, 1), p % last_wgt)
|
||||
call add_to_score(t % scores(score_index, 1), p % wgt)
|
||||
end if
|
||||
end do
|
||||
else
|
||||
|
|
@ -720,7 +720,7 @@ contains
|
|||
bins(TS_SURFACE) = IN_RIGHT
|
||||
bins(1:3) = ijk0 + 1
|
||||
score_index = sum((bins - 1) * t % stride) + 1
|
||||
call add_to_score(t % scores(score_index, 1), p % last_wgt)
|
||||
call add_to_score(t % scores(score_index, 1), p % wgt)
|
||||
end if
|
||||
end do
|
||||
end if
|
||||
|
|
@ -836,7 +836,7 @@ contains
|
|||
end if
|
||||
|
||||
! Add to surface current tally
|
||||
call add_to_score(t % scores(score_index, 1), p % last_wgt)
|
||||
call add_to_score(t % scores(score_index, 1), p % wgt)
|
||||
end if
|
||||
|
||||
! Calculate new coordinates
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue