Difference between revisions of "Sensitivity calculations"
(→Custom perturbations (xGPT)) |
Ana Jambrina (Talk | contribs) |
||
(38 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | Serpent relies on the collision history based first order GPT equivalent implementation<ref name="GPT"/> to calculate sensitivities of various responses to various perturbations. | + | Serpent relies on the collision history based first order GPT equivalent implementation<ref name="GPT"/> <ref name="ValtavirtaBEPU18"/> to calculate sensitivities of various responses to various perturbations. In version 2.1.31, these capabilities were extended to be used for uncertainty propagation of Serpent estimates <ref name="UncReport18"/>. From version 2.2.1 and on, it applies not only to criticality calculations but also to external source calculations. |
− | + | ||
− | + | ||
− | + | ||
== Input == | == Input == | ||
Line 17: | Line 14: | ||
{| class="wikitable" | {| class="wikitable" | ||
− | + | ! <tt>''NAME''</tt> | |
− | + | ! explanation of <tt>''NAME''</tt> | |
− | + | ! <tt>''FLAG''</tt> | |
− | + | ! explanation of <tt>''FLAG''</tt> | |
|- | |- | ||
− | | keff | + | | <tt>keff</tt> |
| sensitivity of effective multiplication factor to perturbation | | sensitivity of effective multiplication factor to perturbation | ||
| 0/1 | | 0/1 | ||
| OFF/ON | | OFF/ON | ||
|- | |- | ||
− | | beff | + | | <tt>beff</tt> |
| sensitivity of effective delayed neutron fraction to perturbation | | sensitivity of effective delayed neutron fraction to perturbation | ||
| 0/1 | | 0/1 | ||
| OFF/ON | | OFF/ON | ||
|- | |- | ||
− | | leff | + | | <tt>leff</tt> |
| sensitivity of effective prompt generation time to perturbation | | sensitivity of effective prompt generation time to perturbation | ||
| 0/1 | | 0/1 | ||
| OFF/ON | | OFF/ON | ||
+ | |- | ||
+ | | <tt>lambda</tt> | ||
+ | | sensitivity of delayed neutron precursor decay constants to perturbation | ||
+ | | 0 0/1 1 | ||
+ | | OFF (total) OFF (group wise) / ON (total) ON (group wise) | ||
|} | |} | ||
Line 44: | Line 46: | ||
Sensitivities of reaction rate ratios to perturbations can be set up to be calculated with | Sensitivities of reaction rate ratios to perturbations can be set up to be calculated with | ||
− | '''sens''' '''resp''' '''detratio''' ''NAME'' ''DET1'' ''DET2'' | + | '''sens''' '''resp''' '''detratio''' ''NAME'' ''DET1'' ''DET2'' [''FRAC1'' ''FRAC2''] |
− | Where the | + | Where the parameters are: |
{| | {| | ||
Line 57: | Line 59: | ||
|<tt>''DET2''</tt> | |<tt>''DET2''</tt> | ||
|: Name of the denominator detector, i.e. the one whose reaction rate is the dividing value. | |: Name of the denominator detector, i.e. the one whose reaction rate is the dividing value. | ||
+ | |- | ||
+ | |<tt>''FRAC1''</tt> | ||
+ | |: Fraction of contributions to <tt>''DET1''</tt> to include in the sensitivity evaluation. Higher fraction yields better statistics but increases runtime. Default is 1 (all detector score contribute to the sensitivity). | ||
+ | |- | ||
+ | |<tt>''FRAC2''</tt> | ||
+ | |: Fraction of contributions to <tt>''DET2''</tt> to include in the sensitivity evaluation. Higher fraction yields better statistics but increases runtime. Default is 1 (all detector score contribute to the sensitivity). | ||
|} | |} | ||
Line 63: | Line 71: | ||
<u>Notes:</u> | <u>Notes:</u> | ||
− | *Currently, | + | *Currently, the detectors must have the same number of bins and at most one [[Input syntax manual#det dr|response bin]]. |
− | *Currently, | + | *Currently, the indirect effect of the perturbation is always calculated and the direct effect is calculated for the following [[ENDF_reaction_MT's_and_macroscopic_reaction_numbers|detector responses]]: |
+ | **dr -1 (macroscopic total XS) | ||
+ | **dr -2 (macroscopic total capture XS) | ||
+ | **dr -3 (macroscopic total elastic scattering XS) | ||
+ | **dr -6 (macroscopic total fission XS) | ||
+ | **dr -7 (macroscopic total fission neutron production XS) | ||
+ | **[[ENDF_reaction_MT's_and_macroscopic_reaction_numbers#ENDF_Reaction_MT's|Positive MT-numbers]], however the sum reaction modes (e.g. MT=4) are not summed up from the partial reaction modes. | ||
+ | |||
+ | ==== Void reactivity coefficient sensitivity ==== | ||
+ | |||
+ | The sensitivity of the void reactivity coefficient to perturbations can be set up to be calculated with | ||
+ | |||
+ | '''sens''' '''resp''' '''void''' ''MATERIAL'' | ||
+ | |||
+ | Where the parameters are: | ||
+ | |||
+ | {| | ||
+ | |<tt>''MATERIAL''</tt> | ||
+ | |: the name of the material corresponding to the void coefficient. | ||
+ | |} | ||
=== Adding a perturbation === | === Adding a perturbation === | ||
+ | |||
+ | ==== Basic perturbations ==== | ||
'''sens''' '''pert''' ''NAME'' ''FLAG'' | '''sens''' '''pert''' ''NAME'' ''FLAG'' | ||
Line 73: | Line 102: | ||
{| class="wikitable" | {| class="wikitable" | ||
− | + | ! <tt>''NAME''</tt> | |
− | + | ! explanation of <tt>''NAME''</tt> | |
− | + | ! <tt>''FLAG''</tt> | |
− | + | ! explanation of <tt>''FLAG''</tt> | |
|- | |- | ||
− | | xs | + | | <tt>xs</tt> |
| perturbation of basic cross sections | | perturbation of basic cross sections | ||
− | | 0/all/allmt | + | | 0/all/allmt/ |
− | | OFF/sum reaction modes/partial (MT) reaction modes | + | | OFF/sum reaction modes/partial (MT) reaction modes<br/> See below for only including some specific reaction modes. |
|- | |- | ||
− | | chi | + | | <tt>chi</tt> |
| perturbation of fission spectrum | | perturbation of fission spectrum | ||
| 0/1 | | 0/1 | ||
| OFF/ON | | OFF/ON | ||
|- | |- | ||
− | | nubar | + | | <tt>nubar</tt> |
| perturbation of fission nubar | | perturbation of fission nubar | ||
| 0/1 | | 0/1 | ||
| OFF/ON | | OFF/ON | ||
|- | |- | ||
− | | eleg | + | | <tt>elamu</tt> |
+ | | perturbation of elastic scattering cosine | ||
+ | | 0/1 | ||
+ | | OFF/ON | ||
+ | |- | ||
+ | | <tt>inlmu</tt> | ||
+ | | perturbation of inelastic scattering cosine | ||
+ | | 0/1 | ||
+ | | OFF/ON | ||
+ | |- | ||
+ | | <tt>eleg</tt> | ||
| perturbation of Legendre moments of <br />elastic scattering angular distribution | | perturbation of Legendre moments of <br />elastic scattering angular distribution | ||
| 0/1/2/3/4/5/6/7 | | 0/1/2/3/4/5/6/7 | ||
| Number of Legendre moments to perturb. | | Number of Legendre moments to perturb. | ||
+ | |- | ||
+ | | <tt>temperature</tt> | ||
+ | | perturbation of temperature | ||
+ | | 0/1 | ||
+ | | OFF/ON | ||
|} | |} | ||
Omitting (or forgetting) the flag from the definition will turn the perturbation on by default. The default number of Legendre moments to include is 3. | Omitting (or forgetting) the flag from the definition will turn the perturbation on by default. The default number of Legendre moments to include is 3. | ||
− | ==== | + | ==== Choosing specific reaction modes to perturb ==== |
− | Instead of | + | Instead of including all sum reactions with <tt>sens pert xs all</tt> a subset of them can be included using |
− | + | '''sens''' '''pert''' '''xs''' '''realist''' ''REA<sub>1</sub>'' ''REA<sub>2</sub>'' ... | |
− | + | where the allowed names for the sum reactions <tt>''REA<sub>n</sub>''</tt> are | |
− | + | *<tt>ela</tt>: Sum elastic scattering (excluding thermal scattering). | |
+ | *<tt>sab</tt>: Sum thermal scattering. | ||
+ | *<tt>inl</tt>: Sum inelastic scattering (MTs 51-91). | ||
+ | *<tt>capt</tt>: Sum neutron capture (all reactions with no outgoing neutrons). | ||
+ | *<tt>fiss</tt>: Sum fission (MTs 19-21 and 38). | ||
+ | *<tt>nxn</tt>: Sum scattering production (non fission reactions with more than one outgoing neutron). | ||
− | + | For example | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | '''sens''' '''pert''' '''xs''' '''realist''' '''capt''' '''fiss''' | |
− | + | will only include the capture and fission reaction modes for perturbation. | |
− | + | Similarly, it is possible to choose only certain partial (MT) reaction modes to perturb with | |
− | + | ||
− | + | '''sens''' '''pert''' '''xs''' '''mtlist''' ''MT<sub>1</sub>'' ''MT<sub>2</sub>'' ... | |
− | + | ||
− | + | For example | |
− | + | ||
− | + | '''sens''' '''pert''' '''xs''' '''mtlist''' '''19''' '''102''' | |
− | + | ||
− | + | will only include the first-chance fission (MT 19) and radiative capture (MT 102) for perturbation. | |
− | + | ||
− | + | ||
− | + | <u>Notes:</u> | |
− | + | ||
− | + | *Sum reaction modes and partial reaction modes cannot currently be perturbed at the same time (in the same input). For inputs containing both perturbations (e.g. a <tt>sens pert xs realist</tt> card and a <tt>sens pert xs mtlist</tt> card) only the latter perturbation is used. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
==== Choosing nuclides to perturb ==== | ==== Choosing nuclides to perturb ==== | ||
Line 178: | Line 216: | ||
this will automatically include the calculation of the total sensitivity. | this will automatically include the calculation of the total sensitivity. | ||
+ | |||
+ | ==== Custom perturbations (xGPT) <span id="Custom perturbations"></span>==== | ||
+ | |||
+ | Instead of adding or subtracting 1 in each accepted or rejected event, there is the possibility to, instead, add or subtract a user defined energy dependent value. This allows applying continuous energy perturbations such as the ones used in <ref name="xGPT"/>. | ||
+ | |||
+ | The syntax for adding custom perturbations is | ||
+ | |||
+ | '''sens pert custom''' ''NAME'' ['''efunc''' ''FILE''] ['''zailist''' ''ZAI<sub>1</sub>'' ''ZAI<sub>2</sub> ...''] ['''matlist''' ''MAT<sub>1</sub>'' ''MAT<sub>2</sub> ...''] ['''mtlist''' ''MT<sub>1</sub>'' ''MT<sub>2</sub> ...''] ['''realist''' ''REA<sub>1</sub>'' ''REA<sub>2</sub> ...''] | ||
+ | |||
+ | where ''<tt>NAME</tt>'' is simply a user-given name used for identification of the custom perturbation. By default, the value added or subtracted for the perturbation is 1, but an energy dependent function can be given with the '''<tt>efunc</tt>''' command, where ''FILE'' is the name of the file containing the energy dependent function in the following format: | ||
+ | |||
+ | ''INTERP_MODE'' | ||
+ | ''N<sub>pts</sub>'' | ||
+ | ''E<sub>1</sub> VAL<sub>1</sub>'' | ||
+ | ''E<sub>2</sub> VAL<sub>2</sub>'' | ||
+ | ... | ||
+ | ''E<sub>N<sub>pts</sub></sub> VAL<sub>N<sub>pts</sub></sub>'' | ||
+ | |||
+ | Accepted interpolation modes are <tt>'''lin-lin'''</tt>, <tt>'''lin-log'''</tt>, <tt>'''log-lin'''</tt> and <tt>'''log-log'''</tt>. | ||
+ | |||
+ | If the perturbation is only applied to certain nuclides (ZAIs) or materials, they can be given using the <tt>'''zailist'''</tt> and '''<tt>matlist</tt>''' options respectively. By default the perturbation is applied at each collision with the target nuclide(s). If the perturbation only affects certain reaction MT numbers, they can be given using the '''<tt>mtlist</tt>''' option. Certain sum-reactions can be flagged for the perturbation using the '''<tt>realist</tt>''' option, where the different sum reaction names are as follows: | ||
+ | |||
+ | {| | ||
+ | | '''ela''' | ||
+ | | : Elastic scattering. | ||
+ | |- | ||
+ | | '''inl''' | ||
+ | | : Inelastic scattering. | ||
+ | |- | ||
+ | | '''sab''' | ||
+ | | : Thermal S(α,β) scattering. | ||
+ | |- | ||
+ | | '''capt''' | ||
+ | | : Neutron capture (reaction neutron yield is zero). | ||
+ | |- | ||
+ | | '''fiss''' | ||
+ | | : Fission. | ||
+ | |- | ||
+ | | '''nxn''' | ||
+ | | : Neutron multiplying (n, xn) reactions. | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | <u>Notes:</u> | ||
+ | *The custom perturbations will only produce the total effect of the perturbation over all materials, nuclides and reaction modes that have not been excluded from the custom perturbation. | ||
+ | *The output for the custom perturbations can be obtained from the energy integrated (_E_INT) arrays printed to <tt>[input]_sens.m</tt>. The only nonzero value for the custom perturbations will be that with the lowest material and ZAI index. | ||
=== Additional options === | === Additional options === | ||
Line 194: | Line 278: | ||
where ''<tt>ENAME</tt>'' is a name of an [[Input_syntax_manual#ene|energy grid definition]]. | where ''<tt>ENAME</tt>'' is a name of an [[Input_syntax_manual#ene|energy grid definition]]. | ||
+ | |||
+ | ==== Spatial data mesh for scoring ==== | ||
+ | |||
+ | The spatial data mesh used for scoring the sensitivities can be set using | ||
+ | |||
+ | '''sens opt dmesh''' ''DNAME'' | ||
+ | |||
+ | where ''<tt>DNAME</tt>'' is a name of a [[Input_syntax_manual#datamesh (general data mesh definition)|spatial data mesh definition]]. | ||
+ | |||
+ | <u>Notes:</u> | ||
+ | *The number of bins defining the energy grid and the spatial data mesh should match | ||
==== Number of latent generations ==== | ==== Number of latent generations ==== | ||
Line 203: | Line 298: | ||
where ''<tt>NGEN</tt>'' is the number of generations to use. The number of summation generations for reaction rate ratios and bilinear-ratios will be ''<tt>NGEN+1</tt>'' | where ''<tt>NGEN</tt>'' is the number of generations to use. The number of summation generations for reaction rate ratios and bilinear-ratios will be ''<tt>NGEN+1</tt>'' | ||
− | ==== Direct scoring instead of event based scoring ==== | + | ==== Effect of number of latent generations ==== |
+ | |||
+ | Setting | ||
+ | |||
+ | '''sens opt history''' yes/1 | ||
+ | |||
+ | will calculate and output the sensitivities with every number of latent generations up to the one indicated with '''<tt>sens opt latgen</tt>'''. This option can be used to estimate the required number of latent generations. | ||
+ | |||
+ | ==== Direct scoring instead of event based scoring <span id="Direct scoring"></span> ==== | ||
There are two ways to go about calculating the net number of accepted collisions in the collision history of a particle. | There are two ways to go about calculating the net number of accepted collisions in the collision history of a particle. | ||
#The default way used by Serpent is to create so-called event-objects during each accepted or rejected event of interest (e.g. collision, sampled fission neutron energy or sampled scattering angle). Then, when the net number of accepted collisions is needed, this list of events is traversed and the net number is calculated. The memory requirement of this method is dependent on the number of interesting events in ''N<sub>gen</sub>'' generations of particle history, where ''N<sub>gen</sub>'' is the total number of generations stored for the collision history. In order to save memory, the events are shared by each particle that has the event in their collision history. Traversing through the event tree in order to calculate the net number of a certain event in the collision history can be costly. | #The default way used by Serpent is to create so-called event-objects during each accepted or rejected event of interest (e.g. collision, sampled fission neutron energy or sampled scattering angle). Then, when the net number of accepted collisions is needed, this list of events is traversed and the net number is calculated. The memory requirement of this method is dependent on the number of interesting events in ''N<sub>gen</sub>'' generations of particle history, where ''N<sub>gen</sub>'' is the total number of generations stored for the collision history. In order to save memory, the events are shared by each particle that has the event in their collision history. Traversing through the event tree in order to calculate the net number of a certain event in the collision history can be costly. | ||
− | #There is the option to update the net number of a certain event on-the-fly, every time that event is sampled. Event objects are no longer stored. Instead the net number of accepted collisions is either incremented (accepted collision) or decremented (rejected collision) directly. This way each generation in the collision history is associated with a ''score matrix'' representing the net number of scores for each of the different events of interest. Again, to save memory each generational score matrix is shared by all neutrons that have that neutron history in their collision history. | + | #There is the option to update the net number of a certain event on-the-fly, every time that event is sampled. Event objects are no longer stored. Instead the net number of accepted collisions is either incremented (accepted collision) or decremented (rejected collision) directly. This way each generation in the collision history is associated with a ''score matrix'' representing the net number of scores for each of the different events of interest. Again, to save memory each generational score matrix is shared by all neutrons that have that neutron history in their collision history. Looping over this score matrix can also be costly. |
+ | |||
+ | Generally, direct scoring is the better option if the length of the collision history is large and the number of perturbations (number of materials X number of nuclides X number of reactions X number of energy groups) is small. | ||
+ | |||
+ | Conversely in systems with a short collision history length (fast systems) and a large number of total perturbations, the default event based scoring should fare better. | ||
It is usually beneficial to test both methods in order to find the faster (or more memory efficient) one for the specific application. | It is usually beneficial to test both methods in order to find the faster (or more memory efficient) one for the specific application. | ||
Line 232: | Line 339: | ||
==== Event bank size ==== | ==== Event bank size ==== | ||
− | In a similar manner to the score matrices described in the previous section, Serpent also preallocates memory for the event objects used to store information about the accepted and rejected collisions. The event objects are also processed after each cycle, which means that setting a too large value for the event bank size will waste processing time. | + | In a similar manner to the score matrices described in the previous section, Serpent also preallocates memory for the event objects used to store information about the accepted and rejected collisions. The event objects are also processed after each cycle, which means that '''setting a too large value for the event bank size will waste processing time'''. |
The event bank size can be set using | The event bank size can be set using | ||
Line 238: | Line 345: | ||
'''set nbuf''' ''NBUF'' ''EBANK'' | '''set nbuf''' ''NBUF'' ''EBANK'' | ||
− | where ''<tt>NBUF</tt>'' is the neutron buffer size (default is 5) and ''<tt>EBANK</tt>'' is the event bank size (default is 100). The event bank size is given by source particle, which means that if the events would not be shared between multiple particles, a reasonable value for the event bank size would be ''N<sub>event</sub> | + | where ''<tt>NBUF</tt>'' is the neutron buffer size (default is 5) and ''<tt>EBANK</tt>'' is the event bank size (default is 100). The event bank size is given by source particle, which means that if the events would not be shared between multiple particles, a reasonable value for the event bank size would be ''N<sub>event</sub> × N<sub>gen</sub>'', where ''N<sub>event</sub>'' is the mean number of events of interest in each generation and ''N<sub>gen</sub>'' is the number of generations stored for the collision history. Due to the sharing of the events across multiple particles, much smaller values can typically be used (e.g. size of 20 for light water system with 16 stored generations with cross section and nubar perturbations for coolant and fuel nuclides). |
If Serpent notices that the allocated score matrices are running out, it will automatically try and allocate more score matrices: | If Serpent notices that the allocated score matrices are running out, it will automatically try and allocate more score matrices: | ||
Line 254: | Line 361: | ||
== Output == | == Output == | ||
− | The output of the sensitivity calculations is written into a MATLAB/OCTAVE readable file <tt>[input]_sens.m</tt> | + | The output of the sensitivity calculations is written into a MATLAB/OCTAVE readable file <tt>[input]_sens[time].m</tt> (dynamic/time-dependent calculations), <tt>[input]_sens[bu].m</tt> (burnup calculations) or <tt>[input]_sens[bu]b[idx].m</tt> (branch calculations), where "<tt>time</tt>" is the time-interval, "<tt>bu</tt>" is the burnup step, and "<tt>idx</tt> is the branch index. |
=== General parameters === | === General parameters === | ||
Line 313: | Line 420: | ||
|- | |- | ||
| ADJ_PERT_KEFF_SENS | | ADJ_PERT_KEFF_SENS | ||
− | | ''SENS_N_MAT'' | + | | ''SENS_N_MAT'' × ''SENS_N_ZAI'' × ''SENS_N_PERT'' × ''SENS_N_ENE'' × 2 |
| The energy dependent sensitivity of the '''multiplication factor''' and the associated statistical error. | | The energy dependent sensitivity of the '''multiplication factor''' and the associated statistical error. | ||
|- | |- | ||
| ADJ_PERT_KEFF_SENS_E_INT | | ADJ_PERT_KEFF_SENS_E_INT | ||
− | | ''SENS_N_MAT'' | + | | ''SENS_N_MAT'' × ''SENS_N_ZAI'' × ''SENS_N_PERT'' × 2 |
| The energy integrated sensitivity of the '''multiplication factor''' and the associated statistical error. | | The energy integrated sensitivity of the '''multiplication factor''' and the associated statistical error. | ||
|- | |- | ||
| ADJ_PERT_BEFF_SENS | | ADJ_PERT_BEFF_SENS | ||
− | | ''SENS_N_MAT'' | + | | ''SENS_N_MAT'' × ''SENS_N_ZAI'' × ''SENS_N_PERT'' × ''SENS_N_ENE'' × 2 |
| The energy dependent sensitivity of the '''delayed neutron fraction''' and the associated statistical error. | | The energy dependent sensitivity of the '''delayed neutron fraction''' and the associated statistical error. | ||
|- | |- | ||
| ADJ_PERT_BEFF_SENS_E_INT | | ADJ_PERT_BEFF_SENS_E_INT | ||
− | | ''SENS_N_MAT'' | + | | ''SENS_N_MAT'' × ''SENS_N_ZAI'' × ''SENS_N_PERT'' × 2 |
| The energy integrated sensitivity of the '''delayed neutron fraction''' and the associated statistical error. | | The energy integrated sensitivity of the '''delayed neutron fraction''' and the associated statistical error. | ||
|- | |- | ||
| ADJ_PERT_LEFF_SENS | | ADJ_PERT_LEFF_SENS | ||
− | | ''SENS_N_MAT'' | + | | ''SENS_N_MAT'' × ''SENS_N_ZAI'' × ''SENS_N_PERT'' × ''SENS_N_ENE'' × 2 |
| The energy dependent sensitivity of the '''prompt neutron generation time''' and the associated statistical error. | | The energy dependent sensitivity of the '''prompt neutron generation time''' and the associated statistical error. | ||
|- | |- | ||
| ADJ_PERT_LEFF_SENS_E_INT | | ADJ_PERT_LEFF_SENS_E_INT | ||
− | | ''SENS_N_MAT'' | + | | ''SENS_N_MAT'' × ''SENS_N_ZAI'' × ''SENS_N_PERT'' × 2 |
| The energy integrated sensitivity of the '''prompt neutron generation time''' and the associated statistical error. | | The energy integrated sensitivity of the '''prompt neutron generation time''' and the associated statistical error. | ||
|- | |- | ||
| ADJ_PERT_VOID_SENS | | ADJ_PERT_VOID_SENS | ||
− | | ''SENS_N_MAT'' | + | | ''SENS_N_MAT'' × ''SENS_N_ZAI'' × ''SENS_N_PERT'' × ''SENS_N_ENE'' × 2 |
| The energy dependent sensitivity of the '''void reactivity coefficient''' and the associated statistical error. | | The energy dependent sensitivity of the '''void reactivity coefficient''' and the associated statistical error. | ||
|- | |- | ||
| ADJ_PERT_VOID_SENS_E_INT | | ADJ_PERT_VOID_SENS_E_INT | ||
− | | ''SENS_N_MAT'' | + | | ''SENS_N_MAT'' × ''SENS_N_ZAI'' × ''SENS_N_PERT'' × 2 |
| The energy integrated sensitivity of the '''void reactivity coefficient''' and the associated statistical error. | | The energy integrated sensitivity of the '''void reactivity coefficient''' and the associated statistical error. | ||
|- | |- | ||
Line 354: | Line 461: | ||
|- | |- | ||
| ADJ_PERT_''NAME''_SENS | | ADJ_PERT_''NAME''_SENS | ||
− | | ''SENS_N_MAT'' | + | | ''SENS_N_MAT'' × ''SENS_N_ZAI'' × ''SENS_N_PERT'' × ''SENS_N_ENE'' × 2 |
| The energy dependent sensitivity of the reaction rate ratio ''NAME'' and the associated statistical error. | | The energy dependent sensitivity of the reaction rate ratio ''NAME'' and the associated statistical error. | ||
|- | |- | ||
| ADJ_PERT_''NAME''_SENS_E_INT | | ADJ_PERT_''NAME''_SENS_E_INT | ||
− | | ''SENS_N_MAT'' | + | | ''SENS_N_MAT'' × ''SENS_N_ZAI'' × ''SENS_N_PERT'' × 2 |
| The energy integrated sensitivity of the reaction rate ratio ''NAME'' and the associated statistical error. | | The energy integrated sensitivity of the reaction rate ratio ''NAME'' and the associated statistical error. | ||
|- | |- | ||
Line 398: | Line 505: | ||
* The energy dependent sensitivities are integrated over the energy bins and '''not''' divided by the bin energy- or lethargy-width. | * The energy dependent sensitivities are integrated over the energy bins and '''not''' divided by the bin energy- or lethargy-width. | ||
* The sensitivity output is mostly written as 1D arrays and reshaped and permuted using the appropriate MATLAB/OCTAVE commands (included in the .m file). | * The sensitivity output is mostly written as 1D arrays and reshaped and permuted using the appropriate MATLAB/OCTAVE commands (included in the .m file). | ||
− | |||
== Examples == | == Examples == | ||
* [[Flattop k-eff sensitivity example]] | * [[Flattop k-eff sensitivity example]] | ||
+ | * [[xGPT example]] | ||
== References == | == References == | ||
Line 409: | Line 516: | ||
<ref name="GPT">Aufiero, M. ''et al.'' ''"A collision history-based approach to sensitivity/perturbation calculations in the continuous energy Monte Carlo code SERPENT"'', Ann. Nucl. Energy, [http://www.sciencedirect.com/science/article/pii/S0306454915002650 152 (2015) 245-258].</ref> | <ref name="GPT">Aufiero, M. ''et al.'' ''"A collision history-based approach to sensitivity/perturbation calculations in the continuous energy Monte Carlo code SERPENT"'', Ann. Nucl. Energy, [http://www.sciencedirect.com/science/article/pii/S0306454915002650 152 (2015) 245-258].</ref> | ||
<ref name="xGPT">Aufiero, M., Martin, M. and Fratoni, M. ''"XGPT: Extending Monte Carlo Generalized Perturbation Theory capabilities to continuous-energy sensitivity functions."'' Ann. Nucl. Energy, [http://www.sciencedirect.com/science/article/pii/S0306454916302572 96 (2016) 295-306].</ref> | <ref name="xGPT">Aufiero, M., Martin, M. and Fratoni, M. ''"XGPT: Extending Monte Carlo Generalized Perturbation Theory capabilities to continuous-energy sensitivity functions."'' Ann. Nucl. Energy, [http://www.sciencedirect.com/science/article/pii/S0306454916302572 96 (2016) 295-306].</ref> | ||
+ | <ref name="ValtavirtaBEPU18">Valtavirta, V., Aufiero, M. and Leppänen, J. ''"Collision-history based sensitivity/perturbation calculation capabilities in Serpent 2.1.30"'', In Proc. BEPU 2018, Lucca, Italy, May 13-19, [https://cris.vtt.fi/ws/portalfiles/portal/22670223/27_conf_Valtavirta_BEPU18.pdf 2018].</ref> | ||
+ | <ref name="UncReport18">Valtavirta, V. ''"Nuclear data uncertainty propagation to Serpent generated group and time constants"'', Research report VTT-R-04681-18 [http://montecarlo.vtt.fi/download/VTT-R-04681-18_web.pdf (2018)].</ref> | ||
</references> | </references> | ||
+ | |||
+ | [[Category:Input]] | ||
+ | [[Category:Output]] | ||
+ | [[Category:Theory]] | ||
+ | [[Category:Tutorials]] |
Latest revision as of 13:38, 26 May 2023
Serpent relies on the collision history based first order GPT equivalent implementation^{[1]} ^{[2]} to calculate sensitivities of various responses to various perturbations. In version 2.1.31, these capabilities were extended to be used for uncertainty propagation of Serpent estimates ^{[3]}. From version 2.2.1 and on, it applies not only to criticality calculations but also to external source calculations.
Contents
Input
Adding a response
Basic responses
Basic responses can be set up with the syntax
sens resp NAME FLAG
Where the different response names and flags are as follows
NAME | explanation of NAME | FLAG | explanation of FLAG |
---|---|---|---|
keff | sensitivity of effective multiplication factor to perturbation | 0/1 | OFF/ON |
beff | sensitivity of effective delayed neutron fraction to perturbation | 0/1 | OFF/ON |
leff | sensitivity of effective prompt generation time to perturbation | 0/1 | OFF/ON |
lambda | sensitivity of delayed neutron precursor decay constants to perturbation | 0 0/1 1 | OFF (total) OFF (group wise) / ON (total) ON (group wise) |
Omitting (or forgetting) the flag from the definition, will turn the response on by default.
Reaction rate ratios
Sensitivities of reaction rate ratios to perturbations can be set up to be calculated with
sens resp detratio NAME DET1 DET2 [FRAC1 FRAC2]
Where the parameters are:
NAME | : the name of the response. Will be used in output. |
DET1 | : Name of the numerator detector, i.e. the one whose reaction rate is being divided. |
DET2 | : Name of the denominator detector, i.e. the one whose reaction rate is the dividing value. |
FRAC1 | : Fraction of contributions to DET1 to include in the sensitivity evaluation. Higher fraction yields better statistics but increases runtime. Default is 1 (all detector score contribute to the sensitivity). |
FRAC2 | : Fraction of contributions to DET2 to include in the sensitivity evaluation. Higher fraction yields better statistics but increases runtime. Default is 1 (all detector score contribute to the sensitivity). |
The two detectors have to be set up separately in normal Serpent fashion.
Notes:
- Currently, the detectors must have the same number of bins and at most one response bin.
- Currently, the indirect effect of the perturbation is always calculated and the direct effect is calculated for the following detector responses:
- dr -1 (macroscopic total XS)
- dr -2 (macroscopic total capture XS)
- dr -3 (macroscopic total elastic scattering XS)
- dr -6 (macroscopic total fission XS)
- dr -7 (macroscopic total fission neutron production XS)
- Positive MT-numbers, however the sum reaction modes (e.g. MT=4) are not summed up from the partial reaction modes.
Void reactivity coefficient sensitivity
The sensitivity of the void reactivity coefficient to perturbations can be set up to be calculated with
sens resp void MATERIAL
Where the parameters are:
MATERIAL | : the name of the material corresponding to the void coefficient. |
Adding a perturbation
Basic perturbations
sens pert NAME FLAG
Where the different perturbation names and flags are as follows
NAME | explanation of NAME | FLAG | explanation of FLAG |
---|---|---|---|
xs | perturbation of basic cross sections | 0/all/allmt/ | OFF/sum reaction modes/partial (MT) reaction modes See below for only including some specific reaction modes. |
chi | perturbation of fission spectrum | 0/1 | OFF/ON |
nubar | perturbation of fission nubar | 0/1 | OFF/ON |
elamu | perturbation of elastic scattering cosine | 0/1 | OFF/ON |
inlmu | perturbation of inelastic scattering cosine | 0/1 | OFF/ON |
eleg | perturbation of Legendre moments of elastic scattering angular distribution |
0/1/2/3/4/5/6/7 | Number of Legendre moments to perturb. |
temperature | perturbation of temperature | 0/1 | OFF/ON |
Omitting (or forgetting) the flag from the definition will turn the perturbation on by default. The default number of Legendre moments to include is 3.
Choosing specific reaction modes to perturb
Instead of including all sum reactions with sens pert xs all a subset of them can be included using
sens pert xs realist REA_{1} REA_{2} ...
where the allowed names for the sum reactions REA_{n} are
- ela: Sum elastic scattering (excluding thermal scattering).
- sab: Sum thermal scattering.
- inl: Sum inelastic scattering (MTs 51-91).
- capt: Sum neutron capture (all reactions with no outgoing neutrons).
- fiss: Sum fission (MTs 19-21 and 38).
- nxn: Sum scattering production (non fission reactions with more than one outgoing neutron).
For example
sens pert xs realist capt fiss
will only include the capture and fission reaction modes for perturbation.
Similarly, it is possible to choose only certain partial (MT) reaction modes to perturb with
sens pert xs mtlist MT_{1} MT_{2} ...
For example
sens pert xs mtlist 19 102
will only include the first-chance fission (MT 19) and radiative capture (MT 102) for perturbation.
Notes:
- Sum reaction modes and partial reaction modes cannot currently be perturbed at the same time (in the same input). For inputs containing both perturbations (e.g. a sens pert xs realist card and a sens pert xs mtlist card) only the latter perturbation is used.
Choosing nuclides to perturb
The perturbed nuclides can be specified by giving a list of the ZAI-numbers to include
sens pert zailist ZAI_{1} ZAI_{2} ...
for example
sens pert zailist 922350 922380
for perturbations affecting ^{235}U and ^{238}U. By giving the control words total and/or sum in the list of ZAI-numbers, the total sensitivity over all ZAIs present in the calculation and the sum sensitivity of the listed ZAIs will be calculated, respectively.
All nuclides present in the calculation can be included with
sens pert zailist all
this will automatically include the calculation of the total sensitivity.
Choosing materials to perturb
The materials, where the perturbations are applied can similarly be specified by giving a list of the material names
sens pert matlist MAT_{1} MAT_{2} ...
for example
sens pert matlist fuel coolant
for perturbations affecting interactions in materials fuel and coolant. By giving the control words total and/or sum in the list of material names, the total sensitivity over all materials present in the calculation and the sum sensitivity of the listed materials will be calculated, respectively.
All materials present in the calculation can be included with
sens pert matlist all
this will automatically include the calculation of the total sensitivity.
Custom perturbations (xGPT)
Instead of adding or subtracting 1 in each accepted or rejected event, there is the possibility to, instead, add or subtract a user defined energy dependent value. This allows applying continuous energy perturbations such as the ones used in ^{[4]}.
The syntax for adding custom perturbations is
sens pert custom NAME [efunc FILE] [zailist ZAI_{1} ZAI_{2} ...] [matlist MAT_{1} MAT_{2} ...] [mtlist MT_{1} MT_{2} ...] [realist REA_{1} REA_{2} ...]
where NAME is simply a user-given name used for identification of the custom perturbation. By default, the value added or subtracted for the perturbation is 1, but an energy dependent function can be given with the efunc command, where FILE is the name of the file containing the energy dependent function in the following format:
INTERP_MODE N_{pts} E_{1} VAL_{1} E_{2} VAL_{2} ... E_{Npts} VAL_{Npts}
Accepted interpolation modes are lin-lin, lin-log, log-lin and log-log.
If the perturbation is only applied to certain nuclides (ZAIs) or materials, they can be given using the zailist and matlist options respectively. By default the perturbation is applied at each collision with the target nuclide(s). If the perturbation only affects certain reaction MT numbers, they can be given using the mtlist option. Certain sum-reactions can be flagged for the perturbation using the realist option, where the different sum reaction names are as follows:
ela | : Elastic scattering. |
inl | : Inelastic scattering. |
sab | : Thermal S(α,β) scattering. |
capt | : Neutron capture (reaction neutron yield is zero). |
fiss | : Fission. |
nxn | : Neutron multiplying (n, xn) reactions. |
Notes:
- The custom perturbations will only produce the total effect of the perturbation over all materials, nuclides and reaction modes that have not been excluded from the custom perturbation.
- The output for the custom perturbations can be obtained from the energy integrated (_E_INT) arrays printed to [input]_sens.m. The only nonzero value for the custom perturbations will be that with the lowest material and ZAI index.
Additional options
The options for sensitivity calculations can be set using the
sens opt ...
syntax.
Energy grid for scoring
The energy grid used for scoring the sensitivities can be set using
sens opt egrid ENAME
where ENAME is a name of an energy grid definition.
Spatial data mesh for scoring
The spatial data mesh used for scoring the sensitivities can be set using
sens opt dmesh DNAME
where DNAME is a name of a spatial data mesh definition.
Notes:
- The number of bins defining the energy grid and the spatial data mesh should match
Number of latent generations
The number of latent generations used for k-effective sensitivity calculations can be set with
sens opt latgen NGEN
where NGEN is the number of generations to use. The number of summation generations for reaction rate ratios and bilinear-ratios will be NGEN+1
Effect of number of latent generations
Setting
sens opt history yes/1
will calculate and output the sensitivities with every number of latent generations up to the one indicated with sens opt latgen. This option can be used to estimate the required number of latent generations.
Direct scoring instead of event based scoring
There are two ways to go about calculating the net number of accepted collisions in the collision history of a particle.
- The default way used by Serpent is to create so-called event-objects during each accepted or rejected event of interest (e.g. collision, sampled fission neutron energy or sampled scattering angle). Then, when the net number of accepted collisions is needed, this list of events is traversed and the net number is calculated. The memory requirement of this method is dependent on the number of interesting events in N_{gen} generations of particle history, where N_{gen} is the total number of generations stored for the collision history. In order to save memory, the events are shared by each particle that has the event in their collision history. Traversing through the event tree in order to calculate the net number of a certain event in the collision history can be costly.
- There is the option to update the net number of a certain event on-the-fly, every time that event is sampled. Event objects are no longer stored. Instead the net number of accepted collisions is either incremented (accepted collision) or decremented (rejected collision) directly. This way each generation in the collision history is associated with a score matrix representing the net number of scores for each of the different events of interest. Again, to save memory each generational score matrix is shared by all neutrons that have that neutron history in their collision history. Looping over this score matrix can also be costly.
Generally, direct scoring is the better option if the length of the collision history is large and the number of perturbations (number of materials X number of nuclides X number of reactions X number of energy groups) is small.
Conversely in systems with a short collision history length (fast systems) and a large number of total perturbations, the default event based scoring should fare better.
It is usually beneficial to test both methods in order to find the faster (or more memory efficient) one for the specific application.
In order to use the direct scoring (option 2), the input is
sens opt direct F
where F indicates the number of score matrices to be allocated per source particle per generation. If the score matrices would not be shared across multiple source particles F would need to be set to 1.0. However, in reality fewer score matrices are needed and the F can be set to be smaller than unity (e.g. 0.2-0.5).
The score matrices require some additional processing after each cycle, which means that it is a good idea to try and make the F parameter as small as possible in order to avoid having to process an excess number of score matrices. If Serpent notices that the allocated score matrices are running out, it will automatically try and allocate more score matrices:
***** Warning: Adjusting event score matrix bank size for thread 5...
Even so, the score matrices can sometimes run out by surprise leading to an error:
Fatal error in function EBlockFromBank: Event score matrix bank is empty. Increase the bank size with "sens opt direct <sz>". Simulation aborted.
Event bank size
In a similar manner to the score matrices described in the previous section, Serpent also preallocates memory for the event objects used to store information about the accepted and rejected collisions. The event objects are also processed after each cycle, which means that setting a too large value for the event bank size will waste processing time.
The event bank size can be set using
set nbuf NBUF EBANK
where NBUF is the neutron buffer size (default is 5) and EBANK is the event bank size (default is 100). The event bank size is given by source particle, which means that if the events would not be shared between multiple particles, a reasonable value for the event bank size would be N_{event} × N_{gen}, where N_{event} is the mean number of events of interest in each generation and N_{gen} is the number of generations stored for the collision history. Due to the sharing of the events across multiple particles, much smaller values can typically be used (e.g. size of 20 for light water system with 16 stored generations with cross section and nubar perturbations for coolant and fuel nuclides).
If Serpent notices that the allocated score matrices are running out, it will automatically try and allocate more score matrices:
***** Warning: Adjusting event bank size for thread 2...
If the event banks run out completely the following error is given:
Fatal error in function EventFromBank: Event bank is empty Simulation aborted.
Output
The output of the sensitivity calculations is written into a MATLAB/OCTAVE readable file [input]_sens[time].m (dynamic/time-dependent calculations), [input]_sens[bu].m (burnup calculations) or [input]_sens[bu]b[idx].m (branch calculations), where "time" is the time-interval, "bu" is the burnup step, and "idx is the branch index.
General parameters
Parameter | Size | Description |
---|---|---|
SENS_N_MAT | 1 | Number of perturbed materials. |
SENS_N_ZAI | 1 | Number of perturbed nuclides (ZAIs). |
SENS_N_PERT | 1 | Number of different perturbation types (cross sections, fission spectra etc.). |
SENS_N_ENE | 1 | Number of energy bins used for tallying the sensitivities. |
SENS_MAT_LIST | SENS_N_MAT strings | Array of names for the perturbed materials. |
SENS_ZAI_LIST | SENS_N_ZAI | Array of ZAI numbers for the perturbed nuclides. |
SENS_PERT_LIST | SENS_N_PERT strings | Array of names for the perturbation types. |
SENS_E | SENS_N_ENE + 1 | Grid points for the energy grid used for tallying the sensitivities. |
SENS_LETHARGY_WIDTHS | SENS_N_ENE | Lethargy widths of the energy bins. Lethargy at the maximum energy bin boundary is 0. |
Calculated sensitivities
The calculated sensitivities are printed out both in an energy dependent format (integrated to the energy grid defined by sens opt egrid) and an energy integrated format (integrated over all energies).
The standard sensitivity responses include:
Parameter | Size | Description |
---|---|---|
ADJ_PERT_KEFF_SENS | SENS_N_MAT × SENS_N_ZAI × SENS_N_PERT × SENS_N_ENE × 2 | The energy dependent sensitivity of the multiplication factor and the associated statistical error. |
ADJ_PERT_KEFF_SENS_E_INT | SENS_N_MAT × SENS_N_ZAI × SENS_N_PERT × 2 | The energy integrated sensitivity of the multiplication factor and the associated statistical error. |
ADJ_PERT_BEFF_SENS | SENS_N_MAT × SENS_N_ZAI × SENS_N_PERT × SENS_N_ENE × 2 | The energy dependent sensitivity of the delayed neutron fraction and the associated statistical error. |
ADJ_PERT_BEFF_SENS_E_INT | SENS_N_MAT × SENS_N_ZAI × SENS_N_PERT × 2 | The energy integrated sensitivity of the delayed neutron fraction and the associated statistical error. |
ADJ_PERT_LEFF_SENS | SENS_N_MAT × SENS_N_ZAI × SENS_N_PERT × SENS_N_ENE × 2 | The energy dependent sensitivity of the prompt neutron generation time and the associated statistical error. |
ADJ_PERT_LEFF_SENS_E_INT | SENS_N_MAT × SENS_N_ZAI × SENS_N_PERT × 2 | The energy integrated sensitivity of the prompt neutron generation time and the associated statistical error. |
ADJ_PERT_VOID_SENS | SENS_N_MAT × SENS_N_ZAI × SENS_N_PERT × SENS_N_ENE × 2 | The energy dependent sensitivity of the void reactivity coefficient and the associated statistical error. |
ADJ_PERT_VOID_SENS_E_INT | SENS_N_MAT × SENS_N_ZAI × SENS_N_PERT × 2 | The energy integrated sensitivity of the void reactivity coefficient and the associated statistical error. |
The reaction rate sensitivities defined using sens resp detratio are output as:
Parameter | Size | Description |
---|---|---|
ADJ_PERT_NAME_SENS | SENS_N_MAT × SENS_N_ZAI × SENS_N_PERT × SENS_N_ENE × 2 | The energy dependent sensitivity of the reaction rate ratio NAME and the associated statistical error. |
ADJ_PERT_NAME_SENS_E_INT | SENS_N_MAT × SENS_N_ZAI × SENS_N_PERT × 2 | The energy integrated sensitivity of the reaction rate ratio NAME and the associated statistical error. |
Helpful indices
The indices for different materials, ZAIs and perturbations are also included as separate variables of the following format
Parameter | Size | Description |
---|---|---|
iSENS_MAT_NAME | 1 | Index corresponding to material NAME. |
iSENS_ZAI_NUMBER | 1 | Index corresponding to the nuclide with ZAI NUMBER. |
iSENS_PERT_NAME | 1 | Index corresponding to the perturbation NAME. |
These indices can be used to refer to the different materials, nuclides and perturbations in data processing without the need to manually figure out the indices. For example,
ADJ_PERT_KEFF_SENS(iSENS_MAT_fuel, iSENS_ZAI_922380, iSENS_PERT_CAPT_XS, :, 1)
will refer to the energy dependent sensitivity of the multiplication factor to the perturbation of the capture cross section of uranium 238 in the material fuel.
It should be noted that the indices for certain materials, ZAIs and perturbations only exist if they have been included in the sensitivity calculation using sens pert.
Notes
- The energy dependent sensitivities are integrated over the energy bins and not divided by the bin energy- or lethargy-width.
- The sensitivity output is mostly written as 1D arrays and reshaped and permuted using the appropriate MATLAB/OCTAVE commands (included in the .m file).
Examples
References
- ^ Aufiero, M. et al. "A collision history-based approach to sensitivity/perturbation calculations in the continuous energy Monte Carlo code SERPENT", Ann. Nucl. Energy, 152 (2015) 245-258.
- ^ Valtavirta, V., Aufiero, M. and Leppänen, J. "Collision-history based sensitivity/perturbation calculation capabilities in Serpent 2.1.30", In Proc. BEPU 2018, Lucca, Italy, May 13-19, 2018.
- ^ Valtavirta, V. "Nuclear data uncertainty propagation to Serpent generated group and time constants", Research report VTT-R-04681-18 (2018).
- ^ Aufiero, M., Martin, M. and Fratoni, M. "XGPT: Extending Monte Carlo Generalized Perturbation Theory capabilities to continuous-energy sensitivity functions." Ann. Nucl. Energy, 96 (2016) 295-306.