To save content items to your account,
please confirm that you agree to abide by our usage policies.
If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account.
Find out more about saving content to .
To save content items to your Kindle, first ensure no-reply@cambridge.org
is added to your Approved Personal Document E-mail List under your Personal Document Settings
on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part
of your Kindle email address below.
Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations.
‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi.
‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
In this chapter, we shall discuss quantum scattering with a spherically symmetric potential as a typical example of the problems studied in computational physics [1, 2]. Scattering experiments are perhaps the most important tool for obtaining detailed information on the structure of matter, in particular the interaction between particles. Examples of scattering techniques include neutron and X-ray scattering for liquids, atoms scattering from crystal surfaces and elementary particle collisions in accelerators. In most of these scattering experiments, a beam of incident particles hits a target which also consists of many particles. The distribution of scattered particles over the different directions is then measured, for different energies of the incident particles. This distribution is the result of many individual scattering events. Quantum mechanics enables us, in principle, to evaluate for an individual event the probabilities for the incident particles to be scattered off in different directions; and this probability is identified with the measured distribution.
Suppose we have an idea of what the potential between the particles involved in the scattering process might look like, for example from quantum mechanical energy calculations (programs for this purpose will be discussed in the next few chapters). We can then parametrise the interaction potential, i.e. we write it as an analytic expression involving a set of constants: the parameters. If we evaluate the scattering probability as a function of the scattering angle for different values of these parameters, and compare the results with experimental scattering data, we can find those parameter values for which the agreement between theory and experiment is optimal.
In the previous chapter we saw how the many-electron problem can be treated in the Hartree–Fock formalism in which the solution of the many-body Schrödinger equation is written in the form of a Slater determinant. The resulting HF equations depend on the occupied electron orbitals, which enter these equations in a nonlocal way. The nonlocal potential of Hartree–Fock is difficult to apply in extended systems, and for this reason there have been relatively few applications to solids; see however Ref. [1].
Most electronic structure calculations for solids are based on density functional theory (DFT), which results from the work of Hohenberg, Kohn and Sham [2, 3]. This approach has also become popular for atoms and molecules. In the density functional theory, the electronic orbitals are solutions to a Schrödinger equation which depends on the electron density rather than on the individual electron orbitals. However, the dependence of the one-particle Hamiltonian on this density is in principle nonlocal. Often, this Hamiltonian is taken to depend on the local value of the density only – this is the local density approximation (LDA). In the vast majority of DFT electronic structure calculations for solids, this approximation is adopted. It is, however, also applied to atomic and molecular systems [4].
In this chapter we describe the density functional method for electronic structure calculations. In the present section, the physical interpretation of the density functional equations is first described and the formal derivations are given.
Six years have passed since the first edition of this book appeared. In these years I have learned a lot more about computational physics – a process which will hopefully never stop. I learned from books and papers, but also from the excellent colleagues with whom I worked on teaching and research during this period. Some of this knowledge has found its place in this edition, which is a substantial extension of the first.
New topics include finite elements, lattice Boltzmann simulation and density matrix renormalisation group, and there are quite a few sections here and there in the book which either give a more in-depth treatment of the material than can be found in the first edition, or extensions to widen the view on the subject matter. Moreover I have tried to eliminate as many errors as possible, but I am afraid that it is difficult for me to beat the entropy of possible things which can go wrong in writing a book of over 650 pages.
In Delft, where I have now a position involving a substantial amount of teaching, I worked for several years in the computational physics group of Simon the Leeuw. I participated in an exciting and enjoyable effort: teaching in an international context. Together with Rajiv Kalia, from Louisana State, we let students from Delft collaborate with Louisiana students, having them do projects in the field of computational physics.
In Chapters 1 to 4 we studied methods for solving the Schrödinger equation for many-electron systems. Many of the techniques described there carry over to other quantum many-particle systems, such as liquid helium, and the protons and neutrons in a nucleus. The techniques which we discussed there were, however, all of a mean-field type and therefore correlation effects could not be taken into account without introducing approximations. In this chapter, we consider more accurate techniques, which are similar to those studied in Chapter 10 and are based on using (pseudo-)random numbers – hence the name ‘Monte Carlo’ for these methods. In Chapter 10 we applied Monte Carlo techniques to classical many-particle systems; here we use these techniques for studying quantum problems involving many particles. In the next section we shall see how we can apply Monte Carlo techniques to the problem of calculating the quantum mechanical expectation value of the ground state energy. This is used in order to optimise this expectation value by adjusting a trial wave function in a variational type of approach, hence the name variational Monte Carlo (VMC).
In the following section we use the similarity between the Schrödinger equation and the diffusion equation in order to calculate the properties of a collection of interacting quantum mechanical particles by simulating a classical particle diffusion process. The resulting method is called diffusion Monte Carlo (DMC).
In Chapter 8 we saw how a classical many-particle system can be simulated by the MD method, in which the equations of motion are solved for all the particles involved. This enables us to calculate statistical averages of static and dynamic physical quantities. There exists another method, called the Monte Carlo (MC) method, for simulating classical many-particle systems by introducing artificial dynamics based on ‘random’ numbers. The artificial dynamics used in the MC method prevent us from using it for determining dynamical physical properties in most cases, but for static properties it is very popular.
In fact, every numerical technique in which random numbers play an essential role can be called a ‘Monte Carlo’ method after the famous Mediterranean casino town, and we shall discuss the method not only as a tool for studying classical many-particle systems, but also as a way of dealing with the more general problem of calculating high-dimensional integrals. In fact, three main types of Monte Carlo simulations can be distinguished:
Direct Monte Carlo, in which random numbers are used to model the effect of complicated processes, the details of which are not crucial. An example is the modelling of traffic where the behaviour of cars is determined in part by random numbers.
Monte Carlo integration, which is a method for calculating integrals using random numbers. This method is efficient when the integration is over high-dimensional volumes (see below). […]
Flow problems are widely studied in engineering because of their relevance to industrial processes and environmental problems. Such problems belong to the realm of macroscopic phenomena which are formulated in terms of one or more, possibly nonlinear, partial differential equations. If there is no possibility of exploiting symmetry, allowing for separation of variables, these equations are usually solved using finite element or finite difference methods.
The standard problem is the flow of a one-component, isotropic nonpolar liquid, which is described by the Navier–Stokes equations. These equations are based on mass and momentum conservation, and on the assumption of isotropic relaxation towards equilibrium. Finite element methods have been described in Chapter 13 for elasticity; the methods described there may be extended and adapted to develop codes for computational fluid dynamics (CFD), which are widely used by engineers. Such an extension is beyond the scope of this book.
A finite element solution of the Navier–Stokes equations may sometimes become cumbersome when the boundary conditions become exceptionally complicated, as is the case with flow through porous media where the pore diameter becomes very small (and the number of pores very large). Other cases where finite element methods run into problems are multiphase or binary systems, where two different substances or phases exist in separate regions of space. These regions change their shape and size in the course of time. Usually, the finite element points are taken on the system boundaries, but that implies complicated bookkeeping, in particular when the topology of the regions changes, as is the case in coalescence of droplets.
Random numbers are used in many simulations, not only of gambling tables but also of particle accelerators, fluids and gases, surface phenomena, traffic and so forth. In all these simulations some part of the system responsible for the behaviour under investigation is replaced by events generated by a random number generator, such as particles being injected into the system, whereas the source itself is not considered. Here we discuss various methods used for generating random numbers and study the properties of these numbers.
Random numbers are characterised by the fact that their value cannot be predicted. More precisely, if we construct a sequence of random numbers, the probability distribution for a new number is independent of all the numbers generated so far. As an example, one may think of throwing a die: the probability of throwing a 3 is independent of the results obtained before. Pure random numbers may occur in experiments: for a radioactive nucleus having a certain probability of decay, it is not possible to predict when it will decay. There is an internet service, http://www.fourmilab.ch/hotbits/ which creates random numbers in this way and sends them over the internet (a careful correction has been carried out to remove any bias resulting in a majority of either 1 or 0). These numbers are truly random [1, 2].
On the other hand, random numbers as generated by a computer are not truly random. In all computer generators the new numbers are generated from the previous ones by a mathematical formula.
We have already discussed, in chapter 4, how complicated functions may be expressed as power series. However, this is not the only way in which a function may be represented as a series, and the subject of this chapter is the expression of functions as a sum of sine and cosine terms. Such a representation is called a Fourier series. Unlike Taylor series, a Fourier series can describe functions that are not everywhere continuous and/or differentiable. There are also other advantages in using trigonometric terms. They are easy to differentiate and integrate, their moduli are easily taken and each term contains only one characteristic frequency. This last point is important because, as we shall see later, Fourier series are often used to represent the response of a system to a periodic input, and this response often depends directly on the frequency content of the input. Fourier series are used in a wide variety of such physical situations, including the vibrations of a finite string, the scattering of light by a diffraction grating and the transmission of an input signal by an electronic circuit.
The Dirichlet conditions
We have already mentioned that Fourier series may be used to represent some functions for which a Taylor series expansion is not possible.
It happens frequently that the end product of a calculation or piece of analysis is one or more algebraic or differential equations, or an integral that cannot be evaluated in closed form or in terms of tabulated or pre-programmed functions. From the point of view of the physical scientist or engineer, who needs numerical values for prediction or comparison with experiment, the calculation or analysis is thus incomplete.
With the ready availability of standard packages on powerful computers for the numerical solution of equations, both algebraic and differential, and for the evaluation of integrals, in principle there is no need for the investigator to do anything other than turn to them. However, it should be a part of every engineer's or scientist's repertoire to have some understanding of the kinds of procedure that are being put into practice within those packages. The present chapter indicates (at a simple level) some of the ways in which analytically intractable problems can be tackled using numerical methods.
In the restricted space available in a book of this nature, it is clearly not possible to give anything like a full discussion, even of the elementary points that will be made in this chapter. The limited objective adopted is that of explaining and illustrating by simple examples some of the basic principles involved. In many cases, the examples used can be solved in closed form anyway, but this ‘obviousness’ of the answers should not detract from their illustrative usefulness, and it is hoped that their transparency will help the reader to appreciate some of the inner workings of the methods described.
This chapter is concerned with the formalism of probably the most widely used mathematical technique in the physical sciences, namely the calculus. The chapter divides into two sections. The first deals with the process of differentiation and the second with its inverse process, integration. The material covered is essential for the remainder of the book and serves as a reference. Readers who have previously studied these topics should ensure familiarity by looking at the worked examples in the main text and by attempting the exercises at the end of the chapter.
Differentiation
Differentiation is the process of determining how quickly or slowly a function varies, as the quantity on which it depends, its argument, is changed. More specifically it is the procedure for obtaining an expression (numerical or algebraic) for the rate of change of the function with respect to its argument. Familiar examples of rates of change include acceleration (the rate of change of velocity) and chemical reaction rate (the rate of change of chemical composition). Both acceleration and reaction rate give a measure of the change of a quantity with respect to time. However, differentiation may also be applied to changes with respect to other quantities, for example the change in pressure with respect to a change in temperature.
Although it will not be apparent from what we have said so far, differentiation is in fact a limiting process, that is, it deals only with the infinitesimal change in one quantity resulting from an infinitesimal change in another.
As is natural, in the four years since the publication of the second edition of this book we have somewhat modified our views on what should be included and how it should be presented. In this new edition, although the range of topics covered has been extended, there has been no significant shift in the general level of difficulty or in the degree of mathematical sophistication required. Further, we have aimed to preserve the same style of presentation as seems to have been well received in the first two editions. However, a significant change has been made to the format of the chapters, specifically to the way that the exercises, together with their hints and answers, have been treated; the details of the change are explained below.
The two major chapters that are new in this third edition are those dealing with ‘special functions’ and the applications of complex variables. The former presents a systematic account of those functions that appear to have arisen in a more or less haphazard way as a result of studying particular physical situations, and are deemed ‘special’ for that reason. The treatment presented here shows that, in fact, they are nearly all particular cases of the hypergeometric or confluent hypergeometric functions, and are special only in the sense that the parameters of the relevant function take simple or related values.
The second new chapter describes how the properties of complex variables can be used to tackle problems arising from the description of physical situations or from other seemingly unrelated areas of mathematics.
Differential equations are the group of equations that contain derivatives. Chapters 14–21 discuss a variety of differential equations, starting in this chapter and the next with those ordinary differential equations (ODEs) that have closed-form solutions. As its name suggests, an ODE contains only ordinary derivatives (no partial derivatives) and describes the relationship between these derivatives of the dependent variable, usually called y, with respect to the independent variable, usually called x. The solution to such an ODE is therefore a function of x and is written y(x). For an ODE to have a closed-form solution, it must be possible to express y(x) in terms of the standard elementary functions such as exp x, ln x, sin x etc. The solutions of some differential equations cannot, however, be written in closed form, but only as an infinite series; these are discussed in chapter 16.
Ordinary differential equations may be separated conveniently into different categories according to their general characteristics. The primary grouping adopted here is by the order of the equation. The order of an ODE is simply the order of the highest derivative it contains. Thus equations containing dy/dx, but no higher derivatives, are called first order, those containing d2y/dx2 are called second order and so on. In this chapter we consider first-order equations, and in the next, second- and higher-order equations.
It is not unusual in the analysis of a physical system to encounter an equation in which an unknown but required function y(x), say, appears under an integral sign. Such an equation is called an integral equation, and in this chapter we discuss several methods for solving the more straightforward examples of such equations.
Before embarking on our discussion of methods for solving various integral equations, we begin with a warning that many of the integral equations met in practice cannot be solved by the elementary methods presented here but must instead be solved numerically, usually on a computer. Nevertheless, the regular occurrence of several simple types of integral equation that may be solved analytically is sufficient reason to explore these equations more fully.
We shall begin this chapter by discussing how a differential equation can be transformed into an integral equation and by considering the most common types of linear integral equation. After introducing the operator notation and considering the existence of solutions for various types of equation, we go on to discuss elementary methods of obtaining closed-form solutions of simple integral equations. We then consider the solution of integral equations in terms of infinite series and conclude by discussing the properties of integral equations with Hermitian kernels, i.e. those in which the integrands have particular symmetry properties.
Obtaining an integral equation from a differential equation
Integral equations occur in many situations, partly because we may always rewrite a differential equation as an integral equation.
All scientists will know the importance of experiment and observation and, equally, be aware that the results of some experiments depend to a degree on chance. For example, in an experiment to measure the heights of a random sample of people, we would not be in the least surprised if all the heights were found to be different; but, if the experiment were repeated often enough, we would expect to find some sort of regularity in the results. Statistics, which is the subject of the next chapter, is concerned with the analysis of real experimental data of this sort. First, however, we discuss probability. To a pure mathematician, probability is an entirely theoretical subject based on axioms. Although this axiomatic approach is important, and we discuss it briefly, an approach to probability more in keeping with its eventual applications in statistics is adopted here.
We first discuss the terminology required, with particular reference to the convenient graphical representation of experimental results as Venn diagrams. The concepts of random variables and distributions of random variables are then introduced. It is here that the connection with statistics is made; we assert that the results of many experiments are random variables and that those results have some sort of regularity, which is represented by a distribution. Precise definitions of a random variable and a distribution are then given, as are the defining equations for some important distributions. We also derive some useful quantities associated with these distributions.
For systems that have some degree of symmetry, full exploitation of that symmetry is desirable. Significant physical results can sometimes be deduced simply by a study of the symmetry properties of the system under investigation. Consequently it becomes important, for such a system, to identify all those operations (rotations, reflections, inversions) that carry the system into a physically indistinguishable copy of itself.
The study of the properties of the complete set of such operations forms one application of group theory. Though this is the aspect of most interest to the physical scientist, group theory itself is a much larger subject and of great importance in its own right. Consequently we leave until the next chapter any direct applications of group theoretical results and concentrate on building up the general mathematical properties of groups.
Groups
As an example of symmetry properties, let us consider the sets of operations, such as rotations, reflections, and inversions, that transform physical objects, for example molecules, into physically indistinguishable copies of themselves, so that only the labelling of identical components of the system (the atoms) changes in the process. For differently shaped molecules there are different sets of operations, but in each case it is a well-defined set, and with a little practice all members of each set can be identified.
As simple examples, consider (a) the hydrogen molecule, and (b) the ammonia molecule illustrated in figure 28.1.
Any student of the physical sciences will encounter the subject of oscillations on many occasions and in a wide variety of circumstances, for example the voltage and current oscillations in an electric circuit, the vibrations of a mechanical structure and the internal motions of molecules. The matrices studied in the previous chapter provide a particularly simple way to approach what may appear, at first glance, to be difficult physical problems.
We will consider only systems for which a position-dependent potential exists, i.e., the potential energy of the system in any particular configuration depends upon the coordinates of the configuration, which need not be be lengths, however; the potential must not depend upon the time derivatives (generalised velocities) of these coordinates. So, for example, the potential −qv · A used in the Lagrangian description of a charged particle in an electromagnetic field is excluded. A further restriction that we place is that the potential has a local minimum at the equilibrium point; physically, this is a necessary and sufficient condition for stable equilibrium. By suitably defining the origin of the potential, we may take its value at the equilibrium point as zero.
We denote the coordinates chosen to describe a configuration of the system by qi, i = 1, 2, …, N. The qi need not be distances; some could be angles, for example. For convenience we can define the qi so that they are all zero at the equilibrium point.