Materials#

In order to support a wide range of applications (and to build complex assemblies) there are a few different types of material that can be utilised in EasyReflectometry. These can include constraints or enabel the user to define the material based on chemical or physical properties. Full API documentation for the EasyReflectoemtry.sample.elements.material mdoule is also available, but here we will give some simple uses for them.

Material#

The simplest type of material that is available is the Material. This allows the user to define a single type of material, with a real and imaginary component to the scattering length density. The construction of a Material is achieved as shown below.

from EasyReflectometry.sample.material import Material

b = Material.from_pars(6.908, -0.278, 'Boron')

The above object will have the properties of sld and isld, which will have values of 6.908 1 / angstrom ** 2 and -0.278 1 / angstrom ** 2 respectively. As is shown in the tutorials, a material can be used to construct a Layer from which slab models are created.

MaterialDensity#

In addition to defining a material by its scattering length density, it may be useful to define a material by the mass density and chemical formula. This is possible with the MaterialDensity material type, which uses the scattering length and atomic mass from the chemical formula and the density to determine the scattering length density. It is then possible to vary the density, which defines the scattering length density in turn. The MaterialDensity material can be create as follows.

from EasyReflectometry.sample.material import MaterialDensity

si = MaterialDensity.from_pars('SiO2', 2.65, 'SiO2 Material')

The density should be in units of grams per cubic centimeter and the scattering length is calculated from 'SiO2'.

MaterialSolvated#

Sometimes it is desirable to have a layer that consists of a material and a solvent in some ratio. An example of this is shown in the solvation tutorial, where a polymer film solvated with D2O is modelled. To produce a material that is described by such a mixture, there is MaterialSolvated. This is constructed from two constituent Materials and the fractional amount of the material in the solvent. So to produce a MaterialSolvated that is 20 % D2O in a polymer, the following is used.

from EasyReflectometry.sample.material import Material
from EasyReflectometry.sample.material import MaterialSolvated

polymer = Material.from_pars(
    sld=2.,
    isld=0.,
    name='Polymer'
)
d2o = Material.from_pars(
    sld=6.36,
    isld=0,
    name='D2O'
)

solvated_polymer = MaterialSolvated.from_pars(
    material=polymer,
    solvent=d2o,
    solvent_surface_coverage=0.2,
    name='Solvated Polymer'
)

For the solvated_polymer object, the sld will be 2.872 1 / angstrom ** 2 (the weighted average of the two scattering length densities). The MaterialSolvated includes a constraint such that if the value of either constituent scattering length densities (both real and imaginary components) or the fraction changes, then the resulting material sld and isld will change appropriately.