def get_sample(): """ Returns a sample with cylinders on a substrate that form a radial paracrystal. """ # defining materials m_ambience = ba.HomogeneousMaterial("Air", 0.0, 0.0) m_substrate = ba.HomogeneousMaterial("Substrate", 6e-6, 2e-8) m_particle = ba.HomogeneousMaterial("Particle", 6e-4, 2e-8) # collection of particles cylinder_ff = ba.FormFactorCylinder(5*nm, 5*nm) cylinder = ba.Particle(m_particle, cylinder_ff) interference = ba.InterferenceFunctionRadialParaCrystal( 20.0*nm, 1e3*nm) pdf = ba.FTDistribution1DGauss(7 * nm) interference.setProbabilityDistribution(pdf) particle_layout = ba.ParticleLayout() particle_layout.addParticle(cylinder, 1.0) particle_layout.setInterferenceFunction(interference) # assembling the sample air_layer = ba.Layer(m_ambience) air_layer.addLayout(particle_layout) substrate_layer = ba.Layer(m_substrate) multi_layer = ba.MultiLayer() multi_layer.addLayer(air_layer) multi_layer.addLayer(substrate_layer) # print(multi_layer.treeToString()) return multi_layer
def multilayer(self): """ Constructs the sample from current parameter values. """ # defining materials m_air = ba.HomogeneousMaterial("Air", 0.0, 0.0) m_Si = ba.HomogeneousMaterial("Si", 5.78164736e-6, 1.02294578e-7) m_Ag = ba.HomogeneousMaterial("Ag", 2.24749529E-5, 1.61528396E-6) m_PTFE = ba.HomogeneousMaterial("PTFE", 5.20508729E-6, 1.96944292E-8) m_HMDSO = ba.HomogeneousMaterial("HMDSO", 2.0888308E-6, 1.32605651E-8) # collection of particles with size distribution nparticles = 20 nfwhm = 2.0 sphere_ff = ba.FormFactorFullSphere(self.radius) sphere = ba.Particle(m_Ag, sphere_ff) position = ba.kvector_t(0 * ba.nm, 0 * ba.nm, -1.0 * self.hmdso_thickness) sphere.setPosition(position) ln_distr = ba.DistributionLogNormal(self.radius, self.sigma) par_distr = ba.ParameterDistribution( "/Particle/FullSphere/Radius", ln_distr, nparticles, nfwhm, ba.RealLimits.limited(0.0, self.hmdso_thickness / 2.0)) part_coll = ba.ParticleDistribution(sphere, par_distr) # interference function interference = ba.InterferenceFunctionRadialParaCrystal( self.distance, 1e6 * ba.nm) interference.setKappa(self.kappa) interference.setDomainSize(20000.0) pdf = ba.FTDistribution1DGauss(self.disorder) interference.setProbabilityDistribution(pdf) # assembling particle layout layout = ba.ParticleLayout() layout.addParticle(part_coll, 1.0) layout.setInterferenceFunction(interference) layout.setTotalParticleSurfaceDensity(1) # roughness r_ptfe = ba.LayerRoughness(2.3 * ba.nm, 0.3, 5.0 * ba.nm) r_hmdso = ba.LayerRoughness(1.1 * ba.nm, 0.3, 5.0 * ba.nm) # layers air_layer = ba.Layer(m_air) hmdso_layer = ba.Layer(m_HMDSO, self.hmdso_thickness) hmdso_layer.addLayout(layout) ptfe_layer = ba.Layer(m_PTFE, self.ptfe_thickness) substrate_layer = ba.Layer(m_Si) # assembling multilayer multi_layer = ba.MultiLayer() multi_layer.addLayer(air_layer) multi_layer.addLayerWithTopRoughness(hmdso_layer, r_hmdso) multi_layer.addLayerWithTopRoughness(ptfe_layer, r_ptfe) multi_layer.addLayer(substrate_layer) return multi_layer
def get_sample(radius=153.4, d=1000.0): # Defining Materials material_1 = ba.HomogeneousMaterial("Air", 0.0, 0.0) material_3 = ba.MaterialBySLD("Si", 2.0737e-06, -2.3758e-11) material_2 = ba.MaterialBySLD("Au", 4.6665e-06, -1.6205e-08) # Defining Layers layer_1 = ba.Layer(material_1) # Defining Form Factors formFactor = ba.FormFactorCone6(radius * ba.nm, 300.0 * ba.nm, 81.0 * ba.deg) # Defining Particles particle = ba.Particle(material_3, formFactor) interference = ba.InterferenceFunctionRadialParaCrystal( d * ba.nm, 2e3 * ba.nm) pdf = ba.FTDistribution1DGauss(250.0 * ba.nm) interference.setProbabilityDistribution(pdf) # Defining Particle Layouts and adding Particles layout_1 = ba.ParticleLayout() layout_1.addParticle(particle, 1.0) layout_1.setTotalParticleSurfaceDensity(0.01) layout_1.setInterferenceFunction(interference) # Adding layouts to layers layer_1.addLayout(layout_1) # Defining Multilayers multiLayer_1 = ba.MultiLayer() multiLayer_1.addLayer(layer_1) return multiLayer_1
def get_sample(params): # function which constructs the sample radius = params["radius"] height = params["height"] height_flattening = (params["height"] / params["radius"]) * params["height_flattening_ratio"] lattice_length = params["lattice_length"] damping_length = params["damping_length"] disorder_parameter = params["disorder_parameter"] # Defining materials: m_air = ba.MaterialBySLD("Air", 0.0, 0.0) m_Cu = ba.MaterialBySLD("Cu", 6.9508e-05, 5.142e-06) m_PEO = ba.MaterialBySLD("PEO", 1.0463e-05, 7.9515e-09) #m_SiO2 = ba.MaterialBySLD("SiO2", 1.8749e-05, 9.3923e-08) #m_Si = ba.MaterialBySLD("Si", 1.9893e-05, 1.795e-07) # Defining particles: tr_spheroid_ff = ba.FormFactorTruncatedSpheroid(radius, height, height_flattening) particle = ba.Particle(m_Cu, tr_spheroid_ff) # Defining interference function: interference_f = ba.InterferenceFunctionRadialParaCrystal( lattice_length, damping_length) omega = disorder_parameter * lattice_length pdf = ba.FTDistribution1DGauss(omega) interference_f.setProbabilityDistribution(pdf) # Defining layers: layout = ba.ParticleLayout() layout.addParticle(particle, 1.0) layout.setInterferenceFunction(interference_f) layout.setTotalParticleSurfaceDensity( 2 / (math.sqrt(3) * lattice_length * lattice_length)) air_layer = ba.Layer(m_air) air_layer.setNumberOfSlices(15) air_layer.addLayout(layout) PEO_layer = ba.Layer(m_PEO) #PEO_layer = ba.Layer(m_PEO, 90*nm) #Si_layer = ba.Layer(m_Si) #roughness = ba.LayerRoughness() #roughness.setSigma(10.0*nm) #roughness.setHurstParameter(1.0) #roughness.setLatteralCorrLength(1.0e-5*nm) # Assembling the multilayer: multi_layer = ba.MultiLayer() multi_layer.addLayer(air_layer) multi_layer.addLayer(PEO_layer) #multi_layer.addLayerWithTopRoughness(PEO_layer, roughness) #multi_layer.addLayer(Si_layer) return multi_layer
def get_sample(): """ Returns a sample with cylinders of two different sizes on a substrate. The cylinder positions are modelled in Local Monodisperse Approximation. """ m_ambience = ba.HomogeneousMaterial("Air", 0.0, 0.0) m_substrate = ba.HomogeneousMaterial("Substrate", 6e-6, 2e-8) m_particle = ba.HomogeneousMaterial("Particle", 6e-4, 2e-8) # cylindrical particle 1 radius1 = 5 * nm height1 = radius1 cylinder_ff1 = ba.FormFactorCylinder(radius1, height1) cylinder1 = ba.Particle(m_particle, cylinder_ff1) # cylindrical particle 2 radius2 = 8 * nm height2 = radius2 cylinder_ff2 = ba.FormFactorCylinder(radius2, height2) cylinder2 = ba.Particle(m_particle, cylinder_ff2) # interference function1 interference1 = ba.InterferenceFunctionRadialParaCrystal( 16.8 * nm, 1e3 * nm) pdf = ba.FTDistribution1DGauss(3 * nm) interference1.setProbabilityDistribution(pdf) # interference function2 interference2 = ba.InterferenceFunctionRadialParaCrystal( 22.8 * nm, 1e3 * nm) interference2.setProbabilityDistribution(pdf) # assembling the sample particle_layout1 = ba.ParticleLayout() particle_layout1.addParticle(cylinder1, 0.8) particle_layout1.setInterferenceFunction(interference1) particle_layout2 = ba.ParticleLayout() particle_layout2.addParticle(cylinder2, 0.2) particle_layout2.setInterferenceFunction(interference2) air_layer = ba.Layer(m_ambience) air_layer.addLayout(particle_layout1) air_layer.addLayout(particle_layout2) substrate_layer = ba.Layer(m_substrate) multi_layer = ba.MultiLayer() multi_layer.addLayer(air_layer) multi_layer.addLayer(substrate_layer) return multi_layer
def get_sample(): """ Returns a sample with cylinders of two different sizes on a substrate. The cylinder positions are modelled in Size-Spacing Coupling Approximation. """ m_vacuum = ba.HomogeneousMaterial("Vacuum", 0.0, 0.0) m_substrate = ba.HomogeneousMaterial("Substrate", 6e-6, 2e-8) m_particle = ba.HomogeneousMaterial("Particle", 6e-4, 2e-8) # cylindrical particle 1 radius1 = 5 * nm height1 = radius1 cylinder_ff1 = ba.FormFactorCylinder(radius1, height1) cylinder1 = ba.Particle(m_particle, cylinder_ff1) # cylindrical particle 2 radius2 = 8 * nm height2 = radius2 cylinder_ff2 = ba.FormFactorCylinder(radius2, height2) cylinder2 = ba.Particle(m_particle, cylinder_ff2) # interference function interference = ba.InterferenceFunctionRadialParaCrystal( 18.0 * nm, 1e3 * nm) pdf = ba.FTDistribution1DGauss(3 * nm) interference.setProbabilityDistribution(pdf) interference.setKappa(1.0) # assembling the sample particle_layout = ba.ParticleLayout() particle_layout.addParticle(cylinder1, 0.8) particle_layout.addParticle(cylinder2, 0.2) particle_layout.setInterferenceFunction(interference) vacuum_layer = ba.Layer(m_vacuum) vacuum_layer.addLayout(particle_layout) substrate_layer = ba.Layer(m_substrate) multi_layer = ba.MultiLayer() multi_layer.addLayer(vacuum_layer) multi_layer.addLayer(substrate_layer) return multi_layer