### Two types of cylinders with size distribution

Scattering of a polydisperse distribution of two types of cylinders.

• The simulation is performed using the Born approximation, i.e. there is no “substrate” layer.
• The sample is made of polydisperse cylinders of two different sizes: $R_1 = H_1$ and $R_2 = H_2$, where $R_i$ and $H_i$ are the radius and width of cylinder of type $i$.
• There are 95% of cylinders of type $1$ and 5% of cylinders of type $2$.
• The polydispersity affects the radii of the cylinders, following a normal distribution. For the small cylinders, their characteristic sizes vary around $R_1 = 5$ nm with a standard deviation $\sigma_1 = 0.2 R_1$. For type 2, the average value $R_2$ is $10$ nm and $\sigma_2 = 0.02 R_2$.
• There is also no interference between the scattered beams.
• The incident beam is characterized by a wavelength of $1$ $\unicode{x212B}$.
• The incident angles $\alpha_i = 0.2 ^{\circ}$ and $\phi_i = 0^{\circ}$.
  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88  """ Mixture cylinder particles with different size distribution """ import bornagain as ba from bornagain import deg, angstrom, nm def get_sample(): """ Returns a sample with cylinders in a homogeneous medium ("air"). The cylinders are a 95:5 mixture of two different size distributions. """ # defining materials m_air = ba.HomogeneousMaterial("Air", 0.0, 0.0) m_particle = ba.HomogeneousMaterial("Particle", 6e-4, 2e-8) # collection of particles #1 radius1 = 5.0*nm height1 = radius1 sigma1 = radius1*0.2 cylinder_ff1 = ba.FormFactorCylinder(radius1, height1) cylinder1 = ba.Particle(m_particle, cylinder_ff1) gauss_distr1 = ba.DistributionGaussian(radius1, sigma1) nparticles = 150 sigma_factor = 3.0 # limits will assure, that generated Radius'es are >=0 limits = ba.RealLimits.nonnegative() par_distr1 = ba.ParameterDistribution( "/Particle/Cylinder/Radius", gauss_distr1, nparticles, sigma_factor, limits) part_coll1 = ba.ParticleDistribution(cylinder1, par_distr1) # collection of particles #2 radius2 = 10.0*nm height2 = radius2 sigma2 = radius2*0.02 cylinder_ff2 = ba.FormFactorCylinder(radius2, height2) cylinder2 = ba.Particle(m_particle, cylinder_ff2) gauss_distr2 = ba.DistributionGaussian(radius2, sigma2) par_distr2 = ba.ParameterDistribution( "/Particle/Cylinder/Radius", gauss_distr2, nparticles, sigma_factor, limits) part_coll2 = ba.ParticleDistribution(cylinder2, par_distr2) # assembling the sample particle_layout = ba.ParticleLayout() particle_layout.addParticle(part_coll1, 0.95) particle_layout.addParticle(part_coll2, 0.05) air_layer = ba.Layer(m_air) air_layer.addLayout(particle_layout) multi_layer = ba.MultiLayer() multi_layer.addLayer(air_layer) return multi_layer def get_simulation(): """ Create and return GISAXS simulation with beam and detector defined """ simulation = ba.GISASSimulation() simulation.setDetectorParameters(200, 0.0*deg, 2.0*deg, 200, 0.0*deg, 2.0*deg) simulation.setBeamParameters(1.0*angstrom, 0.2*deg, 0.0*deg) return simulation def run_simulation(): """ Runs simulation and returns intensity map. """ simulation = get_simulation() simulation.setSample(get_sample()) simulation.runSimulation() return simulation.result() if __name__ == '__main__': result = run_simulation() ba.plot_simulation_result(result, cmap='jet', aspect='auto') 
TwoTypesOfCylindersWithSizeDistribution.py