Material

class nexus.Material(composition, density, isotope=None, abundance=0.0, lamb_moessbauer=0.0, hyperfine_sites=[], id='')

Constructor for Material class.

Parameters:
  • composition (list) – Composition of the material in the format [[“element symbol” (string), relative atomic fraction (float)] , … ].

  • density (float or Var) – Density (g/cm 3).

  • isotope (MoessbauerIsotope) – Moessbauer isotope.

  • abundance (float or Var) – Isotope abundance (0 to 1).

  • lamb_moessbauer (float or Var or None) –

    Lamb Moessbauer factor (0 to 1).

    Changed in version 1.1.2.

    Set to None in case you want to use hyperfine site specific Lamb-Moessbauer factors in this material.

  • hyperfine_sites (list) – List of Hyperfine sites assigned to the material.

  • id (string) – User identifier.

composition

Composition of the material in the format [[“element symbol” (string), relative atomic fraction (float)] , … ].

Type:

list

density

Density (g/cm 3).

Type:

Var

isotope

Moessbauer isotope.

Type:

MoessbauerIsotope

abundance

Isotope abundance (0 to 1).

Type:

Var

lamb_moessbauer

Lamb Moessbauer factor (0 to 1).

Changed in version 1.1.2.

Set to None in case you want to use hyperfine site specific Lamb-Moessbauer factors in this material

Type:

Var or None

id

User identifier.

Type:

string

total_number_density

Total number density (m -3).

Type:

float

average_mole_mass

Average mole mass (g/mole).

Type:

float

isotope_number_density

Isotope number density (m -3).

Type:

float

hyperfine_sites

List of Hyperfine sites assigned to the material.

Type:

list

hyperfine_transitions

List of all Transition object in the material.

Type:

list

elements

List with all Element objects in the material.

Type:

list

CalcTransitions()

Calculates a list with all weights, transition energies and polarization weight matrices in the material. Properly weighted over all distributions and hyperfine sites.

Returns:

List of transitions.

Return type:

list

Copy(ref_hyperfine=True)

Copy the material.

Parameters:

ref_hyperfine (bool) – Determines whether the hyperfine references should be copied as well (True) or not (False). The hyperfine sites are not copied, just the reference is passed to the new object. Changing values in the hyperfine sites will affect both the original and the copied Material object.

Returns:

Copy of the material.

Return type:

Material

GetRelativeWeights()

Returns the relative and normalized weights of the sites present in the material.

Returns:

List of relative weights.

Return type:

list

static Template(material)

Returns a copy of the material from a template of the lib.material.

Parameters:

Material – Material from nexus.lib.material.

class nexus.Composition(*args)

List of lists of [[“element symbol” (string), relative amount (float)], …].

Examples

Various ways to define a Material.

# non-resonant material
Pt = nx.Material(id = "my Platinum",
                 composition = [["Pt", 1]],
                 density = 21.45
                 )

print(Pt)
# material from Template
Pt = nx.Material.Template(nx.lib.material.Pt)
# material in wt%
steel_composition = [['Fe', 55], ['Cr', 25], ['Ni', 20]]  # in wt%

steel_composition = nx.conversion.WtToAt(steel_composition)

print(steel_composition)

steel = nx.Material(id = "stainless steel",
                    composition = steel_composition,
                    density = nx.Var(value = 7.8, min = 7, max = 7.8, fit = True, id = "steel density")
                    )

print(steel)
# resonant material
site1 = nx.Hyperfine(magnetic_field = 33, isotropic = True)

Fe = nx.Material(id = "iron",
                 composition = [["Fe", 1]],
                 density = 7.874,
                 isotope = nx.moessbauer.Fe57,
                 abundance = 0.02119,
                 lamb_moessbauer = 0.796
                 hyperfine_sites = [site1] )