UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

Numerical method for solving the Boltzmann equation using cubic B-splines Khurana , Saheba 2014

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Item Metadata

Download

Media
24-ubc_2014_spring_khurana_saheba.pdf [ 2.5MB ]
Metadata
JSON: 24-1.0167315.json
JSON-LD: 24-1.0167315-ld.json
RDF/XML (Pretty): 24-1.0167315-rdf.xml
RDF/JSON: 24-1.0167315-rdf.json
Turtle: 24-1.0167315-turtle.txt
N-Triples: 24-1.0167315-rdf-ntriples.txt
Original Record: 24-1.0167315-source.json
Full Text
24-1.0167315-fulltext.txt
Citation
24-1.0167315.ris

Full Text

Numerical Method for Solving theBoltzmann Equation Using CubicB-splinesbySaheba KhuranaB. Sc., Tougaloo College, Mississippi, United States, 2006A THESIS SUBMITTED IN PARTIAL FULFILLMENT OFTHE REQUIREMENTS FOR THE DEGREE OFDOCTOR OF PHILOSOPHYinThe Faculty of Graduate and Postdoctoral Studies(Chemistry)THE UNIVERSITY OF BRITISH COLUMBIA(Vancouver)April, 2014c© Saheba Khurana 2014AbstractA numerical method for solving a one-dimensional linear Boltzmann equation is developedusing cubic B-splines. Collision kernels are derived for smooth and rough hard spheres. Acomplete velocity kernel for spherical particles is shown that is reduced to the smooth, rigidsphere case. Similarly, a collision kernel for the rough hard sphere is derived that dependsupon velocity and angular velocity. The exact expression for the rough sphere collisionkernel is reduced to an approximate expression that averages over the rotational degreesof freedom in the system. The rough sphere collision kernel tends to the smooth spherecollision kernel in the limit when translational-rotational energy exchange is attenuated.Comparisons between the smooth sphere and approximate rough sphere kernel are made.Four different representations for the distribution function are presented. The eigen-values and eigenfunctions of the collision matrix are obtained for various mass ratios andcompared with known values. The distribution functions, first and second moments are alsoevaluated for different mass and temperature ratios. This is done to validate the numericalmethod and it is shown that this method is accurate and well-behaved.In addition to smooth and rough hard spheres, the collision kernels are used to modelthe Maxwell molecule. Here, a variety of mass ratios and initial energies are used to testthe capability of the numerical method. Massive tracers are set to high initial energies,representing kinetic energy loss experiments with biomolecules in experimental mass spec-trometry. The validity of the Fokker-Planck expression for the Rayleigh gas is also tested.Drag coefficients are calculated and compared to analytic expressions. It is shown that thesevalues are well predicted for massive tracers but show a more complex behaviour for smallmass ratios especially at higher energies. The numerical method produced well convergedvalues, even when the tracers were initialized far from equilibrium.In general this numerical method produces sparse matrices and can be easily generalizedto higher dimensions that can be cast into efficient parallel algorithms. Future work hasbeen planned that involves the use of this numerical method for a multi-dimension linearBoltzmann equation.iiPrefaceThe work presented in this thesis has been published or is in preparation for publishing bythe author of this thesis, Saheba Khurana, under the guidance and in co-authorship withresearch supervisor Prof. Mark Thachuk. Saheba Khurana is the first author and the mainwriter of the published works and those in the process of publishing.Chapters 1-3 are introductory chapters. Chapter 1 gives the general background ofthe research. Chapter 2 presents in more comprehensive detail the theoretical backgroundof the numerical method. Details of the computational method are given in Chapter 3.Chapters 4 and 5 present the results, followed by Chapter 6 with details of future work andconcluding remarks. Details of the code are given in the Appendix.The analytical details given in Chapter 2 are expanded versions of material presentedin the publications by Saheba Khurana and Mark Thachuk, “A numerical solution of thelinear Boltzmann equation using cubic B-splines”, J. Chem. Phys. 136, 094103 (2012),“Kernels of the linear Boltzmann equation for spherical particles and rough hard sphereparticles”, J. Chem. Phys. 139, 164122 (2013) and “Drag coefficients from the Boltzmannequation for hot and massive tracers”, (in preparation).In Chapter 3, the methodology has been published as part of publications by SahebaKhurana and Mark Thachuk, “A numerical solution of the linear Boltzmann equation us-ing cubic B-splines”, J. Chem. Phys. 136, 094103 (2012), and “Drag coefficients fromthe Boltzmann equation for hot and massive tracers”, (in preparation) with a few moremodifications presented in the same paper.Chapters 4 and 5 present the results. Results in Chapter 4 are part of a publicationby Saheba Khurana and Mark Thachuk, “A numerical solution of the linear Boltzmannequation using cubic B-splines”, J. Chem. Phys. 136, 094103 (2012), and Chapter 5presents results from “Drag coefficients from the Boltzmann equation for hot and massivetracers”, (in preparation).Chapter 6 presents future work that will be completed by Saheba Khurana as a firstauthor, under the supervision of Prof. Mark Thachuk, followed by concluding remarks.iiiTable of ContentsAbstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iiPreface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iiiTable of Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ivList of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viList of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viiList of Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xAcknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiiDedication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii1 Introduction and Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.1 Methods of Solving the Boltzmann Equation . . . . . . . . . . . . . . . . . 31.1.1 Direct Simulation Monte Carlo (DSMC) . . . . . . . . . . . . . . . 31.1.2 Quadrature Discretization Method (QDM) . . . . . . . . . . . . . . 51.2 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 The Boltzmann Equation and Derivation of Collision Kernels . . . . . 82.1 The Boltzmann Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.2 Smooth Hard Sphere Collision Kernel . . . . . . . . . . . . . . . . . . . . . 102.2.1 Hard Sphere . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182.3 Rough Hard Sphere . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182.4 Approximate Rough Hard Sphere Kernel . . . . . . . . . . . . . . . . . . . 252.5 Discussion of Kernels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302.6 Summary of Collision Kernels . . . . . . . . . . . . . . . . . . . . . . . . . 342.7 Maxwell Molecule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372.8 Fokker-Planck Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . 392.9 Drag Coefficients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41iv3 Methodology of Numerical Method and Cubic B-Splines . . . . . . . . . 433.1 Varied Collision Kernels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433.2 Analytical Details of the Algorithm . . . . . . . . . . . . . . . . . . . . . . 443.2.1 Evaluation of Z . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493.3 Initial Functions and Conditions . . . . . . . . . . . . . . . . . . . . . . . . 503.4 Use of Quadratures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503.5 Code Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514 Validating the Numerical Method using Eigenvalues and Moments . . 534.1 Eigenvalues and Eigenfunctions . . . . . . . . . . . . . . . . . . . . . . . . 534.2 Distribution Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554.3 Moments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 634.4 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665 Kinetic Energy Relaxation of Heavy Tracers . . . . . . . . . . . . . . . . 715.1 Eigenvalues of Smooth and Approximate Rough Hard Sphere . . . . . . . . 725.2 Distribution Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735.3 Kinetic Energy Derivative . . . . . . . . . . . . . . . . . . . . . . . . . . . . 765.4 Drag Coefficients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 775.5 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 806 Future Work and Concluding Remarks . . . . . . . . . . . . . . . . . . . . 836.1 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 836.2 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87AppendicesA Appendix A: Numerical Code . . . . . . . . . . . . . . . . . . . . . . . . . . 92A.1 Main Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92A.2 Subroutines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105A.3 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120A.4 Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151A.5 C Subroutines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154A.6 Input File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155A.7 Makefile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155A.8 Submission Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156vList of Tables2.1 Summary of the collision kernel K(x, x′) and collision frequency ν(x), for thesmooth hard sphere, hard sphere and the rough hard sphere models [76]. . 362.2 Summary of the limiting cases of the collision kernel K(0, x′) and K(x, 0) forthe smooth hard sphere, hard sphere and rough hard sphere models [76]. . 374.1 The first and second non-zero eigenvalues obtained for different mass ratios,γ = 1/8, 1/2, 1 and 8, by diagonalizing L using the matrix representation ofthe Khs,1 kernel of Eq. (3.6). The eigenvalues are normalized by Zhs(0). Thegrid used for each diagonalization spans from 0 to S with n intervals. Theaccurate values are QDM results from Shizgal et al. [89]. . . . . . . . . . . 544.2 The magnitudes of the first three non-zero eigenvalues obtained for massratios, γ = 1/8 and 1/2, by diagonalizing L using the matrix representationof the K˜hs, Khs,1 and Khs,3 kernels. The eigenvalues are normalized byZhs(0). The grid used for each diagonalization spans to S = 20 with nintervals and spacing ∆ between grid points. The accurate values are QDMresults from Shizgal et al. [89]. The blank cells indicate that convergencewas obtained for the particular n and ∆ combination. The cells with a dashindicate that no eigenvalues under 1.0000 were obtained. . . . . . . . . . . . 694.3 Same as Table 4.2 except for γ = 1 and 8. . . . . . . . . . . . . . . . . . . 705.1 Eigenvalues (absolute values) of the smooth and approximate rough hardsphere kernels for two different mass ratios and a range of µχ values. Eigen-values are scaled by 2A/√γ and only up to six non-zero scaled values lessthan unity are tabulated. An entry of “...” indicates that no eigenvalue wasfound. The values for µχ = ∞ are for the smooth hard sphere kernel. . . . 72viList of Figures2.1 The spherical component of the kernel plotted as a function of reduced energy,x, for the initial reduced energy x′ = 2. The upper panel plots values for themass ratio γ = 0.1, and the lower panel for γ = 1. The values for the smoothhard sphere kernel of Eq. (2.23) are shown by black lines while the colouredlines plot the values for the rough hard sphere kernel of Eq. (2.85) for valuesof µχ varying from 1.5 to 50. . . . . . . . . . . . . . . . . . . . . . . . . . . 332.2 Same as Fig. 2.1 except for an initial reduced energy x′ = 20. . . . . . . . 342.3 The value of ξ = g˜/2 ·√kt/V0 ·1/√1 + γσ˜Maxwell from Eq. (2.110) for valuesof β = 5, 10, 15, 20. The solid curve for β = ∞ corresponds to Eq. (2.110)directly. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403.1 Cubic B-spline functions, B3i (x), for i = −4,−3,−2,−1, 0 defined on a gridof x values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454.1 Plots showing the accuracy of the eigenfunctions associated with the twolowest, non-zero eigenvalues for different mass ratios. The red squares andblue circles are values obtained from a highly accurate QDM method. Thedashed red and solid blue curves represent the first and second eigenfunctionsobtained by diagonalizing the matrix representation of the kernel K˜hs, usinga grid spanning from 0 to 20 with 200 points. . . . . . . . . . . . . . . . . 564.2 Same as Fig. 4.1 except the curves were obtained by diagonalizing the kernelKhs,1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574.3 Same as Fig. 4.1 except the curves were obtained by diagonalizing the kernelKhs,3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58vii4.4 Snapshots of the time dependence of distribution functions started with theinitial function of Eq. (3.30) with α = 1/2 and γ = 1 and 8. The progressionof the curves begins from the black solid curves to the final equilibriumstate given by the brown dot-dashed curves. The top, middle and bottompanels give the distribution functions in the K˜hs, Khs,1, and Khs,2 and Khs,3representations, respectively. The y-axis of the second panel is logarithmic.The black curves are given for t = 0 and the brown curves represent the lasttime step in the calculations. A greater number of curves are obtained, butsince they overlap each other, only a few are shown to indicate the progressionof the distribution function. The time steps varied from 10− 100 for the thedifferent formulations shown. . . . . . . . . . . . . . . . . . . . . . . . . . . 594.5 Same as Fig. 4.4, except with α = 2 and γ = 1 and 8. . . . . . . . . . . . . 604.6 Distribution functions for α = 1/2 and γ = 1. The left panels are the sameas those in Fig. 4.4, that is, they show the progression of the distributionfunction to equilibrium of the different formulations, Khs, Khs,1, Khs,2 andKhs,3. The right side panels show the complete distribution function as givenby Eqs. (3.2)−(3.4). The red dotted curve is the initial distribution functionthat progress to the equilibrium function given by the black solid curve. Thecurves shown are plotted at identical relaxation times for all the cases. . . . 614.7 Same as Fig. 4.4, except using an initial function given by Eq. (3.31) withγ = 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624.8 Plots of T ∗ and ξ for the distribution functions for different mass ratiosusing the initial function of Eq. (3.30). In all three panels, the blue andyellow dashed curves use initial functions with α = 1/2, and red and greendot-dashed curves are for α = 2. The yellow dashed and green dot-dashedcurves plots values of T ∗. The blue dashed and red dot-dashed curves plotvalues of ξ. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644.9 Plots of T ∗ and ξ for the distribution functions for different mass ratios usingthe initial function of Eq. (3.31). In both panels, the red dashed, black dotted,and blue dot-dashed curves are for mass ratios γ = 1/8, 1 and 8, respectively. 655.1 The time evolution of the distribution function for γ = 0.02 with initialenergies x0 = 5 (left panels) and x0 = 350 (right panels). The top, middle andbottom panels show the relaxation of the distribution function to equilibriumfor the smooth hard sphere, rough hard sphere and Maxwell molecule cases,respectively. The evolution starts from the solid black curves and movesto the dash-dot violet curves (left panels) or dashed maroon curves (rightpanels). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74viii5.2 Same as Fig. 5.1 but for γ = 0.0025. . . . . . . . . . . . . . . . . . . . . . 755.3 Derivatives of the reduced average kinetic energy normalized by 16√γ/3 as afunction of t′ for γ = 0.02, 0.01, 0.005 0.0025 and 0.1 and x0 = 5 (top panel)and x0 = 350 (bottom panel), for the smooth hard sphere case. The squaresymbols indicate the points at which the kinetic energies are 50% of theirinitial values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 765.4 Ratios of calculated drag coefficients to analytical predictions for a varietyof mass ratios and initial reduced energies of x0 = 5. The top, middle andbottom panels are for the smooth and rough hard spheres and the Maxwellmolecule, respectively. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 785.5 Same as Fig. 5.4 except for an initial reduced energy x0 = 350. . . . . . . 79ixList of SymbolsA collision frequency factorα reduced moment of inertiac particle velocity in lab frameχ scattering angleχ used in moment of inertia expression in Section 2.3δ Dirac delta function∆ variable used in Eq. 2.38∆ spacing between intervals of points for evaluation in Chapter 3ǫ azimuthal anglef distribution function of tracerF distribution function of bathF external fieldfhs complete distribution function as given in Eq. (3.1)fhs,1 distribution function expanded about equilibrium function 1 as given in Eq. (3.2)fhs,2 distribution function expanded in the exponent as given in Eq. (3.3)fhs,3 distribution function expanded about exponential tail of equilibrium functionas given in Eq. (3.4)g relative velocityγ mass ratioI moment of inertiaI0(z) modified Bessel function of zeroth orderJ impulsek Boltzmann constantkˆ unit vectorK(x, x′) collision kernelK˜hs original collision kernelKhs,1 modified collision kernel using fhs,1Khs,2 modified collision kernel using fhs,2Khs,3 modified collision kernel using fhs,3m massxM(a, b, z) Kummer’s (confluent hypergeometric) functionn1 number densityr distance between particlesσ diameter of particleσ(g, χ) scattering cross sectionω angular velocityPl Legendre polynomialsφ polar angleΦ(x) error functionQ,R expression used with mass ratioT temperature of bathθ polar angleµ reduced massv relative velocity of sphere at points of contactx scaled energyYlm spherical harmonic functionsZ(x) energy dependent collision frequencyxiAcknowledgementsFirst and foremost I would like to express my sincere gratitude to my supervisor Dr. MarkThachuk for his invaluable guidance, knowledge and support in completing my thesis work.His expertise has provided me a great deal of knowledge and his advice in editing this thesisis also greatly appreciated.Thank you to my parents Pam Khurana and B. M. Singh, for providing a loving, nur-turing and enriching environment for me to grow up in and being the perfect role models.Thank you for making my education your priority and always supporting me in my endeav-ours. I am here today only because of your encouragement, love and support and I hope tocontinue making you proud.Thank you to Dr. Bernard Shizgal and Dr. Donald Douglas for insightful discussionsin regards to the work completed. I also thank my committee members for reading andgiving valuable advice on the work in this thesis. My special thanks to the members ofthe Chemistry Department for creating an enjoyable and inspirational environment, fromwhich I have learnt a tremendous amount.This thesis work was completed with funding provided by Natural Sciences and Engi-neering Research Council of Canada (NSERC).xiiThis thesis is dedicatedtomy parentsxiiiChapter 1Introduction and MotivationThis chapter includes a brief introduction to the problems that are modelled by the Boltz-mann equation in kinetic theory. This is followed by an introduction to some of the popularnumerical methods of solving the Boltzmann equation in Section 1.1. The motivation behindthe work presented in this thesis is given in Section 1.2.Kinetic theory deals with the evolution of the state of a system and provides the lawsof macroscopic phenomena based on the hypothesis of molecular structure of a systemand dynamical laws of discrete molecules. Equilibrium statistical mechanics in comparisondetermines the average state of a system that is in thermal equilibrium. The kinetic theoryof gases developed by Maxwell, Boltzmann, Kro¨nig and Clausius is built on some importantassumptions such as the systems consist of many discrete particles, and the dynamics andinteraction of these particles are known. The dynamical laws are classical and can be usedto derive the macroscopic quantities of the system. A gas is described by the distributionfunction F (c, r, t) and calculations are made to obtain average physical quantities [1–7].A number of problems in kinetic theory lead to a hierarchy of equations. Using New-ton’s equations of motion, the Liouville equation can be derived that governs the timeevolution of the ensemble of particles. Using the Bougoliubov-Born-Green-Kirkwood-Yvon(BBGKY) theory, the Boltzmann equation is derived from the Liouville equation assum-ing uncorrelated binary collisions among the particles. Using the Chapman-Enskog theory,which treats systems close to equilibrium, leads to the Navier-Stokes equation from theBoltzmann equation. The Boltzmann equation is not applicable when correlated collisionsare important and thus can be used for the rarefied or dilute gas regime.The Boltzmann equation has been used to describe many problems where the motion ofparticles is given by classical mechanics. It can account for external fields, the particles canbe non-interacting or be a chemically reactive mixture of multiple species. Some of theseproblems include studies of plasmas, ion mobility, rarefied gases, and micro-scale gas flows[8] that are significant in engineering. In another example, the motion of gas molecules wassimulated using the Direct Simulation Monte Carlo method and the interaction betweena gas molecule and the wall was studied using Molecular Dynamics [9]. The Galerkinnumerical method of solving the Boltzmann equation is used to monitor the relaxationphenomena of a binary gas mixture [10]. A model for the Boltzmann equation is proposedthat describes chemical reactions that proceed within a set activation energy [11]. Reactions1such as these are significant in combustion phenomena and other fluid dynamic processesin fields of astrophysics, organic chemistry, biophysics, chemical physics, and enzymology.These are just a subset of the wide range of problems that are modelled by the Boltzmannequation.Experimental studies done by Chen et al. [12] and Covey and Douglas [13] monitor thekinetic energy decay of biomolecules at high initial energies. Information from this decayis then used to obtain cross section values for the biomolecules. The cross sections canfurther give insight into the structure of the molecule and this information can be usedto understand the role of biomolecules in living cells. The numerical method given in thisthesis models the kinetic energy decay of such experiments where the tracers are initializedat high energies.Furthermore, studies can also include the effect of external fields, similar to ion mobilityproblems [2, 7]. The tracers can be influenced by electric and magnetic fields with arbitraryspatial and temporal dependence. To correctly describe this problem, a minimum of twodimensions is required, those being the tracer velocity parallel and perpendicular to thefield direction. Similarly, problems involving atoms in intense laser fields can be also bemodelled [14]. In such systems the atomic beams can be manipulated to produce ideal laserbeams for chemical kinetics and gas-surface interaction studies. Studies such as these alsorequire a multi-dimensional numerical scheme to be used to study the deflection of the laserbeam. Therefore there can be a numerical scheme that takes into account field effects, thatwould account for the multi-dimensional aspect of the problem.In most numerical methods, the tracers in the system are only slightly perturbed fromequilibrium. The distribution functions of the tracers considered in this study, to testthis numerical method, are far from equilibrium, and their relaxation to equilibrium ismonitored. These initial distribution functions may not even describe a steady state andare anisotropic in velocity and spatial variables. This type of problem is not particularlywell suited for the numerical methods that are available currently. In addition to therequirements for problems involving high energy tracers, the expression of the collisionkernel in the linear Boltzmann equation is known to contain an analytical cusp that alsoadds to difficulty in converging results.With these conditions in mind, a newer method is needed that imposes as few constraintson the distribution function as possible. This type of method should be able to use differenttypes of expressions for the collision integral, to effectively deal with the cusp in the collisionkernel and yet is simple and accurate enough to apply to the problems described above. Themethod presented in this thesis uses B-splines, and also meets the criteria set earlier. Inthis formulation, cubic B-splines are employed in a collocation scheme that approximate thedistribution function as a piece-wise continuous function of cubic polynomials. Therefore,they do not rely on the behaviour of the underlying function except that it can be well-2represented locally by a Taylor series expansion. It will be shown that the B-spline functionsare localized in space, and allow the evaluation of the collision integral to be divided intosmaller localized domains. Due to this construction, the cusp in the collision integral canalso be dealt with.1.1 Methods of Solving the Boltzmann EquationOwing to the number of problems described by the Boltzmann equation, there are a numberof numerical methods that have been developed to solve it. The only exact solution of thisequation is the Maxwellian distribution for the equilibrium case. To solve the Boltzmannequation a number of approximations are made to simplify the expression. These are furtherused in the numerical methods to solve the systems. These numerical methods and theirnumerous variations have been very successful in accomplishing the task of solving theBoltzmann equation. At the same time, there is no one method that can be considereda universal method to solve every problem that involves the Boltzmann equation. Themethods that have been developed work very well primarily because they are specificallydesigned for a particular problem with certain limitations and conditions, which in turnprovides accurate results. A comparative study, by Kowalczyk et al. [15] uses the shockwave problem to compare results obtained using different numerical schemes.In general, the numerical methods used to solve kinetic equations can be divided intoparticle-based methods (section 2.1.1) and methods that solve the Boltzmann equationdirectly for the distribution function (section 2.1.2). These methods include the DirectSimulation Monte Carlo (DSMC) and the Quadrature Discretization Method (QDM). Note,that these two methods are in no way the only methods available. Variations of these andother methods are used to solve the Boltzmann equation. A brief description of thesemethods provides a general picture of the approach taken by numerical schemes used tosolve the Boltzmann equation.1.1.1 Direct Simulation Monte Carlo (DSMC)A very popular particle-based numerical method is the Direct Simulation Monte Carlo[16–22]. There have been numerous applications of this numerical method in rarefied gasdynamics and aerospace studies, through its many variations. For example, a hydrogen-oxygen detonation study used DSMC simulations to study molecular level gas detonation,important in applications of the propagation of detonation waves [23]. The flow of a granulargas can be simulated using DSMC [24], which can be used to study more complex problemsin granular flow. The uniform shear flow in a granular gas is stationary along with a constanttemperature and linear flow velocity when compared to a traditional gas. In aerospace3science the DSMC method has been used to study multiscale aerothermodynamic flows todesign optimal space capsules for entry into planetary atmospheres [25]. Similarly, duringre-entry a weak plasma is formed in the shock layer and the analysis of this plasma has alsobeen done using DSMC [26].In principle, DSMC works by coarse-graining the system into simulated (coarse-grained)particles that represent groups of real particles. The simulated particles are assigned po-sitions and velocities and are allowed to move in time. The collision dynamics occurringamongst the coarse-grained particles can be described by a number of different algorithms.Average quantities are obtained by averaging over the states of the coarse-grained parti-cles. The coarseness in this method increases the fluctuations in the obtained quantities.Systems with large Knudsen numbers, such as rarefied gases are particularly well suited forthe DSMC. The Knudsen number (Kn) is a measure of the degree of rarefaction of a gas.It is a ratio of the mean free path (average distance travelled by the molecules in betweencollisions) to the characteristic dimension. In the case where Kn → 0, the distribution is ofthe Maxwellian form and in the opposite limit, where Kn → ∞, the system falls into thecollisionless or free-molecule flow regime.In rarefied systems, the coarse-graining is physically justified. In principle, the descrip-tion of ion mobility experiments presents a challenge because the concentration of ions istrace so that each ion moves as a separate entity, that is uninfluenced by the other ions.The movement of such an ion is difficult to coarse-grain. With the fluctuations arising inthe DSMC method, ion mobilities would be harder to converge to great accuracy. Alsostatistical errors can arise in DSMC owing to the different parameters that are used in thesimulations [27].The issues arising from the coarse-grained model can be completely avoided by usingfully atomistic classical Molecular Dynamics (MD). Using MD, accurate distribution func-tions for rotating solid bodies in the presence of constant electric fields, have been obtained[28–30]. In these models, the system reaches a steady state and quantities are obtained atthis steady state over many time steps until converged average values are obtained. In thecase where time varying fields are used, this approach becomes difficult because in order toobtain accurate enough averages at each time, large ensembles of trajectories are required.Calculations such as those that involve time varying fields become a lot more intense thanthose where averages have to be obtained for systems with constant fields.In general, particle-based methods such as those mentioned above are not the best fordetermining distribution functions for the ion mobility problem when spatially and tem-porally varying fields are present. These particle based methods are statistical in naturewhich make it challenging to obtain converged and accurate distribution functions, espe-cially in the tails of the distribution. Due to these limitations, methods that solve for thedistribution function directly are expected to perform better for the ion mobility problem.4A number of different methods are available, but one method of particular interest is theQuadrature Discretization Method.1.1.2 Quadrature Discretization Method (QDM)The Quadrature Discretization Method [31–40] is based on the quadrature method fornumerically evaluating integrals. This method uses a weight function to generate a poly-nomial basis set from which a quadrature scheme is constructed. The QDM solves integro-differential equations by representing the distribution function at the set of quadraturepoints which are the roots of these polynomials. The polynomials are orthogonal withrespect to the weight function. The number of quadratures equals the number of sets oforthogonal polynomials. Some of the familiar quadratures are based on classical polyno-mials such as the Legendre, Laguerre, Hermite, Chebyshev, and Jacobi polynomials. Eachof these sets have different intervals and weight functions, and can be used for particularsystems as needed. The set of orthogonal polynomials can be constructed for any intervaland any weight function. A set of expansion coefficients are obtained that are also requiredto be evaluated using the polynomials and the distribution function that are evaluated atthe quadrature points.The collision integral and all other terms in the Boltzmann equation are then evaluatedusing this numerical scheme. The convergence of the distribution functions is dependent onthe choice of the basis set used. If the basis matches the problem well, spectral convergenceis obtained which in turn produces highly accurate distribution functions, whereas, if thebasis does not match the problem well, difficulties can arise. As an example, if the basisset chosen has exponentially decaying tails at large distances but the distribution functiondoes not, they will not accurately represent the distribution function.The QDM has also proven its versatility. For example, variations of this method havebeen used to solve the Fokker-Planck equation [41]. In this study, eigenvalues and eigen-functions were obtained for the Fokker-Planck equation which was used to model the timeevolution of the probability density function. In the study of Shizgal and Blackmore [36],the Boltzmann equation describes the perturbation from equilibrium that occurs due to theloss of energetic atoms in a planetary atmosphere. Radiative transfer equations obtainedfrom the Boltzmann equation describing phonon transport have also been solved using avariation of the QDM [42]. It has been used to solve the Boltzmann equation and also hasbeen used as a numerical method to solve the Schro¨dinger equation [32]. In that case, thebasis functions are used to expand the wave function. These are just a few examples ofproblems where variations of the QDM have been used to solve the Boltzmann equation orits approximations.In ion mobility, it is known that the tails of the distribution function decay algebraically5at large velocities [43]. The cusp in the collision kernel can cause difficulties when integratingbasis functions over the entire range of the integral. This cusp can cause inaccuracies andinsufficiently converged values of the distribution function. The boundary conditions usedin the QDM are intrinsic, that is, they are dependent on the choice of quadrature used, andmodifications to these conditions cannot be made. The form of the Boltzmann equation,such as the linear or linearized Boltzmann equation, or any other forms of the collisionkernel can be used in the QDM, but are dependent on the generation the quadratures.Therefore, the quadratures are dependent on the form of the expressions used. This ensuresan accurate development of the quadrature, that is specific to the problem.1.2 MotivationThe numerical method using cubic B-splines is presented here that is based on the motionof tracer particles in a bath, where the bath considered is at equilibrium, a system that isdescribed by the Boltzmann equation. The tracer particles are in trace amounts, thereforecollisions between tracers are negligible. For this numerical method it is convenient boththeoretically and computationally to use the linear Boltzmann equation in the form of acollision kernel. An approach like this has been used in previous studies, such as, describingthe mobility of gas phase ions in low fields, the kinetic energy relaxation of hot particles, theeffect of velocity-changing collisions, or the collisional broadening of spectral lines [44–51]Spline functions have been used in many fields, but seem to not have been pursued forthe Boltzmann equation. In the literature, the only reference by Siewert [52], uses Hermitecubic splines to solve the Chapman-Enskog equations for viscosity and heat transfer. Inthat study, Burnett functions were computed that were based on rigid sphere collisionsand the linear Boltzmann equation. The work presented in this thesis develops a B-splinemethod for a reduced dimensional problem using collision kernels for the smooth and roughhard sphere.The distribution function can be expanded in several different ways, of which four dif-ferent formulations are introduced, and the relative merits of each will be discussed. Acomplete Boltzmann equation can involve up to ten dimensions (three each for velocity,position and angular momenta, and one for time). The method given here can be easilyextended to higher dimensions that allow fine details to be studied, such as spatial fluctu-ations induced by arbitrary external electric and magnetic fields. As discussed in Chapter6, the extension of the numerical method to higher dimensions will be the aim of futurestudies.The linear kernels derived in Chapter 2 account to some extent for the internal states.A classical description is used which allows the resulting formulation to be used at tem-peratures where quantal rotational effects are negligible. Collision kernels come in different6forms and the expressions can be exact or approximate. The smooth hard sphere modelconsidered in this study uses the well known Wigner-Wilkins kernel [53], which accountsonly for translational velocity energy exchange between the tracer and bath. In the kernelsderived, the tracers are subject to rotations and vibrations whereas in most cases the col-lision kernels only describe the translational velocity changes that occur due to collisions.Subsequently, a kernel expression is derived for the rough hard sphere model, where therotational-translational energy exchange is taken into consideration. It is shown that withincertain limits, the rough hard sphere kernel expression can be reduced to the smooth hardsphere expression. The Maxwell molecule model introduces a repulsive potential, namely1/r4, via which the tracers must interact. This also introduces a more realistic cross sectionexpression that has to be evaluated as part of the collision kernel.7Chapter 2The Boltzmann Equation andDerivation of Collision KernelsThis chapter presents the theory behind the formulation of the numerical method. Section2.1 gives the theory behind the Boltzmann equation and the assumptions that are made tomake it valid for the models considered here. Section 2.2 gives a detailed derivation of thesmooth hard sphere kernel followed by a derivation of the rough hard sphere kernel in Section2.3. This leads to Section 2.4 where the derivation for the approximate rough hard spherekernel is given along with the assumptions that have been used in the derivation. Section2.5 gives a detailed discussion of the kernels, their form and any numerical difficulties thatmay occur. Section 2.6 gives a summary of the kernel expressions and collision frequenciesfor all three models discussed.2.1 The Boltzmann EquationConsider an ensemble made up of multiple systems, and each system is represented by apoint in phase space. Due to the large number of systems within this ensemble, the numberof points become quite dense in the phase space. The distribution can thus be described bya density function, that is a continuous function of the position and momenta coordinates.Normalizing this function density function gives the probability density function, whichcan be denoted by FN (x,p, t), where N is the number of systems within the ensemble.The evolution of FN in time is determined by the motion of each ensemble in the phasespace. The change, dFN , in FN at any given phase point at time t, results from arbitrary,infinitesimal changes in x and p. This can be written as [3]dFN =∂FN∂t dt+N∑i=1∂FN∂xidxi +N∑i=1∂FN∂pidpi . (2.1)Equation (2.1) must be valid for all infinitesimal changes, so that this change follows thetrajectory of the system in phase space. Therefore, (dxi/dt) = q˙i and (dpi/dt) = p˙i and8then Eq. (2.1) can be re-written as [3]dFNdt =∂FN∂t +N∑i=1[∂FN∂xix˙i +∂FN∂pip˙i]. (2.2)∂FN/∂t is the local change in FN , that is, the change at the point x and dFN/dt is thetotal change in FN along the trajectory in the neighbourhood of x. From this, Liouville’sequation is given as [3]dFNdt = 0 . (2.3)Equation (2.3) states that along the trajectory of any phase point the probability densityremains constant in the neighbourhood of the point x. Since FN remains constant along thetrajectory, any function of FN also has this property. The Liouville equation contains a largenumber of degrees of freedom, causing computational difficulties. The Liouville equationleads to the BBGKY (Bogoliubov, Born, H. S. Green, Kirkwood and Yvon) equation. TheBoltzmann equation is derived from the BBGKY equation.Developed by Ludwig Boltzmann (1872) the Boltzmann equation governs the evolutionof the distribution function for sets of particles at low density [1, 2, 2–7, 54, 55]. TheBoltzmann equation is based on the basic assumption that the collision integral is given bythe stosszahlansatz [1, 2, 6], in which the distribution function f evolves from one state to theother due to collisions between particles. The stosszahlansatz gives rise to the assumptionthat only binary collisions occur between particles and that these are uncorrelated. Thisis called the molecular chaos assumption. Consider a binary system composed of tracerand bath particles with distribution functions are f and F , respectively. The Boltzmannequations describing such a binary system in general are∂f∂t + c ·∂f∂r +Fm ·∂f∂c = C[f,F ] + C[f, f ] (2.4)and∂F∂t +C ·∂F∂r +FM ·∂F∂C = C[F ,F ] + C[F , f ] , (2.5)in which F is an external field acting on the system andC[fa, fb] =∫[fa(c1′)fb(c2′)− fa(c1)fb(c2)]gσ12(g, χ) sin χdχdǫdc2 , (2.6)is the collision integral which incorporates the differential scattering cross section σ12(g, χ)between two particles. These integrals account for the interactions between the tracer andbath particles during collisions. The collision integral of Eq. (2.6) can broken down into“loss” and “gain” terms. The expression∫fa(c1)fb(c2)σ(g, χ)g sinχdχdǫdc2 is the “loss”9term, describing the number of particles that are lost out of the vicinity of shell c1 dueto collisions. Similarly,∫fa(c1′)fb(c2′)′σ(g, χ)g sinχdχdǫdc2′ is the “gain” term describingthe number of particles gained in the velocity shell c1 due to collisions from particles withinitial velocities c1′ and c2′. The evolution of the left hand side of Eq. (2.4) is based onexternal, collisionless factors with ∂f/∂t describing the time evolution of the distributionfunction. The term c · ∂f/∂r indicates change in the distribution function due to themovement of particles in and out of the vicinity of the position vector r. The distributionfunction is assumed to have uniform density, that is, f does not change with r. Due tothis assumption this term is ignored. Whereas, the term F · ∂f/∂c describes the change indistribution function due to any external forces F [1–3, 7]. Therefore, the terms on the lefthand side of the Boltzmann equation are not considered in this thesis. This collision kernelon the right hand side of the Boltzmann equation poses more difficulties when it comes tocalculations. The collision kernel expressions in the following sections are based only on theterms on the right hand side of the equation.In Eq. (2.4), the terms C[f,F ] and C[f, f ] describe the tracer-bath and tracer-tracerinteractions. Similarly, in Eq. (2.5), C[F ,F ] and C[F , f ] describe bath-bath and bath-tracerinteractions. Because we wish to study tracers in very low concentrations, the C[f, f ] term inEq. (2.4) and the C[F , f ] term in Eq. (2.5) can be ignored. The bath can then be consideredin equilibrium at all times. This results in Eq. (2.4) being reduced to the linear Boltzmannequation.2.2 Smooth Hard Sphere Collision KernelThe derivation of the collision kernel for spherical particles has appeared in many forms inliterature. For example, the kernel for the linear Boltzmann equation has been derived fora pure gas in Ref. [56]. The first part of the derivation given in the section follows the sameidea except it accounts for the mass ratio between the bath and tracer particles. Waldmann[57] expressed the collision integral of the Boltzmann equation using a transition operatorformalism which Andersen and Schuler [58] then used to derive the collision kernel for thelinear Boltzmann equation for smooth spheres, that also include the spherical componentof this kernel. In an analogous approach the kernel was derived for a smooth hard spheremodel [59] using a result from Berman [60]. The expression for the general kernel and thefirst Legendre component of the kernel for the smooth hard sphere model was reported byKapral and Ross [61], which was based on the work by Mason and Monchick [62] for thelinearized Boltzmann equation. The general expansion of the kernel in terms of Legendrecomponents was given by Shizgal and Blackmore [63].For spherical tracer particles the internal degrees of freedom are ignored. The densitycarries the spatial dependence of the distribution function completely, therefore only the10velocity dependencies are considered.The linear Boltzmann equation derived from Eq. (2.4) in the absence of external fieldsis given as∂∂tf(c) =∫[f(c′)F (0)(c′1)− f(c)F (0)(c1)]gσ(g, χ) sin χdχdǫdc1 , (2.7)which is solved for the distribution function. Here, c′ and c′1 are the pre-collision velocitiesin an inverse collision where c and c1 are the post-collision velocities and variable withsubscript “1” refer to the bath particles. Particles with velocities c have mass m. Therelative velocity between the tracer and bath particles is g = gΩg = c1 − c, and thescattering angle χ is defined as g · g′ = gg′ cosχ. In the case of elastic scattering, thescattering cross section σ(g, χ) depends only on the magnitude of g and the scattering angleand the azimuthal angle ǫ ranges from 0 to 2π, which represents all possible approaches forthe initial scattering direction.In elastic scattering the total momentum and energy are conserved, thus, the dynamicsof the elastic collision can be completely expressed in terms of the impulse, J = µ(g − g′),which is imparted by the collision with the reduced mass µ = mm1/(m+m1) and given asc′ − c = Jm , (2.8)c′1 − c1 = −Jm1,J = 2µ(g · kˆ)kˆ ,where kˆ is the unit vector that lies along the apse line joining the centers of the collidingparticles at the point of closest approach pointing from the bath to the tracer particle. Inthe case of spherical particles collisions are elastic, therefore, g = g′. The equations for theconservation of total momentum and energy aremc+m1c1 = mc′ +m1c′1 , (2.9)mc2 +m1c21 = mc′2 +m1c′21 ,respectively.The equilibrium distribution function for Eq. (2.7) isF (0)(c1) = n1( m12πkT)3/2exp[−m1c212kT], (2.10)where n1 and T are the number density and temperature of the bath, respectively, and k is11the Boltzmann constant. The goal is to express Eq. (2.7) in the form∂∂tf(c) =∫K(c, c′)f(c′)dc′ − Z(c)f(c) , (2.11)which defines the collision kernel K(c, c′). Comparing the loss term in Eq. (2.7) with thelast term in Eq. (2.11) allows the energy dependent collision frequency Z(c) to be identifiedasZ(c) =∫f (0)(c1)gσint(g)dc1 . (2.12)Since c1 is independent of the scattering angle, the integrals over χ and ǫ can be performedindependently, giving the integral cross sectionσint(g) =∫ 2pi0∫ pi0σ(g, χ) sin χdχdǫ . (2.13)Since c is held constant, therefore dc1 = dg. It is beneficial to convert the integrationover c1 to one over g using c21 = c2 + g2 + 2g · c. In order to convert this, a sphericalpolar coordinate system is considered, one where the polar axis is defined by c, so thatg · c = gc cos θ with θ and φ the polar angles specifying the direction of g. Using thesedefinitions and the expressions from Eq. (2.10) for f (0), the integrations over θ and φ areperformed analytically. By defining the reduced variable s =√m1/2kTg givesZ(c) = Z(c) = n1c√π(2kTm1)∫ ∞0s2dsσint(√2kTm1s)(2.14)×{exp[−(s−√m12kT c)2]− exp[−(s+√m12kT c)2]},where, Z(c) depends only upon the magnitude of the tracer velocity.The collision kernel in Eq. (2.11) should be written in a form where the integration isdone over c′ rather than c1 as shown in Eq. (2.7). For this derivation, it is useful to defineC = c′ − c = CΩC , where ΩC is the angular direction of C and since c is being heldconstant, dC = dc′. A relationship between g and C can be found, using the definition ofJ. The first and last relations in Eq. (2.8) define C = J/m, and using the definition of thescattering angle along with g = g′ givesC = Jm =(2µm)|g · kˆ| =( µm)√g2 + g′2 − 2g · g′ =(2µm)g sin(χ/2) . (2.15)12With a fixed scattering angle χ, this givesdc1 = dg = g2dgdΩg =(m2µ)2 1sin3(χ/2)C2dCdΩC =(m2µ)3 dCsin3(χ/2) (2.16)=(m2µ)3 dc′sin3(χ/2) ,where the expression in Eq. (2.15) has been used to express g in terms of C, and it is alsoexplicitly stated that ΩC and Ωg vary over all space so that the former can be replacedby the latter. Comparing the gain term of the Boltzmann equation in Eq. (2.7) with thefirst term of the right hand side of Eq. (2.11) and using the relation in Eq. (2.16) gives thekernel asK(c, c′) =(m2µ)3 ∫f (0)(c′1)gσ(g, χ)sin3(χ/2) sinχdχdǫ . (2.17)Using the expressions in Eq. (2.8), c′21 can be expressed within the equilibrium function interms of c and c′. This gives c′1 = c′ + g′ = c′ + g − 2(g · k)kˆ which after squaring andsimplification givesc′21 = c′2 + g2 − 4(g · kˆ)(c′ · kˆ) + 2g · c′ . (2.18)Taking the dot product of first expression in Eq. (2.8) with c′ givesc′ · (c′ − c) = 2µm (g · kˆ)(c′ · kˆ) . (2.19)The expression for g · c′ is derived by defining a spherical polar coordinate system wherekˆ is along the z-axis and g lies in the xz plane, giving g = g[sinψxˆ + cosψzˆ] with ψ beingthe angle between g and kˆ [56]. From scattering relations, this angle is related to χ byψ = (π− χ)/2. Since θ (angle between kˆ and c′) and φ are the polar angles for c′, kˆ and gdefine the scattering plane and φ is the azimuthal angle relative to this plane. This anglehas exactly the same definition as ǫ over which the scattering cross section is integrated,therefore ǫ = φ. Combining these expressions together gives g = g[cos(χ/2)xˆ + sin(χ/2)zˆ]and c′ = [sin θ cos ǫxˆ+ sin θ sin ǫyˆ + cos θzˆ] givingg · c′ = gc′ [sin θ cos (χ/2) cos ǫ+ cos θ sin (χ/2)] (2.20)=(m2µ) Cc′sin(χ/2) [sin θ cos (χ/2) cos ǫ+ cos θ sin (χ/2)]=(m2µ)[|c′ ×C| cot (χ/2) cos ǫ+ c′ ·C],where from Eq. (2.8), C is parallel to kˆ (since g · kˆ ≥ 0 for scattering particles) henceθ is also the angle between c′ and C, so that c′ · C = c′C cos θ and |c′ × C| = c′C sin θ.13Substituting the expressions from Eqs. (2.15), (2.19), and (2.20) into Eqs. (2.17) and (2.18)givesK(c, c′) =(m2µ)4|c′ − c|n1( m12πkT)3/2exp[− m12kT c′2]∫ 2pi0dǫ∫ pi0sinχdχsin4(χ/2)× σ[(m2µ) |c′ − c|sin(χ/2) , χ]exp[−(m+m1)2kT×{|c′ × c| cot(χ/2) cos ǫ− c′ ·(c′ − c)+(m4µ) |c′ − c|2sin2(χ/2)}]. (2.21)The integration over ǫ can be performed analytically using∫ 2pi0 exp[z cos ǫ]dǫ = 2πI0(z),where I0(z) is the modified Bessel function of zeroth order. Completing the integrationand making a change of variable using s = (m/2µ)2(m1/2kT )|c′ − c|2 cot2(χ/2) gives theexpression for the kernel asK(c, c′) = 4n1|c′ − c|(m2µ)2 ( m12πkT)1/2exp[ m2kT c′2 − (m+m1)2kT{c′ · c+(m4µ)|c′ − c|2}]×∫ ∞0dse−sσ√2kTm1√(m2µ)2 ( m12kT)|c′ − c|2 + s,× 2 cot−1(√2kTm1(2µm) √s|c′ − c|)]I0[2√m12kT|c′ × c||c′ − c|√s]. (2.22)These latter two expressions for the kernel agree with those in the literature [58, 62]. Inthese references the distribution function is expressed as f(c) = f (0)(c)ψ(c) and the kernelsare expressed for the function ψ(c), therefore the kernels in the references are equal tof (0)(c′)K(c, c′)/f (0)(c).In the case of smooth hard sphere particles, σ(g, χ) = σ212/4 where σ12 = (σ1 + σ)/2 isthe distance between the centers of the two hard spheres at the point of collision. Usingthe relation∫∞0 ds exp[−s]I0(α√s) = exp[α2/4] reduces Eq. (2.22) toKhs(c, c′) =n1σ212|c′ − c|(m2µ)2( m12πkT)1/2exp[ m2kT c′2 − (m+m1)2kT (2.23)×{c′ · c+(m4µ)|c′ − c|2 −( µm) |c′ × c|2|c′ − c|2}].This kernel for the smooth hard sphere can be written in several equivalent forms, with one14particularly compact expression given as [59]Khs(c, c′) =n1σ212|c′ − c|(m2µ)2 ( m12πkT)1/2exp[− m12kT(m2µ)2(2.24)×{|c′ − c|+(2µm)c′ · (c− c′)|c′ − c|}2].The full translational velocity dependencies are contained in these kernel expressions.Reduced kernel expressions can be derived from these expressions of the collision kernels,where the new expressions are averaged over various velocity components. One can see thatin Eq. (2.22) that K(c, c′) depends only upon c′, c, and y = cosΘ = Ωc′ ·Ωc, with Θ beingthe angle between c′ and c. As shown by Blackmore and Shizgal [63], the kernel can beexpanded in a series of Legendre polynomials asK(c, c′) = K(c, c′, y) =∞∑l=0(2l + 14π)Kl(c, c′)Pl(Ωc′ ·Ωc) (2.25)withKl(c, c′) = 2π∫ 1−1K(c, c′, y)Pl(y)dy . (2.26)Expanding the distribution function in a series of spherical harmonic functions,f(c) =∑lmflm(c)Ylm(Ωc) , (2.27)withflsm(c) =∫f(c)Y ∗lm(Ωc)dΩc , (2.28)substituting into Eq. (2.11), multiplying both sides by Y ∗lm(Ωc) and then integrating withrespect to Ωc gives∂∂tflm(c) =∑lm′∫K(c, c′)fl′m′(c′)Yl′m′(Ωc′)Y ∗lm(Ωc)c′2dc′dΩc′dΩc − Z(c)flm(c) . (2.29)Replacing the kernel with the expansion in Eq. (2.25) and using the angular momentumaddition theoreml′′∑m′′=−l′′Y ∗l′′m′′(Ωc′)Yl′′m′′(Ωc) =(2l′′ + 14π)Pl′′(Ωc′ ·Ωc) , (2.30)allows orthogonality relations between the spherical harmonics to be used, simplifying the15final expression as∂∂tflm(c) =∫Kl(c, c′)flm(c′)c′2dc′ − Z(c)flm(c) . (2.31)Therefore, the time dependence of the components in flm(c) are dictated by Kl(c, c′) andare also uncoupled. Thus, the higher dimensional integrals of Eq. (2.11) are reduced toa set of uncoupled integro-differential equations with only one dimensional integrations inEq. (2.31).If the kinetic energy of the tracer is to be studied, then for any function of c, h(c), usingthe expansions given above, gives〈h(c)〉 =∫h(c)f(c)dc∫f(c)dc =∫∞0 h(c)f00(c)c2dc∫∞0 f(c)c2dc. (2.32)So, only the spherical component of f(c) is needed and from Eq. (2.31) only the spher-ical component of the kernel K0(c, c′) is required. Scaled energies, x = (m/2kT )c2 andx′ = (m/2kT )c′2 are used to conveniently express the spherical components of the kernel.Including the integrating factor with the definition of the distribution function givesf˜(x) =√πx(2kTm)3/2f00(√2kTxm), (2.33)K˜(x, x′) =√x2(2kTm)3/2K0(√2kTxm ,√2kTx′m). (2.34)Using these definitions, the equations for the spherical component of the distribution func-tion and for obtaining averages, become∂∂t f˜(x) =∫ ∞0K˜(x, x′)f˜(x′)dx′ − Z(x)f˜(x) , (2.35)〈h(x)〉 =∫∞0 h(x)f˜(x)dx∫∞0 f˜(x)dx.Using the same definitions for f (0)(c) = (m/2kT )3/2 exp(−mc2/2kT ) gives the equilibrium16function asf˜ (0)(x) =√πx(2kTm)3/2f (0)00(√2kTxm)(2.36)= 2π√x(2kTm)3/2f (0)(√2kTxm)= 2√π√xe−x ,with normalization∫∞0 f˜(x)dx = 1. Using Eqs. (2.22), (2.26), and (2.34) givesK˜(x, x′) = 2π√x2(2kTm)3/2 ∫ 1−1dyK(√2kTxm ,√2kTx′m , y)(2.37)= A(1 + γ)24γ3/2√xe−γx′∫ 1−1dy( 1x′ + x− 2√xx′y)1/2× exp[− (1 + γ){−x′ +√xx′y +(1 + γ4γ)(x′ + x− 2√xx′y)}]×∫ ∞0dse−sσ˜[√2kTm(((1 + γ)24γ)(x′ + x− 2√xx′y)+ s)1/2,× 2 cot−1( 1√γs(1 + γ)(x′ + x− 2√xx′y)]I0[2√γs√xx′(1− y)2(x′ + x− 2√xx′y)1/2],where the scattering cross section has been scaled relative to the hard sphere value so thatσ˜(g, χ) = 4σ(g, χ)/σ212.The expression for Z(x) is obtained from Eq. (2.14) asZ(x) = Aγ√x∫ ∞0s2σ˜int(√2kTm1s){[− (s−√γx)2]− exp[− (s+√γx)2]}ds , (2.38)with the mass ratio defined as γ = m1/m, the collision frequency factor as A = n1πσ212√2kT/(πm)and where the cross section has been scaled by the hard sphere value so that σ˜int(g) =σint(g)/(πσ212). In the case of non-hard sphere potentials, σ12 is an arbitrary scaling factorchosen to best suit the problem at hand. For the hard sphere potential, σ˜int(g) = 1 andEq. (2.38) can be integrated analytically giving the known result [64, 65],Zhs(x) =A√γ[e−γx +√π2 Φ(√γx){ 1√γx + 2√γx}], (2.39)in which Φ(x) = (2√π)∫ x0 exp(−w2)dw is the error function. The kernel is obtained fromEq. (2.37) using the parameters Q = (1/√γ +√γ)/2 and R = (1/√γ −√γ)/2 and making17the change of variable z = (x′ + x− 2√xx′y)1/2 to giveK˜(x, x′) = AQ2√γx′ e(Q−R)(Rx′−Qx)∫√x′+√x|√x′−√x|dze−QRz2F (x, x′, z; γ) , (2.40)whereF (x, x′, z; γ) =∫ ∞0dse−sσ˜[√2kTm1√s+Q2z2, cot−1(√sqz)]I0[(Q−R)]√∆s](2.41)and∆ = 2(x′ + x)− z2 −(x′ − xx)2. (2.42)Since ∆ is symmetric with respect to the exchange of x and x′, F (x, x′, z; γ) and the integralin Eq. (2.40) have the same symmetry. The expression given is optimized numerically fortreating heavy tracers for which γ < 1 and QR > 0. For lighter tracers with γ > 1,QR < 0 and the value of exp(−QRz2) in the integral may become very large, posingnumerical challenges during convergence. The kernel is generally well-behaved though itmay be helpful to transform to another variable other than z when casting the equationsinto a numerical algorithm.2.2.1 Hard SphereFor a hard sphere potential, σ˜(g, χ) = 1, and using the relation∫∞0 ds exp[−s]I0(α√s) =exp[α2/4], allows the kernel to be evaluated analytically giving the Wigner-Wilkins kernel[53, 58, 64–66], that isK˜hs(x, x′) =AQ22√πx′[Φ(Q√x+R√x′)+ ex′−xΦ(R√x+Q√x′)(2.43)±{Φ(Q√x−R√x′)+ ex′−xΦ(R√x−Q√x′)}],in which the “+” and “-” signs are taken when x < x′ and x > x′, respectively.2.3 Rough Hard SphereIn the rough sphere model, rotating hard spheres with non-smooth surfaces are considered,where changes in rotational and translational energies/momenta occur as the particles col-lide. In this simple model, some internal degrees of freedom are described and inelasticcollisions are introduced. The derivation given here does not account for any effects dueto vibrational motion. In the rough sphere model it is a known fact that the degree ofrotational-translational coupling is greater than in typical molecular systems [2], therefore18a qualitative understanding of the effect of rotational-translational coupling upon the evo-lution of the distribution function is used in this formulation.The collision kernel for the rough hard sphere model is derived for a tracer particle dilutein a bath [67, 68] that is assumed to be at equilibrium. This allows the applicability of thelinear Boltzmann equation to this model. The kernel depends upon both velocity and angu-lar velocity quantities. Further to this derivation, an expression for the approximate roughhard sphere kernel is derived which assumes that the rotational degrees of freedom of thetracer remain at equilibrium and thus can be treated analytically. With this approximation,the kernel is only dependent upon translational velocities.The tracer and bath particles in this model have velocities, c, angular velocities, ω,moments of inertia, I, and diameters, σ. The characterization of the rough sphere modelis based on its moment of inertia, α = 4I/(mσ2). The values of alpha depend upon thedistribution of mass in the tracer particles. With the mass concentrated at the center, α = 0,mass concentrated uniformly at the surface of the particle, α = 2/3 and with uniform massdensity, α = 2/5.As for the smooth hard sphere case, the equations for the collision dynamics in thismodel can be written using J as [2, 69–73],c′ − c = Jm , (2.44)c′1 − c1 = −Jm1,ω′ − ω = − σ2I1kˆ× J ,ω′1 − ω1 = −σ12I1kˆ× J ,J = 2µ1 + µχ[v + µχ(v · kˆ)kˆ].with χ = 1/(mα) + 1/(m1α1) (χ used in these equations should not be confused with thescattering angle that has been used previously) andv = g − 12 kˆ× (σ1ω1 + σω) , (2.45)where v is the value of the relative velocity of the points of contact of the sphere at thecollision. This includes the effects of the relative translational velocity (through g) and therelative surface velocities that arise from rotations of the spheres. Upon collision, the signof v changes, i.e. v′ = −v. The collision equations for the total translational momentum,19total angular momentum, and total energy are written asmc+m1c1 = mc′ +m1c′1 (2.46)Iω + I1ω1 −mσ2 kˆ× c+m1c12 kˆ× c1 = Iω′ + I1ω′1 +mσ2 kˆ× c′ + m1σ12 kˆ× c′112mc2 + 12m1c21 +12Iω2 + 12I1ω21 =12mc′2 + 12m1c′21 +12Iω′2 + 12I1ω′21 ,where the total angular momentum includes contributions from the internal rotations of theparticles, as well as their orbiting contributions (of the form r×p) at the point of collision.The form of the linear Boltzmann equation for the low density rough hard sphere tracerparticle in an uniform, infinite rough sphere bath with no external fields, is given as∂f∂t =∫(f ′f (0)′1 − ff(0)1)σ212(g · kˆ)dkˆdc1dω1 , (2.47)where σ12 = (σ + σ1) /2. The integral over kˆ includes all values for which(g · kˆ)≥ 0, andthe equilibrium bath distribution function is a generalization of Eq. (2.10),f (0)(c1, ω1) = n1(m1I1)3/2(2πkT )3exp[− 12kT(m1c21 + I1ω21)]. (2.48)The Boltzmann equation can be written as∂∂tf (c, ω) =∫K(c, ω, c′, ω′)f(c′, ω′)dc′dω′ − Z (c, ω) f (c, ω) , (2.49)with the collision kernel,K (c, ω, c′, ω′) and the energy dependent collision frequency, Z (c, ω).Comparing the loss term in Eq. (2.47) with the last term in Eq. (2.49), givesZ (c, ω) =∫f (0) (c1, ω1)σ212(g · kˆ)dkˆdc1dω1 . (2.50)Substituting Eq. (2.48) the angular velocity dependence can be integrated analytically. Also,performing the remaining integrals using c21 = c2 + g2 + 2g · c and∫(g · kˆ)dkˆ = πg yieldsthe same expression as for the smooth hard sphere, given in Eq. (2.39). This means thepresence of translational-rotational coupling in the rough sphere model does not affect thefrequency term, and this becomes independent of angular velocity. This is consistent sincethe smooth and rough sphere fluids have precisely the same structure, resulting from thehard impact at the particle surface.The collision kernel is obtained from the gain term in the Boltzmann equation, therefore20comparing Eqs. (2.47) and (2.49) gives∫f (0)(c′1, ω′1)f(c′, ω′)σ212(g · kˆ)dkˆc1dω1 =∫K(c, ω, c′, ω′)f(c′, ω′)dc′dω′ . (2.51)The goal is to rewrite the variable dependency on the left hand side of the equation tomatch that on the right hand side. This is done using the variables w = σ1ω1 + σω,C = c′ − c, and W = ω′ − ω. Since c and ω are kept constant in Eq. (2.49), it follows thatdc1dω1 = 1/σ31dgdw and dc′dω′ = dCdW.Now, c1 and ω1, and therefore g and w, are independently varying vectors so dgdwrepresents six independent differentials. This is different for C and W. The first threeequations in Eq. (2.44) show thatJ = mC , (2.52)W = − σ2I kˆ× J = −mσ2I kˆ×C ,soC·W = 0 regardless of the value of J. Therefore,C andW must always be perpendicular,that is, dCdW (hence dc′dω′) cannot represent six independent differentials because of thisconstraint. There are only five independently varying quantities. If the right hand sideof Eq. (2.51) is to be interpreted as a six-dimensional integral, then it must be the casethat the kernel contains a Dirac delta function which effectively reduces the number ofindependently varying quantities to five. Therefore, the collision kernel must be derivedwith care and it will be shown how the delta function arises in the derivation.Different approaches could be taken to derive the collision kernel for the rough hardsphere model. In one approach, one could transform to the magnitudes C and W , whichare independently varying quantities, and then transform the angular dependencies mindingthe orthogonality constraint. In yet another approach, variables other than C and/or Wcould be used to bypass the orthogonality constraint. Several variations of these approacheswere tried and given here is the derivation that was the simplest and most straightforward.In this approach, g is transformed to C, and then the angular frequency part is dealt with.To begin, a number of relations are derived that are helpful in the derivation. Invertingthe last equation in Eq. (2.44) yields v as a function of J, givingv = 1 + µχ2µ[J− µχ1 + µχ(J · kˆ)kˆ]. (2.53)Combining this equation with Eq. (2.45) and the first equation in Eq. (2.52)givesg =( g2µ)(1 + µχ)[C− µχ1 + µχ(C · kˆ)kˆ]+ 12 kˆ×w . (2.54)21From Eq. (2.54), a few useful relations can be derived, namelydg =(m2µ)3(1 + µχ)2 dC , (2.55)g · kˆ = m2µC · kˆ , (2.56)g · c =(m2µ)(1 + µχ)[C · c− µχ1 + µχ(C · kˆ)(c · kˆ)]+ 12c · kˆ×w , (2.57)g2 =(m (1 + µχ)2µ)2 [C2 − µχ(1 + µχ)2(2 + µχ)(C · kˆ)2](2.58)+ 14(kˆ×w)2+ m (1 + µχ)2µ C · kˆ×w .Using the relations gives in Eqs. (2.55)-(2.58) shows thatσ212(g · kˆ)dkˆdc1dω1 =σ212σ31(m2µ)4(1 + µχ)2(C · kˆ)dkˆdCdw , (2.59)in which it is understood that the integral over kˆ is performed for values where(C · kˆ)≥ 0.Using the definition of W from Eq. (2.52) gives in component formWx =mσ2I [Cy cos θ − Cz sin θ sinφ] , (2.60)Wy =mσ2I [Cz sin θ cosφ− Cx cos θ] ,Wz =mσ2I [Cx sin θ sinφ− Cy sin θ cosφ] ,in which spherical polar coordinates are used to express the component of the unit vectorkˆ with dkˆ = sin θdθdφ. As discussed earlier, for given C and kˆ, the components of W arenot independent but satisfy, as seen in Eqs. (2.60), C · W = 0. There, only two of thethree components are independent. The next transformation maps θ and φ to these twoindependent components of W, which without loss of generality shall be chosen as Wx andWy. Calculating the appropriate Jacobian for this transformation using Eqs. (2.60) givesdWxdWy =(mσ2I)2Cz(C · kˆ)sin θ sinφ =(mσ2I)2Cz(C · kˆ)dkˆ . (2.61)At this point the Dirac delta function is introduced to create an additional integration over22Wz which maintains the dependencies in Eqs. (2.60) that is,dWxdWy = δ[Wz +(CxWx + CyWyCz)]dWxdWydWz (2.62)= Czδ (C ·W) dW .After combining Eqs. (2.59), (2.61), (2.62) allows the left side of Eq. (2.51) to be written∫f (0)(c′1, ω′1)f(c′, ω′)σ212(g · kˆ)dkˆdc1dω= σ212σ31(m2µ)2( Iµσ)2(1 + µχ)2∫f (0)(c′1, ω′1), f(c′, ω′)δ(C ·W)dwdCdW , (2.63)which when compared with the right hand side of Eq. (2.51) and using the definitions forC and W identifies the kernel asK(c, ω, c′, ω′) = σ212σ31(m2µ)2( Iµσ)2(1 + µχ)2 δ[(c′ − c)·(ω′ − ω)]∫f (0)(c′1, ω′1)dw .(2.64)To evaluate the integral over w, use the conservation of energy expression in Eq. (2.46) torewrite the Maxwellian asf (0)(c′1, ω′1) = n1(m1I1)3/2(2πkT )3 exp[− 12kT(mc2 + Iω2 −mc′2 − Iω′2 +m1c21 + I1ω21)].(2.65)The definition of w yields ω2 = (w2 − 2σw · ω + σ2ω2)/σ21 and that of g yields c21 =c2 + g2 +2g · c which can be rewritten using Eqs. (2.57) and (2.58) to eliminate the factorsof g. Performing these substitutions and simplifying gives the final expression of the kernelasK(c, ω, c′, ω′) = n1σ212σ31( m12πkT)3/2( I12πkT)3/2(m2µ)2( Iµσ)2(2.66)× (1 + µχ)2 δ[(c′ − c)·(ω′ − ω)]× exp[− m2kT(c2 − c′2)− 12kT(ω2 − ω′2)− I1σ22σ21kTω2]× exp[− m12kT{β2 −(m2µ)2µχ (2 + µχ)(C · kˆ)2−mχ(c · kˆ)}]×∫exp[− I12σ21kT(w2 − 2σω ·w)− m12kT{14(kˆ×w)2+ β · kˆ×w}]dw ,in whichβ =(m2µ)(1 + µχ)C+ c . (2.67)23Either before or after performing the integration over w it is necessary to express the kˆdependence in terms of C = c′ − c and W = ω′ − ω. This dependence can be obtained bytaking the magnitude of the second equation in Eq. (2.52) and rearranging to give(C · kˆ)2= C2 −( 2Imσ)2W 2 . (2.68)Note that for the smooth hard sphere from Eq. (2.15) (C·kˆ)2 = C2, and comparing with therelation above, and noting Eq. (2.56), shows that for the rough hard sphere, the rotationalmotion decreases the component of g along the apse direction kˆ. It also shows that thiscomponent depends only upon the magnitudes of C and W and not upon their directionsin space. Taking the vector cross product of C with the last equation in Eq. (2.52) giveskˆ = 1C2[(C · kˆ)C− 2ImσC×W]= 1C2√C2 −( 2Imσ)2W 2C− 2ImσC×W . (2.69)This last relation allows all the dependence upon kˆ to be expressed in terms of the kernelvariable dependencies thus providing a complete description.From this, it can be seen that the expression for the kernel contains many terms, in-cluding those which are functions solely of C or W but also those which mix these variabledependencies in both magnitude and angle. As expected, the translational and rotationaldependencies are intimately mixed in the kernel preventing any simple factorization. Also,unlike the corresponding kernel for the smooth sphere case which contains only angulardependence through c ·C (allowing simplifications to be made by expanding the kernel interms of Legendre polynomials in this angle) the angular dependence in the rough spherekernel is fully expressed in both the translational and rotational degrees of freedom. This re-quires expansions in terms of spherical harmonics in both angular degrees of freedom. Suchan expansion would produce a set of integro-differential equations similar to Eq. (2.28) ex-cept they would couple all components of the kernel. While only the spherical componentof the kernel would be necessary to determine the average kinetic energy, the evolution ofthe distribution function would depend upon not only this spherical component but uponall other components of the kernel as well. While closed form expressions for the kernel,including the spherical component, can be evaluated for the smooth hard sphere model, itappears quite difficult to do so for the rough hard sphere model.242.4 Approximate Rough Hard Sphere KernelThe expression for the exact collision kernel for the rough hard sphere is complex. Toavoid using the expression in this form, several options were explored to simplify it. Thegoal of using this collision kernel is to study the kinetic energy loss in large, massive tracerions moving at high translational energies through a buffer gas. It is expected that energyexchange will dominate, and rotational energy exchange should be less important. It is thenreasonable to assume that the rotational degrees of freedom of the tracer as always beingin a state of equilibrium, the same as the surrounding bath gas. The distribution functionthen becomesf(c, ω) ≈ f(c)( 12πkT)3/2exp[− 12kT ω2], (2.70)where f(c) is the translational distribution function for the tracer. Substituting Eq. (2.70)into Eq. (2.49) and integrating both sides with respect to ω gives∂∂tf(c) =∫K1(c, c′)f(c′)dc′ − Z(c)f(c) , (2.71)where Z(c) is given by Eq. (2.39) and the new kernel is given byK1(c, c′) =( 12πkT)3/2 ∫K(c, ω, c′, ω′) exp[− 12πkT ω′2]dω′dω . (2.72)Using the kernel expression in Eq. (2.66) and using the definitions of C and W for differentquantities, givesK1(c, c′) = n1( m12πkT)3/2(m2µ)2( Iµσ)2(1 + µχ)2 exp[− m2kT(c2 − c′2)]×∫dWδ(C ·W) exp[− 12πkT{β2 −(m2µ)2µχ (2 + µχ)(C · kˆ)2− mχ(C · kˆ)(c · kˆ)}]{( 12πkT)3/2 ( I12πkT)3/2× exp[− 12kT ω2 − I12σ21kT(σ2ω2 − 2σω ·w + w2)]}× exp[− m12kT(14(kˆ×w)2+ β · kˆ×w)]dw . (2.73)The integral over ω can be done analytically using the relation 4χ = (I1σ2 + Iσ21)/(II1),with the result that the quantity within braces becomes σ31/(8πχkT )3/2 exp[−w2/(8χkT )].Inserting this result back into the expression for the kernel, and also using Eqs. (2.61) and25(2.62) to transform from integration over W to that over kˆ givesK1(c, c′) =n1σ212(8πkT )3/2( m12πkT)3/2(m2µ)4(1 + µχ)2 exp[− m2kT(c2 − c′2)](2.74)×∫exp[− m12kT{β2 −(m2µ)2µχ (2 + µχ)(C · kˆ)(c · kˆ)}]×{∫exp[− 18χkT w2 − m12kT(14(kˆ×w)2+ β · kˆ×w)]dw}(C · kˆ)dkˆ ,where the integral over kˆ includes all values for which (C · kˆ) ≥ 0. The integral over w canbe performed taking kˆ and β as fixed variables. Let kˆ define the polar axis of a sphericalpolar coordinate system and let β lie in the xz plane so that β = β(sin θβxˆ + cos θβ zˆ)with θβ the angle between kˆ and β. If θ and φ are the polar angles associated withw then kˆ × w = w(− sin θ sinφxˆ + sin θ cosφyˆ), (kˆ × w)2 = w2 sin θ2, and β·kˆ × w =−βw sin θ sinφβ = −|β×kˆ|w sin θ sinφ. Using these relations in the integral over w andintegrating over φ using∫ 2pi0 exp[±z sinφ]dφ = 2πI0(z) with I0(z) a modified Bessel function,then gives the contents within the braces as2π∫ pi0sin θdθ∫ ∞0w2dw exp[− 18χkT w2 (1 +m1χ sin2 θ)]I0( m12kT |β × kˆ|w sin θ).(2.75)The integration over w can be performed by making a change of variable y = w2 and usingthe relation [74]∫ ∞0dyyµ−1/2eαyI2ν (2ρ√y) = Γ (µ+ ν + 1/2)Γ (2ν + 1)ρναµ+ν+1/2M(µ+ ν + 12 , 1 + 2ν,ρ2α),(2.76)in which M(a, b, z) is Kummer’s (confluent hypergeometric) function, so that Eq. (2.75)becomes(8χkT )3/2∫ pi/20dθ sin θ(1 +m1χ sin2 θ)3/2M(32 , 1,m21χ2kTsin2 θ1 +m1χ sin2 θ|β × kˆ|2), (2.77)in which it has been recognized that since the integrand depends only upon sin θ that theintegration over θ is symmetric about θ = π/2. The integral above can be solved [75]yielding the final expression(8πχkT )21 +m1χexp[ m1χ(1 +m1χ)m12kT |β × kˆ|2]. (2.78)26Incorporating these results in the expression for the kernel and using |β×kˆ|2 = β2− (β·kˆ)2then givesK1(c, c′) = n1σ212( m12πkT)3/2(m2µ)4 (1µχ)2(1 +m1χ)× exp[− m2kT(c2 − c′2)− 1(1 +m1χ)m12kT β2]{∫exp[− m12kT{ m1χ1 +m1χ(β · kˆ)2−(m2µ)2µχ (2 + µχ)(C · kˆ)2−mχ(C · kˆ)(c · kˆ)}](C · kˆ)dkˆ}. (2.79)To perform the integration over kˆ it is convenient to choose the direction of C as the polaraxis in a spherical polar coordinate system and let c be in the xz plane. Since the integralover kˆ must be performed for (C · kˆ) ≥ 0 the polar angle θ should range from 0 to π/2 whilethe angle φ should range from 0 to 2π. With these definitions we getC · kˆ = C cos θ , (2.80)c · kˆ = c (sin θ cosφ sin θc + cos θ cos θc) =|c×C|C sin θ cosφ+(c ·C)C cos θ ,β · kˆ =(m2µ)(1 + µχ)(C · kˆ)+(c · kˆ),in which θc is the angle between C and c, and the integral over kˆ within the braces ofEq. (2.79) becomesC∫ 2pi0dφ∫ pi/20sin cos θdθ exp[− m12kT{(m2µ)2(1− (1 + µχ)21 +m1χ)C2 cos2 θ (2.81)+ m1χ1 +m1χ( |c×C|2C2 sin2 θ cos2 φ+ (c ·C) cos2 θ[1 + (c ·C)C2]+ |c×C| sin θ cos θ cosφ[1 + 2(c ·C)C2])}].The only dependence upon φ appears through terms containing cosφ, and∫ 2pi0 ξ(cosφ)dφ =2∫ pi0 ξ(cos φ)dφ for any function ξ. Transform the integral over φ using this relation andt = φ/π. In addition, insert the result for the integral over kˆ into the expression for thekernel, rearrange the resulting terms, including writing the expression for β2 using Eq. (2.67)and substitute C = c′ − c to giveK1(c, c′) = K1(c, c′, y) =n1σ212|c′ − c|( m12πkT)1/2(m2µ)2F1 (2.82)× exp[ m2kT c′2 − (m+m1)2kT{c′ · c+(m4µ)|c′ − c|2}],27in whichF1 = 2|c′ − c|2( m12kT)( 22µ)2 (1 + µχ)2(1 +m1χ)(2.83)×∫ 10dt∫ pi/20sin θ cos θdθ exp[− m12kT{14[( mm1)mχ− m1χ1 +m1χ]|c′ − c|2 sin2 θ+ m1χ1 +m1χ( |c× c′|2|c′ − c|2 sin2 θ cos2(πt)−(c′ · c)sin2 θ − |c× c′|2|c′ × c|2 cos2 θ+(c′2 − c2) |c× c′||c′ − c|2 sin θ cos θ cos(πt))}].In obtaining this result, several useful relations were used, such as (m/2µ)2[1−(1+µχ)2/(1+m1χ)] = [m1χ/(1 +m1χ)− (m/m1)mχ]/4, (c ·C)[1 + (c ·C)/C2] = (c′ · c)− |c× c′|2, and[1+2(c·C)/C2] = (c′2−c2)/|c′−c|2. This shows a simplified expression for the general kernelin Eq. (2.66). Looking at the expression in Eq. (2.82), shows that K1(c, c′) depends onlyupon the magnitudes c and c′, and y = cosΘ =Ωc′ ·Ωc with Θ the angle between c and c′.In other words, the Boltzmann equation reduces to a form with a kernel operator with thesame dependencies found in Eq. (2.22) for the spherical case. The same analysis employedwith that equation can be applied here, that is the kernel can be expanded in a seriesof Legendre polynomials, and the Boltzmann equation reduced to a series of uncoupled,one-dimensional integro-differential equations. Using analogous definitions shown in theequations for the angular components of the kernel gives the spherical component of thekernel asK˜1(x, x′) = 2π√π2(2kTm)3/2 ∫ 1−1dyK1(√2kTxm ,√2kTx′m , y)(2.84)= AQ2√γ√x∫ 1−1dy(x′ + x− 2√xx′y)1/2F1× exp[−R2(x′ + x− 2√xx′y)− x+ (1− γ)√xx′y].Making the change of variable z = (x′ + x − 2√xx′y)1/2 and simplifying gives the finalexpression for the kernel asK˜1(x, x′) =AQ2√γx′ e(Q−R)(Rx′−Qx)∫√x′+√x|√x′−√x|dze−QRz2F1(x, x′, z; γ, µχ) . (2.85)The expression for F1(x, x′, z; γ, µχ) is obtained by rewriting Eq. (2.83) in terms of x =(m/2kT )c2, x′ = (m/2kT )c′2, and z2 = (m/2kT )|c′ − c|2, and writing the parameterdependencies in terms of the mass ratio γ = m1/m and µχ. Note that m1χ = (1 + γ)µχ28and (m/µ) = (1 + γ)/γ. With these variable substitutions, and transforming the integralover θ using s = sin2 θ gives the final expression for F1 asF1(x, x′, z;µχ) =(1 + γ)24γ(1 + µχ)2[1 + (1 + γ)µχ]z2∫ 10dt∫ds (2.86)× exp[−(1 + γ)µχ4γ z2s+ γ (1 + γ)µχ4 [1 + (1 + γ)µχ]×{∆[1− s cos2(πt)]− 2(x′ − xz)√∆s(1− s) cos(πt) +(x′ − xz)2s}],with ∆ given by Eq. (2.42). Note that similar to the spherical kernel of Eq. (2.40) theexpression above shows that F1(x, x′, z; γ, µχ) = F1(x′, x, z; γ, µχ) so that the integral inEq. (2.85) is symmetric with respect to the exchange of x and x′.Examining the expression for J from the last expression in Eq. (2.44) shows that whenµχ → ∞, J → 2µ(g · kˆ)kˆ, that is the impulse shown in the last expression of Eq. (2.8)for the smooth hard sphere system. The inelasticity of the rough hard sphere model isnegligible as µχ becomes very large. Therefore, in this limit the rough hard sphere kernelshould reduce to the smooth hard sphere. This is shown by transforming F1 in Eq. (2.86)using s = (m/2kT )(mχ/4)|c′ − c|2 sin2 θ to giveF1 =(m1µ) (1 + µχ)2µχ (1 +m1χ)∫ 10dt∫ m2kTmχ4 |c′−c|20dse−s (2.87)× exp[ m12kT( m1χ1 +m1χ) |c× c′|2|c− c|2]× exp[−(2m1m)2 11 +m1χ{ |c× c′|2|c′ − c|4 s[1 + cos2(πt)]−(14 +(c′ · c)|c′ − c|2)s+√m2kT√mχ2(c′2 − c2) |c× c′||c′ − c|3√s cos(πt)√1−(2kTm)( 4mχ) s|c′ − c|2}]In the limit when µχ is large, m1χ is also large, and the prefactor in front of the integralin F1 approaches unity, while all the terms is the exponentials, apart from the first two,approach zero due to the factor of 1/(1 +m1χ) which multiplies them, that is,limµχ→∞F1 =∫ 10dt∫ ∞0dse−s exp[ m12kT|c× c′|2|c− c|2]− exp[ m12kT|c× c′|2|c′ − c|2]. (2.88)When this result is incorporated into Eq. (2.82), the smooth hard sphere kernel, Khs(c, c′)of Eq. (2.23) is obtained. Thus, the approximate rough hard sphere kernel approaches thesmooth hard sphere one in the correct limit.292.5 Discussion of KernelsThe analytical results are given for a number of different kernels. From these derivations anumber of issues can arise when using these expressions numerically. Care must be takenwhen the limits x and x′ approach zero in translating the spherical kernel of Eq. (2.40) intoa numerical algorithm. For this kernel when x→ 0 with any value of fixed x′, transformingthe integral in Eq. (2.40) using p = (z −√x′)/√x gives√x∫ 1−1dp exp[−QR(p√x+√x′)2]F(x, x′, p√x+√x′; γ). (2.89)In determining the limits of the integral over p, the relation x < x′ is used, which is alwayssatisfied when x is small enough and x′ has a finite value. The values of p are always of orderunity so when x→ 0, the factors of p√x become negligible, reducing the above expressionto 2√x exp(−QRx′)F (0, x′,√x′; γ). When x = 0 and z =√x′, Eq. (2.42) shows that ∆ = 0which when used in the expression of Eq. (2.41) and noting limz→0 I0(z) = 1, gives the limitof the above expression as2√xe−QRx′∫ ∞0dse−sσ˜[√2kTm1√s+Q2x′, 2 cot−1( √sQ√s)]. (2.90)The leading factor of √x causes the kernel to approach zero when x → 0 and sinceF (x, x′, z; γ) = F (x′, x, z; γ) the preceding analysis shows when x′ → 0 the same limitas that given above will be obtained except with x replaced everywhere with x′. In thiscase, the leading factor of√x′ cancels with the same term in the denominator of the pref-actor in Eq. (2.40) to give a finite result. In summary, the kernel has the following limitingvalues:K˜(0, x′) = 0 (2.91)K˜(x, 0) = 2AQ2√γ∫ ∞0dse−sσ˜[2kTm1√s+Q2x, cot−1( √sQ√x)].For the smooth hard sphere, the last equation gives K˜hs(x, 0) = (2AQ2/√γ) exp(−Q2x)showing an exponential decay as energy increases. More generally, the equations can beused to examine the value of K˜(0, 0). A limit of the last equation giveslimx→0K˜(x, 0) = 2AQ2√γ∫ ∞0dse−sσ˜[√2kTsm1, 0]. (2.92)The forward-scattering cross section for most interaction potentials can be quite large there-fore this limit can be quite significant. Comparing the two expressions in Eq. (2.91) shows30that limx′→0 K˜(0, x′) 6= limx→0 K˜(x, 0); the kernel has a point discontinuity at x = x′ = 0.This point does not affect the values of any integrals because it is of measure zero; however,care must be taken when casting equations in numerical algorithms since the kernel will notbe a continuous function at zero energy.In an analogous procedure, the limits of K˜1(x, x′) when x or x′ is small must be deter-mined. Consider the limit when x is small (with finite x′) and transform the integral overz in the kernel of Eq. (2.85) using p = (z −√x′)/√x) to give√x∫ 1−1dp exp[−QR(p√x+√x′)2]F1(x, x′, p√x+√x′; γ, µχ). (2.93)In the limit when x is small, this reduces to 2√xe−QRx′F1(0, x′,√x′; γ, µχ). As in thespherical case, the factor of √x will cause the kernel to approach zero when x → 0. Thevalue of F1(0, x′,√x′; γ, µχ) can be determined analytically using Eq. (2.86) and noting thatin this limit ∆ → 0. Performing the necessary algebra givesF1(0, x′,√x′; γ, µχ) = (1 + µχ)2µχ (1 + µχ− γ)[1− exp{−µχ (1 + µχ− γ)[1 + (1 + γ)µχ]Q2x′}](2.94)Again using F1(x, x′, z; γ, µχ) = F1(x′, x, z; γ, µχ) gives the limit when x′ is small to beidentical with the above except with x′ replacing x everywhere. The leading factor for√x′then produces a finite limit.In summary, putting together all this information gives the following limiting values forthe kernelK˜1(0, x′) = 0 , (2.95)K˜1(x, 0) =2AQ2√γ e−Q2x (1 + µχ)2µχ (1 + µχ− γ)[1− exp{−µχ (1 + µχ− γ)[1 + (1 + γ)µχ]Q2x}].A number of features can be seen in these expressions. For any finite value of x, limµχ→∞ K˜1(x, 0) =(2AQ2/√γ) exp(−Q2x) which agrees with the smooth sphere result. This is another confir-mation that the rough hard sphere results reduce to the smooth hard sphere ones when µχtends towards infinity. However, for any finite µχ, the equations show limx′→0 K˜1(0, x′) =limx→0 K˜1(x, 0) = 0 so unlike the spherical kernel, K˜(x, x′), the approximate rough spherekernel is continuous and zero at x = x′ = 0.In addition to discontinuities in the limits of zero energy, the kernels may also containcusps. This can be seen by examining the derivative of the kernel expressions. For example,31the partial derivative of Eq. (2.37) with respect to x gives∂∂xK˜(x, x′) = −Q (Q−R) K˜(x, x′) + AQ2√γx′ e(Q−R)(Rx′−Qx)∫√x′+√x|√x′−√x|dze−QRz2(2.96)× ∂∂xF (x, x′, z; γ) + AQ22√γxx′[e−(R√x′+Q√x)2F (x, x′,√x′ +√x; γ)× |√x′ −√x|√x′ −√xe−(R√x′−Q√x)2F (x, x′,√x′ −√x; γ)].As mentioned above, this integral over the scattering cross section in the forward directioncan take on a large values, implying that the last term in the expression for the derivative ofthe kernel will indeed cause a cusp at x = x′ as this value adds or subtracts on either side.The value of this same integral was also responsible for the discontinuity of the kernel atzero energy. Thus, both the cusp and the point discontinuity at zero arises from the samephysical contribution, namely, the scattering cross section in the forward direction.As analogous procedure applied to the approximate rough sphere kernel would yieldan expression identical with Eq. (2.96) except with K˜(x, x′) replaced with K˜1(x, x′) andF (x, x′, z′γ) with F1(x, x′, z;µχ). Using the definition of the latter givesF1(x, x′,√x′ ±√x; γ, µχ) = (1 + γ)24γ(1 + µχ)2[1 + (1 + γ)µχ](√x′ ±√x)2(2.97)×∫ 10ds exp[−(1 + γ)µχ4γ(√x′ ±√x)2s+ γ (1 + γ)µχ4 [1 + (1 + γ)µχ]( x′ − x√x′ ±√x)2s].A limiting procedure gives limx→x′ F1(x, x′,√x′−√x; γ, µχ) = 0. Since the factor appearingin the expression for the derivative of the kernel is zero, and since this term would normallybe responsible for producing a cusp, the approximate rough hard sphere kernel has nocusp at x = x′. Instead the kernel is a smooth function everywhere, including in the limitof zero energy. Physically, this results because the rough hard sphere model undergoestranslational-rotational coupling even for glancing collisions, thus affecting scattering in theforward direction.A comparison of the energy dependence of the smooth and approximate rough spherekernels is made in Figs. 2.1 and 2.2 for two different mass ratios and for a range of µχ values.Note that the largest values of the reduced moments of inertia occur when α = α1 = 2/3,corresponding to the maximum amount of translational-rotational energy exchange. Forthese values µχ = 1.5, and for any other values µχ > 1.5. Thus, the minimum valueof µχ, corresponding to the maximum amount of translational-rotational energy exchange3200.511.522.533.54K(x,2)smoothµχ = 50µχ = 25µχ = 10µχ = 5µχ = 1.50 2 4 6 8 10x00.511.522.5K(x,2)γ = 0.1γ = 1Figure 2.1: The spherical component of the kernel plotted as a function of reduced energy,x, for the initial reduced energy x′ = 2. The upper panel plots values for the mass ratioγ = 0.1, and the lower panel for γ = 1. The values for the smooth hard sphere kernel ofEq. (2.23) are shown by black lines while the coloured lines plot the values for the roughhard sphere kernel of Eq. (2.85) for values of µχ varying from 1.5 to 50.decreases and the system eventually approaches the smooth sphere results in the infinitelimit.As seen in Fig. 2.1, when the bath and tracer particles have the same mass (γ = 1) thekernel for the smooth hard sphere has values which extend to large energies, indicating thewide range of energy transfer which can occur upon collision. In comparison, the curve forthe approximate rough sphere kernel with µχ = 1.5 is shifted to larger energies and is muchbroader. This reflects the additional energy transfer possibilities in the rough case due totranslational-rotational coupling, which is strongest for this value of µχ. As the value ofµχ is increased, the curves for the rough sphere kernel shift to the left, and begin to adoptthe shape of the smooth sphere curve. For µχ = 50, the curves are very close, with thelargest differences appearing near the cusp at x = 2. When the tracer is ten times heavierthan a bath particle (γ = 0.1), the upper panel of Fig. 2.1 shows that the kernel values forthe smooth sphere are strongly peaked near x = 2, therefore, the probability is greatestfor small energy transfers, as expected from the kinematic constraints imposed by the massdifference. The curve for the approximate rough hard sphere kernel with µχ = 1.5 is shiftedto the right and is broadened. However, this shift and broadening is not as pronounced asit was for the γ = 1 case. Again, the rough hard sphere values approach the smooth onesas µχ increases.3300.250.50.7511.251.5K(x,20)smoothµχ = 50µχ = 25µχ = 10µχ = 5µχ = 1.510 15 20 25 30 35 40 45 50x00.10.20.30.40.5K(x,20)γ = 0.1γ = 1Figure 2.2: Same as Fig. 2.1 except for an initial reduced energy x′ = 20.A similar comparison is made in Fig. 2.2 except for a higher energy. In this case, oneis examining tracer energies of x = 20 corresponding to values 20 times higher than theaverage thermal bath energy. For both γ = 1 and γ = 0.1 the smooth sphere results show acusp at x = 20 with values dropping off rapidly for x < 20 and less rapidly for x > 20. Asin Fig. 2.1, the approximate rough sphere kernel values approach the smooth ones as thevalue of µχ increases. For µχ = 1.5, the curve for γ = 0.1 is smooth and shifted slightlyto the right, again reflecting the added energy exchange possible between the translationaland rotational degrees of freedom. This curve gradually shifts to the left and becomes moreasymmetric as µχ increases. In contrast, for γ = 1 the curve for µχ = 1.5 is significantlydifferent from the smooth sphere result, peaking at values far to the right of the plotted axis.This curve and to a certain extent the corresponding curve at low energy in Fig. 2.1 showunrealistic behaviour as a result of using the approximate kernel for a mass ratio that is toosmall. Recall that the approximate kernel was based upon the physical assumption thatthe rotational degrees of freedom of the tracer remained in equilibrium. This assumptionshould be poor unless the tracer is heavy, that is, γ ≪ 1. The curves in Figs. 2.1 and 2.2show this to be true.2.6 Summary of Collision KernelsFor the linear Boltzmann equation describing the distribution for a spherical tracer particleof low concentration in a bath gas, an expression for the scattering kernel (Eq. (2.17)) hasbeen derived in general. The kernel was also expanded in an angular basis, and the explicit34expression for the spherically averaged component was given (Eq. (2.37)). Although theseresults are well known, the presentation given here collects various bits and pieces fromdifferent sources into a single, complete result. Specific expressions for the smooth hardsphere model were also given.As a new result, the general kernel (Eq. (2.66)) for the rough hard sphere model wasderived. This kernel depends upon both translational and angular velocities, and has anumber of constraints which must be imposed. Although more complicated than the smoothsphere result, it is possible to express the rough sphere kernel in closed form. In this model,the degree of translational-rotational coupling is controlled by a single parameter µχ, relatedto the reduced moments of inertia of the bath and tracer particles.To simplify the expressions somewhat, an approximation to the exact rough spherekernel was introduced by treating the rotational degrees of freedom of the tracer as anequilibrium bath. In this approximation, the angular velocity dependence in the full kernelcan be treated analytically, resulting in a reduced kernel (Eq. 2.82)) depending only upontranslational degrees of freedom. This kernel was also expanded in an angular basis andthe explicit expression for the spherically-averaged component was given (Eq. (2.85)). Thislatter result tends to the smooth sphere result when µχ approaches infinity, which is thelimit where translational-rotational energy exchange tends towards zero. In that limit, theapproximation using in deriving Eq. (2.82) becomes exact. The approximate kernel shouldonly be used for treating systems with heavy tracers, that is small values of γ, since itbecomes unphysical for large γ.Due to non-zero scattering in the forward direction, the general spherical kernel containsa cusp at x = x′ and a point discontinuity at x = x′ = 0. When casting equationsinto a numerical algorithm, special care must be used to avoid complications due to thesetwo features. In particular, the accurate integration of the kernel near x = x′ can bechallenging. Because of the nature of the collision dynamics in the rough hard spheremodel, the approximate kernel has neither a cusp nor the point discontinuity for all finiteµχ.Although the degree of translational-rotational coupling in the rough hard sphere modelis greater than that in typical molecules, it is a good model for studying the effects ofinelasticity.35Table 2.1: Summary of the collision kernel K(x, x′) and collision frequency ν(x), for the smooth hard sphere, hard sphere and therough hard sphere models [76].Collision kernel, K(x, x′)) Collision frequency, Z(x)Smooth Hard AQ2√x′γ e(Q−R)(Rx′−Qx) ∫√x′−√x|√x′−√x| dzeQRz2× Aγ√x∫∞0 s2σ˜int(√2kTm1 s){exp[−(s−√xγ)2]Sphere, K˜sph(x, x′)∫∞0 dse−sF (x, x′, z; γ) − exp[−(s+√xγ)2]}dsHard Sphere (Wigner- AQ22√ pix′{Φ(Q√x+R√x′)+ ex′−xΦ(R√x+Q√x′)A√γ{[2√xγ + 1√xγ] √pi2 Φ(√xγ)+ e−xγ}Wilkins), K˜hs(x, x′) ±[Φ(Q√x−R√x′)+ex′−xΦ(R√x−Q√x′)]}Rough Hard AQ2√x′γ e(Q−R)(Rx′−Qx) ∫√x′+√x|√x′−√x| dze−QRz2× Zrhs(x) = Zhs(x)Sphere, K˜rhs(x, x′) F1(x, x′, z; γ, µχ)36Table 2.2: Summary of the limiting cases of the collision kernel K(0, x′) and K(x, 0) for thesmooth hard sphere, hard sphere and rough hard sphere models [76].K(x, 0) K(0, x′)Smooth Hard 2AQ2√γ∫∞0 dse−s× 0Sphere, Ksph(x, x′) σ˜[√2kTm1√s+Q2x, cot−1( √sQ√x)]Hard Sphere (Wigner- 2AQ2√γ e−R2x 0Wilkins), Khs(x, x′)Rough Hard 2AQ2(1+µχ)2√γµχ(1+µχ−γ)e−Q2x× 0Sphere, Krhs(x, x′)[1− exp{−µχ(1+µχ−γ)[1+(1+γ)µχ]Q2x}]2.7 Maxwell MoleculeThe Maxwell model is developed for particles that interact via a 1/r4 potential [2, 77, 78]and is used widely in kinetic theory. In comparison to other more general models, thismodel is special because the eigenvalues are known.Unlike the spherical and rough hard sphere cases which represent specular and diffusescattering [12], the Maxwell molecule represents a more realistic potential for molecules, forwhich the cross section was evaluated from [77, 78]Wrbdb = Wrσ(Wr, χ) sinχdχ = −γ(χ) cos(χ/2)dχ , (2.98)whereγ(χ) = 4 sin(χ/2)σ(Wr , χ)Wr =(A4kT)1/2 s0ds0cos(χ/2)dχ , (2.99)ands0 = s0(Wr) = b(kTW 2rA4)1/4. (2.100)The value of A4 is given byA4 =V (r)r4 , (2.101)where the value of the potential energy V (r) = V0 and inverse potential via which the37Maxwell molecules interact, r = σ12.From the expressions [78]χ(s0) = π − 2∫ s00ds[1− s2 −( ss0)4]−1/2, (2.102)and1− s2c −(scs0)4= 0 , (2.103)where s = b/r with b is the impact parameter. Defining new variables w = s/sc = t andm = s2c + 1 and substituting into Eq. (2.102) givesχ(m) = π − 2sc∫ 10[1 +mt4 − (m+ 1)t2]−1/2 dt , (2.104)where the entire integrand is in the form of an elliptic integral. Re-writing Eq. (2.104) interms of sc and using the limits of m givesχ(sc) = π −2sc√2− s2cK(1− s2c2− s2c), (2.105)where K is a first order elliptic integral. Defining1− s2c2− s2c= sin2 θ , (2.106)gives sc =√cos 2θ/ cos θ, s0 =√2 cot 2θ and Eq. (2.105) becomesχ(θ) = π − 2√cos 2θK(sin2 θ) . (2.107)Differentiating Eq. (2.107) gives,dχdθ =4[cos2 θK(sin2 θ)− cos 2θE(sin2 θ)]sin 2θ√cos 2θ, (2.108)where E is the elliptic integral of the second kind given bydK(m)dm =[E(m) − (1−m)K(m)]2m(1−m) . (2.109)38Substituting Eq. (2.108), the cross section σ(Wr, χ) in Eq. (2.98) can be written asσ˜Maxwell(√2kTm1g˜, χ)= 2√V0kT√1 + γg˜√cos 2θsinχ sin 2θ1[cos2 θK(sin2 θ)− cos 2θE(sin2 θ)] .(2.110)The classical differential cross section above diverges as θ5 or (χ5/2) when θ → 0 (χ → 0),that is in the forward scattering direction. This is a known problem with all classicaldifferential cross sections for potentials which extend to infinite distances. Correct quantummechanical differential cross sections do not have this singularity. In fact, the quantum andclassical cross sections for the Maxwell molecule agree very well except in the forwarddirection [79]. Since the cross section divergence occurs as χ5/2, a function is requiredto multiply with this factor. In addition to removing divergence, this factor should alsoapproach a value of 1 very quickly, in order to keep the values of larger θ unaltered. Toovercome this divergence, the cross section is multiplied by the hyperbolic tangent functiontanh(βχ5/2), where β is a coefficient that determines how quickly the values of the crosssection become finite. A plot of the cross section for different values for β is given in Fig. 2.3.Note that θ ranges from 0 to π/4 as χ ranges from 0 to π. As the value of β becomes larger,the cross section values are more accurately calculated. The solid black curve shows theactual cross section, which diverges as χ→ 0. Introducing the hyperbolic tangent functionforces the cross section values to a finite value at χ = 0. The value of β = 20 was set inthis study because this value removes the singularity at χ = 0 and reproduces the lowesteigenvalues of the Maxwell molecule kernel (which was determined in a separate calculation)to within a few percent. It also gives a strong peak in the forward scattering direction thatmimics realistic cross sections and will provide a good test of the numerical method.For the case of the Maxwell molecule, the scattering angle expression in Eq. (2.107) isevaluated using pre-calculated values of θ on a grid of χ and interpolated as needed. Thecusp at x = x′ is very prominent for this model, and the integration over this point requirescare.2.8 Fokker-Planck ExpressionsAs shown by Andersen and Schuler [58] the Boltzmann equation can be cast into a Fokker-Planck equation when γ is either very large (Lorentz limit) or very small (Rayleigh limit).The system used in this study falls under the Rayleigh limit, and therefore from this pointforward, Rayleigh limit expressions and results will be presented. For the Rayleigh gas, therelaxation of the mean energy is given as [58] (in the present notation),d〈x〉(t′)dt′ = −kR[〈x〉(t′)− 〈x〉(∞)] = −kR[〈x〉(t′)− 3/2] , (2.111)390 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1θ/pi02468101214161820ξ β = ∞ β = 20 β = 15 β = 10 β = 5Figure 2.3: The value of ξ = g˜/2 ·√kt/V0 · 1/√1 + γσ˜Maxwell from Eq. (2.110) for valuesof β = 5, 10, 15, 20. The solid curve for β = ∞ corresponds to Eq. (2.110) directly.40with kR = 16√γ/3 for any initial distribution function. The above results are valid whenγ < 〈x〉0 < γ−1 , (2.112)and 0 ≤ 〈x〉0 ≤ ∞ with 〈x〉0 the initial energy of the system. Using the B-spline numericalscheme, we wish to determine the validity of Eq. (2.111), and to identify the range wherethis expression breaks down.2.9 Drag CoefficientsThe drag force on a tracer is given by~F = md~vdt = −CDAn1m1v2 ~v , (2.113)in which v is the net speed andA the cross sectional area [12] of the tracer. Drag coefficients,CD, are obtained by considering the momentum transfer during a collision and integratingover all scattering angles and a thermal distribution of speeds. Taking the derivative of thenet average kinetic energy for the tracer Ek − (3/2)kT = mv2/2, setting A = πσ212 andusing the definition of the collision frequency factor, A, and Eq. (2.113) givesdEkdt = −ACDγ√πkT(Ek −32kT)3/2, (2.114)which when converted to reduced units givesd〈x˜〉dt′ = −CDγ√π〈x˜〉3/2 , (2.115)with 〈x˜〉 = 〈x〉(t′)−3/2. The time t′ is scaled using the collision frequency, given as, t′ = At.The speed ratio s of the tracer is then s = v√m1/2kT =√γ〈x˜〉.For s≪ 1, Epstein [80] has given the drag coefficients for specular and diffuse scatteringasCsp,ep =163√π1s , (2.116)Cdiff ,ep =139 Csp,ep .Specular scattering is considered for collisions that occur between smooth hard sphere,whereas the diffuse scattering occurs for collisions between rough hard spheres. Expressions41for general speed ratios are [81]Csp =2√πe−s2s(1 + 12s2)+ 2(1 + 1s2 −14s4)Φ(s) , (2.117)Cdiff =2√π3s + Csp ,in which Φ(s) is the error function. These expressions are within a few percent of the Epsteinones when s ≤ 0.05. Note that smooth hard spheres undergo specular scattering only andCsp,ep substituted into Eq. (2.115) gives Eq. (2.111). This is consistent from the derivationof the Fokker-Planck equation that assumes a heavy tracer moving within a specified rangeof energies. From known diffusion coefficients for the rough hard sphere, one can showthat Crough = [(2 + µχ)/(1 + µχ)]Csp. For µχ = 1.5, which corresponds to the maximumamount of translational-rotational coupling this gives Crough = (7/5)Csp which is within afew percent of (13/9)Csp. Thus, the rough hard sphere model with µχ = 1.5 can be usedto model diffuse scattering conditions. More precisely, Crough = 7/5 · 9/13 · Cdiff .42Chapter 3Methodology of Numerical Methodand Cubic B-SplinesA detailed description of the numerical method is given in this chapter. Section 3.1 givesdetails on four different transformations that were used for the collision kernels to makenumerical convergence easier. Each of these transformations is advantageous in differentscenarios, which are discussed. Section 3.2 gives details on the construction of the numericalmethod using B-spline polynomials as a basis set. These polynomials are used to expandthe distribution function. Also given are the conditions and parameters used to validatethe method.3.1 Varied Collision KernelsThe collision kernel was transformed into four different forms. This was done in Ref. [82] forthe hard sphere collision kernel, but these transformations are general and can be used forany of the models discussed. This was done to avoid certain terms in the kernel expressionsthat could cause difficulties with numerical convergence.For the general spherical kernel of by Eq. (2.40). The equilibrium distribution functionisf (0)(x) = 2√xπe−x . (3.1)From a numerical point of view the exponential and root terms in Eq. (2.40) can be prob-lematic, and to bypass these two the following three forms of the distribution function wereconsidered,f(x, t) = 2√xπe−xf1(x, t) , (3.2)f(x, t) = 2√xπe−f2(x,t) , (3.3)f(x, t) = 2√xπf3(x, t) , (3.4)where, at equilibrium f (0)1 (x, t) = 1, f(0)2 (x, t) = x and f(0)3 (x, t) = e−x. Substituting43Eq. (3.2) or (3.4) into Eq. (2.35) gives∂∂tfα(x, t) =∫ ∞0Kα(x, x′)fα(x′, t)dx′ − Z(x)fα(x, t) , (3.5)in which α = 1, 3 andK1(x, x′) =√x′x ex−x′K˜(x, x′) , (3.6)K3(x, x′) =√x′x K˜(x, x′) . (3.7)Similarly substituting Eq. (3.3) into Eq. (2.35) gives∂∂tf2(x, t) = −∫ ∞0K2(x, x′)ef2(x,t)−f2(x′,t)dx′ + Z(x) , (3.8)To test these various transformations, the smooth hard sphere kernel K˜hs(x, x′) of Eq. (2.43)was employed. Following the same analogies as in Section 2.6 surrounding Eqs. (2.89) and(2.90) givesKhs,1(x, 0) = Khs,3(x, 0) = 0 , (3.9)Khs,1(0, x′) = 2AQ2√γ e−R2x′ , (3.10)Khs,3(0, x′) = 2AQ2√γ e−Q2x′ . (3.11)Similarly, Eq. (2.39) gives Zhs(0) = 2A/√γ.3.2 Analytical Details of the AlgorithmA computer algorithm is developed in Fortran 90 to test the analytical results presentedin Chapter 2. This method is constructed using B-splines and was published in [82] and[83]. B-splines are basis splines [84–87] that are simple piece-wise, continuous polynomialfunctions. In the method developed here, third order polynomial functions have been used,therefore cubic B-splines. The order of the B-splines can be increased by odd powers andtherefore quintic or septic B-splines can also be used. This would require modification of thestructure of the matrices and boundary conditions, but the general layout of the numericalmethod does not change. Using a higher order set of B-splines would improve accuracy,but the results obtained using third order B-splines have given accuracy sufficient for thepurpose of developing this method. B-spline functions are constructed over a finite domain.44-4∆ -3∆ -2∆ -∆ 0 ∆ 2∆ 3∆ 4∆x00.10.20.30.40.50.60.7B i3 (x)Figure 3.1: Cubic B-spline functions, B3i (x), for i = −4,−3,−2,−1, 0 defined on a grid ofx values.As an example, the set of B-spline functions used in this study areB3i (x) =16w3i , 0 ≤ wi < 1w3i − 4(wi − 1)3, 1 ≤ wi < 2(4− wi)3 − 4(3 − wi)3, 2 ≤ wi < 3(4− wi)3, 3 ≤ wi ≤ 40, otherwise. (3.12)in which wi = (x/∆)− i. A graphical representation of these functions is given in Fig. 3.1.In this methodology, the B-spline functions are defined over a grid of equally spaced knots orintervals, but in general, these functions are flexible enough to be described over arbitrarilyspaced intervals. The space between each interval is ∆ (which should not be confused for∆ given in Eq. (2.42)). As can be seen in Fig. 3.1, the B-spline functions span over fourunits on the grid, and outside the domain of four units, the functions have a value of 0.The index i labels the left most point of the spline function and matches it to the point onthe grid. Simply put, for i = 0, B30(x) begins at x = 0 and extends to x = x4 = 4∆. In the45present case, the grid over which the B-spline functions are described starts from x0 = 0and extends to xn = S, a finite value. From Fig. 3.1, it should be noted that for all i ≥ nextending past the end of the grid, B3i (x) will not contribute to f . At the same time, oneshould note there will be some contribution to f at grid values beyond x = x0 from B3−3(x),B3−2(x), and B3−1(x). Therefore, the index i in Eq. (3.12) ranges from i = −3 to i = n− 1,to fully include the cubic B-splines contributing to the distribution function values on thegrid. Although there are B-splines off the grid that contribute in the evaluation of thecoefficients, that is, with index i = −3,−2 and −1, the evaluation of the coefficients areconfined to the grid. Calculations that extend to the left of the defined grid give un-physicalvalues, and therefore do not contribute to the calculations.The unknown distribution function f(x, t) is expanded in terms of the B-spline functionsof Eq. (3.12) [82],f(x, t) .=n−1∑i=−3ci(t)B3i (x) , (3.13)where ci(t) are time-dependent coefficients and f can be either f1, f2 or f3. SubstitutingEq. (3.13) into Eq. (3.5) givesn−1∑i=−3dci(t)dt B3i (x) =n−1∑i=−3ci(t)[∫ S0K(x, x′)B3i (x′)dx′ − Z(x)B3i (x)], (3.14)in which K can be any of K˜hs, K1, K2, or K3 or the more general formulations K˜ and K˜1,given by Eqs. (2.40) and (2.85).Using a collocation scheme, the equality in Eq. (3.14) is forced to hold at the gridpoints x = xj = j∆, where j = 0, . . . , n, giving n + 1 constraints for the time dependentcoefficients, ci(t). Two additional constraints are required in this formulation since thereare n + 3 unknown coefficients. To obtain these two extra constraints, a very general andflexible process is used.Constraint 1: One possibility is to enforce the equality in Eq. (3.14) at the midpointbetween the first and the second point, x1/2, on the grid and the midpoint between the lastand second-to-last points, xn−1/2 on the grid. Evaluating Eq. (3.14) at x = x1/2, givesn−1∑i=−3dcidt B3i (x1/2) =n−1∑i=−3ci∫ S0K(x1/2, x′)B3i (x′)dx′ −n−1∑i=−3ciZ(x1/2)B3i (x1/2) (3.15)46which reduces to16[18dc−3dt +238dc−2dt +238dc−1dt +18dc0dt]=n−1∑i=−3K1/2ici−Z1/26[18c−3 +238 c−2 +238 c−1 +18c0].(3.16)Equation (3.16) is obtained by considering values of i where B3i (x1/2) is non-zero, thatis, i = −3, . . ., 0 and calculating the values of the spline functions using Eq. (3.12). Anexpression for xn−1/2 is obtained in a similar fashion.Constraint 2: Obtaining the constraints is a very flexible method, therefore as a secondchoice the spatial and temporal derivatives of f , can also be chosen, that is,∂2∂x∂tf(x, t) =n−1∑i=−3ddtci(t)ddxB3i (x) . (3.17)In this constraint the derivatives are forced to be zero at the grid end points, x = x0, xn.With these constraints set, the first and last rows of the K and Z matrices have zeroesas their elements and the corresponding elements of matrix B are derived from the knownvalues of the spline derivatives at the grid points, again determined from Eq. (3.12). Thisconstraint is not used in the present work, but given to show the flexibility of the method.This constraint was tried but does not work well because it does not match the behaviourof the distribution function well enough. For this reason, this constraint was abandoned.The eigenvalues obtained using constraint 2 were not accurate when compared to those inthe literature. This occurred because the derivative of the B-splines was forced to be zeroat the given points. The derivatives of the B-splines may not have this value at the pointsand this introduces a discrepancy and affects the accurate evaluation of the eigenvalues.With either of these constraints, Eq. (3.14) can be cast into matrix notation asdcdt = Lc , (3.18)withL = B−1(K− ZB) . (3.19)Since the matrix L is time independent, the formal solution of Eq. (3.18) isci(t) = e−Ltc(t = 0) = UeΛtU−1c(t = 0) , (3.20)withΛ = U−1LU , (3.21)in which Λij = λiδij with λi the eigenvalues of the matrix L and U its transformation47matrix.In the f2 case, the formulation given above does not apply because writing f2 as part ofthe exponent term destroys the linearity with respect to the spline coefficients. Therefore,in this particular case the matrix formulation of Eq. (3.8) becomesdcdt = B−1(Z˜− K˜) , (3.22)where B is a square matrix and K˜ and Z˜ are column vectors. The column matrices Z˜ andK˜ have elements Z˜ = Zj andK˜j =∫ S0K3(xj , x′)e[fhs,2(xj ,t)−fhs,2(x′,t)]dx′ . (3.23)For this case a simple finite difference scheme is used to integrate Eq. (3.22), namelyc(t+∆t) = c(t) + dcdt∆t . (3.24)Equation (3.24) can also be used to integrate Eq. (3.18).In the evaluation of the time dependent coefficients, the first set of coefficients areevaluated at t = 0, which are further used in the iterations above. The matrices B, K, andZ are square matrices with dimensions (n+3)× (n+3), whereas for the f2 formulation, K˜and Z˜ have dimensions (n+ 3)× 1.To show a more detailed derivation of the matrix formulation, consider the form ofEq. (3.14) when x = xj, that isn−1∑i=−3dcidt B3i (xj) =n−1∑i=−3ci∫ S0K(xj, x′)B3i (x′)dx′ −n−1∑i=−3ciZ(xj)B3i (xj)16[dcj−3dt + 4dcj−2dt +dcj−1dt]=n−1∑i=−3Kjici −Zj6 [cj−3 + 4cj−2 + cj−1] , (3.25)in whichKji =∫ S0K(xj, x′)B3i (x′)dx′ . (3.26)The second line of Eq. (3.25) is obtained using the values in Eq. (3.12) since B3i (xj) is non-zero only for i = j − 3, j − 2 and j − 1. Mapping the above equations to matrix notation isdone as follows. If k and l are taken to be the indices for the rows and columns of an (n+3)× (n + 3) square matrix, respectively, choose k = 2, . . ., n + 2 to correspond with j = 0,. . ., n and l = 1, . . . , n+ 3 to correspond with i = −3, −2, . . ., n− 1. Therefore, k = j + 2and l = i+4. This provides a mapping from (j, i) labels to matrix indices (k, l). The values48for k = 1 and k = n + 3 are used to assign the values of the two extra constraints. Thematrices used in Eq. (3.19) with constraint 1, then becomeB = 161823823818 . . . 0 01 4 1 0 . . . 0 00 1 4 1 . . . 0 0... ... . . . . . . . . . ... ...0 0 . . . 1 4 1 00 0 . . . 0 1 4 10 0 . . . 18 238 238 18,Z =Z1/2 0 0 . . . 0 00 Z0 0 . . . 0 00 0 Z1 . . . 0 0... ... ... . . . ... ...0 0 0 . . . Zn 00 0 0 . . . 0 Zn−1/2,c =c−3c−2c−1c0...cn−1. (3.27)To obtain the initial coefficients ci(t = 0), Eq. (3.13) is used,ci(t = 0) = B−1f , (3.28)where fk = f(xj, t = 0) with j = k − 2 for k = 2, . . ., n + 2 and j = 1/2 for k = 1 andj = n− 1/2 for k = n+ 3 which match the boundary conditions using constraint 1.3.2.1 Evaluation of ZIdeally, if the grid is infinitely large, that is if S is infinite, then Zj = Z(xj), with Z(x)given by the definition of A for the collision frequency. This equality between Z(x) and theintegral of the collision kernels in Eqs. (3.5) or (3.8) over x′ must be held in order to maintaina constant norm for the distribution function. At equilibrium in this limit K = ZB. But,since S is finite in the numerical method, this equality breaks down at equilibrium and thenorm may not be preserved if Eq. (2.38) is used for evaluating Z(x). To overcome this, the49values of Z are calculated usingZj =∫ S0Ki(xj , x′)dx′ . (3.29)This forces the norm to be preserved but does not guarantee K = ZB will also be satisfied atequilibrium. Only when the representation of the equilibrium function is accurate enough,will this equality be satisfied.3.3 Initial Functions and ConditionsSeveral initial functions were used to test the numerical method, namely a Maxwellian,Gaussian and bimodal functions. The Maxwellian function was set at different temperaturesas compared to the temperature of the bath. The results obtained with this particular formof the initial function are presented in Chapter 4. The form of Maxwellian function used isf(x, t = 0) = 2√xπα3/2e−αx , (3.30)where α is the temperature ratio of the tracer to the bath. The form of Eq. (3.30) isgiven for the fhs formulation and is appropriately transformed into the fhs,1, fhs,2 and fhs,3formulations using Eqs. (3.2), (3.3) and (3.4). To validate the flexibility of the numericalmethod, a more extreme initial function with a bimodal distribution was used, representingpeaks at two different energies, with the formf(x, t = 0) = exp[−0.2(x − 2)2] + exp[−0.2(x − 8)2] . (3.31)The Gaussian distribution function used to obtain the results given in Chapter 5 isf(x, t = 0) = e−(x−x0)2 , (3.32)where x0 is the initial energy of the system.3.4 Use of QuadraturesAny numerical scheme can be used to evaluate the integrals given in the collision kernelexpressions in Eqs. (2.40), (2.85), (3.15), or (3.29). For the results presented in Chapter4 Gauss-Legendre quadrature schemes were used. For the results presented in Chapter 5for the integrations over z in the collision kernel expressions, once again Gauss-Legendrequadratures were used, and those integrals over the variable s were done using Gauss-50Laguerre quadrature. Since the domain of B3i (x) is finite, the integrand is non-zero onlyover a very narrow range on the grid. Therefore, the use of the Gauss-Legendre quadraturescheme is best suited. Because the piecewise continuous nature of the B-splines affectsconvergence of the quadrature scheme, the integrals are divided into pieces extending over asingle grid width ∆. This ensures that each integral is considered to be a separate entity thatis independent of all other intervals. Some intervals may require more points than othersto converge, and by separating the integrals into smaller intervals the appropriate numberof points can be used in the evaluation. The number of quadrature points are increaseduntil the difference in the integrated values is less than a certain tolerance, typically set at10−13 for results in Chapter 4 and 10−9 for results in Chapter 5. Using B-splines providedan advantage in dealing with problematic integrands, such as the cusp at x = x′ in thecollision kernel, in a localized manner.3.5 Code DetailsThe code was written in Fortran 90 and is about 5500 lines. The code was divided into sub-routines, functions and modules that evaluate individual parts of the calculation. The coderequires the use of some routines given in Numerical Recipes [88]. These subroutines includepolint for polynomial interpolation, gaulag for the evaluation of the Gauss-Laguerre quadra-ture abscissae and weights and gauss for the evaluation of the Gauss-Legendre quadratureabscissae and weights. Using these routines, the points and weights of the quadratureswere evaluated at the very beginning of the program and stored. These quadratures wereused as needed in the evaluation of the individual integrals. A level of tolerance was setand the evaluated values of the integrals were checked against these tolerances to confirmtheir convergence. If convergence was not obtained, the number of points and weights wasincreased. For some calculations, the number of points for the quadratures was set at aparticular value. The values obtained with this condition converged well, and thus allowedthe higher level integration to use quadrature points as needed for convergence.To parallelize certain parts of the code, especially large matrix evaluations, OPENMProutines were used. This allowed the use of multiple processors for calculations. Theevaluation of the matrices in Chapter 4 took anywhere from a few seconds to about 4hours. The results for the f1 case completed the fastest and those for the fhs case tookthe longest amount of time. The matrices ranged in size from 20× 20 to 1000 × 1000. Forthe results in Chapter 5, parallelization was introduced. This paralellization was done forevaluation of the matrix L in Eq. (3.19). A separate program was written to complete theevaluation of matrix K in Eq. (3.19). In this the elements of K were evaluated and then theentire matrix was read into the main program. Using two-dimensional linear interpolation,the correct value at the points of evaluation was obtained, and then further used in the51calculation. The evaluation of matrix K would take upto three days, depending on howlarge the matrices were. The largest matrix that was evaluated was 2000 × 2000. Thismethod of evaluating the matrix L was later abandoned since the tolerance on convergencewas relaxed in the lower level evaluations of the integrals. This allowed only the mainprogram to be used for all calculations. The smallest matrix evaluated was 100 × 100 andthe largest 2000 × 2000. The calculations run for the smooth hard sphere were completedbetween 30 minutes to about 2 hours depending on the initial energy that used. It wouldtake longer to complete the calculation for the higher energy cases. The rough hard spherecases were completed between 2 - 6 hours, and the Maxwell model took the longest to run,from 4 - 40 hours. In comparison to other numerical methods available, this method workedquite well in completing the time propagation and giving well converged values. The QDMmethod would still be much faster than the B-spline method. The number of processorswere also controlled in the submission script. The maximum number of processors usedwere 12, that all ran on the same node.C subroutines were used for the gamma and error functions. LAPACK subroutineswere called for the matrix operations such as matrix decomposition, matrix diagonalization,eigenvalue and eigenvector evaluations. Intel and Portland Group compilers were used tocompile and debug the entire code. The code is given in Appendix A.52Chapter 4Validating the Numerical Methodusing Eigenvalues and MomentsThis chapter gives the results used to test the accuracy of the method given in Chapter3. A comparison between the eigenvalues and eigenfunctions is shown for the differentformulations of the collision kernels discussed in Section 3.1, and these values are alsocompared to previously published results that were obtained using QDM ([89]). Also givenare the distribution functions and moments for the different collision kernel formulations.Using the results the advantages and disadvantages of each formulation of the collisionkernel is discussed at the end of the chapter.4.1 Eigenvalues and EigenfunctionsFor the K˜hs, K1 and K3 formulations of the collision kernel, the collision matrix L inEq. (3.19) is diagonalized to obtained eigenvalues and corresponding eigenfunctions. Theeigenvalue spectrum for a hard sphere gas has been evaluated [65] and shown in this thesisare the discrete values that are less than 1. This discrete spectrum gives an eigenvalue of 0that is indicative of the equilibrium distribution function. The consecutive values calculatedare negative and increase. In order to obtain convergence, the smaller values decrease andthe values closer to 1 tend to pile up around this value.Table 4.1 contains the eigenvalues obtained using the K˜hs kernel expression in Eq. (2.43).It shows convergence of the first two non-zero eigenvalues for four different mass ratios ofγ = 1/8, 1/2, 1 and 8. The grid size S and the number of points n vary. The data in Table4.1 shows the effect of changing the grid size and number of points on the convergenceof the eigenvalues. Different combinations of (S, n) are chosen to monitor convergence inmultiple ways. Keeping the value of S fixed and increasing values of n shows the effectsof decreasing the grid spacing on convergence. In contrast, keeping the ratio S/n constantshows the effect of increasing the size of the grid while maintaining a fixed grid spacing.From Table 4.1, it can be deduced that a grid size S of a maximum of 20 units will besufficient to obtain convergence for the eigenvalues. By keeping the values of S constantand increasing the values of n the convergence of the eigenvalues improves. This is further53shown in Tables 4.2 and 4.3.Table 4.1: The first and second non-zero eigenvalues obtained for different mass ratios,γ = 1/8, 1/2, 1 and 8, by diagonalizing L using the matrix representation of the Khs,1kernel of Eq. (3.6). The eigenvalues are normalized by Zhs(0). The grid used for eachdiagonalization spans from 0 to S with n intervals. The accurate values are QDM resultsfrom Shizgal et al. [89].S n γ = 18 γ = 12 γ = 1 γ = 8λ1/Zhs(0) 10 10 0.2796 0.6895 0.8137 0.564110 50 0.2796 0.6896 0.8191 0.601620 20 0.2784 0.6891 0.8188 0.563920 100 0.2784 0.6891 0.8190 0.613230 150 0.2784 0.6889 0.8158 0.5894Accurate values 0.2784 0.6891 0.8190 0.6139λ2/Zhs(0) 10 10 0.4978 0.9157 0.9778 0.957210 50 0.4984 0.9212 0.9760 0.938520 20 0.4882 0.9199 0.9717 0.956120 100 0.4882 0.9208 0.9789 0.938230 150 0.4882 0.9208 0.9760 0.9382Accurate values 0.4882 0.9208 0.9797 0.9667Tables 4.2 and 4.3 show the eigenvalues of the collision kernels in the K˜hs, Khs,1 andKhs,3 formulations for different mass ratios. In Tables 4.2 and 4.3 the same four mass ratiosare tested by varying the number of points n, ranging from 10 − 600 all with S = 20. Itis shown that convergence is obtainable by keeping the grid size constant and varying thenumber of points. The accurate values indicated are obtained using QDM in Ref. [89]. Inall three tables the discrete eigenvalues are reported and are normalized by the frequencyZhs(0). Keeping in accordance with significant figures these values are rounded up.Tables 4.2 and 4.3 show a number of trends. The first non-zero eigenvalue λ1 is obtainedaccurately for all mass ratios in the Khs,1 and Khs,3 formulations. For the smaller massratios of γ = 1/8 and γ = 1/2, the convergence is obtained very quickly. In the case of theKhs,1 formulation fairly accurate eigenvalues are obtained for n = 2 even, and the Khs,3formulation requires a minimum of n = 60. In comparison, the K˜hs formulation goes as highas n = 600 and is still not converged. As the mass ratios increase, namely γ = 1 and γ = 8,a greater number of points are required for convergence. In theKhs,3 case the convergence israpid since the non-polynomial nature of the √x is removed from the distribution function.54Therefore, the convergence is almost as good as the Khs,1 case. It should be noted thatconvergence is the worst for K˜hs formulation for all mass ratios and for γ = 8 the valuesare even less converged at this limit. The trends are similar for the second and third non-zero eigenvalues, except they are correspondingly more difficult to fully converge. This isespecially noticeable for the largest mass ratio γ = 8 where it becomes more difficult toobtain eigenvalues with a small number of points. In fact, for this particular mass ratio λ3was unobtainable until a minimum value of n = 600 was used. Even setting n to a highnumber, the eigenvalue was not converged to the exact value, but it is possible to obtainthe exact value by further increasing the number of points.Overall, the values given in Table 4.1 show similar patterns to those in Table 4.2 and4.3. Between Tables 4.1 and 4.2 and 4.3, it can be confirmed that the B-spline method isstable and does converge to the exact eigenvalues, but the rate of convergence is heavilydependent on the particular formulation used. The Khs,1 and Khs,3 formulations convergemuch faster than K˜hs formulation. Comparison between Tables 4.1 and 4.2 and 4.3 showsthat the B-spline method is quite flexible to accommodate different choices of parameters.However, it is clear that Constraint 1 discussed in Chapter 3 is the better choice to use toobtain converged eigenvalues and has been used in Tables 4.2 and 4.3.The first and second eigenfunctions obtained from the K˜hs, Khs,1 and Khs,3 formulationsare compared with the exact ones in Figs. 4.1, 4.2 and 4.3. In the K˜hs andKhs,3 formulationsthe eigenfunctions oscillate at small distance and have exponentially decaying tails at largedistances.As shown by Shizgal et al. [89] there are very steep oscillations that occur close tox = 0, evident in Figs. 4.1 and 4.3 and are difficult to represent in the K˜hs formulation butin the Khs,3 formulation they are represented very well. As can be seen in Fig. 4.1, theeigenfunctions in the K˜hs formulation are good for small values of γ and become increasinglyworse as γ increases, but in the Khs,3 formulation the eigenfunctions are represented wellfor the entire grid for all mass ratios. The curves for the eigenfunctions were generatedusing S = 20 and n = 200, so with these rather generous parameters, convergence ispoor in K˜hs formulation but not for Khs,3. In comparison, for the eigenfunctions obtainedusing the Khs,1 formulation in Fig. 4.2, the exponential decay in the tails evident in theK˜hs formulation is gradually decreased. All eigenfunctions have tails at large x that aresmooth and slowly varying. In general, the curves are simple in shape and the eigenfunctionobtained using the Khs,1 formulation reproduce the exact values very well.4.2 Distribution FunctionsFigures 4.4 and 4.5 show the time dependence of the distribution functions for all fourformulations (fhs, fhs,1, fhs,2 and fhs,3) starting with initial function given in Eq. (3.30),55-0.4-0.200.20.4Ψ1,2(x)-1-0.50Ψ1,2(x)0 1 2 3 4 5 6 7 8 9 10x-1-0.50Ψ1,2(x)γ = 1/8γ = 1γ = 8Figure 4.1: Plots showing the accuracy of the eigenfunctions associated with the two lowest,non-zero eigenvalues for different mass ratios. The red squares and blue circles are valuesobtained from a highly accurate QDM method. The dashed red and solid blue curves repre-sent the first and second eigenfunctions obtained by diagonalizing the matrix representationof the kernel K˜hs, using a grid spanning from 0 to 20 with 200 points.56051015Ψ1,2(x)-10-50Ψ1,2(x)0 1 2 3 4 5 6 7 8 9 10x-5051015Ψ1,2(x)γ = 1/8γ = 1γ = 8Figure 4.2: Same as Fig. 4.1 except the curves were obtained by diagonalizing the kernelKhs,1.57-0.4-0.3-0.2-0.100.10.20.30.4Ψ1,2(x)-0.6-0.4-0.200.20.40.6Ψ1,2(x)0 1 2 3 4 5 6 7 8 9 10x-1.5-1-0.500.5Ψ1,2(x)γ = 1/8γ = 1γ = 8Figure 4.3: Same as Fig. 4.1 except the curves were obtained by diagonalizing the kernelKhs,3.5800.51f hs(x,t)00.51f hs(x,t)110100f hs,1(x,t)110100f hs,1(x,t)-4-2024f hs,2(x,t)-4-2024f hs,2(x,t)0 1 2 3 4 5 6 7 8 9x00.511.522.5f hs,3(x,t)0 1 2 3 4 5 6 7 8 9 10x00.511.522.5f hs,3(x,t)γ = 1 γ = 8Figure 4.4: Snapshots of the time dependence of distribution functions started with theinitial function of Eq. (3.30) with α = 1/2 and γ = 1 and 8. The progression of the curvesbegins from the black solid curves to the final equilibrium state given by the brown dot-dashed curves. The top, middle and bottom panels give the distribution functions in theK˜hs, Khs,1, and Khs,2 and Khs,3 representations, respectively. The y-axis of the secondpanel is logarithmic. The black curves are given for t = 0 and the brown curves representthe last time step in the calculations. A greater number of curves are obtained, but sincethey overlap each other, only a few are shown to indicate the progression of the distributionfunction. The time steps varied from 10− 100 for the the different formulations shown.with temperature ratios of 1/2 and 2 and the two mass ratios γ = 1 and 8.Figure 4.6 shows the same time dependent distribution functions in the left panel asgiven in Fig. 4.4 for γ = 1 and α = 1/2. In the right panel, the full distribution functionas given by Eqs. (3.2)−(3.4) are given. The curves in the right panel should all be iden-tical to each other. This figure shows the difference of expanding the distribution in thedifferent formulations, does not effect the full distribution function. Therefore, each of theformulations are numerically different from each other, but analytically identical. Each ofthe curves shown in this figure are snapshots taken at identical times in each case.Figure 4.7 shows the time dependent distribution function initialized using the bimodaldistribution function in Eq. (3.31) for all four formulations and γ = 1. With this initialdistribution the tracer has two regions of energy and must relax to equilibrium. Depending5900.10.20.3f hs(x,t)00.10.20.3f hs(x,t)0.0010.010.1f hs,1(x,t)0.0010.010.1f hs,1(x,t)051015f hs,2(x,t)051015f hs,2(x,t)0 1 2 3 4 5 6 7 8 9x00.20.40.60.8f hs,3(x,t)0 1 2 3 4 5 6 7 8 9 10x00.20.40.60.8f hs,3(x,t)γ = 1 γ = 8Figure 4.5: Same as Fig. 4.4, except with α = 2 and γ = 1 and 8.on the formulation used, there is variation in the general shapes of the distribution functions.The top panels of all the figures show the K˜hs formulation. In this representation thedistribution functions have exponentially decaying tails and the initial functions decay to aMaxwellian distribution function. The graphs show the time evolution of the distributionsmoothly moving towards equilibrium. The second panels show the distribution functionsobtained using the Khs,1 formulation, where the initial functions are increasing for a lowertemperature ratio and decreasing for α = 2. In both cases these distributions must relaxto a value of 1 at equilibrium. The third panels show the distribution functions in theKhs,2 formulations. In this representation, the B-splines expand a function in the exponentand therefore the initial distribution function starts with a slope different from 1 and asthe distribution approaches equilibrium, the slope becomes exactly 1, the correct limitingvalue. The bottom panel in all the figures shows the distribution function in the Khs,3formulation. In this formulation the initial distribution function are exponential functionsand at equilibrium the distribution is an exponential.In Fig. 4.7 the top panel very clearly shows the two peaks, where the first peak mustgrow and the second peak must shrink to relax to a Maxwellian distribution at equilibrium.In the second panel for the Khs,1 formulation, the initial distribution starts off with a non-uniform curve and steadily approaches a value of 1 at equilibrium. Similarly, in the Khs,26000.511.5f hs(x,t)00.511.5f hs(x,t)0.1110100100f hs,1(x,t)00.51f hs(x,t)-6-4-2024f hs,2(x,t)00.51f hs(x,t)0 1 2 3 4 5 6 7 8 9x00.511.522.5f hs,3(x,t)0 1 2 3 4 5 6 7 8 9 10x00.51f hs(x,t)Figure 4.6: Distribution functions for α = 1/2 and γ = 1. The left panels are the sameas those in Fig. 4.4, that is, they show the progression of the distribution function toequilibrium of the different formulations, Khs, Khs,1, Khs,2 and Khs,3. The right side panelsshow the complete distribution function as given by Eqs. (3.2)−(3.4). The red dotted curveis the initial distribution function that progress to the equilibrium function given by theblack solid curve. The curves shown are plotted at identical relaxation times for all thecases.6102468f hs(x,t)0.011100f hs,1(x,t)-4048f hs,2(x,t)0 2 4 6 8 10 12 14x110010000f hs,3(x,t)γ = 1Figure 4.7: Same as Fig. 4.4, except using an initial function given by Eq. (3.31) with γ = 1.62formulation shown in the third panel, the curve is non-uniform initially and then approachesa slope of exactly 1 at equilibrium. In the last panel, the initial function has a similar shapeto the black curve in the top panel. As the distribution approaches equilibrium the curvehas an exponential shape. Overall the time dependence in all formulations is well behaved.The curves are smooth over the entire grid of spatial values and remain at equilibrium atlong times. The distribution function at equilibrium for Khs,1 and Khs,2 is a linear functionwhich is represented by the B-splines exactly. In comparison, the other formulations havemore difficult forms, and even in these cases the B-splines are easily able to represent thesefunctions. Therefore, depending on the case each of the formulation can have its advantagesand disadvantages.4.3 MomentsFor the calculation of the moments a standard calculation was done using Eq. (3.30) withα = 0.5 and 2, and the bimodal distribution using Eq. (3.31), for γ = 1/8, 1, and 8, wherethe parameters for the total time, and grid size S, were determined. Multiple calculationswere done to determine the minimum number of the points, n, required for the momentvalues to be varied by more than 0.1% from the standard results. Therefore, the value of nwas reduced until the value of the first moment was within 0.1% of the equilibrium valueof 3/2kT .The values for the zeroth, first and second moments were calculated for distributionfunctions of different mass ratios and initial conditions, but graphical representations of thefirst and second moments are shown in Figs. 4.8 and 4.9. T ∗ can be taken to be the ratiobetween the tracer and bath temperature, and at equilibrium T ∗ = 1. A normalizationfactor of T ∗ = (2/3)〈y〉 is used to normalize the first moment as shown in Figures 4.8 and4.9, where 〈y〉 is the average value of the moment at a particular time. The second momentis calculated using ξ = 〈y2〉 − (5/3)〈y〉2. At equilibrium, for a Maxwellian distributionfunction, ξ = 0, whereas at other times, ξ can be taken to be the measure of deviation ofthe distribution function from equilibrium. It should be noted though, that in general avalue of ξ = 0 does not guarantee a Maxwellian distribution. This relationship between thevalues of T and ξ is also shown in Figures 4.8 and 4.9. The moments are shown to convergequite well as the initial functions approach equilibrium. This is indicated by the curves inFig. 4.8 where the deviation of the normalized moment values from Maxwellian decreasesat longer times.As can be seen in Figure 4.8, the values of T ∗ start either at 2 or 0.5, approach 1smoothly, and remain at that value for long times. As expected, the decay of the momentsfor a higher mass ratio is slower than that for a smaller mass ratio. The values of ξ showsmall deviations from Maxwellian at small times, but then quickly approach the equilibrium6300.511.52T*, ξ00.511.5T*, ξ0 1 2 3 4 5 6 7 8 9 10t00.511.5T*, ξ γ = 1/8 γ = 1 γ  = 8Figure 4.8: Plots of T ∗ and ξ for the distribution functions for different mass ratios usingthe initial function of Eq. (3.30). In all three panels, the blue and yellow dashed curves useinitial functions with α = 1/2, and red and green dot-dashed curves are for α = 2. Theyellow dashed and green dot-dashed curves plots values of T ∗. The blue dashed and reddot-dashed curves plot values of ξ.64012345T*0 1 2 3 4 5t-20-15-10-50 ξFigure 4.9: Plots of T ∗ and ξ for the distribution functions for different mass ratios usingthe initial function of Eq. (3.31). In both panels, the red dashed, black dotted, and bluedot-dashed curves are for mass ratios γ = 1/8, 1 and 8, respectively.65value of zero. In Figure 4.9, the initial function is far from equilibrium, and therefore amore pronounced change is visible. The ξ values are significantly less than zero but increasequickly to zero, with the low mass ratio increasing faster than the higher mass ratio. Thevalues of T ∗ once again show the decay of an initially hot distribution to the equilibriumvalue.Although not shown here, it was found that moments calculated with the fhs,1, fhs,2and fhs,3 formulations, all converged using n = 10 − 100. For the fhs formulation, n wasmuch larger and in fact it was quite challenging to converge the moments to within 0.1%accuracy. Even though the fhs,1 and fhs,2 formulations converged quite well, the fhs,2formulation required many time steps to propagate to the equilibrium state along with avery small time step. The time propagator used for the fhs,2 formulation is quite simple andbetter performance can be obtained by using a more efficient time propagator, such as theRunge-Kutta. Overall, in terms of time steps and convergence, the fhs,1 formulation worksthe best. Also, generally for all the formulations the moments were more easily convergedrather than eigenfunctions and eigenvalues.4.4 DiscussionIn this chapter results from solving the linear Boltzmann equation of Eq. (2.7) using B-splines are shown for four different formulations of the kernel. These were used to testaccuracies in predicting moments, eigenvalues and eigenfunctions. The results indeed vali-date the use of B-splines as a basis set. Using a variety of forms of the distribution functionsfor a number of different combinations of mass and temperature ratios, proves that this nu-merical method is quite flexible and can represent any form of the distribution function.The flexibility of this method also allows the size of the grid, the order of the B-splines,the number of collocation points and boundary conditions, to be changed independentlyaccording to the needs of the problem. The points at which the integrals are evaluated areequally spaced in the results shown, but the use of B-splines does not require this conditionto be satisfied either. The collision kernel is known to have an analytical cusp at x = x′.The use of B-splines did not cause any problem in dealing with this cusp or any otherirregularities that may have been present. This is due to the fact that the evaluation of theintegrals is done over very small domains and the kernel can be represented very well at ornear the cusp. Since this irregular behaviour is localized, very few integrations are affectedby it, and special techniques can be used in these cases to deal with any such problems.The numerical results obtained using the different formulations are nearly identical to eachother, but each formulation has its advantages and disadvantages.Even though different formulations are used, the convergence obtained from each ofthem is not identical. Therefore, depending on the problem at hand, an appropriate kernel66formulation can be used that is the most advantageous. In the original expression of thecollision kernel for K˜hs, there are exponential and√x terms and these formulations help withbypassing these terms. Results obtained using the original expression of the collision kernelrequired the maximum number of collocation points among all the formulations presented.The K˜hs formulation does not produce satisfactory results. Eigenvalues and eigenfunctionsshow poor convergence and the B-splines do not represent the distribution function well.Contributions from a majority of grid points is minimal since they lie in the tail of thedistribution function. Therefore, only a small number of points are actually significant inconstructing an accurate representation of the distribution function. Thus, large values ofn are required for the system to relax to equilibrium.To better balance the contribution of all grid points to the distribution function, theK1 formulation was constructed, where the exponential term was factored out and thusat equilibrium the distribution function is precisely 1, which is exactly represented by thepolynomial nature of the B-splines using only two points. With this formulation, the eigen-values and eigenfunctions produced are very accurate and converge very rapidly to the exactpublished values with very few collocation points. Since this formulation removes the de-caying tails in the equilibrium function, all grid points contribute significantly and evenlyin the construction of the distribution function. The results are more accurate with smallern as compared to the K˜hs formulation. The formulation of K1 can work very well, but itslimitations lie in the fact that the system can only be slightly perturbed from equilibrium.As will be shown in Chapter 5, when tracers are subject to high initial energies, repre-senting the initial distribution functions with the K1 formulation can be a problem becauseas implied by Eq. (3.1) f1(x, t = 0) = 12√pixexf(x, t = 0). The exponential factor approachesvery large values which can be difficult to store in standard variables if f(x, t = 0) is peakedat large x. Propagating such large values is also difficult. To counter this problem, theK3 formulation was designed to remove the√x factor in K˜hs that causes poor convergencebut leaves the remaining dependencies in f untouched. As in the fhs case, the distributionfunction relaxes to an exponential at equilibrium and the number of points required to at-tain equilibrium is comparable to the f1 case. The convergence is slightly poorer than thef1 case, but distribution functions with high initial energies can be represented well withthis formulation. The eigenvalues and eigenfunctions obtained using K3 indicate that thisrepresentation can produce satisfactory results.In general, the original expression of the collision kernel K˜hs should be avoided. TheK3 formulation should be used and is the most similar to K˜hs and produces fairly accurateresults. In both these cases the contribution from the collocation points is uneven andlie mostly in the decaying tails as seen in the eigenfunction plots. To ensure an evencontribution from all the collocation points, the K1 formulation works best but fails in thecase where the tracers have high initial energies. In terms of eigenvalues and eigenvectors,67K1 is the best formulation, since it produces the most accurate results with the least numberof collocation points.In yet another formulation, K2, the distribution function as the exponential of a B-spline expansion is physically correct. In this formulation of K2, the B-splines representan argument of an exponential function. This was done because it guarantees a positivedistribution function which is physically correct regardless of the values of f2. In contrast,all other representations may give physically incorrect negative values for the distributionfunctions, if the spline is poorly converged and develops oscillations. Since the B-splines arein the exponential, the time-dependent coefficients cannot be isolated during the integration,and therefore no eigenfunctions or eigenvalues can be obtained. Thus, this formulation isremoved from the constraint of having to produce these values. Therefore, one can see thatobtaining eigenvalues and eigenfunctions is a matter of choice rather than a necessity forthis numerical method to work. The moments and distribution functions converge well inthis formulation. Once again the number of grid points required to obtain equilibrium areminimal. The only problem encountered with this formulation is that a very small time stepis required with the simple propagator given in Eq. (3.24). One can use more sophisticatedtime propagators to increase this time step.The construction of the numerical method does not rely upon the particular forms of thekernel, therefore any of the kernel formulations, i.e. K˜hs, K1, K2 or K3, can be used. Theseformulations were constructed to bypass the numerical difficulties that can affect conver-gence of the results. The integrations of the collision kernel is divided into smaller intervalsthat are independent of other integrals on the grid. To make the numerical method moreefficient, a parallel algorithm can be set up to perform these integral calculations simultane-ously. The results presented are for a one-dimensional linear Boltzmann equation but thisnumerical method can easily be extended to higher dimensions by using B-splines to rep-resent each dimension. Only a few collocation points are used in the different formulationsto obtain results in one dimension, therefore increasing the number of collocation pointsfor multiple dimensions should be reasonable. In terms of the computational time, the K1formulation was the fastest, and K˜hs formulation took the longest to finish. Even for thisformulation, the calculations completed in a few hours, therefore evaluations in multipledimensions should only require a reasonable amount of computing time.68Table 4.2: The magnitudes of the first three non-zero eigenvalues obtained for mass ratios,γ = 1/8 and 1/2, by diagonalizing L using the matrix representation of the K˜hs, Khs,1and Khs,3 kernels. The eigenvalues are normalized by Zhs(0). The grid used for eachdiagonalization spans to S = 20 with n intervals and spacing ∆ between grid points. Theaccurate values are QDM results from Shizgal et al. [89]. The blank cells indicate thatconvergence was obtained for the particular n and ∆ combination. The cells with a dashindicate that no eigenvalues under 1.0000 were obtained.n ∆ γ = 18 γ = 12Khs,1 K˜hs Khs,3 Khs,1 K˜hs Khs,3λ1/Zhs(0) 2 10 0.2783 0.6277 – 0.6743 1.0000 0.20255 4 0.2784 0.2157 0.2742 0.6813 0.6524 0.752320 1 0.2784 0.3097 0.2779 0.6889 0.7283 0.687560 0.33 0.2861 0.2785 0.6891 0.6972 0.6892200 0.10 0.2799 0.2784 0.6891 0.6906 0.6891600 0.03 0.2787 0.2784 0.6894 0.6891Accurate values 0.2784 0.6891λ2/Zhs(0) 2 10 0.4894 0.6277 – – – –5 4 0.4878 0.6248 – 0.9319 1.0000 0.752320 1 0.4882 0.5201 0.4855 0.9119 0.9757 0.915060 0.33 0.4882 0.4963 0.4882 0.9203 0.9349 0.9200200 0.10 0.4898 0.4882 0.9208 0.9234 0.9208600 0.03 0.4885 0.9208 0.9214 0.9208Accurate values 0.4882 0.9208λ3/Zhs(0) 2 10 0.6707 1.0000 0.6291 – – –5 4 0.6481 0.6248 – – – –20 1 0.6462 0.6777 0.6415 0.9996 1.0000 0.980260 0.33 0.6466 0.6548 0.6465 0.9795 1.0000 0.9798200 0.10 0.6466 0.6482 0.6466 0.9827 0.9884 0.9827600 0.03 0.6469 0.6466 0.9832 0.9843 0.9832Accurate values 0.6465 0.983269Table 4.3: Same as Table 4.2 except for γ = 1 and 8.n ∆ γ = 1 γ = 8Khs,1 K˜hs Khs,3 Khs,1 K˜hs Khs,3λ1/Zhs(0) 2 10 0.8842 1.0000 0.1992 0.5023 1.0000 –5 4 0.7801 1.0000 – 0.4757 0.4726 0.447420 1 0.8136 0.8848 0.8101 0.5639 0.7956 0.554460 0.33 0.8190 0.8325 0.8189 0.6097 0.6584 0.6085200 0.10 0.8190 0.8213 0.8190 0.6139 0.6213 0.6139600 0.03 0.8195 0.8190 0.6139 0.6153 0.6139Accurate values 0.8190 0.6139λ2/Zhs(0) 2 10 – – – – – –5 4 – 0.8512 0.9298 – 1.0000 –20 1 0.9777 1.0000 0.9841 0.9561 1.0000 –60 0.33 0.9727 1.0000 0.9732 0.9292 1.0000 0.9330200 0.10 0.9789 0.9874 0.9789 0.9526 1.0000 0.9523600 0.03 0.9797 0.9812 0.9797 0.9650 0.9770 0.9650Accurate values 0.9797 0.9667λ3/Zhs(0) 2 10 – – – – – –5 4 – – – – – –20 1 – – – – – –60 0.33 – – – – – –200 0.10 0.9994 – 0.9996 – – –600 0.03 0.9977 1.0000 0.9977 1.0046 1.0000 1.0047Accurate values 0.9984 0.999770Chapter 5Kinetic Energy Relaxation ofHeavy TracersIn this chapter the numerical method constructed using B-splines is further scrutinizedby subjecting the heavy tracers to high initial energies and monitoring the relaxation toequilibrium. The smooth and rough hard sphere and Maxwell molecule models are used totest the experimental results of Douglas et al. [12, 13] in mass spectrometry, where gas-phase biomolecular ions, including motilin, ubiquitin, cyctochrome c, myoglobin and bovineserum albumin, are generated using pneumatically assisted electrospray (ion spray). Traceamounts of these biomolecules are injected into a neutral bath at a high initial energy of10i eV, where i is the number of charges on the ion, and this energy when converted tothe units used in our studies is x0 ≃ 386. As they travel the length of the cell, the ionsrelax towards equilibrium due to collisions. By measuring the kinetic energy loss of the ionsexiting the cell and modelling the drag coefficient, cross sections of the order 103 − 104A˚can be calculated. One of the goals of this study is to compare their type of analysis withresults obtained by solving the Boltzmann equation directly.Andersen et al. [58] cast the relaxation of hard sphere Rayleigh and Lorentz gases in theform of a Fokker-Planck equation. In the Rayleigh gas, a trace number of heavy particlesare dispersed in a bath of lighter particles. They predicted a Rayleigh gas should relax at aconstant rate regardless of the initial energy of the tracer particles, and gave an expressionfor the rate. In the present study, the range for the validity for the Fokker-Planck resultsis tested with different mass ratios and initial energies.Drag coefficients are often modelled using specular and diffuse scattering processes,which in the present case be modelled by smooth and rough hard spheres, respectively.These particular models represent two scattering limits in kinetic theory. In addition, theMaxwell model [77, 78] is also used, to represent a more realistic scattering potential allowingthe size of the tracer to vary in the collision. By comparing the results from these threemodels the effect of elastic and inelastic collisions can be gauged, as well as effect of softwalls in the interaction between the tracer and bath.The initial function used to obtain these results is given by Eq. (3.32). To test thelimits of the numerical method a range of energies were tested, with x0 = 5 and 350. These71two initial energies test both lower and upper energy regimes. The mass of the tracersused in the experimental studies were high, around 16000 Da. To mimic such particlestracers with masses 50, 100, 200 and 400 times greater than the bath are used, giving massratios γ = 0.02, 0.01, 0.005 and 0.0025, respectively. The K3 collision kernel formulation isprimarily used to obtain these results. Shown in this chapter are the distribution functionsfor the three models for the two different energies. Also, the Fokker-Planck expression forthe Rayleigh gas derived by Andersen and Schuler [58] is also tested to determine its limitsof applicability. Further, the drag coefficients for the three different models are calculatedand compared to published theoretical and experimental results.5.1 Eigenvalues of Smooth and Approximate Rough HardSphereThe eigenvalues of the kernels for the smooth hard sphere and approximate rough hardsphere in Eqs. (2.40) and (2.85), respectively are given in Table 5.1 for γ = 1 and 0.1.When scaled by Zhs(0) = 2A/√γ, the kernel K˜hs(x, x′) has a discrete spectrum belowTable 5.1: Eigenvalues (absolute values) of the smooth and approximate rough hard spherekernels for two different mass ratios and a range of µχ values. Eigenvalues are scaled by2A/√γ and only up to six non-zero scaled values less than unity are tabulated. An entryof “...” indicates that no eigenvalue was found. The values for µχ = ∞ are for the smoothhard sphere kernel.µχ λ1 λ2 λ3 λ4 λ5 λ6γ = 11.5 . . . . . . . . . . . . . . . . . .5 . . . . . . . . . . . . . . . . . .10 0.9488 . . . . . . . . . . . . . . .25 0.8787 . . . . . . . . . . . . . . .50 0.8503 . . . . . . . . . . . . . . .∞ 0.8190 0.9797 0.9977 . . . . . . . . .γ = 0.11.5 0.3287 0.5801 0.7692 0.9081 . . . . . .5 02724 0.4871 0.6566 0.7895 0.8916 0.965110 0.2536 0.4548 0.6148 0.7419 0.8417 0.917125 0.2404 0.4316 0.5842 0.7060 0.8024 0.876650 0.2356 0.4231 0.5729 0.6924 0.7872 0.8604∞ 0.2307 0.4142 0.5608 0.6779 0.7708 0.8426unity and a continuous one above [64]. The first few discrete values for the smooth sphereare listed in Table 5.1 in the rows labelled with µχ = ∞. The spectrum of K˜1(x, x′) is not72known but for the sake of comparison, its eigenvalues are scaled in the same way and onlythose values less than unity are tabulated. Examining values in Table 5.1 shows that forfinite µχ the number of eigenvalues less than unity for the approximate rough hard spherekernel is less than that for the smooth sphere one, and the corresponding eigenvalues arelarger. This implies relaxation in the rough system should be faster than in the smoothone; an expected result given the possibility for translational-rotational energy exchangein the former. The values for the rough case do approach those for the smooth one as µχincreases, although this convergence is much faster for γ = 0.1 than for γ = 1.5.2 Distribution FunctionsIn Figs. 5.1 and 5.2 representative time evolutions of the distribution function are shownfor γ = 0.02 and 0.0025, respectively, with initial energies x0 = 5 and x0 = 350 for thesmooth hard sphere, rough hard sphere and Maxwell models. In the left panels, the solidblack curves show the distribution function after the first few time steps and are close toGaussian shapes. In a very short time (dotted red curves) the peaks lower and the widthsexpand. As the distributions move to equilibrium the peaks continue to lower and thewidths become greater, until at equilibrium, (violet dot-dashed curves) the functions adoptan exponential form. This trend is identical for all three models tested, except for theMaxwell model, the distribution function is slightly broader at the first few time steps.In the right hand panels, the solid blacks curves represent the distribution function aftera few time steps and show sharp peaks at x0 = 350, with a small bud forming at lowerenergy. These peaks quickly shift and broaden (dotted red curves). As time increases thewidths of the distributions remain approximately constant, but the peaks shift to lowerenergy until at equilibrium the distributions adopt an exponential decay represented by themaroon dashed curves. This trend is similar for both the smooth and rough hard spheremodels while the Maxwell molecule shows a greater relaxation at the initial times. Thismeans an ensemble of the tracers tend to relax as a group with some energy width. Thiswidth defines the resolution possible in a kinetic energy loss experiment.The nature of the distribution functions is consistent with Monte Carlo calculations ofDouglas et al. [13]. Although the distribution curves shown in this experimental study com-pares two different masses of the tracer, similar trends can be seen with the representativedistribution functions in Figs. 5.1 and 5.2. From Ref. [13], the more massive the tracer, thenarrower the distribution, and with a lighter tracer the distribution is more spread out. Inboth Figures 5.1 and 5.2 we note that with a lower initial energy, the distribution is morespread out and relaxation to equilibrium is gradual. With the higher initial energy, thedistribution is narrower and relaxes faster to equilibrium. This behaviour is consistent fora lower mass ratio of γ = 0.0025 as well.7300.511.52f 1(x,t)00.050.10.150.2f 1(x,t)00.511.5f 1(x,t)00.050.10.15f 1(x,t)0 1 2 3 4 5 6x00.511.5f 1(x,t)0 50 100 150 200 250 300 350x00.0250.050.0750.10.125f 1(x,t)smooth smoothroughmaxwell maxwellroughx0 = 5x0 = 5x0 = 5x0 = 350x0 = 350x0 = 350Figure 5.1: The time evolution of the distribution function for γ = 0.02 with initial energiesx0 = 5 (left panels) and x0 = 350 (right panels). The top, middle and bottom panels showthe relaxation of the distribution function to equilibrium for the smooth hard sphere, roughhard sphere and Maxwell molecule cases, respectively. The evolution starts from the solidblack curves and moves to the dash-dot violet curves (left panels) or dashed maroon curves(right panels).7400.511.52f 1(x,t)00.250.50.75f 1(x,t)00.511.5f 1(x,t)00.250.5f 1(x,t)0 1 2 3 4 5 6x00.511.5f 1(x,t)0 100 200 300 400x00.0250.050.075f 1(x,t)smoothx0 = 5roughmaxwellx0 = 350x0 = 5x0 = 5x0 = 350x0 = 350smoothroughmaxwellFigure 5.2: Same as Fig. 5.1 but for γ = 0.0025.750.850.90.9511.05(-d ln<x>/dt’)/(16γ1/2 /3) γ = 0.0025 γ = 0.005 γ = 0.01 γ = 0.02 γ = 0.10 2 4 6 8 10 12 14 16 18 20t’11.21.41.61.8(-d ln<x>/dt’)/(16γ1/2 /3)x0 = 5x0 = 350Figure 5.3: Derivatives of the reduced average kinetic energy normalized by 16√γ/3 as afunction of t′ for γ = 0.02, 0.01, 0.005 0.0025 and 0.1 and x0 = 5 (top panel) and x0 = 350(bottom panel), for the smooth hard sphere case. The square symbols indicate the pointsat which the kinetic energies are 50% of their initial values.5.3 Kinetic Energy DerivativeFigure 5.3 shows the derivatives of the reduced average kinetic energy motivated by Eq. (2.111)for different mass ratios and energy regimes. The values are normalized by 16√γ/3, theFokker-Planck results of Eq. (2.111). The results in Fig. 5.3 test the accuracy of Eq. (2.111)and the bound of Eq. (2.112). In the case where Eq. (2.111) is valid and stands correctfor a particular mass ratio, the values of derivatives of the first moment will equal exactly16√γ/3. If the Fokker-Planck equation is valid for the cases tested, the curves shown inFig. 5.3 will have constant values at 1, and all the curves would overlap each other. Theonly exception in this case would be the curves in the lower panel, because for γ = 0.02,0.01 and 0.005, Eq. (2.112) is not valid.76In the top panel, the relation in Eq. (2.112) is satisfied for all the values of γ shownwhen x0 = 5. Thus, one expects the Fokker-Planck decay constant to be accurate. However,while the curves are generally constant, they deviate from unity as γ increases, that is, asthe tracer becomes lighter. For the smallest mass ratio γ = 0.0025, shown by the solid backcurve the value is very close to unity while for the brown dot-dashed curve representingγ = 0.1 it drops to approximately 0.89.In the bottom panel the relation of Eq. (2.112) is satisfied only for γ = 0.0025 whenx0 = 350. Thus, the curves in this panel show the behaviour when Eq. (2.112) is notsatisfied. Unlike the curves in the top panel, all those in the lower panel decay as timeincreases, with a rate which increases as γ increases. In other words, the initial decay ofthe kinetic energy is much larger than predicted by Eq. (2.111) and does not evolve witha constant decay rate. Eventually though, at long enough times, these rates do becomeconstant and equal to those predicted by Eq. (2.111), as the kinetic energy of the systemdecreases to a point where Eq. (2.112) becomes valid.The square symbols on the curves indicate the times at which the kinetic energy hasdropped to 50% of its initial value. As seen in the upper panel of Fig. 5.3, using Eq. (2.111)when Eq. (2.112) is satisfied gives a rate which deviates by some percentage from kR de-pending on γ. However, as seen in the lower panel, Eq. (2.111) is qualitatively incorrectduring most of the relaxation process when Eq. (2.112) is not satisfied. In other words, inthe case Eq. (2.111) becomes accurate only when the system is closer to equilibrium for thehigher mass ratios.5.4 Drag CoefficientsThe normalized drag coefficients for the smooth and hard sphere models and the Maxwellmodel given by Eq. (2.117) are shown in Figs. 5.4 and 5.5 for x0 = 5 and 350, respectively.The curves are normalized by Csp and Crough for the smooth/Maxwell and rough hardspheres models, respectively. In the top panel of Fig. 5.4, for the smaller mass ratios(i.e heavier tracer particle), the curves are noticeably closer to unity. The most massivetracer with γ = 0.0025, represented by the solid black curve is closest to 1, whereas thelightest tracer with γ = 0.1, represented by the brown dot-dashed curve is furthest awayfrom 1. The normalized curves in this panel have a constant ratio over the entire time. Inthe middle panel of the same figure, all the curves are greater than but within a few percentof unity. The smallest mass ratio, γ = 0.0025, shown by the solid black curve is the furthestaway from unity, whereas the lightest tracer with the highest mass ratio, γ = 0.02, shownby the green dashed curve, is the closest to 1. At higher values of s, where the system is inthe initial stages of relaxation, the curves dip lower, and this feature is most prominent forγ = 0.02. In the approach to equilibrium (i.e. as we move to the left on the curves), the770.850.90.951C D/Cspγ = 0.0025γ = 0.005γ = 0.01γ = 0.02γ = 0.111.011.021.03C D/Crough0.730.740.750.760.77C D/Csp0 0.05 0.1 0.15 0.2 0.25s1.651.7C D/Cspsmoothroughmaxwell (V0 /kT = 1)maxwell (V0/kT = 5)Figure 5.4: Ratios of calculated drag coefficients to analytical predictions for a variety ofmass ratios and initial reduced energies of x0 = 5. The top, middle and bottom panels arefor the smooth and rough hard spheres and the Maxwell molecule, respectively.780.960.970.980.991C D/Cspγ = 0.0025γ = 0.005γ = 0.01γ = 0.0211.1C D/Crough0.30.40.50.60.7C D/Csp0 0.5 1 1.5 2 2.5 3s68101214C D/Cspsmoothroughmaxwell (V0 /kT= 1)maxwell (V0 /kT= 350)Figure 5.5: Same as Fig. 5.4 except for an initial reduced energy x0 = 350.79ratios become constant. Overall, the normalized curves stay constant for the entire timeshown, indicating that the values of the derivative do not change.In the case of the Maxwell model in the bottom panels of the same figure, the normalizedcurves are either significantly less than 1 for V0/kT = 1 at 0.750 − 0.769 and greater than1 for V0/kT = 5 at 0.65 − 1.72. The values of Ksph(x, x′) and Zsph(x) scale with√V0/kTfor the Maxwell molecules as shown by the dependence of the cross section in Eq. (2.110).This can be see in Fig. 5.4 since the limiting values for V0/kT = 5 are√5 as large as thosefor V0/kT = 1. Similarly, in the bottom panels of Fig. 5.5, limiting curves for V0/kT = 350are√350 times those for V0/kT = 1. As defined here, for the Maxwell molecule potential,V (σ12) = V0. Thus, the curves for V0/kT = 1 imply the scaling factor σ12 is approximatelythe distance at which the potential is equal to the thermal energy of the bath. That is, πσ212is approximately the cross section the tracer would have at equilibrium. In Figs. 5.4 and 5.5,the curves for V0/kT = 1 are consistently below unity, at approximately 0.75 indicating thatCsp is overestimating the kinetic energy decay rate. This is physically reasonable becauseat x0 = 5, the actual tracer size is smaller than the σ12 value at equilibrium, leading toa reduced drag and hence slower rate of decay. Curves with V0/kT = 5 estimate σ12 atthe initial collision energy x0 = 5 so the conversion in Fig. 5.4 is above unity because theactual decay rate is greater than that predicted by Csp. The situation is analogous butaccentuated in Fig. 5.5 for V0/kT = 350. Overall, the results for the smooth hard spherein the top panels of Figs. 5.4 and 5.5 show that for heavy enough tracers, Csp describesthe relaxation well for all speed ratios. This is also consistent with the agreement seen inFig. 5.3 with the Fokker-Planck predictions. The ratios in the middle panels for the roughhard sphere are consistently too large. This is possibly due to the approximate nature ofthe collision kernel. For heavy tracers it was argued there should be a larger change intranslational energy than rotational energy. Therefore, the rotational degrees of freedomwere considered to be at equilibrium. The presence of this cold rotational bath could becausing slightly greater drag than would be expected for the exact rough sphere kernel.Equations (2.116) and (2.117) were derived assuming an infinitely heavy tracer. Thisassumption can be relaxed by replacing m1 with µ = γ/√1 + γ in the definition of s [90].Making such a change though causes the ratios in Fig. 5.4 to decrease, moving further fromunity. Thus, the deviations seen for example in the upper panel of Fig. 5.3 cannot becorrected by accounting for this mass effect.5.5 DiscussionThis chapter is a more rigorous test of the numerical method given in Chapter 3. It teststhe collision kernels that were derived in Chapter 2 for the spherical and rough hard spheresgiven by Eqs. (2.40) and (2.85), respectively. Overall, the method produced well converged80values for a variety of mass ratios and initial energies for the smooth and rough hard sphereand Maxwell models, which also included conditions that were far from equilibrium.The expressions given by Andersen and Schuler [58] are derived exactly for the Rayleighlimit, where the tracers are much more massive than the bath gas. The curves shown inFig. 5.3 show where these expressions can be used for mass ratios close to but not exactly inthe Rayleigh limit. The relation given in Eq. (2.112) must be satisfied first before a constantdecay rate occurs. In the case where Eq. (2.112) is not satisfied, the energy decay is a lotgreater than predicted by Eq. (2.111). This is especially the case for larger mass ratios, γand this rate of decay tends to decrease over time as the system relaxes. When Eq. (2.112)is satisfied the mass ratio should be less than about 0.0025 where the tracer is 400 timesmore massive than the bath to give a decay that matches kR in Eq. (2.111). In the case,where the tracer is only 10 times as massive as the bath, kR = 16√γ/3 overestimates thedecay rate by about 10− 15%.The drag coefficients for the three models given in Figs. 5.4 and 5.5 are normalizedby the general expression of Stalder [81]. These expressions are valid for infinitely heavytracers with all values of s. The values of the drag coefficients in this study were calculatedusing Eq. (2.114) and can be used in energy loss experiments such as those done by Douglasand co-workers [12, 13]. These values of the drag coefficients can be used to obtain crosssection values although, accurate values of the drag coefficient CD are required. It is seenthat the exact expressions in Eq. (2.117) work well for hard sphere systems, but fail to takeinto account the change in effective tracer diameter as the energy changes, and is evidentfor the Maxwell molecule case in the two lower panels of Figs. 5.4 and 5.5. In these cases,V0/kT = 1 results show that using Csp overestimates the energy decay rate by about 30%,therefore the cross section from the expressions in Eq. (2.117) are underestimated by aboutthe same amount. This is highlighted by the fact that the effective cross sections decreaseas energy increases. In the experimental studies, Chen et al. [12] found their estimatedcross sections, from high energy relaxation, were 30% smaller than those determined by ionmobility experiments performed at energies closer to equilibrium.In principle, with a good intermolecular potential model, the solutions from solvingthe Boltzmann equation can be used to correct these differences. One can choose, forexample, the Lennard-Jones intermolecular potential which contains an attractive well.Using this potential does not alter the numerical method, except the cross section expressionappropriate to the Lennard-Jones potential would have to be substituted in the evaluationof the collision kernel. For a completely realistic model one should also include the effects ofinelastic collisions. The results obtained from these simulations can be used in experiments,since the Boltzmann equation is solved exactly. The models are used to define the collisiondynamics between the tracers, and the drag coefficients obtained come directly from solvingthe Boltzmann equation and are not based on any assumptions. Therefore, kinetic energy81loss experiments modelled by these simulations can be used to obtain exact cross sectionvalues which can further provide insight into the structure of the tracers. If the tracers areconsidered to be biomolecules, information about the structure of these biomolecules canbe obtained. In experiments, it is assumed that biomolecules in the gas phase retain similarproperties as they would in a liquid medium, therefore the results obtained from gaseousstudies can be translated to understanding biomolecules in the cells of living organisms.82Chapter 6Future Work and ConcludingRemarks6.1 Future WorkThe theory and numerical method given in Chapters 2 and 3, respectively, are presentedfor the one-dimensional linear Boltzmann equation. The B-splines posed no problems withobtaining convergence for all the results given in Chapters 4 and 5.In the next project the numerical method will be extended to solve a two-dimensionallinear Boltzmann equation, where two velocity components, for example the parallel andperpendicular components, are represented. For this case the two-dimensional linear Boltz-mann equation can be written as∂∂tf(x, y, t) =∫K(x, x′, y, y′)f(x′, y′, t)dx′dy′ − Z(x, y)f(x, y, t) , (6.1)where, as before, the distribution function f(x, y, t) is expanded using B-splines asf(x, y, t) =p−1∑n=−3q−1∑m=−3cnm(t)B3n(x)B3m(y) . (6.2)Substituting Eq. (6.2) into Eq. (6.1) givesp−1∑n=−3q−1∑m=−3ddtcnm(t)B3n(x)B3m(y) =p−1∑n=−3q−1∑m=−3cnm(t) (6.3)×[∫ S0K(x, x′, y, y′)B3n(x′)B3m(y′)dx′dy′− Z(x, y)B3n(x)B3m(y)].In Eq. (6.3) the collision kernels can be transformed using formulations similar to thosegiven in Chapter 3. As shown before, the collocation scheme forces the equality in Eq. (6.3)to hold at the grid points (xk, yl) where xk = k∆ (k = 0, . . . , p) and yl = l∆ (l = 0, . . . , q),giving (p + 1)(q + 1) constraints. However, there are (p + 3)(q + 3) unknown coefficients83cnm(t), so that an additional 2(p+ q+4) constraints are needed. As before, choosing theseconstraints is a general process. In analogy with constraint 1 in Section 3.2, the equality inEq. (6.3) can also be forced at values of (x, y) off the grid, such as, (x1/2, yl), (xp−1/2, yl),(xk, y1/2) and (xk, yq−1/2). This gives an additional 2(q + 1) + 2(p + 1) constraints. The4 remaining constraints can follow by imposing the equality in Eq. (6.3) at the points(x1/2, y1/2), (x1/2, yq−1/2), (xp−1/2, y1/2) and (xp−1/2, yq−1/2). This set of additional con-straints are on the grid completely at the half grid points near the grid edges. With theseconstraints imposed, Eq. (6.3) can be cast into matrix notation, asddtcnm =∑Lnkmlckl , (6.4)where Lnkml is a fourth rank tensor and cnm and ckl are second rank tensors (matrices).In comparison the code used for the one-dimensional Boltzmann equation works verysmoothly and the computational time required for the calculations to complete was veryreasonable. The B-spline formulation changes, such that the matrices given in Eq. (3.27)become fourth rank tensors and the column vector becomes a matrix and will have toincorporate the two variables that have to be integrated. This will make the computingideally squared of the original time that was required. This would still be on the order ofa few hours to a few days. It was the Maxwell model calculations that took the longestamount of time for the calculations to complete. Additionally, this numerical method canfurther expanded to the full three dimensional linear Boltzmann equation.Extending the numerical method to a multi-dimensional problem can account for move-ment of tracers under the effects of external electric and magnetic fields. Since only thekinetic energy decay of tracers was modelled in these studies, a one-dimensional velocitydependent collision kernel is sufficient to describe the collisions. In the case of ion mobility,two components of velocity, that is, perpendicular and parallel components of velocity arerequired to describe the tracer-bath collisions. Furthermore, the collision induced alignmentof tracers can be modelled with a two-dimensional linear Boltzmann equation.6.2 Concluding RemarksThis thesis presents a numerical method for solving the Boltzmann equation by expandingthe distribution function in a basis of cubic B-splines. Collision kernels for the sphericaland rough hard spheres have also been derived, and the accuracy of the numerical methodhas been validated. The formulation of the distribution function can be done in a numberof different ways, of which four have been shown in Chapter 3. These formulations canbe chosen according to the needs of the problem at hand. Eigenvalues, eigenfunctions andmoment values have been obtained using the formulations, and have been compared to the84values that have been published in earlier studies. To test this numerical method the initialdistribution functions chosen were far from equilibrium and the mass ratios of the bathto the tracer varied. With the values obtained using different combinations of the initialparameters, it can be concluded that this numerical method is efficient and evaluated wellconverged values for distribution functions, eigenvalues and moments.In the second part of the work presented, the numerical method was further scrutinizedto monitor the kinetic energy relaxation of heavy tracers that were initialized at high ener-gies. In addition to the smooth and rough hard sphere models, the Maxwell model was alsoused, which better represents the dynamics between real molecules. These parameters werechosen to mimic mass spectrometry experiments that monitor the relaxation of biomoleculesand allow the evaluation of cross sections. The distribution functions and moments wereobtained for a Rayleigh gas, for a variety of mass ratios, where the tracer became increas-ingly heavier than the bath. The derivative of the moments were used to determine thelimits of validity for the expression for the rate of kinetic energy relaxation given by theFokker-Planck equation for a hard sphere gas. The drag coefficients were obtained for allthree models using the calculated moment values. These values were compared againstanalytical expression given in the literature.This method was designed to be used for the ion mobility problem where external fieldshave to be accounted for. With the general requirements of the ion mobility problem de-scribed in Chapter 1, this method has shown to satisfy the criteria. This numerical methodis flexible and can incorporate a variety of initial conditions. There were no issues in termsof convergence or computational time as the system propagated and relaxed to equilibrium.Although the effects of external fields were not incorporated, the numerical method is in-dependent of the formulation of the collision kernel to be used. This allows the inclusionof external field effects, interactions amongst particles and using a higher dimensional lin-ear Boltzmann collision integral. The formulation for extending this numerical method tohigher dimensions has been shown in Section 6.1. The general formulation remains thesame, and in general, the structure of the matrices has to change.The other numerical methods available use approximate expressions of the Boltzmannequation. The B-splines method only assumes a bath at equilibrium and the concentrationof the tracer is dilute. This makes collisions between two bath particles and two tracerparticles negligible, that is, only collisions between a bath and tracer particle are considered.This allows the Boltzmann equation to be reduced and becomes the starting equation forthis numerical method. There are no other approximations made, and thus, this method isexact. The numerical methods discussed, work very well for conditions where the systemis only slightly perturbed from equilibrium. In the case where the initial conditions of thesystem are far from equilibrium, these methods do not produce satisfactory results. TheB-spline method produced well-converged values for the cases that were initialized far from85equilibrium as well.Owing to the small domain over which cubic B-splines are defined, the evaluation ofthe integrals can be done over narrow domains that allow any anomalies in the analyticalexpressions to be integrated and give accurate values. For example, the discontinuity thatoccurs at x = x′ in the Boltzmann equation did not cause any difficulties in obtain wellconverged values. The formulation of this numerical method is independent of the formula-tion of the expression of the collision kernel and allows the algorithm to be parallelized tomulti-dimensions. This is an advantage when considering a higher dimensional linear Boltz-mann equation. In terms of the computational times, this numerical method is efficient,since all the different cases were run over a range from a few seconds to a few days, withthe Maxwell model taking the maximum amount of time. One of the disadvantages of thisnumerical method was found in the evaluation of the integrals. Each integral was evaluatedindividually, and was subject to conditions whereby the value of the absolute error betweenconsecutive integral values had to be within a certain range. This caused the convergence toslow down and thus this tolerance had to be relaxed. Even with this change, accuracy wasobtained to 4−5 digits. This was more of a numerical difficulty rather than the formulationof the numerical method.In comparison to the QDM method, the B-splines do not depend on the form of thedistribution function. It assumes that the distribution is smooth and is well representedin the small domain of four units, over which the spline is expressed. The QDM methodgenerates a quadrature that is appropriate for the problem at hand, and thus works verywell for that particular problem. But generating the quadrature can also be tedious andtime consuming, computationally. A large number of quadrature points and weights can berequired to sufficiently describe the distribution function. The QDM also takes into accountthe form of the collision kernel used for the problem, which is used in the generation of thequadrature. This way the quadrature is dependent on the form of the kernel and arespecific only for a particular form. The B-splines are independent of the collision kernelchose, as shown with the use of the smooth and rough hard sphere kernels. This makes itquite versatile. The B-splines are also used to describe conditions for extremely hot tracersfar from equilibrium. It has performed quite well and produced satisfactory results. Whencomparing results obtained using the QDM and the B-splines, there is no doubt, that valuesproduced by the QDM are very accurate. Once again, this is due to the specific quadraturechosen for the problem. This ensures accuracy. In comparison, the B-splines have producedvery good values and are almost as accurate as those produced by the QDM.86Bibliography[1] T. Koga, Introduction to Kinetic Theory Stochastic Processes in Gaseous Systems,(Pergammon Press, 1970).[2] S. Chapman and T. G. Cowling, The Mathematical Theory of Non-Uniform Gases,(Cambridge University Press, 1970).[3] S. Harris, An Introduction to the Theory of The Boltzmann Equation, (Holt, Rinehartand Winston, Inc., 1971).[4] C. Cercignani, The Boltzmann Equation and its Applications, (Springer-Verlag, 1988).[5] S. Golden, Elements of the Theory of Gases, (Addison-Wesley Publishing Company,1964).[6] T. Wu, Kinetic Equations of Gases and Plasmas, (Addison-Wesley Publishing Com-pany, 1966).[7] E. A. Mason and E. W. McDaniel, Transport Properties of Ions in Gases, (Wiley,New York, 1988).[8] O. I. Rovenskaya, AIP Conference Proceedings, 1333, 772 (2011).[9] H. Takeuchi, K. Yamamoto and T. Hyakutake, AIP Conference Proceedings, 1333,486 (2011).[10] K. Yoshimura and S. Kuwabara, AIP Conference Proceedings, 1333, 87 (2011).[11] G. M. Alves, G. M. Kremer and A. Soares, AIP Conference Proceedings, 1333, 643(2011).[12] Yu-Luan Chen, B. A. Collings and D. J. Douglas, J. Am. Soc. Mass Spectrom. 8,681-687 (1997).[13] T. Covey and D. J. Douglas, J. Am. Soc. Mass Spectrom. 4, 616-623 (1993).[14] T. C. Lilly, A. D. Ketsdever and S. F. Gimelshein, AIP Conference Proceedings, 1333,825 (2011).87[15] P. Kowalczyk, A. Palczewski, G. Russo, and Z. Walenta, Eur. J. of Mech. B/Fluids27, 62-74 (2008).[16] G. A. Bird, Molecular Gas Dynamics and the Direct Simulation of Gas Flows, (OxfordUniversity Press, 1994).[17] S. K. Stefanov, J. Sci. Comput. 33, 677-702 (2011).[18] A. A. Ganjaei, S. S. Nourazar, J. Mech Sci. & Tech. 23, 2861-2870, (2009).[19] C. D. Landon, N. G. Hadjiconstantinou, AIP Conference Proceedings 1333, 277-282,(2011).[20] H. A. Al-Mohssen, N. G. Hadjiconstantinou, AIP Conference Proceedings 1084, 257-262, (2008).[21] A. V. Bobylev, S. Rjasanow, Eur. J. of Mech. B/Fluids 18, 869-887 (1999).[22] J. M. Burt and I. D. Boyd, AIP Conference Proceedings, 1333 230 (2011).[23] Y. A. Bondar and M. S. Ivanov, AIP Conference Proceedings, 1333 1209 (2011).[24] F. Vega Reyes, AIP Conference Proceedings, 1333 360 (2011).[25] E. Jun, J. M. Burt and I. D. Boyd, AIP Conference Proceedings, 557 1333 (2011).[26] E. D. Farbar and I. D. Boyd, AIP Conference Proceedings, 1333 242 (2011).[27] M. Yu. Plotnikov and E. V. Shkarupa, AIP Conference Proceedings, 1333 (2011).[28] R. Baranowski and M. Thachuk, J. Chem. Phys. 111, 10061 (1999).[29] X. Chen and M. Thachuk, J. Chem. Phys. 124, 174501 (2006).[30] R. Baranowski, B. Wagner and M. Thachuk, J. Chem. Phys. 114 (2001).[31] J. Lo, Pseudospectral Methods in Quandtum and Statistical Mechanics (UBC Thesis)(2002).[32] B. Shizgal and H. Chen, J. Chem. Phys. 104 4137 (1996).[33] B. D. Shizgal, J. Mol. Structure (Theochem) 391 131 - 139 (1997).[34] J. Lo and B. D. Shizgal, J. Chem. Phys. 125 194108 (2006).[35] K. Leung, B. D. Shizgal and H. Chen, J. Math. Chem. 24, 291-319 (1998).[36] B. Shizgal and R. Blackmore, Planet. Space Sci. 34 279-291 (1986).88[37] B. Shizgal, J. Comp. Phys. 41, 309-328, (1981).[38] B. Shizgal, R. Blackmore, J. Comp. Phys. 55, 313-327, (1984).[39] A. Clarke and B. Shizgal, Phys. Rev. E 49, 347-358, (1994).[40] H. Chen, The Quadrature Discretization Method and its Applications (UBC Thesis)1998.[41] R. Blackmore, U. Weinert and B. Shizgal, Trans. Theory and Stat. Phys. 15, 181-120(1986).[42] D. Lemonnier, Microscale and Nanoscale Heat Transfer, Topics Appl. Phys. 107,77-106 (2007).[43] H. Skullerud, J. Phys. B 6, 728 (1973).[44] P. R. Berman, J. E. M. Haverkort, and J. P. Woerdman, Phys. Rev. A 34, 4647(1986).[45] J. Park, N. Shafer, and R. Bersohn, J. Chem. Phys. 91, 7861 (1989).[46] C. A. Taatjes, J. I. Cline, and S. R. Leone, ibid. 93, 6554 (1990).[47] K. E. Gibble and A. Gallagher, Phys. Rev. A 43, 1366 1993.[48] K. E. Gibble and J. Cooper, ibid. 44, R5335 (1991).[49] G. Nan and P. L. Houston, J. Chem. Phys. 97, 7865 (1992).[50] D. A. Shapiro, J. Phys. B 33, L43-L49 (2000).[51] O. V. Belai, O. Y. Schwartz, and D. A. Shapiro, Phys. Rev. A 76, 012513 (2007).[52] C. E. Siewert, J. Quant. Spec. & Rad. Trans. 74, 789-796 (2002).[53] E. P. Wigner and J. E. Wilkins, U.S. Atomic Energy Commission Report AECD 2275,1944.[54] C. Cercignani, Mathematical Methods in Kinetic Theory, 2nd Ed., (Plenum Press,1990).[55] M. Kac, Foundations of Kinetic Theory, Third Berkeley Symp. on Math. Statist. andProb., Vol. 3, 171-197 (Univ. of Calif. Press 1956).[56] J. H. Ferziger and H. G. Kaper, Mathematical Theory of Transport Processes in Gases(North-Holland, Amsterdam, 1972).89[57] L. Waldmann in Handbuch der Physik, edited by S. Flu¨gge (Springer-Verlag, Berlin,1958), Vol. 12, p. 348.[58] K. Andersen and K. E. Schuler, J. Chem. Phys. 40, 633 (1964).[59] P. F. Liao, J. E. Bjorkholm, and P. R. Berman, Phys. Rev. A 21, 1927 (1980).[60] P. R. Berman, Adv. At. Mol. Phys. 13, 57 (1978).[61] R. Kapral and J. Ross, J. Chem. Phys. 52, 1238 (1970).[62] L. Monchick and E. A. Mason, Phys. Fluids 10, 1377 (1967).[63] B. Shizgal and R. Blackmore, Chem. Phys. 77, 417 (1983).[64] M. R. Hoare and C. H. Kaplinsky, J.Chem. Phys. 52, 3336 (1970).[65] M. R. Hoare, The Linear Gas, Advances in Chemical Physics 20 John Wiley & Sons,135-214 (1971).[66] S. E. Nielsen and T. A. Bak, J. Chem. Phys. 41, 665 (1964).[67] G. H. Bryan, Rep. Br. Assoc. Advmt. Sci. 64, 64 (1894).[68] F. B. Pidduck, Proc. R. Soc. London. Ser. A 101, 101 (1922).[69] J. ODell and B. Berne, J. Chem. Phys. 63, 2376 (1975).[70] B. Berne, ibid. 66, 2821 (1977).[71] C. Pangali and B. Berne, ibid. 67, 4590 (1977).[72] J. Montgomery and B. Berne, ıibid. 67, 4580 (1977).[73] O. Kravchenko and M. Thachuk, J. Chem. Phys. 134, 114310 (2011). The value ofJ used in this reference is the negative of that employed in the current work, withparticles “1” and “2” being the tracer and bath, respectively.[74] I. S. Gradshteyn and I. M. Ryzhik, Table of Integrals, Series, and Products, 5th ed.(Academic Press, San Diego, 1994), integral (6.643.2).[75] With a change of variable, s = (1+m1χ) sin2 θ/(1+m1χ sin2 θ), and using the proper-ties of Kummer’s function giving M(3/2, 1, z) = exp(z/2)[(1 + z)I0(z/2) + zI1(z/2)],Eq. (2.77) can be written in simplified notation as (8πχkT )3/2F2( m12kT |β×kˆ|2;m1χ)in which F2(z; a) = 11+a∫ 10 ds[ebs/√1− s][(1/2 + bs)I0(bs) + bsI1(bs)] with b =az/[2(1 + a)]. Using a numerical comparison, and also expanding this function in a90Taylor series up to seventh order, it was determined that Fz(z; a) = eaz/(1+a)/(1+a).Using this relation produced the result of Eq. (2.78).[76] S. Khurana and M. Thachuk, J. Chem. Phys. 139, 164122 (2013).[77] J. C. Maxwell, Phil. Trans. R. Soc. Lond. 157, 49-88 (1867).[78] F. R. W. McCourt, J. J. M. Beenakker, W. E. Kohler, and I. Kuscer, NonequilibriumPhenomena in Polyatomic Gases Volume I (Clarendon Press, Oxford 1990).[79] Y. Chang and B. Shizgal, AIP Cong. Proc. (2009).[80] P. S. Epstein, Phys. Rev. 23, 710 (1924).[81] J. R. Stalder and V. J. Zurick National Advisory Committee for Aeronautics TN,NACA, 2423 (1951).[82] S. Khurana and M. Thachuk, J. Chem. Phys. 136, 094103 (2012).[83] S. Khurana and M. Thachuk, in preparation.[84] M. N. Schultz, Spline Analysis, (Prentice Hall, New Jersey, 1973).[85] P. M. Prenter, Splines and Variational Methods, (John Wiley, New York, 1975).[86] B. W. Shore, J. Chem. Phys. 58, 3855-3866, (1973).[87] L. L. Schumaber, Spline Functions - Basic Theory, (Krieger Publishing Company,1993).[88] W. Press, S. A. Teuksolky, W. T. Vetterling, and B. P. Flannery, Numerical Recipes:The Art of Scientific Computing, 1st Ed. (Cambridge University Press, 1986).[89] B. Shizgal, M. J. Lindenfeld and R. Reeves, J. Chem. Phys. 56, 249-260 (1981).[90] Z. Li and H. Wong, Phys. Rev. E. 65 061207 (2003).91Appendix AAppendix A: Numerical CodeGiven here is the code used to obtain the results given in this thesis.A.1 Main ProgramPROGRAM ION MOBILITYUSE IONMOBILITYUSE MODULECROSSECIMPLICIT NONE! This program c a l l s on the module i onmob i l i t y , which d e s c r i b e s some o f thev a r i a b l e s be ing used .REAL( h ip rec ) : : t 0 ,w, y temp , vz n , y temp deriv , y temp 2 der iv , vz , moment int ,moment1 , moment2 ,moment0 , f n c p l o t , i p l o t , a l imREAL( h ip rec ) : : b l im , z , eva l gauss , moment mod , moment1 mod , moment2 mod ,moment2a mod , x , moment1 diff , eva l gau lag , numdense , sigma12 , c a l l 1 , x1 , g ,check c ros s , c h i v a l , beta , alpha! v z 0 : the s t a r t i n g po in t o f v e l o c i t y g r i d! vz n : the end po in t o f v e l o c i t y g r i d! t 0 : i n i t i a l time!w: argument used in b s p l i n e f unc t i on! y temp : temporary va lue o f unknown func t i on! y temp 2 der i v : second d e r i v a t i v e o f unknown func t i on! y temp der i v : f i r s t d e r i v a t i v e o f unknown func t i on! d i s t f u n c : d i s t r i b u t i o n func t i on va lue at a p a r t i c u l a r po in t on g r i d! vz : v e l o c i t y g r i dINTEGER i , j , nstep , in fo , n , f l ag2 , f l ag3 , mod calc , tmp read , lda , incx , incy! d e f i n i n g g r i d f o r vzINTEGER,PARAMETER : : n max gauss = 3INTEGER,DIMENSION ( : ) ,ALLOCATABLE: : i p i vREAL( h ip rec ) , DIMENSION ( : ) ,ALLOCATABLE : : c oe f f p rod , temp , coe f f new , nu h ,c o e f f o l d , c o e f f h!An array provided as an outputCHARACTER(40) : : read tmpLOGICAL doneREAL( h ip rec ) ,DIMENSION ( : , : ) , ALLOCATABLE : : wr new , c o e f f , lmat check ,b i n i t s a v e d92! This i s a matrix used in the e va l ua t i on o f the c o e f f i c i e n t s .REAL( h ip rec ) ,EXTERNAL : : b sp l in e3 , exe func , p lot , d i s t f un c , i n t e g r a t e ,i n t i n t e r v a l , integra lw , k matrix , F 1 , F 2 , c r o s s e c! Bsp l i ne i s an ex t e rna l f unc t i on which i n c l ud e the s p l i n e f unc t i on s! Fo l lowing v a r i a b l e s are en tered in an inpu t f i l e separa ted from t h i s f i l e .We can change th e s e parameters as d e s i r ed when the code i s g i ven thecommand to compi le .! vz n : end po in t o f v e l o c i t y g r i d and vz num i s t o t a l number o f po i n t s onv e l o c i t y g r i dREAD(∗ ,∗ ) vz 0 , vz n , vz num!m: mass r a t i o o f bath to ion and c o l f r e q i s c o l l i s i o n f requencyREAD(∗ ,∗ )m, c o l f r e q! ns tep and h are number o f s t e p s and s i z e o f i n t e r v a l r e s p e c t i v e l y .! These two va l u e s can be s e t to any de s i r ed va lue , as the program prog r e s s e s .READ(∗ ,∗ ) nstep , hREAD(∗ ,∗ ) spc! max smth i s the v a r i a b l e t ha t d i s t i n g u i s h e s between the c a l c u l a t i o n f o rsmooth sphere or maxwell molecu le! max smth = 1 i s smooth sphere! max smth = 2 i s maxwel l molecu le! These are the matr ices and array whoses s i z e s are dependent on the inpu t o fthe va l u e s f o r the v a r i a b l e s above .! Thus t h e s e can be changed according to the problem .! These matr ices / arrays are used through tou t d i f f e r e n t su b rou t i n e s andf unc t i on s .n dim = vz num+2ALLOCATE( b i n i t ( 0 : n dim , 0 : n dim ) )ALLOCATE( b i n i t s a v e d ( 0 : n dim , 0 : n dim ) )ALLOCATE( l1 mat ( 0 : n dim , 0 : n dim ) )ALLOCATE( l2 mat ( 0 : n dim , 0 : n dim ) )ALLOCATE( v z g r i d ( 0 : vz num) )ALLOCATE( i p i v ( 0 : n dim ) )ALLOCATE( y ( 0 : n dim ) )ALLOCATE( k1 ( 0 : n dim ) )ALLOCATE( k2 ( 0 : n dim ) )ALLOCATE( k3 ( 0 : n dim ) )ALLOCATE( k4 ( 0 : n dim ) )ALLOCATE( y1 ( 0 : n dim ) )ALLOCATE( temp ( 0 : n dim ) )ALLOCATE( coe f f n ew ( 0 : n dim ) )ALLOCATE(wr new ( 0 : n dim , 0 : n dim ) )ALLOCATE( c o e f f ( 0 : n dim , 0 : n dim ) )ALLOCATE( c o e f f h ( 0 : n dim ) )93OPEN (10 ,FILE = ”ini func values”)OPEN (11 ,FILE = ”rk4 values”)OPEN (12 ,FILE = ”dist func values”)OPEN (14 ,FILE = ”mat values ww”)OPEN (15 ,FILE = ”x gauss w gauss”)OPEN (17 ,FILE = ”x gaulag w gaulag”)OPEN (18 ,FILE = ”moment values”)OPEN (19 ,FILE = ”Integrand values”)OPEN (20 ,FILE = ”moment0”)OPEN (21 ,FILE = ”moment1”)OPEN (22 ,FILE = ”moment2”)OPEN (23 ,FILE = ”hspace coeff”)OPEN (24 ,FILE = ”moment mod values”)OPEN (25 ,FILE = ”values integrand”)OPEN (26 ,FILE = ”initial func values”)OPEN (27 ,FILE = ”dist values”)OPEN (30 ,FILE = ”gaulag convergence”)! Open a l l f i l e s throughout e n t i r e code , t h i s one time , and then data i s s t o r edacco rd i n g l y to i t s r e s p e c t i v e f i l e .q = 0.5 d0 ∗ ( 1 . 0 d0/ sq r t (m) + sq r t (m) )r = 0 .5 d0 ∗ ( 1 . 0 d0/ sq r t (m) − s q r t (m) )! q and r f unc t i on s o f the mass r a t i o as de f i nedev a l gau s s = i n t i n t e r v a l (−1 ,0 ,0.0 d0 , 1 . 0 d0 , 0 , 0 )! e v a l ua t e s po i n t s and we i gh t s o f gauss−l e gendre quadraturedvz = ( vz n − vz 0 ) /REAL( vz num)IF ( spc == 6 . or . spc == 7 .OR. spc == 11) THENdone = .TRUE.OPEN(38 , FILE = ”KMATVALUESEXTRAP”)DO WHILE ( done )READ(38 , ∗ ,END=10000) kmat m , kmat vz 0 , kmat vz n , kmat vz numALLOCATE( kmat x val ( 0 : kmat vz num) )ALLOCATE( kmat y val ( 0 : kmat vz num) )ALLOCATE( k mat val ( 0 : kmat vz num , 0 : kmat vz num) )READ(38 ,∗ ,END = 10000) kmat x val , kmat y val , k mat valkmat dvz = ( kmat vz n − kmat vz 0 ) /REAL( kmat vz num)IF (kmat m == m) THENDONE = .FALSE.ELSEDEALLOCATE( kmat x val )DEALLOCATE( kmat y val )DEALLOCATE( k mat val )END IFENDDO94! check mass r a t i o s between inpu t f i l e s to determine which s e t o f data to usef o r f u r t h e r c a l c u l a t i o nCLOSE(38)END IFIF ( spc == 10 . .OR. spc == 11) THEN ! spc = 9 and 10 as w e l lREAD(∗ ,∗ ) mu chiEND IFIF ( spc == 5 .OR. spc == 6 .OR. spc == 7) THENREAD(∗ ,∗ ) numdense , sigma12 , max smtheva l gau l ag = i n t i n t e r v a l ( −2 ,0 ,0 ,0 ,0 ,0)IF (max smth == 2) THENREAD(∗ ,∗ ) a 4 t i l d aCALL EVAL CHI!OPEN (44 , FILE = ”max cross ”)!DO c h i v a l = 0.001 d0 , pi , 0 . 001 d0! g = 4.0 d0∗ s q r t ( a 4 t i l d a ∗m∗ (1 . 0 d0+m) )! ch e c k c ro s s = crossec (2 , 1 . 0 d0 , c h i v a l )!END DO!CLOSE(44)END IFEND IF!CALL BESSEL!˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜! sma l l l oop wr i t t en to e va l ua t e the 1/ r ˆ4 p o t e n t i a l f o r maxwel l molecu le!DO x1 = 0.0 d0 , 1 .0 d0 , 0.001! c a l l 1 = 1.0 d0/( x1 ∗∗4)! WRITE(80 , ’ ( e15 .10 ,1 x , e35 . 30) ’ ) x1 , c a l l 1!END DO!STOP! check ing k mat f unc t i on f o r spaces 5 and above ( those t ha t r e qu i r ei n t e r p o l a t i o n / e x t r a p o l a t i o n using e x t e r n a l l y generated matrix )!DO x1 = 0.0 d0 , 10 . 0 d0 , 0 . 001 d0! x1 = 275.0 d0! c a l l 1 = k matr i x ( spc , 2 . 0 d0 , x1 , c o e f f )! c a l l 2 = e v a l c h i!WRITE(57 , ’E15 .10 ,3X, E20 . 15 ’ ) x1 , c a l l 1!WRITE(57 , ’E15 .10 ,1X, E25 . 20 ’ ) x1 , c a l l 1! WRITE(57 , ’ (E15 .10 ,1X, E35 .30) ’ ) x1 , c a l l 1!END DO!STOP!˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜95! S e t t i n g beg inn ing o f v e l o c i t y g r i d wi th 0 .! v z 0 = 0!With t h i s we s e t spac ings between po i n t s on v e l o c i t y g r i d . This i s dependednton t o t a l l en g t h o f gr id , goes back to v a r i a b l e s t ha t are inpu t in thebeg inn ing .! Spacing between po i n t s i s uniform .! dvz = ( vz n − vz 0 ) /REAL( vz num)! This loop c r ea t e s array f o r v e l o c i t y g r i d .DO i = 0 , vz numvz g r i d ( i )= vz 0 + REAL( i ) ∗dvzENDDOb i n i t = 0 .0 d0DO i = 1 , n dim−1b i n i t ( i , i ) = 4 .0 d0 /6 .0 d0b i n i t ( i , i −1)= 1 .0 d0 /6 .0 d0b i n i t ( i , i +1)= 1 .0 d0 /6 .0 d0ENDDO! Values o f matrix b i n i t , are based on boundary cond i t i on s mentioned above .These are the f i r s t 4 e l ements in f i r s t row , and l a s t 4 e l ements in l a s trow in matrix .b i n i t (0 ,0 ) = 1 .0 d0 /48.0 d0b i n i t (0 ,3 ) = 1 .0 d0 /48.0 d0b i n i t (0 ,1 ) = 23 .0 d0 /48.0 d0b i n i t (0 ,2 ) = 23 .0 d0 /48.0 d0b i n i t ( n dim , n dim ) = 1.0 d0 /48.0 d0b i n i t ( n dim , n dim−3) = 1 .0 d0 /48.0 d0b i n i t ( n dim , n dim−1) = 23 .0 d0 /48.0 d0b i n i t ( n dim , n dim−2) = 23 .0 d0 /48.0 d0b i n i t s a v e d = b i n i tALLOCATE(work ( 0 : n dim+1))CALL DGETRF( n dim+1,n dim+1, b in i t , n dim+1, ip iv , i n f o )IF ( i n f o /= 0) STOP ”DGETRF: FAILED”CALL DGETRI( n dim+1, b in i t , n dim+1, ip iv , work , n dim+1, i n f o )IF ( i n f o /=0) STOP ”DGETRI: FAILED”IF ( spc == 3) THENALLOCATE( nu h ( 0 : n dim ) )nu h = 0.0 d0DO j = 1 , n dim−1nu h ( j ) = i n t e g r a t e (3 , f l ag2 , v z g r i d (0) , v z g r i d ( vz num) , v z g r i d ( j−1) ,c o e f f )96WRITE(14 ,∗ ) nu h ( j )ENDDOnu h (0) = i n t e g r a t e (3 , f l ag2 , v z g r i d (0) , v z g r i d ( vz num) , 0 . 5 d0∗dvz , c o e f f )WRITE(14 ,∗ ) nu h (0)nu h ( n dim ) = i n t e g r a t e (3 , f l ag2 , v z g r i d (0) , v z g r i d ( vz num) , v z g r i d ( vz num)−0.5d0∗dvz , c o e f f )WRITE(14 ,∗ ) nu h ( n dim )ELSECALL WIGNER WILKINS! wigner w i l k i n s subrou t ine con ta ins con s t ru c t i on o f a l l matr i ces needed f o re va l ua t i on o f d i s t r i b u t i o n func t i on . More comments on d e t a i l s insubrou t ine f i l e i t s e l f . This subrou t ine e va l ua t e s matrix L , which i s thec o l l i s i o n opera tor t ha t w i l l be used f o r e va l ua t i on o f d i s t r i b u t i o nfunc t i on .END IFOPEN (29 , FILE = ”plot values”)DO i p l o t = vz 0 , vz n , 0 . 0 5f n c p l o t = p lot ( i p l o t )WRITE(29 ,∗ ) i p l o t , f n c p l o tENDDOCLOSE(29)! This loop eva l ua t e s va l u e s o f time dependent c o e f f i c i e n t s used in e va l u t i ono f d i s t r i b u t i o n func t i on .DO i = 0 , vz numy( i +1)= exe func (0 , v z g r i d ( i ) )ENDDO! These two are f i r s t and l a s t v a l u e s o f c o e f f i c i e n t s in array , based on twoex t ra boundary cond i t i on s t ha t we have to i n c l ud e .! These bounday cond i t i on s are va l u e s o f f unc t i on at mid−po i n t s between f i r s tand second po in t and mid−po in t between l a s t and second−to− l a s t po in t ong r i d .y (0)= exe func (0 , v z g r i d (0)+(dvz /2 .0 d0 ) )y ( n dim ) = exe func (0 , v z g r i d ( vz num)−dvz /2 .0 d0 )WRITE (10 ,∗ ) y! y = MATMUL( b i n i t , y )CALL DGEMV( ’N’ , n dim+1,n dim+1 ,1.0 d0 , b i n i t , n dim+1,y , 1 , 0 . 0 d0 , temp , 1 )WRITE (10 ,∗ ) temph2 = h/2 .0 d0t 0 = 0 .0 d0! temp = y97! This loop eva l ua t e s va l u e s o f v e l o c i t y gr id , t e s t funct ion , f i r s t and secondd e r i v a t i v e s o f both the ac tua l f unc t i on and b s p l i n e funct ion , and va l u e so f d i s t r i b u t i o n func t i on .! This loop a l s o e va l ua t e s e r ro r s ob ta ined between r e s p e c t i v e va l u e s o f t e s tf unc t i on and b s p l i n e f unc t i on s and t h e i r d e r i v a t i v e s .DO vz = vz 0 , vz n , 0 . 0 5!WRITE (10 ,”(F7 .4 , 3X, E10 .4 , 3X, E10 .4 , 3X, E10 .4 , 3X, E10 .4 , 3X, F8 .2 , 3X,F8 .2 , 3X, E10.4 , 3X, E10 .4 , 3X,F8 . 2 ) ”) vz , d i s t f u n c (1 ,0 , vz , y ) , exe f unc (0 , vz ) , d i s t f u n c(1 ,1 , vz , y ) , exe f unc (1 , vz ) , ( ( d i s t f u n c (1 ,0 , vz , y )−exe func (0 , vz ) ) / exe func(0 , vz ) ) ∗100 ,&! ( ( d i s t f u n c (1 ,1 , vz , y )−exe func (1 , vz ) ) / exe func (1 , vz ) ) ∗100 , exe f unc (2 , vz ) ,d i s t f u n c (1 ,2 , vz , y ) , ( ( d i s t f u n c (1 ,2 , vz , y )− exe func (2 , vz ) ) / exe func (2 , vz) ) ∗100WRITE(26 ,”(F11.7 ,3X,E10.4)”) vz , d i s t f u n c (1 ,0 , vz , temp)ENDDO! ˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜TIME PROPAGATION OF COEFFICIENTS˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜ALLOCATE( c o e f f o l d ( 0 : n dim ) )a l im = vz g r i d (0)b l im = vz g r i d ( vz num)c o e f f o l d = tempmoment0 = i n t e g r a t e (1 ,0 , a l im , b l im , 1 , c o e f f o l d )moment1 = i n t e g r a t e (1 ,1 , a l im , b l im , 1 , c o e f f o l d ) /moment0moment1 mod = log (moment1−1.5d0 )WRITE(21 , ’ (F9.4 ,3(2X,E14.8) ) ’ ) 0 .0 d0 , moment1 , 2 . 0 d0 /3 .0 d0∗moment1 , moment1 modDO j = 1 , nstept = t 0 + REAL( j ) ∗hIF ( spc == 3) THENDO n = 0 , n dimIF (n == 0) THENz = 0 .5 d0∗dvzELSE IF (n == n dim ) THENz = vz g r i d ( vz num)−0.5d0∗dvzELSEz = vz g r i d (n−1)! va l ue o f z i s what i s passed in as the va l ue o f y i n t o k matr i xEND IFc o e f f h (n) = −1.0d0∗ i n t e g r a t e (4 ,0 , v z g r i d (0) , v z g r i d ( vz num) , z ,c o e f f o l d )ENDDOtemp = co e f f h+nu hCALL DGEMV( ’N’ , n dim+1,n dim+1 ,1.0 , b i n i t , n dim+1,temp , 1 , 0 . 0 d0 , coe f f new, 1 )! coe f f new = c o e f f o l d + MATMUL( b i n i t , c o e f f h+nu h ) ∗hcoe f f n ew = c o e f f o l d + coe f f n ew ∗h!WRITE(23 ,∗) c o e f f h98!WRITE(23 ,∗) nu h!WRITE(23 ,∗) t , coe f f new!WRITE(23 ,”A1”) ’& ’ELSE IF ( spc == 1 .OR. spc == 2 .OR. spc == 4 .OR. spc == 5 .OR. spc == 6 .OR. spc == 7 .OR. spc == 9 .OR. spc == 10 .OR. spc == 11) THEN! wr new = 0.0 d0! t h i s loop c r ea t e s the d i a gona l i z e d matrix wi th the e i g enva l u e seva l ua ted in the l i n i t f i l e .! we are using exac t s o l u t i o n to complete time propogat ion o f system .!We are e va l ua t i n g the matrix , and then we ob ta in time−dependentc o e f f i c i e n t s at any time , by t a k i n g product o f d i a gona l i z e d matrixand c o e f f i c i e n t s eva l ua ted at t =0.! i n d i v i d u a l matr i ces are cons t ruc ted / so l v ed in l i n i t f i l e! time dependence o f d i s t r i b u t i o n func t i on i s e va l u t ed here using exac texpres s i on! t = t 0 + REAL( j−1)∗h!DO i = 0 , n dim! wr new ( i , i ) = exp (wr( i ) ∗ t )!END DO! c o e f f = MATMUL( vr saved , (MATMUL(wr new , vr ) ) )! coe f f new = MATMUL( coe f f , y )CALL DGEMV( ’N’ , n dim+1,n dim+1 ,1.0 d0 , l mat sa fe , n dim+1, c o e f f o l d , 1 , 0 . 0d0 , coe f f new , 1 )! coe f f new = c o e f f o l d + MATMUL( l ma t sa f e , c o e f f o l d ) ∗hcoe f f n ew = c o e f f o l d + coe f f n ew ∗hEND IF! t h i s i n i t i a l i z e s gau l ag subrout ine , in which po i n t s and we i gh t s o f gauss−l a gu e r r e are c a l c u l a t e d and then s t o r ed in a matrix form .! an i t e r a t i o n ta k e s p l a c e s and depending on convergence , appropr i a te s e t o fpo i n t s and we i gh t s are used in e va l ua t i on o f moments .IF ( spc == 3 .OR. spc == 1 .OR. spc == 4 .OR. spc == 5 .OR. spc == 7 .OR.spc == 9 .OR. spc == 10 .OR. spc == 11) THENmod calc = mod( j , 1 0 )IF ( mod calc == 0) THENmoment0 = i n t e g r a t e (1 ,0 , v z g r i d (0) , v z g r i d ( vz num) , 1 . 0 d0 , coe f f n ew )! e v a l ua t e s the z eo r t h order moment (norm)WRITE(20 ,∗ ) t , moment0!WRITE(24 ,∗) t , moment0! take d e r i v a t i v e o f the f i r s t momentmoment1 = i n t e g r a t e (1 ,1 , a l im , b l im , 1 , coe f f n ew ) /moment0moment1 mod = log (moment1−1.5d0 )! e v a l ua t e s the f i r s t moment , and i s normal i zed by the normWRITE(21 ,”(F9.4 ,3(2X,E14.8) )”) t , moment1 , 2 . 0 d0 /3 .0 d0∗moment1 ,moment1 mod!WRITE(24 ,∗) moment1 mod99moment2 = i n t e g r a t e (1 ,2 , a l im , b l im , 1 , coe f f n ew ) /moment0moment2 mod = (3 . 0 d0 /5 .0 d0 ) ∗moment2 /(moment1 ∗∗2)moment2a mod = moment2 − ( ( 5 . 0 d0 /3 .0 d0 ) ∗moment1 ∗∗2)! e v a l ua t e s the second moment , and i s normal i zed by the normWRITE(22 ,∗ ) t , moment2WRITE(24 ,∗ ) t , moment2 mod , moment2a mod!WRITE (22 ,”A1”) ’& ’!DO i = 0 , n dim!WRITE(12 ,∗) i , coe f f new ( i )!We ob ta in time−dependent c o e f f i c i e n t s , and p l o t s o f t h e s e va l u e s!END DODO vz = vz 0 , vz n , 0 . 0 5!WRITE (12 ,”(F10 .6 , 3X, E13 .7 , 3X, E13 .7 , 3X, E13 . 7 ) ”) vz , d i s t f u n c (1 ,0 ,vz , coe f f new ) ! , d i s t f u n c (3 ,0 , vz , coe f f new ) ! ,−1∗ d i s t f u n c (2 ,0 ,vz , coe f f new )WRITE (12 ,∗ ) vz , d i s t f u n c (1 ,0 , vz , coe f f n ew ) ! , d i s t f u n c (3 ,0 , vz ,coe f f new ) ! ,−1∗ d i s t f u n c (2 ,0 , vz , coe f f new )ENDDOWRITE (12 ,”(A1)”) ’&’END IFc o e f f o l d = coe f f n ewELSEmoment0 = i n t e g r a t e (1 ,0 , v z g r i d (0) , v z g r i d ( vz num) , 1 . 0 d0 , coe f f n ew )! e v a l ua t e s z eo r t h order moment (norm)WRITE(20 ,∗ ) t , moment0!WRITE(24 ,∗) t , moment0! take d e r i v a t i v e o f f i r s t momentmoment1 = i n t e g r a t e (1 ,1 , a l im , b l im , 1 , coe f f n ew ) /moment0moment1 mod = log (moment1−1.5 d0 )! moment1 mod = (2 .0 d0 /3.0 d0 ) ∗moment1! e va l ua t e s the f i r s t moment , and i s normal i zed by the normWRITE(21 ,”( f9 .4 ,3(2x , e14 .8) )”) t , moment1 , 2 . 0 d0 /3 .0 d0∗moment1 , moment1 mod!WRITE(21 ,∗) t , moment1 ,moment1 mod!WRITE(24 ,∗) moment1 modmoment2 = i n t e g r a t e (1 ,2 , a l im , b l im , 1 , coe f f n ew ) /moment0moment2 mod = (3 . 0 d0 /5 .0 d0 ) ∗moment2 /(moment1 ∗∗2)moment2a mod = moment2 − ( ( 5 . 0 d0 /3 .0 d0 ) ∗moment1 ∗∗2)! e v a l ua t e s second moment , and i s normal i zed by normWRITE(22 ,∗ ) t , moment2WRITE(24 ,∗ ) t , moment2 mod , moment2a mod!WRITE (22 ,”A1”) ’& ’IF ( spc == 2 ) THENf l a g 3 = 2ELSE IF ( spc == 4) THENf l a g 3 = 4ELSE IF ( spc == 5) THEN100f l a g 3 = 5END IFDO i = 0 , n dim!WRITE(12 ,∗) i , coe f f new ( i )!We ob ta in time−dependent c o e f f i c i e n t s , and p l o t s o f t h e s e va l u e sENDDODO vz = vz 0 , vz n , 0 . 0 5!WRITE (12 ,”(F10 .6 , 3X, E13 .7 , 3X, E13 .7 , 3X, E13 . 7 ) ”) vz , d i s t f u n c (1 ,0 , vz ,coe f f new ) , d i s t f u n c ( f l a g3 , 0 , vz , coe f f new ) ! ,−1∗ d i s t f u n c (2 ,0 , vz ,coe f f new )WRITE (12 ,∗ ) vz , d i s t f u n c (1 ,0 , vz , coe f f n ew ) , d i s t f u n c ( f l ag3 , 0 , vz ,coe f f n ew ) ! ,−1∗ d i s t f u n c (2 ,0 , vz , coe f f new )ENDDOWRITE (12 ,”(A1)”) ’&’c o e f f o l d = coe f f n ewEND IFENDDO! e v a l ua t e time dependent c o e f f i c i e n t s above wi th exac t mathematicalf o rmu la t i on .! This loop eva l ua t e s d i s t r i b u t i o n func t i on at po i n t s on g r i d .! The d i s t r i b u t i o n func t i on i s eva l ua ted f o r o r i g i n a l b s p l i n e , f i r s t d e r i v a t i v eand second d e r i v a t i v e .CLOSE (10)CLOSE (11)CLOSE (12)CLOSE (14)CLOSE (15)CLOSE (17)CLOSE (18)CLOSE (19)CLOSE (20)CLOSE (21)CLOSE (22)CLOSE (23)CLOSE (24)CLOSE (25)CLOSE (26)CLOSE (27)CLOSE (30)10000 IF ( spc == 6 . and . done ) WRITE(∗ ,∗ ) ”MASS RATIO NOTFOUND INKMATVALUESEXTRAP”ENDPROGRAM ION MOBILITYPROGRAM ANALYZE101!! ana l y ze moment va l u e s!USE IONMOBILITYIMPLICIT NONEREAL( h ip rec ) : : e r ro r , vz , tmp1 , tmp2 , tmp3 , tmp4 , j , enrgy , s , eq rgh1 , eq rgh2 ,eq smth1 , eq smth2 , eq rgh1a , eq rgh2a , red mass , s red mass , eq rgh1 rm ,eq rgh2 rm , eq smth1 rm , eq smth2 rm , eq rgh1a rm , eq rgh2a rmINTEGER i , i n f oINTEGER,DIMENSION ( : ) ,ALLOCATABLE: : i p iv ,mdREAL( h ip rec ) ,EXTERNAL : : b sp l in e3 , d i s t f u n cDOUBLE PRECISION,EXTERNAL: : e r fINTERFACESUBROUTINE POLINT(xa , ya , x , y , dy )INTEGER,PARAMETER: : I4B = SELECTED INT KIND(9) , h ip rec=KIND( 0 . 0D0)REAL( h ip rec ) ,DIMENSION( : ) : : xa , yaREAL( h ip rec ) : : xREAL( h ip rec ) : : y , dyEND SUBROUTINEEND INTERFACE! vz num i s the number o f moment va l u e s to processREAD(5 ,∗ ) vz num ,m, enrgyn dim = vz num+2ALLOCATE( b i n i t ( 0 : n dim , 0 : n dim ) )ALLOCATE( v z g r i d ( 0 : vz num) )ALLOCATE( i p i v ( 0 : n dim ) )ALLOCATE( y ( 0 : n dim ) )ALLOCATE(md(0 : 2∗ vz num) )OPEN (10 ,FILE = ’ coe f f i c i ents ’ )OPEN (25 ,FILE = ’moment derivative ’ )! read in moment va l u e s from standard inpu tDO i = 0 , vz numREAD(5 ,∗ ) tmp1 , tmp2 , tmp3 , tmp4v z g r i d ( i )= tmp1y( i +1)= tmp4ENDDOdvz = vz g r i d (1) − v z g r i d (0)102b i n i t = 0 .0 d0DO i = 1 , n dim−1b i n i t ( i , i ) = 4 .0 d0 /6 .0 d0b i n i t ( i , i −1)= 1 .0 d0 /6 .0 d0b i n i t ( i , i +1)= 1 .0 d0 /6 .0 d0ENDDOb i n i t (0 ,0 ) = 1 .0 d0 /48.0 d0b i n i t (0 ,3 ) = 1 .0 d0 /48.0 d0b i n i t (0 ,1 ) = 23 .0 d0 /48.0 d0b i n i t (0 ,2 ) = 23 .0 d0 /48.0 d0b i n i t ( n dim , n dim ) = 1.0 d0 /48.0 d0b i n i t ( n dim , n dim−3) = 1 .0 d0 /48.0 d0b i n i t ( n dim , n dim−1) = 23 .0 d0 /48.0 d0b i n i t ( n dim , n dim−2) = 23 .0 d0 /48.0 d0ALLOCATE(work ( 0 : n dim+1))CALL DGETRF( n dim+1,n dim+1, b in i t , n dim+1, ip iv , i n f o )IF ( i n f o /= 0) STOP ”DGETRF: FAILED”CALL DGETRI( n dim+1, b in i t , n dim+1, ip iv , work , n dim+1, i n f o )IF ( i n f o /=0) STOP ”DGETRI: FAILED”! use p o l i n t to g e t va l u e s at midpoints f o r boundary cond i t i on sCALL POLINT( v z g r i d ( 0 : 5 ) , y ( 1 : 6 ) , ( v z g r i d (0)+vz g r i d (1) ) ∗0 .5 d0 , y (0) , e r r o r )! wr i t e (∗ ,∗ ) y (0) , e r rorCALL POLINT( v z g r i d ( vz num−6:vz num) , y ( n dim−7:n dim−1) , ( v z g r i d ( vz num)+vz g r i d ( vz num−1)) ∗0 .5 d0 , y ( n dim ) , e r r o r )!WRITE(∗ ,∗ ) y ( n dim) , errorWRITE (10 ,∗ ) yy = MATMUL( b in i t , y )WRITE (10 ,∗ ) yOPEN (40 ,FILE = ’moment derivative a ’ )DO i = 0 , 2∗vz numvz = REAL( i ) ∗0 .5 d0∗dvztmp1 = d i s t f u n c (1 ,0 , vz , y )tmp2 = d i s t f u n c (1 ,1 , vz , y )red mass = m/(1 . 0 d0+m)s = sq r t (m∗( exp ( tmp1) ) )s r ed mass = sq r t ( red mass ∗( exp ( tmp1) ) )! speedeq smth1 = 16 .0 d0 / ( 3 . 0 d0∗ s q r t ( p i ) ∗ s )eq smth1 rm = 16 .0 d0 / ( 3 . 0 d0∗ s q r t ( p i ) ∗ s r ed mass )! e p s t e i n r e s u l t f o r smooth sphere103eq smth2 = ( ( 2 . 0 d0∗exp(−( s ∗ s ) ) ) /( sq r t ( p i ) ∗ s ) ) ∗ ( 1 . 0 d0+(0.5 d0/( s ∗ s ) ) ) +2.0d0∗ ( 1 . 0 d0+(1.0 d0/( s ∗ s ) ) −(1.0d0 / ( 4 . 0 d0∗ s ∗∗4) ) )∗ e r f ( s )eq smth2 rm = (2 . 0 d0∗exp(− s r ed mass ∗ s r ed mass ) /( sq r t ( p i ) ∗ s r ed mass ) )∗ ( 1 . 0 d0+0.5d0/( s r ed mass ∗ s r ed mass ) ) +2.0d0 ∗ ( 1 . 0 d0+1.0d0/( s r ed mass ∗s r ed mass )−1.0d0 / ( 4 . 0 d0∗ s r ed mass ∗∗4) ) ∗ e r f ( s r ed mass )! s t a l d e r r e s u l t f o r smooth sphereeq rgh1 = eq smth1 ∗13.0 d0 /9 .0 d0eq rgh1 rm = eq smth1 ∗13.0 d0 /9 .0 d0eq rgh1a = eq smth1 ∗7 .0 d0 /5 .0 d0eq rgh1a rm = eq smth1 ∗7 .0 d0 /5 .0 d0! e p s t e i n r e s u l t f o r rough sphereeq rgh2 = eq smth2 + (2 . 0 d0∗ s q r t ( p i ) ) / ( 3 . 0 d0∗ s )eq rgh2 rm = eq smth2 + (2 . 0 d0∗ s q r t ( p i ) ) / ( 3 . 0 d0∗ s r ed mass )eq rgh2a = eq rgh2 ∗ ( 7 . 0 d0 /5 .0 d0 ) ∗ ( 9 . 0 d0 /13.0 d0 )eq rgh2a rm = eq rgh2 rm ∗7 .0 d0 /5 .0 d0! s t a l d e r r e s u l t f o r rough sphereWRITE(25 , ’ (F11.5 ,3X,E22.15 ,3X,E22.15 ,3X,E22.15) ’ ) vz , tmp1 , tmp2 , tmp2/(−16.0 d0 / ( 3 . 0 d0∗ s q r t (1/m) ) )! p r i n t s out the f o k k e r p lanck r e s u l t s : time , va l ue o f moment , d e r i v a t i v e o fmoment , r a t i o o f d e r i v a t i v e wi th a c tua l f o k k e r p lanck r e s u l tWRITE(26 , ’ (F11.5 ,3X,E15.10 ,3X,E15.10 ,3X,E13.7 ,3X,E13.7 ,3X,E13.7 ,3X,E13.7) ’ )vz , s q r t (m∗( exp ( tmp1) ) ) , 1/(−m∗ s q r t ( p i ) ) / sq r t ( exp ( tmp1) ) ∗tmp2 , eq smth1, eq smth2 ,(1/(−m∗ s q r t ( p i ) ) / sq r t ( exp ( tmp1) )∗tmp2) /eq smth1 ,(1/(−m∗ s q r t (p i ) ) / sq r t ( exp ( tmp1) ) ∗tmp2) /eq smth2! f o r t .26 i s f o r the smooth sphere r e s u l t s! p r i n t s va l u e s f o r vz , speed , drag c o e f f i c i e n t s , e p s t e i n r e s u l t f o r dragc o e f f i c i e n t s , s t a l d e r r e s u l t f o r drag c o e f f i c i e n t , r a t i o o f dragc o e f f i c i e n t to the ep s t e i n r e s u l tWRITE(27 , ’ (F11.5 ,3X,E15.10 ,3X,E15.10 ,3X,E13.7 ,3X,E13.7 ,3X,E13.7 ,3X,E13.7 ,3X,E13.7 ,3X,E13.7) ’ ) vz , s q r t (m∗( exp ( tmp1) ) ) , 1/(−m∗ s q r t ( p i ) ) / sq r t ( exp (tmp1) ) ∗tmp2 , eq rgh1 , eq rgh2 ,(1/( −m∗ s q r t ( p i ) ) / sq r t ( exp ( tmp1) ) ∗tmp2) /eq rgh1 ,(1/(−m∗ s q r t ( p i ) ) / sq r t ( exp ( tmp1) ) ∗tmp2) / eq rgh1a ,(1/(−m∗ s q r t ( p i )) / sq r t ( exp ( tmp1) )∗tmp2) / eq rgh2 ,(1/(−m∗ s q r t ( p i ) ) / sq r t ( exp ( tmp1) ) ∗tmp2) /eq rgh2a! f o r t .27 p r i n t s the same r e s u l t s as above f o r f o r t .26 excep t f o r the roughsphere , the l a s t column mu l t i p l i e s the rough c o e f f i c i e n t wi th 7/5 fromtheory .!WRITE(25 , ’ (F11 .5 , 3X, E13 .7 , 3X, E13 .7 , 3X, E13 . 7 ) ’ ) vz , d i s t f u n c (1 ,0 , vz , y ) ,d i s t f u n c (1 ,1 , vz , y ) , d i s t f u n c (1 ,1 , vz , y ) /(−16.0d0 /(3 . 0 d0∗ s q r t (1/m) ) )!WRITE(40 , ’ (F11 .5 , 3X, E13 . 7 ) ’ ) vz , d i s t f u n c (1 ,1 , vz , y ) ∗(16.0 d0∗ s q r t (m) /3.0 d0 )WRITE(28 , ’ (F11.5 ,3X,E15.10 ,3X,E15.10 ,3X,E13.7 ,3X,E13.7 ,3X,E13.7 ,3X,E13.7) ’ )vz , s red mass , 1/(−m∗ s q r t ( p i ) ) / sq r t ( exp ( tmp1) ) ∗tmp2 , eq smth1 rm ,eq smth2 rm ,(1/( −m∗ s q r t ( p i ) ) / sq r t ( exp ( tmp1) ) ∗tmp2) /eq smth1 rm ,(1/(−m∗s q r t ( p i ) ) / sq r t ( exp ( tmp1) ) ∗tmp2) /eq smth2 rmWRITE(29 , ’ (F11.5 ,3X,E15.10 ,3X,E15.10 ,3X,E13.7 ,3X,E13.7 ,3X,E13.7 ,3X,E13.7 ,3X,E13.7 ,3X,E13.7) ’ ) vz , s red mass , 1/(−m∗ s q r t ( p i ) ) / sq r t ( exp ( tmp1) ) ∗tmp2104, eq rgh1 rm , eq rgh2 rm ,(1/(−m∗ s q r t ( p i ) ) / sq r t ( exp ( tmp1) )∗tmp2) /eq rgh1 rm ,(1/(−m∗ s q r t ( p i ) ) / sq r t ( exp ( tmp1) )∗tmp2) /eq rgh1a rm ,(1/(−m∗s q r t ( p i ) ) / sq r t ( exp ( tmp1) ) ∗tmp2) /eq rgh2 rm ,(1/(−m∗ s q r t ( p i ) ) / sq r t ( exp (tmp1) ) ∗tmp2) / eq rgh2a rmWRITE(30 , ’ (F11.5 ,3X,E15.10 ,3X,E15.10 ,3X,E15.10) ’ ) vz , s q r t (m∗( exp ( tmp1) ) ) ,eq rgh1 / eq rgh2 , eq rgh1a / eq rgh2aENDDOCLOSE (10)CLOSE (25)CLOSE (40)ENDPROGRAM ANALYZEA.2 SubroutinesSUBROUTINE WIGNER WILKINSUSE IONMOBILITYUSE MODULE INTEGRATEUSE MODULECROSSECIMPLICIT NONE! The subrou t ine c a l l s on the i onmob i l i t y module , which d e s c r i b e s some o f thev a r i a b l e s used . This subrou t ine i s des i gned to be gener i cCHARACTER: : jobv l , jobvrLOGICAL,EXTERNAL: : se lectREAL( h ip rec ) : : a l im , b l im , v , vz , temp , eva l gauss , z , temp1! a l im : lower l im i t o f i n t e g r a t i o n found using maximum va l u e s o f i n t e r v a lg i ven! b l im : h i gher l im i t o f i n t e g r a t i o n found using the minimum of va l u e s o fi n t e r v a l g i ven! v : v e l o c i t yREAL( h ip rec ) ,DIMENSION ( : ) , ALLOCATABLE : : y de r iv , ip iv , wl , wi! y d e r i v : array con ta in ing c o e f f i c i e n t s f o r b s p l i n e f unc t i on! i p i v : an array d e l i v e r e d upon outputREAL( h ip rec ) ,DIMENSION ( : , : ) , ALLOCATABLE: : k mat , b t i l , b t i l v a l u e s , nu , b p , b ,l mat , v l , wr new , v r t ran spose , nu1 , d i f f , l mat1 , l mat1 sa fe , c! k mat : e va l ua t e s matrix K in eva l ua t i on o f L matrix ; t h i s con ta ins e va l ua t i ono f wigner−w i l k i n s k e rne l! b t i l : matrix used in the e va l ua t i on o f the L matrix! b t i l v a l u e s : t h i s matrix saves o r i g i n a l b t i l matrix , s i nce i n v e r s esubrou t ine de s t r o y s o r i g i n a l matrix , and we need the b t i l matrix in i t so r i g i n a l form as w e l l f o r e va l ua t i on o f L matrix! nu : one o f the matr ices used in e va l ua t i on o f L matrix! b : matrix used in e va l ua t i on o f L matrix! b p : matrix used in e va l ua t i on o f L matrixINTEGER i , j , k , in fo , lwork , a , f l ag1 , f l ag2 , ldc , n105! i , j , k : i n t e g e r s used in the l oops o f the code ,! lwork i s a parameter in the LAPACK rout ines , to s e t the s i z e o f the matr icesbe ing eva lua ted .REAL( h ip rec ) ,DIMENSION( 0 : n dim ) : : c o e f fREAL( h ip rec ) ,EXTERNAL : : exe func , i n t i n t e r v a l , i n t e g r a t e , moments , d i s t f u n c! e xe f unc : e x t e rna l f unc t i on tha t has i n i t i a l f unc t i on s be ing used f o r thecode! i n t e g r a t e : e x t e rna l f unc t i on tha t checks i n t e r v a l s f o r e va l ua t i on o fin tegrands! moments : e x t e rna l f unc t i on tha t e va l ua t e s r e s p e c t i v e moments! d s i t f u n c : e x t e rna l f unc t i on tha t e va l ua t e s the d i s t r i b u t i o n func t i onLOGICAL : : doneDOUBLE PRECISION, EXTERNAL: : e r f!READ(67)!RETURNALLOCATE( i p i v ( 0 : n dim ) )ALLOCATE( y d e r i v ( 0 : n dim ) )ALLOCATE( k mat ( 0 : n dim , 0 : n dim ) )!ALLOCATE( b t i l ( 0 : n dim , 0 : n dim) )!ALLOCATE( b t i l v a l u e s (0 : n dim , 0 : n dim) )ALLOCATE(nu ( 0 : n dim , 0 : n dim ) )ALLOCATE( b p ( 0 : n dim , 0 : n dim ) )ALLOCATE(b ( 0 : n dim , 0 : n dim ) )ALLOCATE( l mat ( 0 : n dim , 0 : n dim ) )ALLOCATE( l mat s a f e ( 0 : n dim , 0 : n dim ) )! above e l ements are due the mid−po i n t s used as two ex t ra cond i t i on s needed f o re va l ua t i on o f c o e f f i c i e n t s! b t i l v a l u e s = b t i l! This forms b t i l d a matrix used in e va l ua t i on o f L matrix! The va l u e s o f e l ements are s e t to zero i n i t i a l l y! This i s a band matrix . Diagonal e l ements in matrix have va l u e s 1 ,4 ,1! The f i r s t and l a s t rows o f above matrix has 1 ,4 ,1 as f i r s t th ree and l a s tth ree e l ements r e s p e c t i v e l yb p = 0.0 d0b = 0.0 d0! $omp p a r a l l e l shared ( n dim , dvz , b , b p ) p r i v a t e ( i )! $omp do schedu l e ( auto )DO i = 1 , n dim−1b p ( i , i −1) = −0.5d0/dvzb p ( i , i +1) = 0 .5 d0/dvzb( i , i −1) = 1 .0 d0 /6 .0 d0106b( i , i ) = 4 .0 d0 /6 .0 d0b( i , i +1) = 1 .0 d0 /6 .0 d0ENDDO! $omp end do! $omp end p a r a l l e l!WRITE(14 ,∗) ’B P ’!CALL L INIT VALUES( b p )! This i s b prime matrix used in e va l ua t i on o f L matrix! The va l u e s o f the e l ements o f t h i s matrix are i n i t i a l l y s e t to zero! This i s a band matrix , in which f i r s t and t h i r d element o f band i s −1.0 and1.0 r e s p e c t i v e l y! b = 0.0 d0!DO i = 1 , n dim−1! b ( i , i−1) = 1.0 d0 /6.0 d0! b ( i , i ) = 4.0 d0 /6.0 d0! b ( i , i +1) = 1.0 d0 /6.0 d0!END DOb (0 ,0 ) = 1 .0 d0 /48.0 d0b (0 ,3 ) = 1 .0 d0 /48.0 d0b (0 ,1 ) = 23 .0 d0 /48.0 d0b (0 ,2 ) = 23 .0 d0 /48.0 d0b( n dim , n dim ) = 1.0 d0 /48.0 d0b( n dim , n dim−3) = 1 .0 d0 /48.0 d0b( n dim , n dim−1) = 23 .0 d0 /48.0 d0b( n dim , n dim−2) = 23 .0 d0 /48.0 d0!WRITE(14 ,∗) ’B’!CALL L INIT VALUES( b )! This i s a band matrix! The e lements in band are 1/6 ,4/6 ,1/6 r e s p e c t i v e l y!We decided to use mid−po i n t s between f i r s t two and l a s t two po i n t s onv e l o c i t y g r i d as two ex t ra cond i t i on s needed f o r e va l ua t i on o f time−dependent c o e f f i c i e n t s .! This caused a need to modify b matrix , wi th above g i ven e lements .! F i r s t f our e l ements o f f i r s t row and l a s t f our e l ements o f l a s t row arede f i ned ou t s i d e the loop as a s p e c i a l case .! Unless s p e c i f i c a l l y def ined , the matr ices above have zeroes everywhere! This loop forms the K−matrix! Elements in t h i s matrix are zero everywhere excep t f o r element in cen tre o fmatrix107! This p a r t i c u l a r element i s e va l u t ed by the f o l l ow i n g loop , which a l s oi n co rpo ra t e s an ex t e rna l subrou t ine! This e x t e rna l subrou t ine e va l ua t e s we i gh t s and po i n t s (w and x r e s p e c t i v e l y )f o r e va l ua t i on o f i n t e g r a l! I n t e g r a l i s approximated by summation over product o f we i gh t s and va l u e s o ff unc t i on at the provided po i n t s! In K−matrix , the i nd i c e s o f the element in the cen tre are sw i tched around asp r e v i o u s l y d e s c r i b ed! The i ( column ) element i s d e s c r i b ed as i = j−3 and the j ( row) element i sd e s c r i b ed as j = i−1! This matrix a l s o uses maximum and minimum va l u e s in the e va l u t i on o f theb s p l i n e f unc t i on! l matr i x ww : f i n a l matrix needed to cont inue r e s t o f program eva l ua t i on s! l ma t r i x i s a product o f var i ous matr ices computed in t h i s subrou t inek mat = 0.0 d0! the k mat matrix i s zero everywhere , excep t f o r the e l ements chosen in thef o l l ow i n g loop! n gauss i s number o f po i n t s and we i gh t s used in e va l ua t i on o f i n t e g r a l! e va l g au s s = i n t i n t e r v a l (−1 ,0 ,0 ,1.0d0 , 0 , 0 )! I have chosen to e va l ua t e po in t and we i gh t on ly once in every loop and thenused the ass i gned va lue in the k e rne l expres s i on!With above c a l l , we e va l ua t e gauss ian po i n t s and we i gh t s f o r a l l v a l u e s o fn gauss upto n gauss max , which we e x p l i c i t l y s e t . .! With above c a l l , p o i n t s and we i gh t s are s t o r ed in an array− l i k e fashion , anddepending on the va lue o f n gauss , the appropr i a te s e t i s c a l l e d f o re va l ua t i on o f in tegrands .! The en t i r e i n t e g r a l i s mu l t i p l i e d by a 1/( s q r t ( x ) ) term . So when x=0, t h i sterm would cause en t i r e i n t e g r a l to blow up , something we do not want .! Thus we eva lua ted the i n t e g r a l j u s t f o r x , us ing a Taylor Se r i e s expansionand der i ved above expres s i on .! $omp p a r a l l e l shared ( n dim , v z g r i d , dvz , vz num , k mat ) p r i v a t e ( i , j , z , a l im ,b l im )! $omp do schedu l e ( auto )DO j = 0 , n dim!DO j = 100 ,100! be c a r e f u l to t r e a t the mid−po in t va l u e s c a r e f u l l y . . .! we don ’ t want to i n t e g r a t e over the cusp at x=x ’IF ( j == 0) THENz = 0 .5 d0∗dvz108k mat (0 ,0 ) = i n t e g r a t e (2 ,−3 , v z g r i d (0) , z , z , 0 . 0 d0 ) + i n t e g r a t e (2 ,−3 , z ,v z g r i d (1) , z , 0 . 0 d0 )k mat (0 ,1 ) = i n t e g r a t e (2 ,−2 , v z g r i d (0) , z , z , 0 . 0 d0 ) + i n t e g r a t e (2 ,−2 , z ,v z g r i d (2) , z , 0 . 0 d0 )k mat (0 ,2 ) = i n t e g r a t e (2 ,−1 , v z g r i d (0) , z , z , 0 . 0 d0 ) + i n t e g r a t e (2 ,−1 , z ,v z g r i d (3) , z , 0 . 0 d0 )k mat (0 ,3 ) = i n t e g r a t e (2 ,0 , v z g r i d (0) , z , z , 0 . 0 d0 ) + i n t e g r a t e (2 ,0 , z ,v z g r i d (4) , z , 0 . 0 d0 )DO i = 1 , n dim−3! DO i = 1 ,100a l im = vz g r i d (max(0 , i ) )b l im = vz g r i d (min(vz num , i +4))k mat (0 , i +3) = i n t e g r a t e (2 , i , a l im , b l im , z , 0 . 0 d0 )!WRITE(46 ,∗) j , i , k mat (0 , i +3)ENDDOELSE IF ( j == n dim )THENz = vz g r i d ( vz num)−0.5d0∗dvzk mat ( n dim , n dim ) = i n t e g r a t e (2 , n dim−3, v z g r i d ( n dim−3) , z , z , 0 . 0 d0 ) +i n t e g r a t e (2 , n dim−3,z , v z g r i d ( vz num) , z , 0 . 0 d0 )k mat ( n dim , n dim−1) = i n t e g r a t e (2 , n dim−4, v z g r i d ( n dim−4) , z , z , 0 . 0 d0 ) +i n t e g r a t e (2 , n dim−4,z , v z g r i d ( vz num) , z , 0 . 0 d0 )k mat ( n dim , n dim−2) = i n t e g r a t e (2 , n dim−5, v z g r i d ( n dim−5) , z , z , 0 . 0 d0 ) +i n t e g r a t e (2 , n dim−5,z , v z g r i d ( vz num) , z , 0 . 0 d0 )k mat ( n dim , n dim−3) = i n t e g r a t e (2 , n dim−6, v z g r i d ( n dim−6) , z , z , 0 . 0 d0 ) +i n t e g r a t e (2 , n dim−6,z , v z g r i d ( vz num) , z , 0 . 0 d0 )DO i = −3,n dim−7a l im = vz g r i d (max(0 , i ) )b l im = vz g r i d (min(vz num , i +4))k mat ( n dim , i +3) = i n t e g r a t e (2 , i , a l im , b l im , z , 0 . 0 d0 )!WRITE(46 ,∗) j , i , k mat ( n dim , i +3)ENDDOELSEz = vz g r i d ( j−1)! the va l ue o f z i s what i s what i s passed in as the va l ue o f y i n t ok matr i xDO i = −3,n dim−3a l im = vz g r i d (max(0 , i ) )b l im = vz g r i d (min(vz num , i +4))k mat ( j , i +3) = i n t e g r a t e (2 , i , a l im , b l im , z , 0 . 0 d0 )!WRITE(46 ,∗) j , i , k mat ( j , i +3)ENDDOEND IFENDDO! $omp end do! $omp end p a r a l l e l109WRITE(14 ,∗ ) ’KMATRIX’CALL L INIT VALUES( k mat )! The i nd i c e s used in the code ( i , j ) to con s t ru c t our matrix loops , ared i f f e r e n t than the i nd i c e s we have used in the notesWRITE(14 ,∗ ) ’NU’nu = 0.0 d0! $omp p a r a l l e l shared ( n dim , v z g r i d , vz num , nu , dvz ) p r i v a t e ( j , a l im , b l im , z ,temp , temp1 , done )! $omp do schedu l e ( auto )DO j = 0 , n dimIF ( j == 0) THENZ = 0.5D0∗dvzELSE IF ( j == n dim ) THENz = vz g r i d ( vz num)−0.5d0∗dvzELSEz = vz g r i d ( j−1)END IF! i n t e g r a t e over whole g r i d s t a r t i n g at d i agona l and working towards p o s i t i v eand nega t i v e d i recr i ons , s topp ing when va l u e s are converged to a to l e r ance.! s t e p by 2 dvz to speed th i n g s uptemp = 0.0 d0IF ( j == 1) THENdone = .TRUE.ELSEdone = .FALSE.END IFb l im = zDO WHILE( not ( done ) )a l im = MAX( v z g r i d (0) , b l im −2.0d0∗dvz )temp1 = i n t i n t e r v a l ( 3 ,0 , a l im , b l im , z , 0 . 0 d0 )temp = temp + temp1b l im = a l imIF ( ( abs ( temp1/temp) < 1 .0 d−13) .OR. ( b l im .LE. v z g r i d (0) ) ) done = .TRUE.ENDDOnu( j , j ) = temptemp = 0.0 d0IF ( j == ( n dim−1) ) THENdone = .TRUE.ELSEdone = .FALSE.END IFa l im = z110DO WHILE( not (DONE) )b l im = MIN( v z g r i d ( vz num) , a l im+2.0d0∗dvz )temp1 = i n t i n t e r v a l ( 3 ,0 , a l im , b l im , z , 0 . 0 d0 )temp = temp + temp1a l im = b l imIF ( ( abs ( temp1/temp) < 1 .0 d−13) .OR. ( a l im .GE. v z g r i d ( vz num) ) ) done =.TRUE.ENDDOnu( j , j ) = nu( j , j ) + tempENDDO! nu( j , j ) = i n t e g r a t e (3 ,0 , v z g r i d (0) , v z g r i d ( vz num) , v z g r i d ( j−1) , 0 . 0 d0 )!WRITE(14 ,∗) nu( j , j )!END DO! $omp end do! $omp end p a r a l l e l! nu (0 ,0) = i n t e g r a t e (3 ,0 , v z g r i d (0) , v z g r i d ( vz num) ,0 . 5 d0∗dvz , 0 . 0 d0 )! nu( n dim , n dim) = i n t e g r a t e (3 ,0 , v z g r i d (0) , v z g r i d ( vz num) , v z g r i d ( vz num)−0.5d0∗dvz , 0 . 0 d0 )DO j = 0 , n dimWRITE(14 ,∗ ) nu ( j , j )ENDDO!WRITE(14 ,∗) nu (0 ,0)!WRITE(14 ,∗) nu( n dim , n dim)! nu ( f requency ) matrix i s eva l ua ted using e l ements from k matr i x above .! i n t e r v a l o f i n t e g r a t i o n i s from 0 to S ( f i n i t e i n t e r v a l ) , as opposed to 0 toi n f i n i t y as in theory! f i r s t and l a s t v a l u e s o f f r equency matrix are eva l ua ted s epa ra t e l y , and thoseva l u e s corresponding to midpoints on g r i d! nu matrix i s a d i agona l matrix , wi th f requency va l u e s on diagonal , and th e s eva l u e s are dependent on v e l o c i t y gr id , and zeroes everywhere e l s e! l1 mat = MATMUL(nu , b )CALL DGEMM( ’N’ , ’N’ , n dim+1,n dim+1,n dim+1 ,1.0 d0 , nu , n dim+1,b , n dim+1 ,0.0 d0 ,l1 mat , n dim+1)WRITE(14 ,∗ ) ’L1MAT’CALL L INIT VALUES( l1 mat )l2 mat = k mat−l1 matWRITE(14 ,∗ ) ’L2MAT’CALL L INIT VALUES( l2 mat )! l 1 mat and l2 mat j u s t s epa ra t e s components o f d e f i n t i o n o f c o l l i s i o nopera tor ( see comment below )111! the b p matrix t ha t r e qu i r e s ex t ra mu l t i p l i c a t i o n wi th time−dependente x t e rna l f i e l d . So f a r we have not inc l uded any e f f e c t s o f f i e l d on thesystem! l mat = MATMUL( b i n i t , l 2 mat )CALL DGEMM( ’N’ , ’N’ , n dim+1,n dim+1,n dim+1 ,1.0 d0 , b i n i t , n dim+1, l2 mat , n dim+1 ,0.0 d0 , l mat , n dim+1)l mat s a f e = l matOPEN(67 ,FORM = ’UNFORMATTED’ ,FILE=’LMATSAFE’ )WRITE(67) l matCLOSE(67)WRITE(14 ,∗ ) ’LMAT’CALL L INIT VALUES( l mat )! l mat matrix i s c o l l i s i o n opera tor f o r which were are e va l ua t i n g e i g enva l u e s! This i s the f i n a l matrix t ha t we need f o r c a l c u l a t i o n o f d i s t r i b u t i o nfunc t i on! In our notes c o l l i s i o n matrix i s de f i ned ( us ing the no ta t i ons o f the code ) asL = inve r s e ( b t i l ) ∗( k mat−b p−nu∗b ) .! A l l matr i ces are eva l ua ted in t h i s su b rou t i n e s i t s e l f .! ˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜! !DIAGONALIZATION!ALLOCATE( vr (0 : n dim , 0 : n dim) )!ALLOCATE( v l ( 0 : n dim , 0 : n dim) )!ALLOCATE( vr saved (0 : n dim , 0 : n dim ) )!ALLOCATE( wl (0 : n dim ) )!ALLOCATE(wr (0 : n dim ) )!ALLOCATE(wi (0 : n dim ) )!LAPACK subrout ine , e va l ua t e s r i g h t and l e f t e i g enva l u e s o f g i ven matrix .! Eva lua t ing e i g enva l u e s o f c o l l i s i o n opera tor l mat .! For our p a r t i c u l a r matrix , we shou l d ob ta in only r i g h t e i genva lues , and l e f te i g enva l u e s shou l d have a va lue o f zero .!CALL DGEEV( ’N’ , ’V’ , n dim+1, l mat , n dim+1,wr , wi , v l , n dim+1, vr , n dim+1,work ,−1 ,i n f o )! lwork = work (0)!DEALLOCATE(work )!ALLOCATE(work (1 : lwork ) )!CALL DGEEV( ’N’ , ’V’ , n dim+1, l mat , n dim+1,wr , wi , v l , n dim+1, vr , n dim+1,work ,lwork , i n f o )! E i genva lues are s ca l e d using f o l l ow i n g e va l ua t i on!WRITE(∗ ,∗ ) ’REAL EIGENVALUES (NU) : SCALED’!WRITE(∗ ,∗ ) wr /(2 . 0 d0∗ c o l f r e q / s q r t (m) )112!WRITE(∗ ,∗ ) ’REAL EIGENVALUES OF MAXWELL (NU) : SCALED’!WRITE(∗ ,∗ ) wr/( c o l f r e q ∗ s q r t (1 . 0 d0+m) ∗ s q r t ( a 4 t i l d a )/ s q r t (m∗ p i ) ) ! maxwel ls c a l e d e i g enva l u e s!STOP!WRITE(∗ ,∗ ) ’REAL EIGENVALUES (NU) : NOT SCALED’!WRITE(∗ ,∗ ) wr!WRITE(∗ ,∗ ) ’IMAGINARY EIGENVALUES (NU1) : SCALED’!WRITE(∗ ,∗ ) ’IMAGINARY EIGENVALUES OF MAXWELL (NU1) : SCALED’!WRITE(∗ ,∗ ) wi /( c o l f r e q ∗ s q r t (1 . 0 d0+m) ∗ s q r t ( a 4 t i l d a )/ s q r t (m∗ p i ) ) ! maxwel limaginary s ca l e d e i g enva l u e s!WRITE(∗ ,∗ ) wi /(2 . 0 d0∗ c o l f r e q / s q r t (m) )!WRITE(∗ ,∗ ) ’IMAGINARY EIGENVALUES (NU1) : NOT SCALED’!WRITE(∗ ,∗ ) wi! vr are e i g enve c t o r s t ha t are eva l ua ted by subrou t ine DGEEV, f o r l mat matrix .!WRITE(14 ,∗) ’ vr ’!CALL L INIT VALUES( vr )! v r saved = vr!CALL DGETRF( n dim+1,n dim+1,vr , n dim+1, i p i v , i n f o )! IF ( i n f o /= 0) STOP ”DGETRF: FAILED”!CALL DGETRI( n dim+1, vr , n dim+1, i p i v , work , n dim+1, i n f o )! IF ( i n f o /=0) STOP ”DGETRI: FAILED”! e va l ua t e s i n v e r s e o f above tranformation matrix! a l im = v z g r i d (0)! b l im = v z g r i d ( vz num)! DO i = 0 , n dim! WRITE (33 ,”(A1 , x , I3 ) ”) ’& ’ , i! DO vz = vz 0 , v z g r i d ( vz num) ,0.05! WRITE(33 ,”(F7 .4 , 3X, E10 .4 , 3X, E10 .4 , 3X, E10 .4 , 3X, E10 .4 , 3X,F8 .2 , 3X,F8.2 , 3X, E10 .4 , 3X, E10 .4 , 3X,F8 . 2 ) ”) vz , d i s t f u n c (1 ,0 , vz , v r saved ( : , 1 ) ) ,d i s t f u n c (1 ,0 , vz , v r saved ( : , 2 ) ) ! d i s t f u n c (2 ,1 , vz , v r saved ( : , i ) )! END DO! a = 0! temp = i n t e g r a t e (1 ,0 , a l im , b l im , 1 . 0 d0 , vr saved ( : , i ) )! WRITE(34 ,∗) i , temp! END DO!WRITE(14 ,∗) ’CHECK INVERSE OF VR’!CALL L INIT VALUES(MATMUL( vr saved , vr ) )!CALL DGEMM( ’N’ , ’N’ , n dim+1,n dim+1,n dim+1 ,1.0d0 , vr saved , n dim+1,vr , n dim+1 ,0.0d0 , c , n dim+1)!END DIAGONALIZATION ROUTINE113!˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜! y1 = MATMUL( l ma t sa f e , y )! f o r runge−ku t t a!WRITE(14 ,∗) ’L MAT & Y’!WRITE(14 , ’ (13(1pE9 .2 ,X) ) ’ ) ( y1 ( i ) / s q r t ( a l im ) , i =0,n dim)! y d e r i v = MATMUL( k mat , y )! f o r runge−ku t t a!WRITE(14 ,∗) ’KMAT & Y’!WRITE (14 , ’ (13(1pE9 .2 ,X) ) ’ ) ( y d e r i v ( i ) , i =0,n dim)! l1 mat= MATMUL(nu , b )! y1 = MATMUL( l1 mat , y )! f o r runge−ku t t a!WRITE(14 ,∗) ’Y, B, NU’!WRITE(14 , ’ (13(1pE9 .2 ,X) ) ’ ) ( y1 ( i ) , i =0,n dim)!WRITE(14 ,∗) ’nu ’!DO i = 0 ,100!WRITE(14 ,∗) nu( i , i )!END DOEND SUBROUTINE WIGNER WILKINSSUBROUTINE L INIT VALUES(x )USE IONMOBILITYIMPLICIT NONE! t h i s subrou t ine he l p s in p r i n t i n g out the va l u e s o f the matr ices t ha t arebe ing eva lua ted e l sewhere .! the format i s s e t up to the proper matrix form , to make i t e a s i e r to readthe matr icesCHARACTER ( len=10) fREAL( h ip rec ) , DIMENSION ( 0 : n dim , 0 : n dim ) : : xINTEGER : : i , jDO i = 0 , n dimWRITE(14 , ’ (13(E12.6 ,X) ) ’ ) ( x ( i , j ) , j =0,n dim )ENDDOEND SUBROUTINE114SUBROUTINE GAUSSWW ( n gauss , w gauss , x gauss , x1 , x2 )!USE MODULE INTEGRATEIMPLICIT NONE! This subrou t ine c a l l s on the i onmob i l i t y module which! d e s c r i b e s some o f the v a r i a b l e s used! This subrou t ine w i l l e v a l ua t e the po i n t s x gauss and! the we i gh t s w gauss! These we i gh t s and po i n t s w i l l be used the the! subrou t ine l i n i t , to approximate an i n t e g r a l used in! the e va l ua t i on o f the element in the K matrix .INTEGER,PARAMETER: : h ip rec = KIND( 0 . 0D0)REAL( h ip rec ) ,DIMENSION ( 1 : n gauss ) : : w gauss , x gauss! w gauss : the we i gh t s c a l c u l a t e d in t h i s subrou t ine! x gauss : the po i n t s c a l c u l a t e d in t h i s subrou t ineREAL( h ip rec ) : : x1 , x2 , z1 , p1 , p2 , pp , z , p3 , max val , min val! z1 :! p1 : the d e s i r ed Legendre po lynomia l! p2 : Legendre po lynomia l o f one lower order! pp : d e r i v a t i v e o f p1 : Legendre po lynomia l! z : c a l c u l a t i o n o f the l egendre po lynomia l at t h i s p a r t i c u l a r va l ue! p3 : po lynomia l t h a t i s two orders lower! max val : maximum va lue o f i n t e g r a t i o n! min va l : minimum va lue o f i n e g ra t i onINTEGER i , j , n gauss , mod calc ,m1! n gauss : the t o t a l number o f po i n t s used in the summation o f the in tegrand! mod calc : c a l c u l a t e s the mod o f n gauss! m1: s e t s a cond i t i on f o r the va l u e s o f n gauss to be usedREAL( h ip rec ) , PARAMETER: : eps = 1 .0D−15, p i = 3.1459265359 d0WRITE(15 ,∗ )”x1 = ” , x1 , ”x2 = ” , x2 , ”n gauss = ” , n gaussmod calc = mod ( n gauss , 2 )IF ( mod calc == 0)THENm1 = n gauss /2ELSEm1 = ( n gauss+1)/2END IF115max val = 0 .5 d0∗( x2+x1 )min val = 0 .5 d0∗( x2−x1 )DO i = 1 ,m1z = cos ( p i ∗(REAL( i )−0.25d0 ) /(REAL( n gauss ) +0.5d0 ) )z1 = 2 .0 d0DO WHILE (ABS( z−z1 )>eps )p1 = 1.0 d0p2 = 0.0 d0DO j = 1 , n gaussp3=p2p2=p1p1 =((2.0 d0∗REAL( j )−1.0d0 ) ∗z∗p2−(REAL( j )−1.0d0 ) ∗p3 ) /REAL( j )ENDDOpp = REAL( n gauss ) ∗( z∗p1−p2 ) /( z∗z−1.0d0 )z1 = zz = z1−p1/ppENDDOx gauss ( i ) = max val−min val ∗zx gauss ( n gauss+1−( i ) ) = max val+min val ∗zw gauss ( i )= 2 .0 d0∗min val / ( ( 1 . 0 d0−z∗z ) ∗pp∗pp )w gauss ( n gauss+1− i )= w gauss ( i )ENDDOWRITE(15 ,∗ )”points”WRITE(15 ,∗ ) ( x gauss ( j ) , j =1, n gauss )WRITE(15 ,∗ )”weights”WRITE(15 ,∗ ) ( w gauss ( j ) , j =1, n gauss )END SUBROUTINESUBROUTINE POLINT(xa , ya , x , y , dy )!USE nru t i l , ONLY: a s s e r t e q , iminloc , nerrorIMPLICIT NONE! This subrou t ine e va l ua t e s the d e r i v a t i v e s o f the moments at the mid−po in tbetween the f i r s t two po i n t s on the g r i d and the mid po in t between the twol a s t po i n t s on the g r i d .! t h i s i s an i n t e r p o l a t i o n to e va l ua t e t h e s e two po i n t s .! t h i s subrou t ine i s be ing used as a check to see i f the r e s u l t s ob ta ined ares im i l a r to those in the Andersen−Schu l e r (1964) paper .INTEGER,PARAMETER: : I4B = SELECTED INT KIND(9) , h ip rec= KIND( 0 . 0D0)REAL( h ip rec ) ,DIMENSION( : ) ,INTENT( in ) : : xa , yaREAL( h ip rec ) ,INTENT( in ) : : xREAL( h ip rec ) ,INTENT(out ) : : y , dy116!INTEGER( I4B) ,EXTERNAL: : a s s e r t e q , imin locINTEGER( I4B ) : : m, n , ns , nstepREAL( h ip rec ) ,DIMENSION( s ize ( xa ) ) : : c , d , den , hoINTERFACEFUNCTION IMINLOC( ar r )INTEGER,PARAMETER: : h ip rec = KIND( 0 . 0D0) , I4B = SELECTED INT KIND(9)REAL( h ip rec ) ,DIMENSION( : ) ,INTENT( in ) : : a r rEND FUNCTIONEND INTERFACEn = s ize ( xa )! n = a s s e r t e q ( s i z e ( xa ) , s i z e ( ya ) , ’ point ’ )c = yad = yaho = xa−xns = imin loc (ABS(x−xa ) )y = ya ( ns )ns = ns−1DO m = 1 ,n−1den ( 1 : n−m) = ho ( 1 : n−m)−ho(1+m: n)IF (ANY( den ( 1 : n−m) == 0.0 d0 ) ) THENCALL NERROR( ’ point : calculation fa i lure ’ )END IFden ( 1 : n−m) = ( c ( 2 : n−m+1)−d ( 1 : n−m) )/den ( 1 : n−m)d ( 1 : n−m) = ho(1+m: n) ∗den ( 1 : n−m)c ( 1 : n−m) = ho ( 1 : n−m) ∗den ( 1 : n−m)IF (2∗ ns < n−m) THENdy = c ( ns+1)ELSEdy = d( ns )ns = ns−1END IFy = y+dyENDDOEND SUBROUTINE POLINTFUNCTION IMINLOC( ar r )INTEGER,PARAMETER: : h ip rec = KIND( 0 . 0D0) , I4B = SELECTED INT KIND(9)REAL( h ip rec ) ,DIMENSION( : ) ,INTENT( in ) : : a r rINTEGER( I4B ) ,DIMENSION(1 ) : : iminINTEGER( I4B ) : : im in locimin=minloc ( ar r ( : ) )im in loc=imin (1)END FUNCTION IMINLOC117FUNCTION ASSERT EQ(nn , s t r i n g )CHARACTER( len=∗) ,INTENT( in ) : : s t r i n gINTEGER,DIMENSION( : ) ,INTENT( in ) : : nnINTEGER : : a s s e r t e qIF ( a l l (nn ( 2 : ) == nn (1) ) ) THENa s s e r t eqn = nn (1)ELSEWRITE(∗ ,∗ ) ’NERROR: an assert eq fa i l ed with this tag : ’ , s t r i n gSTOP ’program terminated by assert eqn ’END IFEND FUNCTION ASSERT EQSUBROUTINE NERROR( s t r i n g )CHARACTER( len=∗) ,INTENT( in ) : : s t r i n gWRITE (∗ ,∗ ) ’ nerror : ’ , s t r i n gSTOP ’program terminated by nerror ’END SUBROUTINE NERRORSUBROUTINE EVAL CHIUSE MODULECROSSECIMPLICIT NONEREAL( h ip rec ) : : e r ro r , alpha , ch i v a l , t h e t a v a lREAL( h ip rec ) ,EXTERNAL: : e l l i p t i cINTEGER i , j , j l , j uINTERFACESUBROUTINE POLINT(xa , ya , x , y , dy )INTEGER, PARAMETER: : h ip rec = KIND( 0 . 0D0)REAL( h ip rec ) ,DIMENSION( : ) : : xa , yaREAL( h ip rec ) : : x , y , dyEND SUBROUTINEEND INTERFACEALLOCATE( theta ( 0 : 1000 ) )ALLOCATE( ch i ( 0 : 1000 ) )ALLOCATE( c r o s s f u n c ( 0 : 1000 ) )! f i r s t determine the mapping between ch i and th e t aOPEN (42 , FILE = ”chi values”)ch i = 0 .0 d0theta = 0 .0 d0i = 0write (42 ,∗ ) theta (0) , ch i ( 0 )DO t h e t a v a l = 0.001 d0 , p i /4 .0 d0 , 0 . 001 d0118i = i+1theta ( i ) = th e t a v a lch i ( i ) = pi − 2 .0 d0∗ s q r t ( cos ( 2 . 0 d0∗ theta ( i ) ) ) ∗ e l l i p t i c ( cos ( theta ( i ) ) , 1 . 0 d0 )write (42 ,∗ ) theta ( i ) , ch i ( i )ENDDOn va l = i+1theta ( n va l ) = pi /4 .0 d0ch i ( n va l ) = piwrite (42 ,∗ ) theta ( n va l ) , ch i ( n va l )CLOSE(42)! now f i l l c r o s s f unc wi th va l u e s needed f o r the cross s e c t i on c a l c u l a t i o n! use a uni formly spaced ch i g r i d f o r t h i salpha = 20.00 d0n ch i = 100dch i = pi / f l o a t ( n ch i )do i = 1 , n ch i−1c h i v a l = f l o a t ( i )∗ dch i!! f i n d ch i va l ue in ch i array!j = n va lDO WHILE ( ch i ( j ) > c h i v a l )j = j − 1ENDDOj l = max(0 , j−4)j u = min( n val , j +4)!! i n t e r p o l a t e va l ue o f t h e t a from the ch i and th e t a arrays!CALL POLINT( ch i ( j l : j u ) , theta ( j l : j u ) , c h i v a l , th e ta va l , e r r o r )!! use t h e t a and ch i va l u e s to c a l c u l a t e c r o s s s e c t i o n func t i on va l u e s!c r o s s f u n c ( i ) = sq r t ( cos ( 2 . 0 d0∗ t h e t a v a l ) ) / s i n ( c h i v a l ) / s i n ( 2 . 0 d0∗ t h e t a v a l) /( ( cos ( t h e t a v a l ) ) ∗∗2∗ e l l i p t i c ( cos ( t h e t a v a l ) , 1 . 0 d0 )−cos ( 2 . 0 d0∗t h e t a v a l ) ∗ e l l i p t i c ( cos ( t h e t a v a l ) , ( cos ( t h e t a v a l ) ) ∗∗2) )!! now add damping f a c t o r to make forward s c a t t e r i n g cross s e c t i on f i n i t e!! wr i t e (58 ,∗) c h i v a l /pi , c r o s s f unc ( i ) , tanh ( a lpha ∗ c h i v a l ∗∗2.5 d0 ) ∗c ro s s f unc ( i )write (58 ,∗ ) ch i v a l , c r o s s f u n c ( i ) , tanh ( alpha ∗ c h i v a l ∗∗2.5 d0 ) ∗ c r o s s f u n c ( i)119c r o s s f u n c ( i ) = tanh ( alpha∗ c h i v a l ∗∗2.5 d0 ) ∗ c r o s s f u n c ( i )end do! add ana l y t i c va l u e s at endpo in t sc r o s s f u n c (0) = sq r t ( 3 . 0 d0∗pi ) /4 .0 d0∗ alphac r o s s f u n c ( n ch i ) = (1 . 0 d0/ e l l i p t i c (1/ sq r t ( 2 . 0 d0 ) , 1 . 0 d0 ) ) ∗∗2! wr i t e (58 ,∗) p i /pi , c r o s s f unc ( n ch i )write (58 ,∗ ) pi , c r o s s f u n c ( n ch i )! wr i t e (58 ,∗) 0 .0 d0/pi , c r o s s f unc (0)write (58 ,∗ ) 0 .0 d0 , c r o s s f u n c (0)! now f i l l ch i array wi th va l u e s matching those o f c ro s s f uncch i = 0 .0 d0do i = 0 , n ch ich i ( i ) = f l o a t ( i ) ∗ dch iend doEND SUBROUTINE EVAL CHIA.3 FunctionsFUNCTION INTEGRATE( f lag1 , f l ag2 , a , b , z , c o e f f )USE IONMOBILITYIMPLICIT NONE! This f unc t i on t e s t s whether i n t e r v a l f o r i n t e g r a t i o n i s g r ea t e r than one un i ton the v e l o c i t y g r i d .! I f so , loop breaks down i n t e r va l , so t ha t i n t e g r a t i o n i s done over 1 un i t ata time .! I t then adds va l u e s o f integrand , to g i v e a f i n a l va l ue f o r g i ven l im i t s o fi n t e g r a t i o n .!We a l s o have 0.5 i n t e r v a l s because o f the s p e c i a l c ond i t i on s we have addedtha t i n vo l v e the mid−po i n t s between 0 and 1 and n dim−1 and n dim .! For t h i s case i n t e g r a t i o n i s ca r r i e d out over h a l f an i n t e r v a l w i th in g i venl im i t s , and then va l u e s are added to g i v e a number f o r g i ven l i m i t s o fi n t e g r a t i o n .REAL( h ip rec ) : : a , b , i n t e g r a t e , z , a1 , b1! a/b : lower /upper l im i t s o f i n t e g r a t i o n i n t e r v a l t h a t are passed from prev i oussubrou t ine! a1/b1 : newer lower/ upper l i m i t s o f i n t e g r a t i o n tha t are passed on to nextf unc t i onLOGICAL done120INTEGER f l ag1 , f l ag2 , index! index : c a l c u l a t e s index o f the po in t on l e f t o f the a on v e l o c i t y g r i dREAL( h ip rec ) ,DIMENSION( 0 : n dim ) ,INTENT(OUT) : : c o e f fREAL( h ip rec ) , EXTERNAL: : i n t i n t e r v a lIF ( a < v z g r i d (0) ) THEN! checks to make sure t ha t beg inn ing on the i n t e r v a l f o r i n t e g r a t i o n i s notl e s s than beg inn ing o f g r i d .WRITE(∗ ,∗ ) ”ERROR: CHECK INTERVALS FOR INTEGRATION”STOPEND IF! r e turns error i f above ana l y s i s f a i l s! i f a l l i s w e l l wi th an a l y s i s done above , f unc t i on cont inues in check ingi n t e r v a l f o r i n t e g r a t i o nindex = INT( ( a−v z g r i d (0) ) /dvz ) + 1a1 = ab1 = vz g r i d ( index )IF ( b1 > b) THENb1 = bdone = .TRUE.ELSEdone = .FALSE.END IFi n t e g r a t e = i n t i n t e r v a l ( f l ag1 , f l ag2 , a1 , b1 , z , c o e f f )! wr i t e (32 ,∗) ’ saheba1 ’ , a1 , b1 , i n t e g r a t ea1 = b1DO WHILE(NOT( done ) )IF (b−a1 > dvz ) THENindex = index+1b1 = vz g r i d ( index )! wi th f o l l ow i n g c a l l to f unc t i on i n t e g ra t e2 , we are e va l ua t i n g gauss ian po i n t sand we i gh t s f i r s t f o r the s e t i n t e r v a l us ing va l u e s o f a and b .! t h i s preven ts gauss ian po i n t s and we i gh t s to be re−eva lua ted r ep ea t ed l y andcan be use f o r e n t i r e loop as long as a and b do not change .i n t e g r a t e = i n t e g r a t e + i n t i n t e r v a l ( f l ag1 , f l ag2 , a1 , b1 , z , c o e f f )!WRITE(32 ,∗) a1 , b1 , i n t e g r a t ea1 = b1ELSEb1 = bi n t e g r a t e = i n t e g r a t e + i n t i n t e r v a l ( f l ag1 , f l ag2 , a1 , b1 , z , c o e f f )!WRITE(32 ,∗) ’ saheba ’ , a1 , b1 , i n t e g r a t edone = .TRUE.END IFENDDO121END FUNCTION INTEGRATEFUNCTION INT INTERVAL( f lag1 , f l ag2 , a , b , z , c o e f f )USE IONMOBILITYUSE INTEGRATEGAULAGUSE MODULE INTEGRATEIMPLICIT NONE! t h i s subrou t ine has d i f f e r e n t scenar i os where k e rne l i s eva l ua ted in! f space : f ( x ) = 1! gspace : f ( x ) = 2∗ s q r t ( p i /x ) ∗ exp(−x ) ∗g ( x ) ; where g ( x ) = 1! hspace : f ( x ) = 2∗ s q r t ( p i /x ) ∗ exp(−h ( x ) ) ; where h ( x ) = xREAL( h ip rec ) : : a , b , wgt , pt , j , i n t i n t e r v a l , integrand , i n t e g r and l a s t , z , moment val, moment val last , x , k mat y! a : upper l im i t o f i n t e g r a t i o n! b : lower l im i t o f i n t e g r a t i o nREAL( h ip rec ) , EXTERNAL: : k matrix , d i s t f un c , b sp l i n e3! b s p l i n e3 : e x t e rna l f unc t i on tha t con ta ins the e xp r e s s i on s f o r the b s p l i n ef unc t i ons , t h e i r f i r s t and second d e r i v a t i v e sREAL( h ip rec ) ,DIMENSION( 0 : n dim ) ,INTENT(OUT) : : c o e f fINTEGER f l ag1 , f l ag2 , k , i , f l ag3 , n , n max gauss checkLOGICAL doneSELECT CASE( f l a g 1 )CASE (−1)! e v a l ua t e s gauss ian po i n t s and we i gh t s f o r g i ven l i m i t s o f i n t e g r a l .! we avoid re−e va l ua t i on o f po i n t s and we i gh t f o r same i n t e r v a l .! a = 0.0 d0! b = 1.0 d0! above va l u e s f o r a and b are e x p l i c i t l y def ined , to ensure t ha t po i n t s andwe i gh t s are eva l ua ted f o r a gener i c i n t e r v a l o f 0 to 1! t h e s e are then s ca l e d l a t e r on depending on i n t e r v a l we want to e va l ua t e thein tegrands overDO n = 1 , n max gaussnpt s gauss (n) = 2∗∗(n+2)CALL GAUSSWW( npt s gauss (n) , w gauss (n , : ) , x gauss (n , : ) , a , b)ENDDOCASE(−2)DO n = 1 , n max gaulagnpt s gau lag (n) = 2∗∗(n+2)CALL GAULAG( x gau lag (n , : ) , w gaulag (n , : ) , 0 . 0 d0 , np t s gau lag (n) )ENDDOCASE(1 )!MOMENT CALCULATION122! f l a g 2 = order o f moment!moment c a l c u l a t i o n in f spaceIF ( spc == 1) THENf l a g 3 = 1ELSE IF ( spc == 2)THENf l a g 3 = 2IF ( z < 0 .0 d0 ) THENf l a g 3 = 1! n e ga t i v e z means c a l c u l a t e moment in na t i v e spaceEND IFELSE IF ( spc == 3) THENf l a g 3 = 3IF ( z < 0 .0 d0 ) THENf l a g 3 = 1END IFELSE IF ( spc == 4) THENf l a g 3 = 4IF ( z < 0 .0 d0 ) THENf l a g 3 = 1END IFELSE IF ( spc == 5 .OR. spc == 6 .OR. spc == 7 .OR. spc == 10 .OR. spc == 11)THENf l a g 3 = 5IF ( z < 0 .0 d0 ) THENf l a g 3 = 1END IFEND IFmoment val last = 0 .0 d0DO n = 1 , n max gaussmoment val = 0 .0 d0DO k = 1 , npt s gauss (n)pt = x gauss (n , k ) ∗(b−a )+awgt = w gauss (n , k ) ∗(b−a )! p o i n t s and we i gh t s are s ca l e d depending on i n t e r v a l o f i n t e g r a l e va l ua t i onmoment val = moment val + wgt∗( pt∗∗ f l a g 2 ) ∗ d i s t f u n c ( f l ag3 , 0 , pt , c o e f f )! e v a l ua t e moments at d i f f e r e n t po i n t s as eva l ua ted by gauss−l e gendresubrou t ineENDDO!WRITE(18 ,∗) a , b , np t s gauss (n) ,moment vali f ( ( abs ( ( moment val − moment val last ) /moment val ) < 1 .0 d−13 ) . or .( abs ( moment val − moment val last ) < 1 .0 d−14 ) ) exit! t h i s t e s t checks the convergence o f the in tegrands .! we can s e t t o l e r ance to any de s i r ed va lue . So f a r t o l e r ance i s s u f f i c i e n tf o r doub l e p r e c i s i on va l u e s .moment val last = moment val123!WRITE(18 ,∗) n , moment valENDDOi n t i n t e r v a l = moment valIF (n == n max gauss+1) THEN!WRITE(19 ,∗) ”Value not converged ” , ” f l a g 1 = ” , f l a g1 , ” i = ” , i , ” a = ” ,a , ”b = ” , b , ” j = ” , j! a l i t t l e t e s t does show tha t once the loop i s complete , we would haven max gauss+1 as the l a s t va lue , hence we can use the above t e s t to checkwhether converged va lue i s appropr i a teEND IF!WRITE (18 ,”(A1) ”) ’& ’CASE(2 )! e v a l ua t i on o f i n t e g r a l s in f−space , when spc ( de f i ned in the inpu t ) e qua l s 1! g−space i n t e g r a t i o n o f k e rne l when spc = 2! i n t e g r a t i o n in both cases i s done wi th r e sp e c t to v a r i a b l e xIF ( spc == 3) THENWRITE(∗ ,∗ ) ”ERROR: WEARE IN CASE 2 IN INT INTERVAL!”STOPEND IF! IF ( spc == 1 )THEN! f l a g 3 = 1!ELSE IF ( spc == 2) THEN! f l a g 3 = 2!ELSE IF ( spc == 4) THEN! f l a g 3 = 4!ELSE IF ( spc == 5) THEN! f l a g 3 = 5!ELSE IF ( spc == 6) THEN! f l a g 3 = 6!ELSE IF ( spc == 7) THEN! f l a g 3 = 7!ELSE IF ( spc == 9) THEN! f l a g 3 = 9!ELSE IF ( spc == 10) THEN! f l a g 3 = 10!END IFi n t e g r an d l a s t = 0 .0 d0! IF ( z < 1.0d−14) THEN! n max gauss check = n max gauss!ELSE! n max gauss check = 4!END IFDO n = 1 , n max gauss124!DO n = 1 , n max gauss checkin tegrand = 0.0 d0DO k = 1 , npt s gauss (n)wgt = w gauss (n , k ) ∗(b−a )pt = x gauss (n , k ) ∗(b−a )+ax = ( pt − v z g r i d (0) ) /dvz − REAL( f l a g 2 )! f l a g 2 c a r r i e s the index o f the s p l i n ein tegrand = integrand + wgt∗k matrix ( spc , pt , z , c o e f f ) ∗ b sp l i n e3 (0 , x )!WRITE(38 ,∗) pt , wgt , z , i n tegrandENDDO! WRITE(19 ,∗) np t s gauss (n) , i n tegrand ! , ” gauss”!WRITE(19 , ’ ( f 8 . 3 , 3X,F8 .3 , 3X, I3 , 3X, E15 . 9 ) ’ ) a , b , n , i n tegrandIF ( ( abs ( ( integrand − i n t e g r an d l a s t ) / integrand ) < 1 .0 d−9 ) .OR.( abs ( integrand − i n t e g r an d l a s t ) < 1 .0 d−14 ) ) EXITi n t e g r an d l a s t = integrandENDDOi n t i n t e r v a l = integrandIF (n == n max gauss+1) THEN!WRITE(19 ,∗) ”Value not converged ” , ” s p l i n e index = ” , f l a g2 , ”a = ” ,a , ” b= ” , b , ”y = ” , zEND IFCASE (3 )! t h i s case i s f o r i n t e g r a t i o n o f j u s t the k e rne l by i t s e l f , wi th r e sp e c t to y! no b s p l i n e f unc t i on s are used in i n t e g ra t i on , and po i n t s and we i gh t s o f gauss−l e gendre quadrature are used .! IF ( spc == 1) THENIF ( spc == 1 .OR. spc ==2 .OR. spc == 3 .OR. spc ==4) THENf l a g 3 = 1ELSE IF ( spc == 5 .OR. spc == 6 .OR. spc == 7) THENf l a g 3 = 8ELSE IF ( spc == 9 .OR. spc == 10 .OR. spc == 11) THENf l a g 3 = 9END IFi n t e g r an d l a s t = 0 .0 d0! IF ( z < 1.0d−14) THEN! n max gauss check = n max gauss!ELSE! n max gauss check = 4!END IFDO n = 1 , n max gauss ! uses the f u l l 512 po i n t s in the i n t e g r a t i o n . . s e t inmodu l e in tegra te!DO n = 1 , n max gauss checkin tegrand = 0.0 d0DO k = 1 , npt s gauss (n)wgt = w gauss (n , k ) ∗(b−a )125pt = x gauss (n , k ) ∗(b−a )+aintegrand = integrand + wgt∗k matrix ( f l ag3 , z , pt , c o e f f )! t h i s i n t e g r a t i o n f o r nu matrix i s done using f i r s t case in k matr i x!make the change f o r the in tegrand c a l l us ing the spc == 5 and s e t the f l a g toa v a r i a b l e .ENDDO!WRITE(19 ,”( i5 , 1 x , 1 pd20 .12 ,1 x , f10 . 4 , 1 x , f10 . 4 ) ”) np t s gauss (n) , integrand ,a , bIF ( ( abs ( ( integrand − i n t e g r an d l a s t ) / integrand ) < 1 .0 d−9 ) .OR. (abs ( integrand − i n t e g r an d l a s t ) < 1 .0 d−14 ) ) EXITi n t e g r an d l a s t = integrandENDDOi n t i n t e r v a l = integrandIF (n == n max gauss+1) THEN!WRITE(19 ,∗) ”Value not converged ” , ” f l a g 1 = ” , f l a g1 , ” i = ” , i , ” a = ” ,a , ”b = ” , b , ” j = ” , jEND IFCASE(4 )! t h i s i s the e va l ua t i on o f i n t e g r a l s in the h−spacei n t e g r an d l a s t = 0 .0 d0DO n = 1 , n max gaussintegrand = 0.0 d0DO k = 1 , npt s gauss (n)wgt = w gauss (n , k ) ∗(b−a )pt = x gauss (n , k ) ∗(b−a )+aintegrand = integrand + wgt∗k matrix (3 , pt , z , c o e f f )ENDDO!WRITE(19 ,∗) np t s gauss (n) , i n tegrandIF ( ( abs ( ( integrand − i n t e g r an d l a s t ) / integrand ) < 1 .0 d−13 ) .OR. ( abs (integrand − i n t e g r an d l a s t ) < 1 .0 d−14 ) ) EXITi n t e g r an d l a s t = integrandENDDOi n t i n t e r v a l = integrandIF (n == n max gauss+1) THEN!WRITE(19 ,∗) ”Value not converged ” , ” f l a g 1 = ” , f l a g1 , ” i = ” , i , ” a = ” ,a , ” b= ” , b , ” j = ” , jEND IFEND SELECTEND FUNCTION INT INTERVALRECURSIVE FUNCTION KMATRIX(a , x , x1 , c o e f f ) RESULT( k mat r i x c a l c )!FUNCTION K MATRIX(a , x , y , c o e f f )USE IONMOBILITYUSE MODULE INTEGRATEIMPLICIT NONE126! This i s a funct ion , t ha t has the d i f f e r e n t e xp r e s s i on s f o r the 4 d i f f e r e n ti n t e g r a l s we are using , t ha t make up the Wigner Wi lk ins k e rne l .! Case 1 i s the form of the expres s i on f o r the i n i t i a l funct ion , g ( x )=1! Case 2 i s the form of the expres s i on f o r the i n i t i a l funct ion , g ( x )=exp(−x )! A l l v a l e s are in doub l e p r e c i s i onREAL( h ip rec ) : : pt , wgt , j , k matrix1 , k matrix2 , x , a l im , b l im , add , d i f f , constant , b ,integrand , i n t e g r and l a s t , vz n , yval , xval , f11 , f22 , f12 , f21 , constant1 ,constant2 , de l tax , k mat r ix ca l c , x1!REAL( h iprec ) : : k matr ix7REAL( h ip rec ) ,DIMENSION( 0 : n dim ) : : c o e f fINTEGER i , a , k , n! i n t e g e r a s e l e c t s the case according to the i n i t i a l f unc t i on! i n t e g e r n s e l e c t s the in tegrand expres s i on tha t needs to eva l ua tedREAL( h ip rec ) , EXTERNAL: : b sp l i n e 3! This i s an ex t e rna l f unc t i on tha t the d i f f e r e n t e xp r e s s i on s f o r the t h i r dorder b s p l i n e funcyion .DOUBLE PRECISION, EXTERNAL: : e r f , d i s t f un c , integra lw , b i l i n e a r , F 2SELECT CASE ( a )CASE(1 )! f−space k e rne lIF (ABS(x ) < 1 .0 d−12) THENk mat r i x c a l c = 2 .0 d0∗ c o l f r e q ∗q∗q/ sq r t (m)∗exp ( −q∗q∗x1 )! l im i t o f x going to zeroELSEk matrix1 = e r f ( q∗ s q r t ( x1 ) + r ∗ s q r t ( x ) ) + exp (x−x1 ) ∗ e r f ( r ∗ s q r t ( x1 ) +q∗ s q r t ( x ) )k matrix2 = e r f ( q∗ s q r t ( x1 ) − r ∗ s q r t ( x ) ) + exp (x−x1 ) ∗ e r f ( r ∗ s q r t ( x1 ) −q∗ s q r t ( x ) )IF ( x > x1 ) THENk mat r i x c a l c = c o l f r e q ∗q∗q /2 .0 d0∗ s q r t ( p i /x )∗&( k matrix1 + k matrix2 )ELSEk mat r i x c a l c = c o l f r e q ∗q∗q /2 .0 d0∗ s q r t ( p i /x )∗&( k matrix1 − k matrix2 )END IFEND IF127CASE(2 )! g−space k e rne lIF (ABS( x1 ) < 1 .0 d−12) THENk mat r i x c a l c = 2 .0 d0∗ c o l f r e q ∗q∗q/ sq r t (m)∗exp ( −q∗q∗x )ELSEk matrix1 = exp (x1−x) ∗( e r f ( q∗ s q r t ( x1 ) + r ∗ s q r t ( x ) ) ) + e r f ( r ∗ s q r t ( x1) + q∗ s q r t ( x ) )k matrix2 = exp (x1−x) ∗( e r f ( q∗ s q r t ( x1 ) − r ∗ s q r t ( x ) ) ) + e r f ( r ∗ s q r t ( x1) − q∗ s q r t ( x ) )IF ( x > x1 ) THENk mat r i x c a l c = c o l f r e q ∗q∗q /2 .0 d0∗ s q r t ( p i /x1 )∗&( k matrix1 + k matrix2 )ELSEk mat r i x c a l c = c o l f r e q ∗q∗q /2 .0 d0∗ s q r t ( p i /x1 )∗&( k matrix1 − k matrix2 )END IFEND IFCASE(3 )! h−space k e rne lIF (ABS( x1 ) < 1 .0 d−12) THENk mat r i x c a l c = 2 .0 d0∗ c o l f r e q ∗q∗q/ sq r t (m) ∗( exp ( d i s t f u n c ( 1 , 0 , 0 . 0 d0 ,c o e f f )−d i s t f u n c (1 ,0 , x , c o e f f ) − r ∗ r ∗x) )ELSEk matrix1 = exp ( d i s t f u n c (1 ,0 , x1 , c o e f f )−d i s t f u n c (1 ,0 , x , c o e f f ) )∗&(&e r f ( q∗ s q r t ( x1 ) + r ∗ s q r t ( x ) ) + exp ( x−x1 ) ∗ e r f ( r ∗ s q r t (x1 ) + q∗ s q r t ( x ) )&)k matrix2 = exp ( d i s t f u n c (1 ,0 , x1 , c o e f f )−d i s t f u n c (1 ,0 , x , c o e f f ) )∗&(&e r f ( q∗ s q r t ( x1 ) − r ∗ s q r t ( x ) ) + exp (x−x1 ) ∗ e r f ( r ∗ s q r t ( x1 )− q∗ s q r t ( x ) )&)IF ( x > x1 ) THENk mat r i x c a l c = c o l f r e q ∗q∗q ∗0 .5 d0∗ s q r t ( p i /x1 )∗&( k matrix1 + k matrix2 )ELSEk mat r i x c a l c = c o l f r e q ∗q∗q ∗0 .5 d0∗ s q r t ( p i /x1 )∗&( k matrix1 − k matrix2 )END IFEND IF128CASE(4 )IF (ABS( x1 ) < 1 .0 d−12) THENk mat r i x c a l c = 2 .0 d0∗ c o l f r e q ∗q∗q/ sq r t (m) ∗exp(−r ∗ r ∗x)ELSEk matrix1 = e r f ( q∗ s q r t ( x1 ) + r ∗ s q r t ( x ) ) + exp (x−x1 ) ∗ e r f ( r ∗ s q r t ( x1) + q∗ s q r t ( x ) )k matrix2 = e r f ( q∗ s q r t ( x1 ) − r ∗ s q r t ( x ) ) + exp (x−x1 ) ∗ e r f ( r ∗ s q r t ( x1) − q∗ s q r t ( x ) )IF ( x > x1 ) THENk mat r i x c a l c = c o l f r e q ∗q∗q ∗0 .5 d0∗ s q r t ( p i /x1 )∗&( k matrix1 + k matrix2 )ELSEk mat r i x c a l c = c o l f r e q ∗q∗q ∗0 .5 d0∗ s q r t ( p i /x1 )∗&( k matrix1 − k matrix2 )END IFEND IFCASE(5 )! the genera l case k e rne lIF (ABS(x ) < 1 .0 d−12) THENk mat r i x c a l c = 0 .0 d0ELSE IF (ABS( x1 ) < 1 .0 d−12) THENk mat r i x c a l c = (2 . 0 d0∗ c o l f r e q ∗q∗q/ sq r t (m) ) ∗exp(−r ∗ r ∗x) ∗ i n t egra lw ( 0 . 0 d0 ,x , 0 . 0 d0 )ELSEi n t e g r an d l a s t = 0 .0 d0constant = ( c o l f r e q ∗q∗q/ sq r t (m∗x1 ) ) ∗exp ( ( q−r ) ∗( r ∗x−q∗x1 ) )a l im = ABS( sq r t ( x )−s q r t ( x1 ) )b l im = sq r t ( x )+sq r t ( x1 )!DO n = 4 ,4DO n = 1 , n max gaussintegrand = 0.0 d0DO k = 1 , npt s gauss (n)wgt = w gauss (n , k ) ∗( b l im−a l im )pt = x gauss (n , k ) ∗( b l im−a l im )+a l imintegrand = integrand + wgt∗ constant ∗exp(−q∗ r ∗pt∗pt ) ∗ i n t egra lw ( pt ,x , x1 )ENDDOi f ( (n > 1) .AND. ( ( abs ( ( integrand − i n t e g r an d l a s t ) / integrand ) <1 .0 d−10 ) . or . ( abs ( integrand − i n t e g r an d l a s t ) < 1 .0 d−14 ) ) )exiti n t e g r an d l a s t = integrand!WRITE(57 , ’ (E15 .9 , 3X, E15 .9 , 3X, I3 , 3X, E15 . 9 ) ’ ) x , x1 , n , i n tegrandENDDOk mat r i x c a l c = integrand129! s topIF (n == n max gauss + 1) THEN! WRITE(19 ,∗) ”KMAT CASE: 5 VALUE NOT CONVERGED”END IFEND IFCASE(6 )! e v a l ua t i on o f the kmatr ix f o r the Maxwell molecu le and the genera l casesmooth sphere! can a l s o be eva l ua ted using case 5 above , but i t would take a l o t l onger torun the c a l c u l a t i o n s! spc = 6! t h e s e arrays are the ones eva l ua ted by the k mat ca l c program , and c r ea t e sthe arrays o f a r b i t r a r y va l u e s! t h e s e arrays are used to i n t e r p o l a t e the va l ue to be used in the c a l c u l a t i o no f the in tegrandsi = INT( ( x−kmat vz 0 ) /kmat dvz )k = INT( ( x1−kmat vz 0 ) /kmat dvz )xval = x − kmat x val ( i )yval = x1 − kmat y val ( k )IF ( i < 0) THENi = 0END IFIF ( i >= kmat vz num) THENi = kmat vz num − 1END IFIF ( k < 0) THENk = 0END IFIF ( k >= kmat vz num) THENk = kmat vz num−1END IF! the above i nd i c e s are eva l ua ted based on the va l u e s o f x and y tha t arepassed in , to i d e n t i f y which e lements in the arrays shou l d be used f o ri n t e r p o l a t i o nconstant = ( c o l f r e q ∗q∗q/ sq r t (m∗x1 ) ) ∗exp ( ( q−r ) ∗( r ∗x−q∗x1 ) )constant1 = log ( constant )IF ( i == k) THEN! i n t e r p o l a t i o n above or below the d i agona l but not c ro s s i n g the d i agona l duethe presence o f the cusp! uses 3 po i n t s in 2D f o r i n t e r p o l a t i o n130IF ( i == 0 .AND. yval > xval ) THENconstant = ( c o l f r e q ∗q∗q/ sq r t (m∗kmat y val (1 ) ) ) ∗exp ( ( q−r ) ∗( r ∗x−q∗kmat y val (1 ) ) )constant1 = log ( constant )! t r i a n g l e below the d i agona lf11 = 0 .0 d0f12 = k mat val ( i , k+1)f21 = 0 .0 d0f22 = constant ∗ k mat val ( i +1,k+1)k mat r i x c a l c = exp ( b i l i n e a r (1 , xval , yval , f11 , f12 , f21 , f22 ) )ELSE IF ( i == 0 .AND. xval >= yval ) THENconstant = ( c o l f r e q ∗q∗q/ sq r t (m∗kmat y val (1 ) ) ) ∗exp ( ( q−r ) ∗( r ∗x−q∗kmat y val (1 ) ) )constant1 = log ( constant )f11 = k mat val ( i , k )f12 = k mat val ( i +1,k )f21 = 0 .0 d0f22 = constant ∗exp ( k mat val ( i +1,k+1) )k mat r i x c a l c = b i l i n e a r (1 , xval , yval , f11 , f12 , f21 , f22 )ELSE! case f o r a l l o ther po i n t s a long the d i agona lIF ( xval >= yval ) THENf11 = k mat val ( i , k )f12 = k mat val ( i +1,k )f21 = 0 .0 d0f22 = k mat val ( i +1,k+1)ELSEf11 = k mat val ( i +1,k+1)f12 = k mat val ( i , k )f21 = 0 .0 d0f22 = k mat val ( i , k+1)! t h i s i s an excep t i on f o r the no ta t i on beacuse o f the v a r i a b l e s used in theformula in b i l i n e a r . f90! the va l ue o f f21 i s what i s used in the i n t e r p o l a t i o nEND IFk mat r i x c a l c = constant1+b i l i n e a r (1 , xval , yval , f11 , f12 , f21 , f22 )k mat r i x c a l c = exp ( k mat r i x c a l c )131END IF! normal b i l i n e a r i n t e r p o l a t i o n in 2D using 4 po i n t sELSEIF ( k == 0) THEN! s p e c i a l case f o r the f i r s t row o f the matrix t ha t i s eva l ua ted when theva lue o f y i s 0! t h e r e f o r e the f i r s t row in the matrix i s eva l ua ted wi th a l im i t i n g case andt h e r e f o r e needs to be d e a l t wi th a s p e c i a l case f o r i n t e r p o l a t i o nconstant = ( c o l f r e q ∗q∗q/ sq r t (m∗kmat y val (1 ) ) ) ∗exp ( ( q−r ) ∗( r ∗x−q∗kmat y val (1 ) ) )constant1 = log ( constant )f11 = k mat val ( i , 0 )f12 = constant ∗( exp ( k mat val ( i , 1 ) ) )f21 = k mat val ( i +1 ,0)f22 = constant ∗( exp ( k mat val ( i +1 ,1) ) )k mat r i x c a l c = b i l i n e a r (2 , xval , yval , f11 , f12 , f21 , f22 )ELSE IF ( i == 0) THEN! s p e c i a l case f o r the l im i t o f x approaching 0 , t h e r e f o r e in the k mat va lmatrix t h i s corresponds to the f i r s t column tha t i s eva l ua ted to be a l lz e roesconstant = ( c o l f r e q ∗q∗q/ sq r t (m∗x1 ) ) ∗exp ( ( q−r ) ∗( r ∗kmat x val (1 )−q∗x1 ) )f11 = k mat val ( i , k )f12 = k mat val ( i , k+1)f21 = exp ( k mat val ( i +1,k ) )f22 = exp ( k mat val ( i +1,k+1))k mat r i x c a l c = constant ∗ b i l i n e a r (2 , xval , yval , f11 , f12 , f21 , f22 )ELSE! f o r a l l o ther po i n t s and e lements in the k mat va l matrixf11 = k mat val ( i , k )f12 = k mat val ( i , k+1)f21 = k mat val ( i +1,k )f22 = k mat val ( i +1,k+1)k mat r i x c a l c = constant1+b i l i n e a r (2 , xval , yval , f11 , f12 , f21 , f22 )! k matr i x = cons tan t ∗ b i l i n e a r (2 , xva l , yva l , f11 , f12 , f21 , f22 )k mat r i x c a l c = exp ( k mat r i x c a l c )END IFEND IF! WRITE(56 ,∗) x , x1 , f11 , f12 , f21 , f22 , k ma t r i x ca l c132!WRITE(56 ,∗) cons tan t ∗ exp ( f11 ) , cons tan t ∗ exp ( f12 ) , cons tan t ∗ exp ( f21 ) ,cons tan t ∗ exp ( f22 )!WRITE(56 ,∗) xva l , yva l , k matr i x! s topCASE(7 )! t h i s i s a hybr i d case f o r e va l ua t i n g the k matr i x! t h i s w i l l c a l l case 5 or case 6 depending on the va l u e s o f x and y! i t w i l l e v a l ua t e va l u e s around the d i agona l o f the matrix us ing case 5 andthe r e s t us ing case 6i = INT( ( x−kmat vz 0 ) /kmat dvz )k = INT( ( x1−kmat vz 0 ) /kmat dvz )IF ( i < 0) THENi = 0END IFIF ( i >= kmat vz num) THENi = kmat vz num−1END IFIF ( k < 0) THENk = 0END IFIF ( k >= kmat vz num) THENk = kmat vz num−1END IFIF ( abs (k−i ) < 10) THEN! e v a l ua t i on o f the k matr i x w i th in the band around the d i agona l! o f course once again onlyk mat r i x c a l c = k matrix (5 , x , x1 , c o e f f )ELSE! e v a l ua t i on o f the k matr i x everywhere e l s e in the matrixk mat r i x c a l c = k matrix (6 , x , x1 , c o e f f )END IF! k matr ix1 = k matr i xCASE(8 )! f−space f ormu la t i on f o r the genera l k e rne l! c a l c u l a t i o n o f the nu matrix f o r spaces 5 ,6 ,7! uses the genera l k e rne l wi th the s q r t ( x ) f a c t o r inc l uded in i t! i n t e g r a t i o n i s done over the v a r i a b l e y! x and y v a r i a b l e are sw i tched around! t h i s w i l l use case 2 in i n t e g ra lw f o r the f requency c a l c u l a t i o nIF (ABS(x ) < 1 .0 d−12) THEN133k mat r i x c a l c = (2 . 0 d0∗ c o l f r e q ∗q∗q/ sq r t (m) ) ∗exp(−q∗q∗x1 ) ∗ i n t egra lw ( 0 . 0d0 , x1 , 0 . 0 d0 )ELSE IF (ABS( x1 ) < 1 .0 d−12) THENk mat r i x c a l c = 0 .0 d0ELSEi n t e g r an d l a s t = 0 .0 d0constant = ( c o l f r e q ∗q∗q/ sq r t ( x∗m) ) ∗exp ( ( q−r ) ∗( r ∗x−q∗x1 ) )a l im = ABS( sq r t ( x )−s q r t ( x1 ) )b l im = sq r t ( x )+sq r t ( x1 )!DO n = 4 ,4DO n = 1 , n max gaussintegrand = 0.0 d0DO k = 1 , npt s gauss (n)wgt = w gauss (n , k ) ∗( b l im−a l im )pt = x gauss (n , k ) ∗( b l im−a l im )+a l imintegrand = integrand + wgt∗ constant ∗exp(−q∗ r ∗pt∗pt ) ∗ i n t egra lw ( pt ,x , x1 )ENDDOi f ( ( n > 1) . and . ( ( abs ( ( integrand − i n t e g r an d l a s t ) / integrand ) <1 .0 d−13 ) . or . ( abs ( integrand − i n t e g r an d l a s t ) < 1 .0 d−14 ) ) )exiti n t e g r an d l a s t = integrandENDDOk mat r i x c a l c = integrand! WRITE(57 ,∗) x , x1 , k matr i x! s topIF (n == n max gauss + 1) THEN! WRITE(19 ,∗) ”KMAT CASE: 5 VALUE NOT CONVERGED”END IFEND IFCASE(9 )! rough hard sphere approximate k e rne l − f−space r ep r e s en ta t i on! constant1 = 1.5 !\mu\ ch i va l ueIF (ABS( x1 ) < 1 .0 d−12) THENk mat r i x c a l c = 0 .0 d0ELSE IF (ABS(x ) < 1 .0 d−12) THEN! k matr i x = (2 . 0 d0∗ c o l f r e q ∗q∗q/ s q r t (m) ) ∗ exp(−q∗q∗x1 ) ∗F 2 (0 . 0 d0 , y , s q r t ( x1) ,m, mu chi )k mat r i x c a l c = (2 . 0 d0∗ c o l f r e q ∗q∗q/ sq r t (m) ) ∗exp(−q∗q∗x1 ) ∗ ( ( 1 . 0 d0+mu chi )∗∗2) /mu chi / ( 1 . 0 d0+mu chi−m) ∗ ( 1 . 0 d0 − exp(−mu chi∗q∗q ∗ ( 1 . 0 d0+mu chi−m) ∗x1 / ( 1 . 0 d0+(1.0 d0+m) ∗mu chi ) ) )ELSEi n t e g r an d l a s t = 0 .0 d0constant= c o l f r e q ∗q∗q/ sq r t (m∗x) ∗exp ( ( q−r ) ∗( r ∗x−q∗x1 ) )a l im = ABS( sq r t ( x )−s q r t ( x1 ) )134b l im = sq r t ( x )+sq r t ( x1 )DO n = 4 ,4!DO n = 1 , n max gaussin tegrand = 0.0 d0DO k = 1 , npt s gauss (n)wgt = w gauss (n , k ) ∗( b l im−a l im )pt = x gauss (n , k ) ∗( b l im−a l im )+a l imintegrand = integrand +wgt∗exp(−q∗ r ∗pt∗pt ) ∗F 2 (x , x1 , pt ,m, mu chi )ENDDOi f ( ( abs ( ( integrand − i n t e g r an d l a s t ) / integrand ) < 1 .0 d−13 ) . or .( abs ( integrand − i n t e g r an d l a s t ) < 1 .0 d−14 ) ) exiti n t e g r an d l a s t = integrandENDDOk mat r i x c a l c = constant ∗ in tegrand!WRITE(57 ,∗) x , y , k matr i xIF (n == n max gauss + 1) THEN! WRITE(19 ,∗) ”KMAT CASE: 9 VALUE NOT CONVERGED”END IFEND IFCASE (10)! rough hard sphere approximate k e rne l − g−space r ep r e s en ta t i on! constant1 = 1.5 !\mu\ ch i va l ueIF (ABS(x ) < 1 .0 d−12) THENk mat r i x c a l c = 0 .0 d0ELSE IF (ABS( x1 ) < 1 .0 d−12) THEN!! c a r e f u l here wi th t h i s one . . . .!! k matr i x = (2 . 0 d0∗ c o l f r e q ∗q∗q/ s q r t (m) ) ∗ exp(−r∗ r∗x ) ∗F 2 ( x , 0 . 0 d0 , s q r t ( x ) ,m, mu chi )k mat r i x c a l c = (2 . 0 d0∗ c o l f r e q ∗q∗q/ sq r t (m) ) ∗exp(−r ∗ r ∗x) ∗ ( 1 . 0 d0+mu chi )∗∗2/mu chi / ( 1 . 0 d0+mu chi−m) ∗ ( 1 . 0 d0 − exp(−mu chi ∗ ( 1 . 0 d0+mu chi−m) ∗q∗q∗x / ( 1 . 0 d0+(1.0 d0+m) ∗mu chi ) ) )ELSEi n t e g r an d l a s t = 0 .0 d0constant = c o l f r e q ∗q∗q/ sq r t (m∗x1 ) ∗exp ( ( q−r ) ∗( r ∗x−q∗x1 ) )a l im = ABS( sq r t ( x )−s q r t ( x1 ) )b l im = sq r t ( x )+sq r t ( x1 )DO n = 4 ,4!DO n = 1 , n max gaussin tegrand = 0.0 d0DO k = 1 , npt s gauss (n)wgt = w gauss (n , k ) ∗( b l im−a l im )pt = x gauss (n , k ) ∗( b l im−a l im )+a l im135in tegrand = integrand + wgt∗exp(−q∗ r ∗pt∗pt ) ∗F 2 (x , x1 , pt ,m, mu chi )ENDDOi f ( ( abs ( ( integrand − i n t e g r an d l a s t ) / integrand ) < 1 .0 d−10 ) . or . (abs ( integrand − i n t e g r an d l a s t ) < 1 .0 d−14 ) ) exiti n t e g r an d l a s t = integrandENDDOk mat r i x c a l c = constant ∗ in tegrand!WRITE(57 ,∗) x , x1 , k matr i xIF (n == n max gauss + 1) THEN! WRITE(19 ,∗) ”KMAT CASE: 10 VALUE NOT CONVERGED”END IFEND IFCASE(11)! t h i s i s a hybr i d case f o r e va l ua t i n g the k matr i x! t h i s w i l l c a l l case 10 or case 6 depending on the va l u e s o f x and x1! i t w i l l e v a l ua t e va l u e s around the d i agona l o f the matrix us ing case 10 andthe r e s t us ing case 6i = INT( ( x−kmat vz 0 ) /kmat dvz )k = INT( ( x1−kmat vz 0 ) /kmat dvz )IF ( i < 0) THENi = 0END IFIF ( i >= kmat vz num) THENi = kmat vz num−1END IFIF ( k < 0) THENk = 0END IFIF ( k >= kmat vz num) THENk = kmat vz num−1END IFIF ( abs (k−i ) < 10) THEN! e v a l ua t i on o f the k matr i x w i th in the band around the d i agona l! o f course once again onlyk mat r i x c a l c = k matrix (10 , x , x1 , c o e f f )ELSE! e v a l ua t i on o f the k matr i x everywhere e l s e in the matrixk mat r i x c a l c = k matrix (6 , x , x1 , c o e f f )END IF! k matr ix1 = k matr i xEND SELECTEND FUNCTION KMATRIXFUNCTION CROSSEC(n , g , c h i v a l )136USE IONMOBILITYUSE MODULECROSSECIMPLICIT NONEREAL( h ip rec ) : : g , c ros sec , constant , e r ro r , c h i v a lINTEGER i , n , i u , i lREAL( h ip rec ) ,EXTERNAL: : e l l i p t i cINTERFACESUBROUTINE POLINT(xa , ya , x , y , dy )INTEGER, PARAMETER: : h ip rec = KIND( 0 . 0D0)REAL( h ip rec ) ,DIMENSION( : ) : : xa , yaREAL( h ip rec ) : : x , y , dyEND SUBROUTINEEND INTERFACESELECT CASE(n)CASE(1 )! c ros s s e c t i on f o r the smooth sphere casec r o s s e c = 1 .0 d0CASE(2 )! cons tan t i n c l ud e s the f a c t o r o f s q r t (2kT/m 1) from the genera l c a l lconstant = 2 .0 d0∗ s q r t ( a 4 t i l d a ∗ ( 1 . 0 d0+m) ) /g! cons tan t = 1.0 d0! l o c a t e g r i d po i n t s around ch i va l ue o f i n t e r e s t and use p o l i n t to! i n t e r p o l a t e c ro s s f unc va lue to g e t f i n a l c ross s e c t i oni = in t ( c h i v a l / dch i )i l = max(0 , i −4)i u = min( n ch i , i +4)CALL POLINT( ch i ( i l : i u ) , c r o s s f u n c ( i l : i u ) , c h i v a l , c ro s sec , e r r o r )c r o s s e c = constant ∗ c r o s s e cEND SELECTEND FUNCTION137FUNCTION INTEGRALW(a , x , x1 )USE IONMOBILITYUSE MODULE INTEGRATEUSE INTEGRATEGAULAGIMPLICIT NONE! f o l l ow i n g loop i n i t i a l i z e s gauss l a gue r r e subrou t ine t ha t would c a l c u l a t e thepo i n t s and we i gh t s f o r the quadrature! t h e s e are eva luaed and s t o r ed in a matrixREAL( h ip rec ) : : a , x , integrandw , in t egrandw las t , integra lw , pt , wgt , constant ,sigma12 , numdense , a l im , b l im , x1 , vz n , constant1REAL( h ip rec ) , EXTERNAL: : c r o s s e cDOUBLE PRECISION,EXTERNAL : : b e s s i 0 ! b e s s e l f unc t i onINTEGER i , k , n! t h i s case i s used f o r i n t e g r a t i o n o f spc 5 ,6 ,7 but in f 4 f ormu la t i on o fgenera l k e rne li n t egrandw las t = 0 .0 d0constant1 = (q−r ) ∗( s q r t ( 2 . 0 d0∗( x+x1 )−a∗a−((x−x1 ) /a ) ∗∗2) )DO i = 5 ,5!DO i = 1 , n max gaulagintegrandw = 0.0 d0DO k = 1 , npt s gau lag ( i )wgt = w gaulag ( i , k )pt = x gau lag ( i , k )IF ( abs ( x1 ) < 1 .0 d−12) THENintegrandw =integrandw + wgt∗ c r o s s e c (max smth , s q r t ( q∗q∗x+pt ) , 2 . 0 d0∗atan (q∗ s q r t ( x/pt ) ) )ELSEintegrandw = integrandw + wgt∗ be s s i 0 ( constant1 ∗ s q r t ( pt ) ) ∗ c r o s s e c (max smth , s q r t ( q∗q∗a∗a+pt ) , 2 . 0 d0∗atan (q∗a/ sq r t ( pt ) ) )END IFENDDOIF ( ( abs ( ( integrandw − i n t egrandw las t ) / integrandw ) < 1 .0 d−13 ) .OR. (abs ( integrandw − i n t egrandw las t ) < 1 .0 d−14 ) ) EXITi n t egrandw las t = integrandwENDDOi n t egra lw = integrandwIF (n == n max gaulag + 1) THENWRITE(30 ,∗ ) ”VALUE NOTCONVERGED”END IF!CLOSE (30)138END FUNCTION INTEGRALW!FUNCTION ELLIPTIC( qqc , pp , aa , bb )FUNCTION ELLIPTIC( qqc , bb )IMPLICIT NONEINTEGER, PARAMETER: : h ip rec = KIND( 0 . 0D0)REAL( h ip rec ) : : e l l i p t i c , qqc , a , b , f , g , em, p , qc , bb , aa , pp , q , eREAL( h ip rec ) ,PARAMETER: : ca = 0.000000003 d0 , p i02 = 1.5707963268 d0IF ( qqc == 0) PAUSE ’ fa i lure in e l l i p t i c ’qc = ABS( qqc )b = bbp = 1.0 d0e = qcem = 1.0 d0f = 1 .0 d0a = 1.0 d0 + bg = eb = b + gb = b + bp = g + 1.0 d0g = emem = qc+emDO WHILE (ABS(g−qc ) > g∗ ca )qc = sq r t ( e )qc = qc+qce = qc∗emf = aa = a+b/pg = e/pb = b+f ∗gb = b+bp = g+pg = emem = qc+emEND doe l l i p t i c = pi02 ∗(b+a∗em) /(em∗(em+p) )END FUNCTIONFUNCTION BILINEAR(a , x , x1 , f11 , f12 , f21 , f22 )USE IONMOBILITYIMPLICIT NONE139REAL( h ip rec ) : : f11 , f12 , f21 , f22 , x , x1 , b i l i n e a rINTEGER aSELECT CASE( a )CASE(1 )! t r i a n g l e i n t e r p o l a t i o nb i l i n e a r = f11 + (1 . 0 d0/kmat dvz ) ∗( x∗( f12−f22 ) − x1 ∗( f12−f22 ) )! b i l i n e a r = f11 −(1.0 d0/ kmat dvz ) ∗(( x ∗( f11−f 21 ) )−(y ∗( f21−f 22 ) ) )! check the formulaCASE(2 )! t h i s i s the 2D b i l i e a r i n t e r p o l a t i o n using 4 poin/ t s around the va l u e s o f xand y! b i l i n e a r = f11 + &! (1 . 0 d0/ kmat dvz ) ∗( f12 ∗( x + y ) ) + f21 ∗x +f12 ∗y + &! (1 . 0 d0/( kmat dvz ∗ kmat dvz ) ) ∗( x∗y ) ∗( f11−f21−f 12+f22 )b i l i n e a r = f11 + &(1 . 0 d0/kmat dvz ) ∗ ( ( f11−f21 )∗(−x) + ( f11−f12 )∗(−x1 ) ) + &(1 . 0 d0/( kmat dvz∗kmat dvz ) ) ∗( x∗x1 ) ∗( f11−f21−f12+f22 )END SELECTEND FUNCTIONFUNCTION F 1 ( z , a )USE IONMOBILITYUSE MODULE INTEGRATEIMPLICIT NONEREAL( h ip rec ) : : a , z , integrand , i n t e g r and l a s t , F 1 , pt , wgt , constant , constant1REAL( h ip rec ) , EXTERNAL: : b e s s i 0 , b e s s i 1INTEGER n , iconstant = a∗z / ( 1 . 0 d0+a )F 1 = exp ( constant ) / ( 1 . 0 d0+a )return!! I d i scovered numer i ca l l y t ha t the r e s u l t o f the i n t e g r a t i o n below i s the! very s imple f unc t i on g i ven above . . . . Lucky ! ! ! !140!! I ’ ve l e f t the code below in case one wants to go back to the i n t e g r a t i o n! and check t h i n g s numer i ca l l y!constant = a∗z /2 .0 d0 / ( 1 . 0 d0+a )i n t e g r an d l a s t = 0 .0 d0!DO n = 3 ,3DO n = 1 , n max gaussintegrand = 0.0 d0DO i = 1 , np t s gauss (n)wgt = w gauss (n , i )pt = x gauss (n , i )constant1 = constant ∗ ( 1 . 0 d0−pt∗pt )integrand = integrand + wgt∗exp ( constant1 ) ∗( ( 1 . 0 d0+2.0d0∗ constant1 ) ∗be s s i 0 ( constant1 ) + 2 .0 d0∗ constant1 ∗ be s s i 1 ( constant1 ) )ENDDOwrite (30 ,∗ ) np t s gauss (n) , integrandIF ( abs ( ( integrand − i n t e g r an d l a s t ) / integrand ) < 1 .0 d−13) THENEXITEND IFi n t e g r an d l a s t = integrandENDDOF 1 = integrand / ( 1 . 0 d0+a )IF ( n == n max gauss + 1 ) THENWRITE(30 ,∗ ) ”VALUE NOTCONVERGED”END IFwrite (53 ,∗ ) constant , integrand , l og ( integrand )!CLOSE (30)END FUNCTION F 1FUNCTION F 2 (x , x1 , z , a1 , a2 )USE IONMOBILITYUSE MODULE INTEGRATEIMPLICIT NONEREAL( h ip rec ) : : a1 , a2 , x , x1 , z , integrand , i n t e g r and l a s t , F 2 , pt1 , pt2 , wgt1 , wgt2 ,alpha , de lta , constant , constant1 , constant2 , cost , cos t1INTEGER n1 , n2 , i1 , i 2alpha = (1 . 0 d0+a1 ) ∗a2constant = (x−x1 ) /zd e l t a = 2 .0 d0∗( x+x1 )−z∗z−constant ∗ constantconstant1 = alpha / ( 1 . 0 d0+alpha ) ∗a1 /4 .0 d0constant2 = alpha∗z∗ z /4 .0 d0/a1141i n t e g r an d l a s t = 0 .0 d0DO n1 = 3 ,3!DO n1 = 1 , n max gaussDO n2 = 3 ,3!DO n2 = 1 , n max gaussin tegrand = 0.0 d0DO i 1 = 1 , npt s gauss ( n1 )DO i 2 = 1 , npt s gauss ( n2 )wgt1 = w gauss ( n1 , i 1 )pt1 = x gauss ( n1 , i 1 )wgt2 = w gauss ( n2 , i 2 )pt2 = x gauss ( n2 , i 2 )cos t1 = pi ∗pt2cos t = cos ( cos t1 )integrand = integrand + wgt1∗wgt2∗exp ( constant1 ∗( d e l t a ∗ ( 1 . 0 d0−cos t ∗cos t ∗pt1 )−2.0d0∗ constant ∗ s q r t ( d e l t a ) ∗ cos t ∗ s q r t ( pt1 ∗ ( 1 . 0 d0−pt1 ) )+constant ∗ constant ∗pt1 )−constant2 ∗pt1 )ENDDOENDDOi f ( ( abs ( ( integrand − i n t e g r an d l a s t ) / integrand ) < 1 .0 d−13 ) . or . (abs ( integrand − i n t e g r an d l a s t ) < 1 .0 d−14 ) ) exiti n t e g r an d l a s t = integrandENDDOENDDOF 2 = integrand ∗ ( 1 . 0 d0+a1 ) ∗ ( 1 . 0 d0+a1 ) ∗ ( 1 . 0 d0+a2 ) ∗ ( 1 . 0 d0+a2 ) ∗ z∗z /4 .0 d0/a1 / ( 1 . 0d0+alpha )IF ( ( n1 == n max gauss + 1 ) . or . ( n2 == n max gauss + 1 ) ) THENWRITE(30 ,∗ ) ”VALUE NOTCONVERGED”END IF!CLOSE (30)END FUNCTION F 2FUNCTION be s s i 0 ( x )IMPLICIT NONEINTEGER, PARAMETER: : h ip rec = KIND( 0 . 0D0)REAL( h ip rec ) bes s i0 , x , ax , yREAL( h ip rec ) ,PARAMETER: : p1 = 1 .0 d0 , p2 = 3.5156229d0 , p3 = 3.0899424d0 ,p4 = 1.2067492d0 , p5 = 0.2659732d0 , p6 =0.360768d−1, p7 = 0.45813d−2REAL( h ip rec ) ,PARAMETER: : q1 = 0.39894228d0 , q2 = 0.1328592d−1, q3 = 0.225319d−2, q4 = −0.157565d−2, q5 = 0.916281d−2, q6=−0.2057706d−1, q7 = 0.2635537d−1, q8 = −0.1647633d−1, q9 = 0.392377d−2ax = abs ( x )142i f ( ax . l t . 3 . 7 5 d0 ) theny = (x/3.75 d0 ) ∗∗2b e s s i 0 = p1+y∗( p2+y∗( p3+y∗( p4+y∗( p5+y∗( p6+y∗p7 ) ) ) ) )elsey = 3.75 d0/axb e s s i 0 = ( exp ( ax ) / sq r t ( ax ) ) ∗( q1+y∗( q2+y∗( q3+y∗( q4+y∗( q5+y∗( q6+y∗( q7+y ∗( q8+y∗q9 ) ) ) ) ) ) ) )endifEND FUNCTION be s s i 0! (C) Copr . 1986−92 Numerical Recipes Sof tware !”#D& ’.FUNCTION BESSI0 S (x )IMPLICIT NONEINTEGER, PARAMETER: : h ip rec = KIND( 0 . 0D0)REAL( h ip rec ) : : b e s s i 0 s , axREAL( h ip rec ) , INTENT(IN) : : xREAL( h ip rec ) ,DIMENSION(7 ) : : P = (/1 . 0D0,3 .5156229D0,3 .0899424D0,1 .2067492D0,0 .2659732D0,0 .0360768D0,0 .0045813D0/)REAL( h ip rec ) ,DIMENSION(9 ) : : Q = (/0.39894228D0,0 .01328592D0,0 .00225319D0,−0.00157565D0, 0 .00916281D0, −0.02057706D0, 0 .02635537D0, −0.01647633D0,0 .00392377D0/)!REAL( h iprec ) , EXTERNAL: : po l yINTERFACEFUNCTION POLY(x , c o e f f s )INTEGER, PARAMETER: : h ip rec = KIND( 0 . 0D0)REAL( h ip rec ) ,DIMENSION( : ) : : c o e f f sREAL( h ip rec ) : : xEND FUNCTIONEND INTERFACEax = abs ( x )IF ( ax < 3 .75 d0 ) THENb e s s i 0 s = poly ( ( x /3.75 d0 ) ∗∗2 ,p)ELSEb e s s i 0 s = ( exp ( ax ) / sq r t ( ax ) )∗poly ( ( 3 . 75 d0/ax ) , q )END IFEND FUNCTIONFUNCTION POLY(x , c o e f f s )143IMPLICIT NONEINTEGER, PARAMETER: : h ip rec = KIND( 0 . 0D0)INTEGER, PARAMETER : : npar poly = 8REAL( h ip rec ) , INTENT(IN) : : xREAL( h ip rec ) , DIMENSION( : ) , INTENT(IN) : : c o e f f sREAL( h ip rec ) : : poly , powREAL( h ip rec ) , DIMENSION( : ) , ALLOCATABLE: : vecINTEGER i , n , nn!DO x = 0.0 d0 , 10 . 0 d0 , 0 . 00001d0n = s ize ( c o e f f s )IF (n <= 0) THENpoly = 0 .0 d0ELSE IF (n < npar poly ) THENpoly = c o e f f s (n)DO i = n−1,1,−1poly = x∗poly+c o e f f s ( i )ENDDOELSEALLOCATE( vec (n+1) )pow = xvec ( 1 : n) = c o e f f sDOvec (n+1) = 0.0 d0nn = i s h f t (n+1,−1)vec ( 1 : nn ) = vec ( 1 : n : 2 )+pow∗vec ( 2 : n+1:2)IF (nn == 1) EXITpow = pow∗pown = nnENDDOpoly = vec (1)DEALLOCATE( vec )END IF! wr i t e (53 ,∗) x , po l y! end do! s topEND FUNCTIONFUNCTION EXE FUNC(n , x )144USE IONMOBILITYIMPLICIT NONEREAL( h ip rec ) ,PARAMETER: : a lpha = 1.0 d0 ! , p i = 3.14159265359! A l l v a l u e s in t h i s subrou t ine are s e t to doub l e p r e c i s i on! This e x t e rna l f unc t i on subrou t ine de f i n e s the i n i t i a l f unc t i on to be used inthe ion mob i l i t y problem .! This i s the s t a r t i n g po in t in the Runge−Kutta method o f numerical a n a l y s i s .! The f i r s t d e r i v a t i v e o f t h i s f unc t i on s t a r t s the i t e r a t i o n process .REAL( h ip rec ) : : exe func , xINTEGER n! t h i s i s the f unc t i on we chooseIF ( spc == 2) THENIF (n == 0) THENexe func = 1.0 d0! e xe f unc = exp(−x ) ! a lpha = 2! exe func = exp (0 . 5 d0∗x ) ! a lpha = 0.5! exe f unc = exp (0 . 98 d0∗x ) ! a lpha = 50! exe func = exp ( x ) ∗( exp (−0.2 d0∗( x−2.0d0 ) ∗∗2)+exp (−0.2 d0∗( x−8.0d0 ) ∗∗2) ) !a lpha = odd func t i onELSEexe func = 0.0 d0! e xe f unc = −exp(−x )! exe f unc = 0.5 d0∗ exp (0 . 5 d0∗x )! exe f unc = 0.98 d0∗ exp (0 . 98 d0∗x )! exe f unc = exp ( x−0.2d0∗( x−2.0d0 ) ∗∗2) ∗ (1 . 0 d0−0.4d0∗( x−2.0d0 ) ) + exp ( x−0.2d0∗( x−8.0d0 ) ∗∗2) ∗ (1 . 0 d0−0.4d0∗( x−8.0d0 ) )END IFELSE IF ( spc == 1 .OR. spc == 8 .OR. spc == 9) THENIF (n == 0) THENexe func = exp(−x) ∗ s q r t ( x ) ! a lpha = 1! exe func = s q r t ( x ) ∗ exp (−0.5 d0∗x ) ! a lpha = 0.5! exe f unc = s q r t ( x ) ∗ exp (−2.0 d0∗x ) ! a lpha = 2! exe func = s q r t ( x ) ∗ exp (−0.02d0∗x ) ! a lpha = 50! exe func = exp (−0.1d0∗( x−2.0d0 ) ∗∗2) + 1.5 d0∗ exp (−0.1 d0∗( x−8.0d0 ) ∗∗2) !a lpha = odd func t i onELSEexe func = −exp ( 0 . 5 d0∗x) ∗ ( 0 . 5 d0∗ s q r t ( 0 . 5 d0∗x)−1/( sq r t ( 0 . 5 d0∗x) ) )! e xe f unc = −0.5d0∗ exp (−0.5 d0∗x ) ∗(1/ s q r t ( x ) − s q r t ( x ) )! exe f unc = −2.0d0∗ exp (−2.0 d0∗x ) ∗(1/ s q r t ( x ) − s q r t ( x ) )! exe f unc = −0.020d0∗ exp (−0.02d0∗x ) ∗(1/ s q r t ( x ) − s q r t ( x ) )145! e xe f unc = −0.2d0∗( x−2.0d0 ) ∗ exp (−0.1d0∗( x−2.0d0 ) ∗∗2) − 0.3 d0∗( x−8.0d0 ) ∗exp (−0.1d0 ∗( x−8.0d0 ) ∗∗2)END IFELSE IF ( spc == 3) THENIF (n == 0) THENexe func = x! e xe f unc = 2.0 d0∗x ! a lpha = 2! exe func = exp (−0.5d0∗x ) ! a lpha = 0.5! exe f unc = exp (−0.02d0∗x ) ! a lpha = 50! exe func = − l o g ( exp (−0.2d0 ∗( x−2.0d0 ) ∗∗2) + exp (−0.2d0 ∗( x−8.0d0 ) ∗∗2) ) !a lpha = odd func t i onELSEexe func = 1.0 d0! e xe f unc = 2.0 d0! exe f unc = −0.5d0∗ exp (−0.5 d0∗x )! exe f unc = −0.02d0∗ exp (−0.02d0∗x )! exe f unc = 2.4 d0/( exp (−0.2 d0∗( x−2.0d0 ) ∗∗2) + exp (−0.2 d0∗( x−8.0d0 ) ∗∗2) )END IFELSE IF ( spc == 4 .OR. spc == 5 .OR. spc == 6 .OR. spc == 7 .OR. spc == 10 .OR. spc ==11) THENIF (n == 0) THEN! e xe f unc = exp(−x )! exe f unc = exp (−0.5d0∗x ) ! a lpha = 2! exe func = exp (−0.98d0∗x ) ! a lpha = 50! exe func = exp (−2.0d0∗x ) ! a lpha = 0.5! exe f unc = exp ( x ) ∗( exp (−0.2 d0∗( x−2.0d0 ) ∗∗2)+exp (−0.2 d0∗( x−8.0d0 ) ∗∗2) ) !a lpha = odd func t i onexe func = exp (−5.0d0∗(x−350.0 d0 ) ∗∗2) ! newf4 ! gauss ian func t i on used f o rspaces 5 ,6 ,7! exe f unc = s q r t ( x ) ∗ exp (−0.5 d0∗( x−5.0d0 ) ∗∗2) ! gauss ian ∗ s q r tELSE! e xe f unc = −exp(−x )! exe f unc = −0.5d0∗ exp (−0.5 d0∗x )! exe f unc = −0.98d0∗ exp (−98.0d0∗x )! exe f unc = −2.0d0∗ exp (−2.0 d0∗x )! exe f unc = exp ( x−0.2d0∗( x−2.0d0 ) ∗∗2) ∗ (1 . 0 d0−0.4d0∗( x−2.0d0 ) ) + exp ( x−0.2d0∗( x−8.0d0 ) ∗∗2) ∗ (1 . 0 d0−0.4d0∗( x−8.0d0 ) )exe func = (x−350.0 d0 ) ∗exp (−5.0 d0∗(x−350.0 d0 ) ∗∗2) ! d e r i v a t i v e o f newf4! exe f unc = (0 .5 d0/ s q r t ( x ) ) ∗ exp (−0.5d0∗( x−5.0d0 ) ∗∗2) + s q r t ( x ) ∗( x−5.0d0 )∗ exp (−0.5d0∗( x−5.0d0 ) ∗∗2) ! d e r i v a t i v e o f gauss ian ∗ s q r tEND IF!ELSE IF ( spc == 5 .OR. spc == 6 .OR. spc == 7) THEN! IF (n == 0) THEN! ! exe f unc = exp(−x∗x ) ! e qu i l i b r i um func t i on! ! exe f unc = exp (−0.5d0∗( x ) ∗∗2) ! gauss ian func t i on146! e xe f unc = exp (−5.0d0∗( x−350.0d0 ) ∗∗2) ! gauss ian func t i on high energy! exe f unc = exp (−0.5d0∗( x−5.0d0 ) ∗∗2) ! gauss ian func t i on low energy! ELSE! exe func = −2.0d0∗x∗ exp ( x∗x )! exe f unc = −x∗ exp (−0.5d0 ∗( x ) ∗∗2)! exe f unc = −(x−350.0d0 ) ∗( exp (−0.5d0∗( x−350.0d0 ) ∗∗2) )! exe f unc = −(x−5.0d0 ) ∗( exp (−0.5d0∗( x−5.0d0 ) ∗∗2) )! END IFEND IFEND FUNCTIONRECURSIVE FUNCTION DIST FUNC(a , n , vz , c o e f f ) RESULT( d i s t f u n c 1 )USE IONMOBILITYIMPLICIT NONE! This e x t e rna l f unc t i on i s used in the main program i on mob i l i t y .! This f unc t i on eva l ua t e s d i s t r i b u t i o n func t i on at po i n t s on v e l o c i t y g r i d .!w: the argument used to e va l ua t e the b s p l i n e f unc t i on .! n determines whether the o r i g i n a l funct ion , the f i r s t d e r i v a t i v e , or thesecond d e r i v a t i v e o f the t h i r d order b s p l i n e i s used in the e va l ua t i on .! D i s t r i b u t i o n func t i on i s d i v i d ed by cons tan t dvz ra i s ed to the power o f n .! This f unc t i on c a l l s on ex t e rna l f unc t i on BSPLINE3 which con ta ins t h i r d orders p l i n e e xp r e s s i on s .REAL( h ip rec ) : : w, vz , index , d i s t f un c2 , d i s t f u n c 1REAL( h ip rec ) ,EXTERNAL: : b sp l i n e 3REAL( h ip rec ) ,DIMENSION( 0 : n dim ) : : c o e f fINTEGER i , n , a , jd i s t f u n c 1 = 0.0 d0IF ( ( v z g r i d (0) > vz ) .OR. ( vz > v z g r i d ( vz num) ) )RETURNindex = ( vz−v z g r i d (0) ) /dvzSELECT CASE( a )CASE(1 )! e v a l ua t e s d i s t r i b u t i o n func t i on at g i ven g r i d po in t in na t i v e spaceDO i = INT( index )−3, INT( index )w = index − REAL( i )d i s t f u n c 1 = d i s t f u n c 1 + c o e f f ( i +3)∗BSPLINE3 (n ,w)ENDDOd i s t f u n c 1 = d i s t f u n c 1 /dvz∗∗nCASE (2 )! t h i s case e va l ua t e s the moments as d e s i r ed .147! moments are eva l ua ted in terms o f f! we check s i z e o f gr id , s i nce some o f the moments can f a l l o f the end o f g r i d .! on ly moments t ha t a c t u a l l y l i e on the g r i d are needed! f o l l ow i n g check ensures t ha t on ly the r e l e van t po i n t s are eva l ua ted! gspace undone to f spaceIF (n == 0) THENd i s t f u n c 1 = 2.0 d0∗ s q r t ( vz/ p i ) ∗exp(−vz )∗ d i s t f u n c (1 ,0 , vz , c o e f f )ELSEd i s t f u n c 1 = 2.0 d0/ sq r t ( p i ) ∗exp(−vz ) ∗( s q r t ( vz ) ∗ d i s t f u n c (1 ,1 , vz , c o e f f) + (0 . 5 d0∗ s q r t (1/ vz ) − s q r t ( vz ) ) ∗ d i s t f u n c (1 ,0 , vz , c o e f f ) )END IFCASE(3 )! conver t s the c a l c u l a t i o n o f d i s t r i b u t i o n func t i on from h−space to f−spaceIF (n == 0) THENd i s t f u n c 1 = 2.0 d0∗ s q r t ( vz/ p i ) ∗exp (−1.0 d0∗ d i s t f u n c (1 ,0 , vz , c o e f f ) )ELSEd i s t f u n c 1 = 2.0 d0∗exp (−1.0 d0∗ d i s t f u n c (1 ,0 , vz , c o e f f ) ) / sq r t ( p i ) ∗ ( 0 . 5d0/ sq r t ( vz ) − s q r t ( vz ) ∗ d i s t f u n c (1 ,1 , vz , c o e f f ) )END IFCASE(4 )! f pr ime space comments! t h i s case e va l ua t e s the moments as d e s i r ed .! the moments are eva l ua ted in terms o f f! check s i z e o f gr id , s i nce some o f the moments can f a l l o f the end o f the g r i d.! on ly moments t ha t a c t u a l l y l i e on the g r i d are needed! f o l l ow i n g check ensures t ha t on ly the r e l e van t po i n t s are eva l ua ted! gspace undone to f spaceIF (n == 0) THENd i s t f u n c 1 = 2.0 d0∗ s q r t ( vz/ p i ) ∗ d i s t f u n c (1 ,0 , vz , c o e f f )ELSEd i s t f u n c 1 = 2.0 d0/ sq r t ( p i ) ∗ ( 0 . 5 d0/ sq r t ( vz ) ∗ d i s t f u n c (1 ,0 , vz , c o e f f ) +sq r t ( vz ) ∗ d i s t f u n c (1 ,1 , vz , c o e f f ) )END IFCASE(5 )! g enera l case o f the k e rne lIF (n == 0) THENd i s t f u n c 1 = 2.0 d0∗ s q r t ( vz/ p i ) ∗ d i s t f u n c (1 ,0 , vz , c o e f f )ELSEd i s t f u n c 1 = 2.0 d0/ sq r t ( p i ) ∗ ( 0 . 5 d0/ sq r t ( vz ) ∗ d i s t f u n c (1 ,0 , vz , c o e f f ) +sq r t ( vz ) ∗ d i s t f u n c (1 ,1 , vz , c o e f f ) )END IFEND SELECT! d i s t f u n c 1 = d i s t f u n c148END FUNCTIONFUNCTION BSPLINE3(n ,w)USE IONMOBILITYIMPLICIT NONE! This i s an ex t e rna l f unc t i on d e s c r i b i n g the p i ecew i se b s p l i n e f unc t i on .! The func t i on i s d e s c r i b ed over f our i n t e r v a l s , where i t has a d i f f e r e n t form.! Depending on the va lue o f w, the argument , the appropr i a te case o f theb s p l i n e ! i s c a l l e d .! The b s p l i n e f unc t i on has va l u e s over only f our points , and zero everywhere! e l s e .! w: argument used to e va l ua t e the b s p l i n e expres s i on! n determines which case i s to be c a l l e d upon during the e va l ua t i on .REAL(KIND = hiprec ) : : b sp l in e3 ,wINTEGER nIF (w < 0)THENBSPLINE3 = 0.0 d0RETURNEND IFSELECT CASE (n)! This case has the e xp r e s s i on s f o r the o r i g i n a l cub i c s p l i n e f unc t i on .CASE (0 )SELECT CASE ( i n t (w) )CASE (0 )b sp l i n e3 = 1 .0 d0 /6 .0 d0∗(w∗∗3)CASE (1 )b sp l i n e3 = 1 .0 d0 /6 .0 d0 ∗ ( (w∗∗3)−4.0d0∗(w−1.0d0 ) ∗∗3)CASE (2 )b sp l i n e3 = 1 .0 d0 /6 .0 d0 ∗ ( ( 4 . 0 d0−w) ∗∗3−4.0 d0 ∗ ( 3 . 0 d0−w) ∗∗3)CASE (3 )b sp l i n e3 = 1 .0 d0 /6 .0 d0 ∗ ( 4 . 0 d0−w) ∗∗3CASE DEFAULTb sp l i n e3 = 0 .0 d0END SELECT! This case has the e xp r e s s i on s f o r the f i r s t d e r i v a t i v e o f the cub i c s p l i n e s .CASE (1 )SELECT CASE ( i n t (w) )CASE (0 )b sp l i n e3 = 0 .5 d0∗(w∗w)149CASE (1 )b sp l i n e3 = 0 .5 d0 ∗ ( (w∗w)−4.0d0∗(w−1.0 d0 ) ∗∗2)CASE (2 )b sp l i n e3 = −0.5d0 ∗ ( ( 4 . 0 d0−w) ∗∗2−4.0 d0 ∗ ( 3 . 0 d0−w) ∗∗2)CASE (3 )b sp l i n e3 = −0.5d0 ∗ ( 4 . 0 d0−w) ∗∗2CASE DEFAULTb sp l i n e3 = 0 .0 d0END SELECT! This case c on s i s t s o f the second d e r i v a t i v e e xp r e s s i on s o f the cub i c s p l i n e s.CASE (2 )SELECT CASE ( i n t (w) )CASE (0 )b sp l i n e3 = wCASE (1 )b sp l i n e3 = (4 . 0 d0−3.0d0∗w)CASE (2 )b sp l i n e3 = (3 . 0 d0∗w−8.0 d0 )CASE (3 )b sp l i n e3 = (4 . 0 d0−w)CASE DEFAULTb sp l i n e3 = 0 .0 d0END SELECTEND SELECTEND FUNCTIONFUNCTION be s s i 1 ( x )IMPLICIT NONEINTEGER, PARAMETER: : h ip rec = KIND( 0 . 0D0)REAL( h ip rec ) bes s i1 , x , ax , yREAL( h ip rec ) ,PARAMETER: : p1 = 0 .5 d0 , p2 = 0.87890594d0 , p3 = 0.51498869d0 , p4 = 0.15084934d0 , p5 = 0.2658733d−1, p6 =0.301532d−2, p7 = 0.32411d−3REAL( h ip rec ) ,PARAMETER: : q1 = 0.39894228d0 , q2 =−0.3988024d−1, q3 =−0.362018d−2, q4 = 0.163801d−2, q5 =−0.1031555d−1, q6 =0.2282967d−1, q7 =−0.2895312d−1, q8 = 0.1787654d−1, q9 = −0.420059d−2ax = abs ( x )i f ( ax . l t . 3 . 7 5 d0 ) theny = (x/3.75 d0 ) ∗∗2b e s s i 1 = x∗( p1+y∗( p2+y∗( p3+y∗( p4+y∗( p5+y∗( p6+y∗p7 ) ) ) ) ) )elsey = 3.75 d0/ax150be s s i 1 = ( exp ( ax ) / sq r t ( ax ) ) ∗( q1+y∗( q2+y∗( q3+y∗( q4+y∗( q5+y∗( q6+y∗( q7+y ∗( q8+y∗q9 ) ) ) ) ) ) ) )i f ( x . l t . 0 . 0 d0 ) b e s s i 1 = −be s s i 1endifEND FUNCTION be s s i 1! (C) Copr . 1986−92 Numerical Recipes Sof tware !”#D& ’.A.4 ModulesMODULE IONMOBILITYIMPLICIT NONEINTEGER, PARAMETER: : h ip rec = KIND( 0 . 0D0)REAL( h ip rec ) : : t , h , h2 , dvz , vz 0 ,m, c o l f r e q , q , r , kmat vz 0 , kmat vz n , kmat dvz ,kmat m , mu chi! t : time! h : time s t ep! dvz : s i z e o f the i n t e r v a l in the v e l o c i t y g r i d! m: mass r a t i o o f the bath gas to the ion! c o l f r e q : the c o l l i s i o n f requencyINTEGER : : n dim , vz num , spc , max smth , kmat vz num! vz num : the t o t a l number o f po i n t s on the v e l o c i t y g r i d! n dim : s i z e o f the arrays . We ge t ex t ra two va l u e s due to the cond i t i on s onthe d e r i v a t i v e s . These ex t ra va l u e s are needed f o r the cub i c s p l i n e s .REAL( h ip rec ) ,PARAMETER: : p i = 3.14159265359!REAL(KIND = hiprec ) , DIMENSION(1 :1100) : : x gauss , w gauss! x gauss : the po i n t s eva l ua ted by the gauss ian quadrature used in thee va l ua t i on o f the in tegrands! w gauss : the we i gh t s eva l ua ted by the gauss ian quadrature used in thee va l ua t i on o f the in tegrandsREAL( h ip rec ) ,DIMENSION ( : ) ,ALLOCATABLE: : y , k1 , k2 , k3 , k4 , y1 , v z gr id , work , wr ,work1 , wr1 , kmat x val , kmat y val! y : va l ue o f the d e r i v a t i v e at the i n t e r v a l! k1 : the f i r s t e va l ua t i on o f the d e r i v a t i v e! k2 : the second eva l ua t i n o f the d e r i v a t i v e! k3 : the t h i r d e va l ua t i on o f the d e r i v a t i v e! k4 : the f ou r t h e va l ua t i on o f the d e r i v a t i v e! y1 : va l ue o f the d e r i v a t i v e a f t e r the e va l ua t i on at the f our po i n t s w i th inthe ! i n t e r v a l . This a l s o becomes the next po in t o f e va l ua t i on in theRunge−KuttaREAL( h ip rec ) ,DIMENSION ( : , : ) ,ALLOCATABLE: : l1 mat , l2 mat , vr , vr saved , vr saved1 ,vr1 , l11 mat , l21 mat , b i n i t , l mat sa fe , k mat val! l 1 mat : the f i e l d−dependent matrix product o f two matrices , i n v e r s e o f b t i land b p! l2 mat : the product o f matrices , i n v e r s e o f b t i l , k mat , and nu and b! vr saved : the array con ta in ing the e i g en f unc t i on s o f the e i g enva l u e s o f L151! vr : the array con ta in ing the i n v e r s e o f vr savedENDMODULE IONMOBILITYMODULE MODULE INTEGRATEUSE IONMOBILITYIMPLICIT NONEINTEGER,PARAMETER: : n max gauss = 7 , n max trap = 25INTEGER,DIMENSION( 1 : n max gauss ) : : np t s gaussINTEGER npt s t rapREAL( h ip rec ) , DIMENSION( 1 : n max gauss , 1 : 2 ∗ ∗ ( n max gauss+2) ) : : x gauss , w gauss! x gauss : the po i n t s eva l ua ted by the gauss ian quadrature used in thee va l ua t i on o f the in tegrands! w gauss : the we i gh t s eva l ua ted by the gauss ian quadrature used in thee va l ua t i on o f the in tegrandsENDMODULEMODULE MODULECROSSECUSE IONMOBILITYIMPLICIT NONEREAL( h ip rec ) ,DIMENSION( : ) ,ALLOCATABLE: : theta , chi , c r o s s f u n cINTEGER n val , n ch iREAL( h ip rec ) : : dchi , a 4 t i l d aENDMODULE MODULECROSSECMODULE INTERFACESUSE IONMOBILITYIMPLICIT NONE!INTERFACE i n t d i s t f u n c! REAL( h iprec )!INTERFACE moments1! REAL( h iprec ) FUNCTION MOMENTS(a , coe f f 1 , a max , b min )! INTEGER, PARAMETER: : h i prec = KIND(0 .0D0)! REAL( h iprec ) : : a max , b min! INTEGER a! REAL( h iprec ) co e f f 1 ( : )! END FUNCTION MOMENTS152!END INTERFACEINTERFACE moments chk1REAL( h ip rec ) FUNCTION MOMENTSCHK(a , c o e f f 1 , a max , b min )use i onmob i l i t y! INTEGER, PARAMETER: : h i prec = KIND(0 .0D0)REAL( h ip rec ) : : a max , b minINTEGER aREAL( h ip rec ) c o e f f 1 ( : )END FUNCTION MOMENTSCHKEND INTERFACEINTERFACE d i s t f u n c 1REAL( h ip rec ) FUNCTION DIST FUNC(a , n , vz , c o e f f 1 )use i onmob i l i t y! INTEGER, PARAMETER: : h i prec = KIND(0 .0D0)INTEGER a , nREAL( h ip rec ) c o e f f 1 ( : )REAL( h ip rec ) : : vzEND FUNCTION DIST FUNCEND INTERFACEINTERFACESUBROUTINE GAULAG(x ,w, a l f , n)use i onmob i l i t y! INTEGER, PARAMETER: : h i prec = KIND(0 .0D0)INTEGER nREAL( h ip rec ) : : a l fREAL( h ip rec ) x ( : ) ,w( : )END SUBROUTINE GAULAGEND INTERFACEENDMODULE INTERFACESMODULE INTEGRATEGAULAGUSE IONMOBILITYIMPLICIT NONEINTEGER,PARAMETER: : n max gaulag= 5REAL( h ip rec ) : : a l f! the parameter used by the gau l ag subrou t ine in the e va l ua t i on o f the po i n t sand we i gh t s! f o r the purpose o f t h i s code , a l f = 0INTEGER,DIMENSION( 1 : n max gaulag ) : : np t s gau lag153REAL( h ip rec ) , DIMENSION( 1 : n max gaulag , 1 : 2 ∗ ∗ ( n max gaulag+2) ) : : x gaulag ,w gaulag! the arrays t ha t w i l l s t o r e the po i n t s ( x gau l a g ) and we i gh t s ( w gaulag )! a l l t he po i n t s and we i gh t s f o r the d i f f e r e n t va l u e s o f n are cons t ruc ted inthe i n i t a l i z a t i o n! the soubrou t ine moments c a l l s the d i f f e r e n t va l u e s o f n , and depending onconvergence , the appropr i a te s e t o f po i n t s and we i gh t s are used in thee va l ua t i on o f the momentsENDMODULE INTEGRATEGAULAGA.5 C Subroutines/∗C program to c a l l the error f unc t i on s in the C math l i b r a r y∗/#include <math . h>double e r f (double ∗ arg ){return ( e r f (∗ arg ) ) ;}double e r f c (double ∗ arg ){return ( e r f c (∗ arg ) ) ;}/∗C program to c a l l the gamma func t i on in the C math l i b r a r y∗/#include <math . h>double lgamma (double ∗ arg ){return ( lgamma(∗ arg ) ) ;}/∗doub l e gammln s ( doub l e ∗arg ){re turn ( gammln s (∗ arg ) ) ;}∗/154A.6 Input File0 10 100 vz n vz num0.02 1 .0 mass r a t i o c o l f r e q40 0.005 nstep h1 spc1 .5 mu chi ( rough )1 .0 1 .0 1 numdense sigma12 max smth ( s p h e r i c a l )1 a 4 t i l d a (maxwell )A.7 MakefileF90 = i f o r t## In t e l f l a g s##LIBS = −L/ g l oba l / so f tware / i n t e l /mkl72/ l i b /32 −lmk l lapack#LIBS = −L/ g l oba l / so f tware / i n t e l /mkl/ l i b / i n t e l 6 4 −lmk l lapack#pgf90 f l a g s#LIBS = −l l ap ack − l b l a s − l p g f t n r t l − l r t −l p th read −lmOFLAGS = −mkl − f a s t −Bst a t i c −openmp#opt imizat ion#OFLAGS = −openmp −mkl −Bst a t i c#(debugger )F90FLAGS = −c ${OFLAGS}## Source and ob j e c t f i l e s f o r mob i l i t y code#OBJECTS2 = module . o modu le in t egrat e . o modu le c ros sec . o i n t e r f a c e s . o b e s s i 1 . o\l i n i t p r i n t . o module gaulag . o i on mob i l i t y . o gauss . o b sp l i n e3 . o \rk4 . o der iv . o f i e l d . o exe func . o d i s t f u n c . o e r f . o l i n i t . o \k mat . o i n t e g r a t e . o cnvrg chk . o i n t i n t e r v a l . o gammaln . o \mat chk . o gaulag . o p l o t f u n c t i o n . o po l i n t . o ch i . o e l l i p t i c . o\i n t egra lw . o b e s s e l . o c r o s s e c . o b i l i n e a r . o F 1 . o F 2 . o b e s s i 0 . o \ch i . o#ion mob i l i t y 1 . o k mat ca l c . o k mat ca l c func . o\OBJECTS3 = module . o analyze . o b sp l i n e3 . o po l i n t . o d i s t f u n c . o d r g c o e f f . o \e r f . oOBJECTS4 = module . o module gaulag . o modu le in t egrat e . o modu le c ros sec . o ch i . o\k mat ca l c . o c r o s s e c . o gammaln . o gauss . o d i s t f u n c . o b sp l i n e3 . o\be s s i 0 . o in t egra lw . o e l l i p t i c . o k mat ca l c func . o po l i n t . o F 2 . o\gaulag . o155OBJECTS5 = modu le c ros sec . o ch i . o e l l i p t i c . o#OBJECTS6 = kmat check . o module . o modu le in t egrat e . o in t egra lw . o c r o s s e c . ob e s s e l . o module gaulag . o gammaln . o e l l i p t i c . o%.o : %. f90$ (F90 ) $ (F90FLAGS) −o $@ $<#−−−−−−−−−−−−−−−−−−−−−−−−−DESCRIPTION PART −−−−−−−−−−−−−−−−−−−−ion mobi l i ty ww : $ (OBJECTS2)${F90} ${OFLAGS} −o ion mobi l i ty ww ${OBJECTS2} ${LIBS}analyze : $ (OBJECTS3)${F90} ${OFLAGS} −o analyze ${OBJECTS3} ${LIBS}k mat ca l c : $ (OBJECTS4)${F90} ${OFLAGS} −o k mat ca l c ${OBJECTS4} ${LIBS}e l l i p t i c : $ (OBJECTS5)# ${F90} ${OFLAGS} −o e l l i p t i c ${OBJECTS5} ${LIBS}#kmat chk : $ (OBJECTS6)# ${F90} ${OFLAGS} −o kmat chk ${OBJECTS6} ${LIBS}c l ean :rm ∗ . o ion mobi l i ty wwA.8 Submission Script#! / b in / csh##PBS − l nodes=1: f a s t : ppn=6#PBS −N maxwe l l ex t e rna l#PBS −o output#PBS −e e r r o rcd $PBS O WORKDIRsetenv OMPNUMTHREADS 6#/tmp/K MAT VALUES EXTRAP#./ ion mobi l i ty ww < input > In t egrand va lue s. / k mat ca l c < i n pu t c a l c156

Cite

Citation Scheme:

        

Citations by CSL (citeproc-js)

Usage Statistics

Share

Embed

Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                        
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            src="{[{embed.src}]}"
                            data-item="{[{embed.item}]}"
                            data-collection="{[{embed.collection}]}"
                            data-metadata="{[{embed.showMetadata}]}"
                            data-width="{[{embed.width}]}"
                            async >
                            </script>
                            </div>
                        
                    
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:
http://iiif.library.ubc.ca/presentation/dsp.24.1-0167315/manifest

Comment

Related Items