forked from neams-th-coe/cardinal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request neams-th-coe#853 from aprilnovak/std_dev_bug
Fix bug in tally relative error calculation.
- Loading branch information
Showing
5 changed files
with
123 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
test/tests/postprocessors/fission_tally_relative_error/gold/ratio_out.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
time,heating_max,heating_min,kf_max,kf_min,max_ht,max_kf,min_ht,min_kf | ||
0,0,0,0,0,0,0,0,0 | ||
1,0.035555464514196,0.029889937640975,0.035548762735905,0.029978352900852,0.035555464514196,0.035548762735905,0.029889937640975,0.029978352900852 |
106 changes: 106 additions & 0 deletions
106
test/tests/postprocessors/fission_tally_relative_error/ratio.i
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
[Mesh] | ||
[sphere] | ||
type = FileMeshGenerator | ||
file = ../../neutronics/meshes/sphere.e | ||
[] | ||
[solid] | ||
type = CombinerGenerator | ||
inputs = sphere | ||
positions = '0 0 0 | ||
0 0 4 | ||
0 0 8' | ||
[] | ||
[] | ||
|
||
[Problem] | ||
type = OpenMCCellAverageProblem | ||
power = 100.0 | ||
tally_blocks = '1' | ||
cell_level = 0 | ||
tally_type = cell | ||
check_tally_sum = false | ||
|
||
tally_score = 'heating kappa_fission' | ||
output = 'unrelaxed_tally_std_dev' | ||
initial_properties = xml | ||
[] | ||
|
||
# the ratio of the std_dev variable and the output tally should give | ||
# the relative error in the tallies.out | ||
[AuxVariables] | ||
[heating_rel_err] | ||
family = MONOMIAL | ||
order = CONSTANT | ||
[] | ||
[kappa_fission_rel_err] | ||
family = MONOMIAL | ||
order = CONSTANT | ||
[] | ||
[] | ||
|
||
[AuxKernels] | ||
[heating] | ||
type = ParsedAux | ||
variable = heating_rel_err | ||
expression = 'heating_std_dev / heating' | ||
coupled_variables = 'heating_std_dev heating' | ||
[] | ||
[kappa_fission] | ||
type = ParsedAux | ||
variable = kappa_fission_rel_err | ||
expression = 'kappa_fission_std_dev / kappa_fission' | ||
coupled_variables = 'kappa_fission_std_dev kappa_fission' | ||
[] | ||
[] | ||
|
||
[Executioner] | ||
type = Transient | ||
num_steps = 1 | ||
[] | ||
|
||
[Postprocessors] | ||
[heating_max] | ||
type = ElementExtremeValue | ||
value_type = max | ||
variable = heating_rel_err | ||
[] | ||
[heating_min] | ||
type = ElementExtremeValue | ||
value_type = min | ||
variable = heating_rel_err | ||
[] | ||
[kf_max] | ||
type = ElementExtremeValue | ||
value_type = max | ||
variable = kappa_fission_rel_err | ||
[] | ||
[kf_min] | ||
type = ElementExtremeValue | ||
value_type = min | ||
variable = kappa_fission_rel_err | ||
[] | ||
[max_ht] | ||
type = TallyRelativeError | ||
value_type = max | ||
tally_score = 'heating' | ||
[] | ||
[min_ht] | ||
type = TallyRelativeError | ||
value_type = min | ||
tally_score = 'heating' | ||
[] | ||
[max_kf] | ||
type = TallyRelativeError | ||
value_type = max | ||
tally_score = 'kappa_fission' | ||
[] | ||
[min_kf] | ||
type = TallyRelativeError | ||
value_type = min | ||
tally_score = 'kappa_fission' | ||
[] | ||
[] | ||
|
||
[Outputs] | ||
csv = true | ||
[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters