@@ -50,15 +50,19 @@ class Settings:
5050 Indicate whether fission neutrons should be created or not.
5151 cutoff : dict
5252 Dictionary defining weight cutoff, energy cutoff and time cutoff. The
53- dictionary may have ten keys, 'weight', 'weight_avg', 'energy_neutron',
54- 'energy_photon', 'energy_electron', 'energy_positron', 'time_neutron',
55- 'time_photon', 'time_electron', and 'time_positron'. Value for 'weight'
56- should be a float indicating weight cutoff below which particle undergo
57- Russian roulette. Value for 'weight_avg' should be a float indicating
58- weight assigned to particles that are not killed after Russian roulette.
59- Value of energy should be a float indicating energy in eV below which
60- particle type will be killed. Value of time should be a float in
61- seconds. Particles will be killed exactly at the specified time.
53+ dictionary may have the following keys, 'weight', 'weight_avg',
54+ 'survival_normalization', 'energy_neutron', 'energy_photon',
55+ 'energy_electron', 'energy_positron', 'time_neutron', 'time_photon',
56+ 'time_electron', and 'time_positron'. Value for 'weight' should be a
57+ float indicating weight cutoff below which particle undergo Russian
58+ roulette. Value for 'weight_avg' should be a float indicating weight
59+ assigned to particles that are not killed after Russian roulette. Value
60+ of energy should be a float indicating energy in eV below which particle
61+ type will be killed. Value of time should be a float in seconds.
62+ Particles will be killed exactly at the specified time. Value for
63+ 'survival_normalization' is a bool indicating whether or not the weight
64+ cutoff parameters will be applied relative to the particle's starting
65+ weight or to its current weight.
6266 delayed_photon_scaling : bool
6367 Indicate whether to scale the fission photon yield by (EGP + EGD)/EGP
6468 where EGP is the energy release of prompt photons and EGD is the energy
@@ -162,20 +166,20 @@ class Settings:
162166 'naive', 'simulation_averaged', or 'hybrid'.
163167 The default is 'hybrid'.
164168 :source_shape:
165- Assumed shape of the source distribution within each source
166- region. Options are 'flat' (default), 'linear', or 'linear_xy'.
169+ Assumed shape of the source distribution within each source region.
170+ Options are 'flat' (default), 'linear', or 'linear_xy'.
167171 :volume_normalized_flux_tallies:
168- Whether to normalize flux tallies by volume (bool). The default
169- is 'False'. When enabled, flux tallies will be reported in units of
170- cm/cm^3. When disabled, flux tallies will be reported in units
171- of cm (i.e., total distance traveled by neutrons in the spatial
172- tally region).
172+ Whether to normalize flux tallies by volume (bool). The default is
173+ 'False'. When enabled, flux tallies will be reported in units of
174+ cm/cm^3. When disabled, flux tallies will be reported in units of cm
175+ (i.e., total distance traveled by neutrons in the spatial tally
176+ region).
173177 :adjoint:
174178 Whether to run the random ray solver in adjoint mode (bool). The
175179 default is 'False'.
176180 :sample_method:
177- Sampling method for the ray starting location and direction of travel.
178- Options are `prng` (default) or 'halton`.
181+ Sampling method for the ray starting location and direction of
182+ travel. Options are `prng` (default) or 'halton`.
179183
180184 .. versionadded:: 0.15.0
181185 resonance_scattering : dict
@@ -899,6 +903,8 @@ def cutoff(self, cutoff: dict):
899903 cv .check_type ('average survival weight' , cutoff [key ], Real )
900904 cv .check_greater_than ('average survival weight' ,
901905 cutoff [key ], 0.0 )
906+ elif key == 'survival_normalization' :
907+ cv .check_type ('survival normalization' , cutoff [key ], bool )
902908 elif key in ['energy_neutron' , 'energy_photon' , 'energy_electron' ,
903909 'energy_positron' ]:
904910 cv .check_type ('energy cutoff' , cutoff [key ], Real )
@@ -1364,7 +1370,8 @@ def _create_cutoff_subelement(self, root):
13641370 element = ET .SubElement (root , "cutoff" )
13651371 for key , value in self ._cutoff .items ():
13661372 subelement = ET .SubElement (element , key )
1367- subelement .text = str (value )
1373+ subelement .text = str (value ) if key != 'survival_normalization' \
1374+ else str (value ).lower ()
13681375
13691376 def _create_entropy_mesh_subelement (self , root , mesh_memo = None ):
13701377 if self .entropy_mesh is None :
@@ -1797,10 +1804,14 @@ def _cutoff_from_xml_element(self, root):
17971804 self .cutoff = {}
17981805 for key in ('energy_neutron' , 'energy_photon' , 'energy_electron' ,
17991806 'energy_positron' , 'weight' , 'weight_avg' , 'time_neutron' ,
1800- 'time_photon' , 'time_electron' , 'time_positron' ):
1807+ 'time_photon' , 'time_electron' , 'time_positron' ,
1808+ 'survival_normalization' ):
18011809 value = get_text (elem , key )
18021810 if value is not None :
1803- self .cutoff [key ] = float (value )
1811+ if key == 'survival_normalization' :
1812+ self .cutoff [key ] = value in ('true' , '1' )
1813+ else :
1814+ self .cutoff [key ] = float (value )
18041815
18051816 def _entropy_mesh_from_xml_element (self , root , meshes ):
18061817 text = get_text (root , 'entropy_mesh' )
0 commit comments