@@ -1467,7 +1467,7 @@ def to_xml_element(
14671467
14681468 @classmethod
14691469 def mix_materials (cls , materials , fracs : Iterable [float ],
1470- percent_type : str = 'ao' , name : str | None = None ) -> Material :
1470+ percent_type : str = 'ao' , ** kwargs ) -> Material :
14711471 """Mix materials together based on atom, weight, or volume fractions
14721472
14731473 .. versionadded:: 0.12
@@ -1482,10 +1482,8 @@ def mix_materials(cls, materials, fracs: Iterable[float],
14821482 Type of percentage, must be one of 'ao', 'wo', or 'vo', to signify atom
14831483 percent (molar percent), weight percent, or volume percent,
14841484 optional. Defaults to 'ao'
1485- name : str
1486- The name for the new material, optional. Defaults to concatenated
1487- names of input materials with percentages indicated inside
1488- parentheses.
1485+ **kwargs
1486+ Keyword arguments passed to :class:`openmc.Material`
14891487
14901488 Returns
14911489 -------
@@ -1544,10 +1542,11 @@ def mix_materials(cls, materials, fracs: Iterable[float],
15441542 openmc .data .AVOGADRO
15451543
15461544 # Create the new material with the desired name
1547- if name is None :
1548- name = '-' .join ([f'{ m .name } ({ f } )' for m , f in
1545+ if " name" not in kwargs :
1546+ kwargs [ " name" ] = '-' .join ([f'{ m .name } ({ f } )' for m , f in
15491547 zip (materials , fracs )])
1550- new_mat = cls (name = name )
1548+
1549+ new_mat = cls (** kwargs )
15511550
15521551 # Compute atom fractions of nuclides and add them to the new material
15531552 tot_nuclides_per_cc = np .sum ([dens for dens in nuclides_per_cc .values ()])
0 commit comments