A Study of the Thermal Properties of a One. Dimensional Lennard-Jones System

Similar documents
Ideal Gas Behavior. NC State University

Module 5: Rise and Fall of the Clockwork Universe. You should be able to demonstrate and show your understanding of:

KINETICE THEROY OF GASES

MD Thermodynamics. Lecture 12 3/26/18. Harvard SEAS AP 275 Atomistic Modeling of Materials Boris Kozinsky

Lecture 25 Goals: Chapter 18 Understand the molecular basis for pressure and the idealgas

Physics 207 Lecture 25. Lecture 25, Nov. 26 Goals: Chapter 18 Understand the molecular basis for pressure and the idealgas

KINETIC THEORY OF GASES

Imperfect Gases. NC State University

Mechanics, Heat, Oscillations and Waves Prof. V. Balakrishnan Department of Physics Indian Institute of Technology, Madras

Molecular Motion and Gas Laws


Downloaded from

Physics 160 Thermodynamics and Statistical Physics: Lecture 2. Dr. Rengachary Parthasarathy Jan 28, 2013

Rate of Heating and Cooling

Mechanics IV: Oscillations

KINETIC THEORY OF GASES

Multiphase Flow and Heat Transfer

18 VALENCE BOND THEORY

THEORY OF MOLECULE. A molecule consists of two or more atoms with certain distances between them

Chapter 10. Thermal Physics

Condensed Matter Physics Prof. G. Rangarajan Department of Physics Indian Institute of Technology, Madras

CHEM1100 Summary Notes Module 2

ε tran ε tran = nrt = 2 3 N ε tran = 2 3 nn A ε tran nn A nr ε tran = 2 N A i.e. T = R ε tran = 2

Lecture PowerPoints. Chapter 13 Physics: Principles with Applications, 7 th edition Giancoli

Engineering Physics 1 Dr. B. K. Patra Department of Physics Indian Institute of Technology-Roorkee

The Kinetic-Molecular Theory of Gases

Chapter 14 Temperature and Heat

Heat, Work, and the First Law of Thermodynamics. Chapter 18 of Essential University Physics, Richard Wolfson, 3 rd Edition

The Kinetic-Molecular Theory of Gases

Chem 105 Friday 3 Dec 2010

Atoms, electrons and Solids

PHYSICS - CLUTCH CH 19: KINETIC THEORY OF IDEAL GASSES.

SOLIDS AND LIQUIDS - Here's a brief review of the atomic picture or gases, liquids, and solids GASES

Physics Fall Mechanics, Thermodynamics, Waves, Fluids. Lecture 20: Rotational Motion. Slide 20-1

