def get_sample(): """ Returns a sample with box-shaped core-shell particles on a substrate. """ # defining materials m_vacuum = ba.HomogeneousMaterial("Vacuum", 0.0, 0.0) m_shell = ba.HomogeneousMaterial("Shell", 1e-4, 2e-8) m_core = ba.HomogeneousMaterial("Core", 6e-5, 2e-8) # collection of particles parallelepiped1_ff = ba.FormFactorBox(16 * nm, 16 * nm, 8 * nm) parallelepiped2_ff = ba.FormFactorBox(12 * nm, 12 * nm, 7 * nm) shell_particle = ba.Particle(m_shell, parallelepiped1_ff) core_particle = ba.Particle(m_core, parallelepiped2_ff) core_position = ba.kvector_t(0.0, 0.0, 0.0) particle = ba.ParticleCoreShell(shell_particle, core_particle, core_position) particle_layout = ba.ParticleLayout() particle_layout.addParticle(particle) interference = ba.InterferenceFunctionNone() particle_layout.setInterferenceFunction(interference) vacuum_layer = ba.Layer(m_vacuum) vacuum_layer.addLayout(particle_layout) multi_layer = ba.MultiLayer() multi_layer.addLayer(vacuum_layer) return multi_layer
def get_sample(): """ Returns a sample with a magnetic core-shell particle in a solvent. """ # Defining Materials mat_solvent = ba.HomogeneousMaterial("Solvent", 5e-6, 0.0) mat_core = ba.HomogeneousMaterial("Core", 6e-6, 2e-8, magnetization_core) mat_shell = ba.HomogeneousMaterial("Shell", 1e-7, 2e-8) # Defining Layer solvent_layer = ba.Layer(mat_solvent) # Defining particle layout with a core-shell particle layout = ba.ParticleLayout() core_sphere_ff = ba.FormFactorFullSphere(10*nm) shell_sphere_ff = ba.FormFactorFullSphere(12*nm) core = ba.Particle(mat_core, core_sphere_ff) shell = ba.Particle(mat_shell, shell_sphere_ff) position = kvector_t(0.0, 0.0, 2.0) particleCoreShell = ba.ParticleCoreShell(shell, core, position) layout.addParticle(particleCoreShell) # Adding layout to layer solvent_layer.addLayout(layout) # Defining Multilayer with single layer multiLayer = ba.MultiLayer() multiLayer.addLayer(solvent_layer) return multiLayer
def get_sample(): # Defining Materials material_1 = ba.HomogeneousMaterial("Air", 0.0, 0.0) material_2 = ba.MaterialBySLD("Au", 4.6665e-06, -1.6205e-08) material_3 = ba.MaterialBySLD("Si", 2.0737e-06, -2.3758e-11) # Defining Layers layer_1 = ba.Layer(material_1) layer_2 = ba.Layer(material_3) formFactor_1 = ba.FormFactorCone6(159.0 * nm, 640.0 * nm, 86.0 * deg) formFactor_2 = ba.FormFactorCone6(157.0 * nm, 640.0 * nm, 86.0 * deg) formFactor_3 = ba.FormFactorTruncatedSphere(115.0 * nm, 160.0 * nm, 0.0 * nm) particle_1 = ba.Particle(material_2, formFactor_1) particle_2 = ba.Particle(material_3, formFactor_2) particle_3 = ba.Particle(material_2, formFactor_3) particle_3_position = kvector_t(0.0 * nm, 0.0 * nm, 640.0 * nm) particle_3.setPosition(particle_3_position) # Defining Core Shell Particles particleCoreShell_1 = ba.ParticleCoreShell(particle_2, particle_1) particleCoreShell_1_rotation = ba.RotationZ(0 * deg) particleCoreShell_1.setRotation(particleCoreShell_1_rotation) # Defining composition of particles at specific positions particleComposition_1 = ba.ParticleComposition() particleComposition_1.addParticle(particleCoreShell_1) particleComposition_1.addParticle(particle_3) particleComposition_1_rotation = ba.RotationX(0.0 * deg) particleComposition_1.setRotation(particleComposition_1_rotation) # Defining Interference Functions interference_1 = ba.InterferenceFunction2DLattice( 1500.0 * nm, 1500.0 * nm, 120.0 * deg, i * deg) interference_1_pdf = ba.FTDecayFunction2DCauchy( 1000.0 * nm, 1000.0 * nm, 0.0 * deg) interference_1.setDecayFunction(interference_1_pdf) interference_1.setPositionVariance(500.0 * nm2) # Defining Particle Layouts and adding Particles layout_1 = ba.ParticleLayout() layout_1.addParticle(particleComposition_1, 1.0) layout_1.setInterferenceFunction(interference_1) layout_1.setTotalParticleSurfaceDensity(0.000001) # Adding layouts to layers layer_1.addLayout(layout_1) # Defining Multilayers multiLayer_1 = ba.MultiLayer() multiLayer_1.addLayer(layer_1) multiLayer_1.addLayer(layer_2) return multiLayer_1
def get_sample(): # Defining Materials material_1 = ba.HomogeneousMaterial("Air", 0.0, 0.0) material_2 = ba.MaterialBySLD("Au", 4.6665e-06, -1.6205e-08) material_3 = ba.MaterialBySLD("Si", 2.0737e-06, -2.3758e-11) material_4 = ba.MaterialBySLD("Fe", 7.9486e-06, -5.9880e-10) # Defining Layers layer_1 = ba.Layer(material_1) layer_2 = ba.Layer(material_3) formFactor_1 = ba.FormFactorCone6(85 * nm, 385.0 * nm, 86.0 * deg) formFactor_2 = ba.FormFactorCone6(84 * nm, 385.0 * nm, 86.0 * deg) formFactor_3 = ba.FormFactorTruncatedSphere(68.0 * nm, 95.0 * nm, 0.0 * nm) particle_1 = ba.Particle(material_4, formFactor_1) particle_2 = ba.Particle(material_3, formFactor_2) particle_3 = ba.Particle(material_2, formFactor_3) particle_3_position = kvector_t(0.0 * nm, 0.0 * nm, 385.0 * nm) particle_3.setPosition(particle_3_position) # Defining Core Shell Particles particleCoreShell_1 = ba.ParticleCoreShell(particle_2, particle_1) particleCoreShell_1_rotation = ba.RotationZ(i * deg) particleCoreShell_1.setRotation(particleCoreShell_1_rotation) # Defining composition of particles at specific positions particleComposition_1 = ba.ParticleComposition() particleComposition_1.addParticle(particleCoreShell_1) particleComposition_1.addParticle(particle_3) particleComposition_1_rotation = ba.RotationX(0.0 * deg) particleComposition_1.setRotation(particleComposition_1_rotation) # Defining Particle Layouts and adding Particles layout_1 = ba.ParticleLayout() layout_1.addParticle(particleComposition_1, 1.0) layout_1.setTotalParticleSurfaceDensity(0.01) # Adding layouts to layers layer_1.addLayout(layout_1) # Defining Multilayers multiLayer_1 = ba.MultiLayer() multiLayer_1.addLayer(layer_1) multiLayer_1.addLayer(layer_2) return multiLayer_1
def get_sample(): # Defining Materials material_1 = ba.HomogeneousMaterial("Air", 0.0, 0.0) material_2 = ba.MaterialBySLD("Au", 4.6665e-06, -1.6205e-08) material_3 = ba.MaterialBySLD("Si", 2.0737e-06, -2.3758e-11) # Defining Layers layer_1 = ba.Layer(material_1) layer_2 = ba.Layer(material_3) # Defining Form Factors formFactor_1 = ba.FormFactorCone6(90.0 * nm, 270.0 * nm, 75.0 * deg) formFactor_2 = ba.FormFactorCone6(88.0 * nm, 270.0 * nm, 75.0 * deg) # Defining Particles particle_1 = ba.Particle(material_2, formFactor_1) particle_2 = ba.Particle(material_3, formFactor_2) # Defining Core Shell Particles particleCoreShell_1 = ba.ParticleCoreShell(particle_2, particle_1) particleCoreShell_1_rotation = ba.RotationZ(i * deg) particleCoreShell_1.setRotation(particleCoreShell_1_rotation) # Defining Particle Layouts and adding Particles layout_1 = ba.ParticleLayout() layout_1.addParticle(particleCoreShell_1, 1.0) layout_1.setTotalParticleSurfaceDensity(0.0001) # Defining Roughness Parameters # layerRoughness_1 = ba.LayerRoughness(1.0, 0.3, 5.0*nm) # Adding layouts to layers layer_1.addLayout(layout_1) # Defining Multilayers multiLayer_1 = ba.MultiLayer() multiLayer_1.addLayer(layer_1) multiLayer_1.addLayer(layer_2) # multiLayer_1.addLayerWithTopRoughness(layer_2, layerRoughness_1) return multiLayer_1
def get_sample(): """ Returns a sample """ # defining materials m_si = ba.MaterialBySLD("Si", sld_Si, sld_Si_im) m_d2o = ba.MaterialBySLD("D2O", sld_D2O, sld_D2O_im) m_core = ba.MaterialBySLD("Me3O5:D2O2", 2.0 * 1.0e-06, 0.0) m_shell = ba.MaterialBySLD("Me3O5:D2O", 3.9 * 1.0e-06, 0.0) # layer with particles # calculate average SLD Vcore = vol(core_radius, core_height) Vshell = vol(radius, height) - Vcore f_d2o = 0.7 f_core = (1.0 - f_d2o) / (1 + Vshell / Vcore) f_shell = (1.0 - f_d2o) / (1 + Vcore / Vshell) sld_mix = f_d2o * sld_D2O + f_shell * 3.9 * 1.0e-06 + f_core * 2.0 * 1.0e-06 m_mix = ba.MaterialBySLD("mix", sld_mix, 0.0) # fluctuation component ff_microgel = FormFactorMicrogel(b, xi, xiz) microgel = ba.Particle(m_core, ff_microgel) microgel_layout = ba.ParticleLayout() microgel_layout.addParticle(microgel, 1.0) # collection of particles ff = ba.FormFactorTruncatedSphere(radius=radius, height=height) ff_core = ba.FormFactorTruncatedSphere(radius=core_radius, height=core_height) transform = ba.RotationY(180.0 * deg) shell_particle = ba.Particle(m_shell, ff) core_particle = ba.Particle(m_core, ff_core) core_position = ba.kvector_t(0.0, 0.0, 0.0) particle = ba.ParticleCoreShell(shell_particle, core_particle, core_position) particle.setPosition(ba.kvector_t(0.0, 0.0, 0.0)) particle.setRotation(transform) nparticles = 2 # the larger is this number, the more slow will be the simulation. 10 is usually enough sigma = 0.2 * radius gauss_distr = ba.DistributionGaussian(radius, sigma) sigma_factor = 2.0 par_distr = ba.ParameterDistribution( "/ParticleCoreShell/Particle1/TruncatedSphere/Radius", gauss_distr, nparticles, sigma_factor, ba.RealLimits.lowerLimited(core_radius + 1.0)) par_distr.linkParameter( "/ParticleCoreShell/Particle1/TruncatedSphere/Height") par_distr.linkParameter( "/ParticleCoreShell/Particle0/TruncatedSphere/Height") par_distr.linkParameter( "/ParticleCoreShell/Particle0/TruncatedSphere/Radius") part_coll = ba.ParticleDistribution(particle, par_distr) microgel_layout.addParticle(part_coll, 1.2e-05) # interference can be neglected interference = ba.InterferenceFunctionNone() microgel_layout.setInterferenceFunction(interference) # describe layer roughness roughness = ba.LayerRoughness() roughness.setSigma(1.2 * ba.nm) roughness.setHurstParameter(0.8) roughness.setLatteralCorrLength(570.0 * ba.nm) # create layers d2o_layer = ba.Layer(m_d2o) mix_layer = ba.Layer(m_mix, 2.0 * height) mix_layer.addLayout(microgel_layout) si_layer = ba.Layer(m_si) multi_layer = ba.MultiLayer() multi_layer.addLayer(si_layer) multi_layer.addLayer(mix_layer) multi_layer.addLayerWithTopRoughness(d2o_layer, roughness) return multi_layer