mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Random Ray Void Accuracy Fix (#3316)
This commit is contained in:
parent
a2a5c2af19
commit
53066768de
5 changed files with 10 additions and 12 deletions
|
|
@ -187,8 +187,7 @@ void FlatSourceDomain::normalize_scalar_flux_and_volumes(
|
|||
source_regions_.volume_naive(sr) =
|
||||
source_regions_.volume(sr) * normalization_factor;
|
||||
source_regions_.volume_sq(sr) =
|
||||
(source_regions_.volume_sq_t(sr) / source_regions_.volume_t(sr)) *
|
||||
volume_normalization_factor;
|
||||
source_regions_.volume_sq_t(sr) / source_regions_.volume_t(sr);
|
||||
source_regions_.volume(sr) =
|
||||
source_regions_.volume_t(sr) * volume_normalization_factor;
|
||||
}
|
||||
|
|
@ -463,12 +462,11 @@ void FlatSourceDomain::convert_source_regions_to_tallies()
|
|||
auto filter_weight = filter_iter.weight_;
|
||||
|
||||
// Loop over scores
|
||||
for (auto score_index = 0; score_index < tally.scores_.size();
|
||||
score_index++) {
|
||||
auto score_bin = tally.scores_[score_index];
|
||||
for (int score = 0; score < tally.scores_.size(); score++) {
|
||||
auto score_bin = tally.scores_[score];
|
||||
// If a valid tally, filter, and score combination has been found,
|
||||
// then add it to the list of tally tasks for this source element.
|
||||
TallyTask task(i_tally, filter_index, score_index, score_bin);
|
||||
TallyTask task(i_tally, filter_index, score, score_bin);
|
||||
source_regions_.tally_task(sr, g).push_back(task);
|
||||
|
||||
// Also add this task to the list of volume tasks for this source
|
||||
|
|
|
|||
|
|
@ -127,8 +127,7 @@ void LinearSourceDomain::normalize_scalar_flux_and_volumes(
|
|||
source_regions_.volume(sr) =
|
||||
source_regions_.volume_t(sr) * volume_normalization_factor;
|
||||
source_regions_.volume_sq(sr) =
|
||||
(source_regions_.volume_sq_t(sr) / source_regions_.volume_t(sr)) *
|
||||
volume_normalization_factor;
|
||||
source_regions_.volume_sq_t(sr) / source_regions_.volume_t(sr);
|
||||
if (source_regions_.volume_t(sr) > 0.0) {
|
||||
double inv_volume = 1.0 / source_regions_.volume_t(sr);
|
||||
source_regions_.centroid(sr) = source_regions_.centroid_t(sr);
|
||||
|
|
|
|||
|
|
@ -703,6 +703,7 @@ void RandomRay::attenuate_flux_linear_source_void(
|
|||
// source region. The centroid and spatial momements estimates are scaled by
|
||||
// the ray segment length as part of length averaging of the estimates.
|
||||
domain_->source_regions_.volume(sr) += distance;
|
||||
domain_->source_regions_.volume_sq(sr) += distance_2;
|
||||
domain_->source_regions_.centroid_iteration(sr) += midpoint * distance;
|
||||
moment_matrix_estimate *= distance;
|
||||
domain_->source_regions_.mom_matrix(sr) += moment_matrix_estimate;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
tally 1:
|
||||
1.760401E+00
|
||||
1.554914E-01
|
||||
2.354630E+00
|
||||
2.777456E-01
|
||||
tally 2:
|
||||
1.056204E-01
|
||||
5.741779E-04
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
tally 1:
|
||||
1.762592E+00
|
||||
1.558698E-01
|
||||
2.356821E+00
|
||||
2.782548E-01
|
||||
tally 2:
|
||||
1.082935E-01
|
||||
6.029854E-04
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue