## Material types

### Overview

Currently two material types are available in BornAgain: HomogeneousMaterial and MaterialBySLD.

First of them is created with the following syntax:

magnetization = ba.kvector_t(1.0, 0.0, 0.0)
<material> = ba.HomogeneousMaterial("name", delta, beta, magnetization)

where name is the arbitrary name of the material associated with its complex refractive index $n = 1 - delta + i \cdot beta$. magnetization defines a 3D magnetization vector (in A/m). Variable <material> is later used when referring to this particular material.

magnetization can be omitted in material construction. It is assumed to be zero then:

<material> = ba.HomogeneousMaterial("name", delta, beta)

MaterialBySLD can be created with the expression

<material> = ba.MaterialBySLD("name", sld_real, sld_imag, magnetization)

or, omitting magnetization again,

<material> = ba.MaterialBySLD("name", sld_real, sld_imag)

Here sld_real and sld_imag are the real and imaginary parts of material scattering length density (SLD) according to the following convention:

$$SLD = sld_{real} - i \cdot sld_{imag}$$

SLD values for a wide variety of materials can be calculated with numerous online SLD-calculators, e.g. these ones:

The first of aforementioned calculators provides SLD values in inverse square angstroms, which are also the input units for MaterialBySLD. Thus the SLD values found with the calculator can be directly copied and pasted into a BornAgain script.

Both HomogeneousMaterial and MaterialBySLD can be created with empty constructors:

<material> = ba.HomogeneousMaterial()
<material2> = ba.MaterialBySLD()

In this case the “default” material is created, i.e. a material with the name vacuum, zero SLD/refractive index and zero magnetization.

### Limitations

HomogeneousMaterial uses refractive index directly, thus it is equally suitable for simulations with X-ray or neutron probe. On the other hand, refractive index does depend on beam wavelength, thus using HomogeneousMaterial can lead to incorrect simulation results in the case of significant beam divergence in wavelength or when used for time-of-flight experiments.

MaterialBySLD is intended for the experiments with neutron probe and provides correct values of refractive index for a wide range of wavelengths. For this reason, MaterialBySLD is recommended to use in the case of time-of-flight experiments or standard neutron experiments with significant beam divergence in wavelength.

However, calculation of refractive index with MaterialBySLD in BornAgain neglects incoherent scattering cross-section, thus providing incorrect $\Im(n)$ in the case of incoherent scattering term being larger or comparable with the absorption term:

$$\sigma_{abs} \cdot \lambda \geq \sigma_{inc} \lambda,$$

where $\lambda$ is the basic beam wavelength, $\sigma_{abs}$ - absorption cross-section, $\sigma_{inc}$ - incoherent scattering cross-section.

Even in this case MaterialBySLD can be used for simulations, since usually $sld_{imag} \ll sld_{real}$, and incorrect imaginary term of refractive index does not significantly affect the simulation result.