openmc.TallyDerivative

class openmc.TallyDerivative(derivative_id=None, variable=None, material=None, nuclide=None)[source]

A material perturbation derivative to apply to a tally.

Parameters
  • derivative_id (int, optional) – Unique identifier for the tally derivative. If none is specified, an identifier will automatically be assigned

  • variable (str, optional) – Accepted values are ‘density’, ‘nuclide_density’, and ‘temperature’

  • material (int, optional) – The perturbed material ID

  • nuclide (str, optional) – The perturbed nuclide. Only needed for ‘nuclide_density’ derivatives. Ex: ‘Xe135’

Variables
  • id (int) – Unique identifier for the tally derivative

  • variable (str) – Accepted values are ‘density’, ‘nuclide_density’, and ‘temperature’

  • material (int) – The perturubed material ID

  • nuclide (str) – The perturbed nuclide. Only needed for ‘nuclide_density’ derivatives. Ex: ‘Xe135’

classmethod from_xml_element(elem)[source]

Generate tally derivative from an XML element

Parameters

elem (lxml.etree._Element) – XML element

Returns

Tally derivative object

Return type

openmc.TallyDerivative

to_xml_element()[source]

Return XML representation of the tally derivative

Returns

element – XML element containing derivative data

Return type

lxml.etree._Element