@@ -289,6 +289,14 @@ class Settings:
289289 :cellto: Cell ID used to determine if particles crossing identified
290290 surfaces are to be banked. Particles going to this declared
291291 cell will be banked (int)
292+ surface_grazing_cutoff : float
293+ Surface flux cosine cutoff. If not specified, the default value is
294+ 0.001. For more information, see the surface tally section in the theory
295+ manual.
296+ surface_grazing_ratio : float
297+ Surface flux cosine substitution ratio. If not specified, the default
298+ value is 0.5. For more information, see the surface tally section in the
299+ theory manual.
292300 survival_biasing : bool
293301 Indicate whether survival biasing is to be used
294302 tabular_legendre : dict
@@ -399,6 +407,8 @@ def __init__(self, **kwargs):
399407 self ._uniform_source_sampling = None
400408 self ._seed = None
401409 self ._stride = None
410+ self ._surface_grazing_cutoff = None
411+ self ._surface_grazing_ratio = None
402412 self ._survival_biasing = None
403413 self ._free_gas_threshold = None
404414
@@ -710,6 +720,27 @@ def stride(self, stride: int):
710720 cv .check_greater_than ('random number generator stride' , stride , 0 )
711721 self ._stride = stride
712722
723+ @property
724+ def surface_grazing_cutoff (self ) -> float :
725+ return self ._surface_grazing_cutoff
726+
727+ @surface_grazing_cutoff .setter
728+ def surface_grazing_cutoff (self , surface_grazing_cutoff : float ):
729+ cv .check_type ('surface grazing cutoff' , surface_grazing_cutoff , float )
730+ cv .check_greater_than ('surface grazing cutoff' , surface_grazing_cutoff , 0.0 )
731+ cv .check_less_than ('surface grazing cutoff' , surface_grazing_cutoff , 1.0 )
732+ self ._surface_grazing_cutoff = surface_grazing_cutoff
733+
734+ @property
735+ def surface_grazing_ratio (self ) -> float :
736+ return self ._surface_grazing_ratio
737+
738+ @surface_grazing_ratio .setter
739+ def surface_grazing_ratio (self , surface_grazing_ratio : float ):
740+ cv .check_type ('surface grazing ratio' , surface_grazing_ratio , float )
741+ cv .check_greater_than ('surface grazing ratio' , surface_grazing_ratio , 0.0 )
742+ self ._surface_grazing_ratio = surface_grazing_ratio
743+
713744 @property
714745 def survival_biasing (self ) -> bool :
715746 return self ._survival_biasing
@@ -1625,6 +1656,16 @@ def _create_stride_subelement(self, root):
16251656 element = ET .SubElement (root , "stride" )
16261657 element .text = str (self ._stride )
16271658
1659+ def _create_surface_grazing_cutoff_subelement (self , root ):
1660+ if self ._surface_grazing_cutoff is not None :
1661+ element = ET .SubElement (root , "surface_grazing_cutoff" )
1662+ element .text = str (self ._surface_grazing_cutoff )
1663+
1664+ def _create_surface_grazing_ratio_subelement (self , root ):
1665+ if self ._surface_grazing_ratio is not None :
1666+ element = ET .SubElement (root , "surface_grazing_ratio" )
1667+ element .text = str (self ._surface_grazing_ratio )
1668+
16281669 def _create_survival_biasing_subelement (self , root ):
16291670 if self ._survival_biasing is not None :
16301671 element = ET .SubElement (root , "survival_biasing" )
@@ -2128,6 +2169,16 @@ def _stride_from_xml_element(self, root):
21282169 if text is not None :
21292170 self .stride = int (text )
21302171
2172+ def _surface_grazing_cutoff_from_xml_element (self , root ):
2173+ text = get_text (root , 'surface_grazing_cutoff' )
2174+ if text is not None :
2175+ self .surface_grazing_cutoff = float (text )
2176+
2177+ def _surface_grazing_ratio_from_xml_element (self , root ):
2178+ text = get_text (root , 'surface_grazing_ratio' )
2179+ if text is not None :
2180+ self .surface_grazing_ratio = float (text )
2181+
21312182 def _survival_biasing_from_xml_element (self , root ):
21322183 text = get_text (root , 'survival_biasing' )
21332184 if text is not None :
@@ -2435,6 +2486,8 @@ def to_xml_element(self, mesh_memo=None):
24352486 self ._create_ptables_subelement (element )
24362487 self ._create_seed_subelement (element )
24372488 self ._create_stride_subelement (element )
2489+ self ._create_surface_grazing_cutoff_subelement (element )
2490+ self ._create_surface_grazing_ratio_subelement (element )
24382491 self ._create_survival_biasing_subelement (element )
24392492 self ._create_cutoff_subelement (element )
24402493 self ._create_entropy_mesh_subelement (element , mesh_memo )
@@ -2549,6 +2602,8 @@ def from_xml_element(cls, elem, meshes=None):
25492602 settings ._ptables_from_xml_element (elem )
25502603 settings ._seed_from_xml_element (elem )
25512604 settings ._stride_from_xml_element (elem )
2605+ settings ._surface_grazing_cutoff_from_xml_element (elem )
2606+ settings ._surface_grazing_ratio_from_xml_element (elem )
25522607 settings ._survival_biasing_from_xml_element (elem )
25532608 settings ._cutoff_from_xml_element (elem )
25542609 settings ._entropy_mesh_from_xml_element (elem , meshes )
0 commit comments