  if material_name in material_thickness.keys():
                    material_thickness[material_name] += thickness.to(&#39;mm&#39;)
                else:
                    material_thickness[material_name] = thickness.to(&#39;mm&#39;)
        res = {}
        for name, thickness in material_thickness.items():
            frac_mass, density = self.materials[name]
            mat = self.create_material(name=name,
                                       fractional_masses=frac_mass,
                          