Thermal Physics. Temperature (Definition #1): a measure of the average random kinetic energy of all the particles of a system Units: o C, K

askiitians Class: 11 Subject: Chemistry Topic: Kinetic theory of gases No. of Questions: The unit of universal gas constant in S.I.

Gases, Their Properties and the Kinetic Molecular Theory

CE 530 Molecular Simulation

Some notes on sigma and pi bonds:

CHEMISTRY Matter and Change. Chapter 12: States of Matter

Javier Junquera. Statistical mechanics

Kinetic theory. Collective behaviour of large systems Statistical basis for the ideal gas equation Deviations from ideality

Recap: Energy Accounting

Chapter 1. The Properties of Gases Fall Semester Physical Chemistry 1 (CHM2201)

Symmetry breakdown in binary elastic collisions in classical dynamics

Thermodynamics. Thermo : heat dynamics : motion Thermodynamics is the study of motion of heat. Time and Causality Engines Properties of matter

Turning up the heat: thermal expansion

Chapter 19 Entropy Pearson Education, Inc. Slide 20-1

Example questions for Molecular modelling (Level 4) Dr. Adrian Mulholland

Understanding KMT using Gas Properties and States of Matter

CHAPTER 21 THE KINETIC THEORY OF GASES-PART? Wen-Bin Jian ( 簡紋濱 ) Department of Electrophysics National Chiao Tung University

KINETIC MOLECULAR DESCRIPTION OF THE STATES OF MATTER

States of matter Part 1

From The Picture Book of Quantum Mechanics, S. Brandt and H.D. Dahmen, 4th ed., c 2012 by Springer-Verlag New York.

What is Classical Molecular Dynamics?

States of matter Part 1. Lecture 1. University of Kerbala. Hamid Alghurabi Assistant Lecturer in Pharmaceutics. Physical Pharmacy

An introduction to Molecular Dynamics. EMBO, June 2016

Structural Bioinformatics (C3210) Molecular Mechanics

UNIT 5 : STATES OF MATTER Concept 1. INTERMOLECULAR FORCES

Similarities and differences:

Fig Note the three different types of systems based on the type of boundary between system and surroundings.

11/22/2010. Mid term results. Thermal physics

C H E M 1 CHEM 101-GENERAL CHEMISTRY CHAPTER 5 GASES INSTR : FİLİZ ALSHANABLEH

First Year Physics: Prelims CP1 Classical Mechanics: DR. Ghassan Yassin

Exploring the energy landscape

Today s lecture. WEST VIRGINIA UNIVERSITY Physics

Polar? * POLAR BONDS? YES. C=O should be polar. * GEOMETRY? LINEAR geometry, with the oxygens 180 degrees apart, so NONPOLAR.

Kinetic Theory: Atomic and Molecular Explanation of Pressure and Temperature

Ideal Gases. 247 minutes. 205 marks. theonlinephysicstutor.com. facebook.com/theonlinephysicstutor. Name: Class: Date: Time: Marks: Comments:

End-of-Chapter Exercises

Name Date Class THE NATURE OF GASES

Metropolis, 2D Ising model

The broad topic of physical metallurgy provides a basis that links the structure of materials with their properties, focusing primarily on metals.

2007 Problem Topic Comment 1 Kinematics Position-time equation Kinematics 7 2 Kinematics Velocity-time graph Dynamics 6 3 Kinematics Average velocity

Concepts of Thermodynamics

Gases. Pressure is formally defined as the force exerted on a surface per unit area:

Physics 1501 Lecture 35

CHM Solids, Liquids, and Phase Changes (r15) Charles Taylor 1/9

PHYSICS 219 Homework 2 Due in class, Wednesday May 3. Makeup lectures on Friday May 12 and 19, usual time. Location will be ISB 231 or 235.

Intermolecular Potentials and The Second Virial Coefficient

International Physics Course Entrance Examination Questions

CIE Physics IGCSE. Topic 2: Thermal Physics

The Equipartition Theorem

Physics 22: Homework 1

Computer simulations as concrete models for student reasoning

Kinetic Model of Gases

Momentum and Impulse. Prefixes. Impulse F * t = delta(mv) / t OR area under Force time graph

Gases, Liquids and Solids

Molecular Dynamics Simulation of Argon

Good Vibes: Introduction to Oscillations

Thermodynamics 1 Lecture Note 2

Chemistry: The Central Science

CHAPTER III: Kinetic Theory of Gases [5%]

Chapter 9: Impulse and Momentum

Kinetic Molecular Theory, Weak Interactions, States of Matter (Why do liquids & solids exist?)

Lecture Outline Chapter 17. Physics, 4 th Edition James S. Walker. Copyright 2010 Pearson Education, Inc.

(a) (i) One of the assumptions of the kinetic theory of gases is that molecules make elastic collisions. State what is meant by an elastic collision.

Physics General Physics. Lecture 24 Oscillating Systems. Fall 2016 Semester Prof. Matthew Jones

Kinetic Theory 1 / Probabilities

Advanced sampling. fluids of strongly orientation-dependent interactions (e.g., dipoles, hydrogen bonds)

Transcription:

A Study of the Thermal Properties of a One Dimensional Lennard-Jones System Abstract In this study, the behavior of a one dimensional (1D) Lennard-Jones (LJ) system is simulated. As part of this research, a special purpose computer program was designed, coded, and tested. In both the model and the program calculations, energy and momentum are conserved. The modeling assumes constant pressure throughout each simulation, although several different pressures are modeled. The simulation yields the specific heat and the compressibility of the system, and eventually will be able to calculate heat conductivity. The model also reveals a gradual phase change when the temperature becomes high enough to break bonds in the system, allowing the particles to escape the two-particle potential energy well. An increase in the specific heat is seen as the bonds between the system particles are broken. At sufficiently high temperatures the compressibility appears to approach a value proportional to the inverse pressure of the simulation. 1

Introduction Often it is difficult to experimentally determine the thermal properties of a material under extreme conditions of pressure and temperature. In these cases it is useful to construct a modeling force law of the system, which has all the important energy terms in it. Using this mathematical model, the thermal properties of the system can be predicted. The consequences of this model can be compared to experimental data obtained under non-extreme conditions. If these agree with each other, confidence in the model is established. Having established the validity of the model, the model can then be subjected to extreme conditions, and the computations can be used to predict the real system s behavior under the same conditions. This is the approach taken in this study. A Lennard-Jones system, which obeys a Lennard-Jones potential energy formula (discussed later in this paper) is modeled [1,2,3]. The model is used to predict specific heat and compressibility, and is run under variable temperatures and pressures to establish the validity of the computations performed. The model is then used to predict behavior under extreme conditions. Although the trajectories of the particles in the Lennard Jones system can be calculated analytically for a system with two particles, the multi-particle systems in the present study require computational methods. The Lennard-Jones system is modeled with a Fortran 77 computer program written as part of this research project [4,5]. The shareware Salford compiler is used[6]. Using a 2.6 Gigahertz Pentium processor each run took about 24 hours to compute 15-20 temperature points for each pressure. The program uses Newton s Laws to predict the trajectories of the particles in the system 2

being modeled. An algorithm calculates the velocity and acceleration of the particles at a certain time, and uses that to predict the trajectories of each particle in the system for a slightly later time. This time step is done for many iterations. To minimize the error in each time step, the Verlet Algorithm was used [7-10]. The Lennard-Jones model consists of two forces: a long-range attractive force, and a short-range hard core repulsive force - two particles colliding will experience something resembling an instantaneous, elastic collision [1-3]. This attractive potential between two particles was shown experimentally by Van der Waals to scale as 1/(distance) 6, and was later proven by quantum mechanics to be caused by an induced dipole moment [2]. The nearly hard core repulsive potential, caused by the overlapping electron orbitals, is actually an exponential function, but was modeled in the Lennard- Jones system as scaling as 1/(distance) 12 due to the computational limitations of the time. This is still a valid model because both repulsive potentials approach infinity very quickly, so the actual function used to model the hard core repulsion doesn t matter very much, so long as it goes from 0 to infinity very quickly. The Lennard-Jones potential is given by where V LJ is the LJ potential, r is the distance between particles, ε is the minimum energy in the system, which is the depth of the potential well, and σ is the inter-particle spacing when the potential energy is equal to zero. The derivative of this potential, taken with respect to position, gives the Force for the LJ system: 3

Force LJ = 48ε * (σ 12 / r 13 ) - 24ε * (σ 6 / r 7 ) The LJ Potential is illustrated in the following graph, which shows how the potential energy u varies with the inteparticle spacing r. Figure 1: The Lennard Jones Potential Energy u shown as a function of inter-particle spacing r. Notice that σ is the inter-particle spacing where the potential energy u=0, and at ε u is a minimum. From ref. [2]. From Figure 1 it is seen that σ is the inter-particle spacing where the potential energy is equal to zero. There is a potential energy well of depth ε when the distance between the two particles is r = σ (2 1/6 ). This is the equilibrium position of the particle in the system since it is the minimum energy state. The first test of the model is to consider two Lennard-Jones particles near their equilibrium spacing. The simulation (see Figure 2) shows that the particle oscillations approach simple harmonic motion for small deviations from equilibrium. In this model, the particles begin at 1.2 σ apart, which is close to the equilibrium value of r = (2 1/6 ) σ. In this region of inter-particle spacing, there is a linear restoring force. The simple harmonic motion, which is observed, is expected from the symmetry of the Lennard- Jones potential for small deviations from its equilibrium (Figure 1). 4

Figure 2 Shown above is the computed result of a model of two Lennard-Jones particles that start at rest at a distance of 1.2 σ away from each other. The position is shown as a function of time, and simple harmonic motion is observed. From the graph of the Lennard-Jones potential, it is seen that as the energy of the two-particle system increases, the short-range repulsion becomes more of a hard core repulsion, meaning that two particles colliding experience a nearly instantaneous, elastic collision. For the second test of the model, this region of particle spacing was modeled, and Figure 3 shows the simulation results for the position of these particles as a function of time. The initial condition in this run is that the particles start at r =3σ, at rest. They fall towards the energy well, and oscillate around the energy well. This graph shows that the oscillations between particles are no longer simple harmonic. In the cusp-like regions of the graph, the particle velocities are high and there are high accelerations, indicating that in these regions the particles are colliding with each other, rather than oscillating smoothly about their equilibrium positions. 5

Figure 3 - This graph shows the computed position of particles which are initially placed at r =3 σ, as a function of time. The cusp-like portions of the graph represent collisions, since the velocities change rapidly in these regions. Both time and position are in arbitrary units (A.U.). A third test of the model is to see how it behaves as the temperature increases. As the temperature of the LJ system with constant pressure approaches infinity, the system is expected to become similar to a one-dimensional ideal gas. In a three dimensional ideal gas, the particles collide with the walls, while any interior collisions can be neglected. In a one dimensional ideal gas, the particles have only head-on collisions with each other, and they collide with the walls of the system. Because of this, these collisions result only in an exchange of velocities between particles, making the collisions unimportant, as it is the same as having them not interact at all. As the temperature approaches infinity, this is equivalent to the interior particles having no effect on each other, making the volume of the system approaches N*T/P, where N is the number of particles, T the temperature of 6

the system, and P the pressure of the system, which is the ideal gas law PV = nrt. The model results for volume confirmed this relationship, verifying this expected behavior. These simulation results for the behavior of the LJ system near equilibrium, its behavior farther from equilibrium, and its behavior at high temperatures establish faith in the usefulness of the Lennard-Jones model, and its predictions. With this confidence in the algorithms, the computations performed, and the computational methods, thermal properties are investigated. All of the simulations run were done under constant pressure, although the pressure is varied between runs. In one dimension, constant pressure means that the interior particles act according to the Lennard-Jones model, and that the two wall particles at the two edges of the system have an additional force exerted on them inwards, to represent the pressure exerted by the walls. In one dimension, each particle in the system has only one degree of freedom. As temperature approaches absolute zero, the energy decreases and the thermal vibrations approach simple harmonic motion. In this case the average potential energy above the minimum potential value is the same as the average kinetic energy of each particle, giving the system a specific heat of one as temperature approaches zero. Specific heat is defined as C = {Total Energy New Temperature Total Energy Old Temperature} /{n * ΔT} where n is the number of particles. As the temperature approaches infinity, the system model behaves as an ideal gas discussed previously, and under constant pressure, the specific heat approaches 3/2. At an intermediate temperature, which is high enough to break some of the bonds in the system, more heat is needed to increase the temperature further and break even more bonds between the particles, causing the specific heat to be higher. However, unlike higher dimensional phase transitions, the phase change in one 7

dimension is a gradual crossover, since it happens over a range of temperature, as the chance of each bond being broken becomes more likely as the temperature increases. For the time steps, the Verlet Algorithm [7-9] was used to minimize the error. This algorithm calculates future particle positions from acceleration and previous positions, rather than using an explicit velocity variable, giving higher accuracy. It is expected that in a constant temperature system the particle velocities resemble a Maxwell-Boltzmann distribution shown in Figure 4.1, which in 1D is a Gaussian Distribution with a mean about 0, and the standard deviation of velocities is proportional to the square root of temperature [11]. Figure 4.1-Maxwell-Boltzmann Distribution of velocities for one dimension 8

Figure 4.2-Velocity Distribution of a system with a steep temperature gradient (The right side of the system is hotter than the left). Notice how the mode velocity is slightly positive, and how velocities of -1.6 are far more frequent than velocities of 1.6 Simulation results show, however, that when heat is being transferred across the system the velocity distribution for the Lennard-Jones system doesn t perfectly fit the Maxwell-Boltzmann model; instead the velocities change into a distribution that is not quite symmetric about zero. This is seen in the simulation results shown in Figure 4.2. Because every particle is identical, many of the units of measurement can scale out. The five units in the problem are t, m, σ, distance, and ε. t is time, m is the mass of each particle, σ is the distance between each particle, distance is a measure of length, and ε is the depth of the energy well. However, in order to shorten computational time, distance can be defined in terms of σ, and time in terms of {σ 2 * m/ ε}, using only two units to represent five. As an example of what these units could represent, Argon, an ideal gas that can be modeled with the Lennard Jones potential, has ε = 1.67 *10-21 Joules, σ = 9

3.40 Angstroms, and m = 39.948 atomic mass units. With these units, an arbitrary unit of time translates to 2.1425 * 10-12 seconds. To determine the specific heat, a system of nineteen particles was created using a Fortran 77 program as described below and outlined in the program flowchart, Chart #1. The particles were placed equidistant from each other and given a Maxwell-Boltzmann distribution of velocities. The two edge particles at the boundaries of the 1D system are subject to an extra force, to represent the pressure exerted by the walls of a container. All of the particles are in contact with a heat-bath, and all particles experience random collisions with the heat-bath. The heat bath consists of imaginary particles, which occasionally collide with particles in the system. When two particles of equal mass experience a head on collision with each other, they always exchange velocities. The heat bath particles have a Maxwell-Boltzmann velocity distribution [11], so every now and then each particle in the system has a chance of acquiring a new velocity, which is dependent on the temperature of the heat-bath, but not the original velocity of the particle. The original velocity of the particle in the system is transferred to the imaginary heat bath particle. In effect, each particle occasionally gains a new velocity, randomly generated by the computer [12]. Systems with more than nineteen particles were modeled and found to yield the similar results. So, for computational reasons, the runs were done using nineteen particles. The system is allowed to come into equilibrium with the heat bath, after which the average total energy of the system is calculated. The heat-bath s temperature is then increased, and the system is allowed to equilibrate again with the hotter heat bath, after 10

11

which the new average total energy of the system is calculated. This process is done many times, and is used to determine the specific heat of the system, which is defined as C = ΔQ/{m ΔT} where C represents the specific heat, ΔQ is the heat added to the system (the change in average total energy of the system), ΔT is the change in temperature due to ΔQ, and m is the mass of the system. In the simulation, the average total energy of the system, which is the sum of the total energy at each iteration divided by the number of iterations, is compared to the total energy computed in the last iteration to obtain the specific heat. C = {Total Energy New Temperature Total Energy Old Temperature} /{N * ΔT} where N is the number of particles. There are two different ways to calculate the change in total energy. One is to calculate the total energy of the system by determining the individual particles velocities and the LJ potential energies between each particle. Another way is to monitor each collision between the particles and the heat-bath for the energy added or removed from the system. Both of these calculations gave the same results for the specific heat. For a 19-Particle Lennard Jones System, the specific heat is shown in Figure 5 at a constant pressure. The error bars are obtained using a 19-particle simulation and changing the heat bath s temperature back and forth between 0.5 and 0.15, and calculating the specific heat. The standard deviation is found, and it is assumed that energy fluctuations are proportional to temperature; therefore it was assumed that the standard deviation scaled up proportional to temperature. The horizontal error bars were so small that they couldn t be seen on the graph. 12

From Figure 5 it is apparent that the specific heat is nearly 1 at T=0. At about T = 0.5, the specific heat is a maximum, and then levels off as the temperature continues to increase. This peak in specific heat at about T=0.5 indicates that there is a gradual phase change in the system. As the pressure increases, the phase change becomes less well defined (see Figure 5). This is because at an increased pressure the attractive forces and the potential energy well become less significant since the particles are forced together by the increased pressure. Since the phase change is due to the energy well, the phase change becomes less defined, and also gets shifted to a higher temperature. As pressure increases, the temperature at which the crossover occurs is increased, and the crossover becomes more gradual. 13

Specific Heat(A.U.) Specific Heat as a Function of Temperature Pressure =.25 A.U. 4 3 2 1 0 0 0.5 1 1.5 2 Temperature(A.U.) Specific Heat (A.U.) 3 2 1 Specific Heat as a Function of Temperature Pressure =.5 A.U. 0 0 0.5 1 1.5 2 Temperature (A.U.) Specific Heat as a Function of Temperature Pressure = 1 A.U. Specific Heat (A.U.) 2.5 2 1.5 1 0.5 0 0 0.5 1 1.5 2 Temperature (A.U.) Specific Heat(A.U.) Specific Heat as a Function of Temperature Pressure = 2 A.U. 2.5 2 1.5 1 0.5 0 0 0.5 1 1.5 Temperature(A.U.) Figure 5: This figure shows the specific heat as a function of temperature as calculated from the energy changes in the system due to contact with the heat-bath at four different pressures. The LJ system consists of nineteen particles, and each simulation was run at a constant pressure. 14

Compresablilty as a Function of Temperature Pressure = 0.25 A.U. Compressability(A.U.) 4 3 2 1 0 0 0.5 1 1.5 2 2.5 Temperature (A.U.) Compressability as a Function of Temperature Pressure =.5 A.U. Compressability(A.\U.) 2 1.5 1 0.5 0 0 0.5 1 1.5 2 2.5 Temperature (A.U.) Compressability as a Function of Temperature Pressure = 1 A.U. Compressability(A.U.) 0.8 0.6 0.4 0.2 0 0 0.5 1 1.5 2 2.5 Temperature(A.U.) Compressability a a Function of Temperature Pressure = 2. A.U. Compressability (A.U.) 0.25 0.2 0.15 0.1 0.05 0 0 0.5 1 1.5 2 Temperature(A.U.) Figure 6: The compressibility of the LJ system shown as a function of temperature, determined by the volume of the system. The pressure is held constant in each simulation. 15

The compressibility, ĸ, is defined as ĸ = ΔP/(V average ΔV) ΔP is the change in pressure, V average is the average volume, and ΔV is the change in volume. This quantity could also be determined from the model by the relationship ĸ = ({V 2 } average {V average } 2 )/ V average. To calculate this, the temperature of the system is varied, and at each temperature the average volume and average volume 2 is determined. Results are shown in Figure 6. Notice that as the temperature increases, the compressibility of the system increases. This is because as the temperature increases, there is more extra space between the particles at higher temperatures. Since compressibility is measured as a deviation, the error bars are proportional to the compressibility At sufficiently high temperatures the compressibility appears to approach a value that is proportional to the inverse pressure of the simulation, as expected from the Ideal Gas Law. However, due to the hard core repulsion, it would take a truly infinite temperature to reach this compressibility, so the compressibility is slightly lower. As a result of the finite temperature, the compressibility is still approaching its asymptote. This effect is most noticeable at the higher pressures. 16

Conclusion and Future Work The properties of the 1D Lennard-Jones system, simulated as part of this research project, indicate a gradual phase change over a range of temperature. The temperature at which the phase change occurs increases as the pressure increases, as seen from the specific heat results (Figure 5). Although the compressibility initially increases with temperature, it approaches the asymptote predicted by the Ideal Gas Law (Figure 6). I would like to extend the modeling to two and three dimensions. With these added dimensions, a real system could be modeled more closely, and therefore properties of real systems could be predicted and compared with experimental results. This effort will require significantly more computer time and power. Acknowledgements I would like to thank Prof. P.B. Allen for the opportunity to perform this research in his group at SUNY Stony Brook, and for all of his guidance throughout the work presented here, and during the continuation of this project. I would also like to thank Billy Lo, Dr. Baldo, and Mr. Murphy for their help and guidance in my research endeavors. 17

References [1] G. W. Castellan, Physical Chemistry. Addison-Wesley, 1971. [2] http://polymer.bu.edu/wasser/robert/work/node8.html; formula for the Lennard-Jones Potential. [3] http://nautilus.fis.uc.pt/softc/read_c/rv/virtual_water/articles/art6/art6.html; potential energy diagram. [4] C.G. Page, Professional Programmers Guide to Fortran 77. University of Leicester Press, UK, 2001. [5] http://www-teaching.physics.ox.ac.uk/unix+prog/hargrove/tutorial_77; a Fortran tutorial. [6] http://www.salfordsoftware.co.uk/compilers/support/downloads.html; the free Fortran compiler used for the simulations [7] L. Verlet, Computer Experiments on Classical Fluids. I. Thermodynamical Properties of Lennard-Jones Molecules, Phys. Rev. 159, 98 (1967) [8] L. Verlet, Computer "Experiments" on Classical Fluids. II. Equilibrium Correlation Functions, Phys. Rev. 165, 201 (1968). [9] http://www.fisica.uniud.it/~ercolessi/md/md/node21.html; simple explanation of the Verlet alogorithm. [10] R. P. Feynman, R. B. Leighton and M. Sands, The Feynman Lectures on Physics. Vol. 1, Addison-Wesley, 1963. [11] http://www.curvefit.com/id212.htm; Graph of Maxwell-Boltzmann Distribution for 1d [12] W.H. Press, B.P. Flannery, S.A. Teukolsky, W.T. Vetterling, Numerical Recipes in Fortran. Cambridge Univ. Press, 1992. 18