Computational Physics (Lecture 3) PHY4370. Interpolation Computer is a system with finite number of discrete states. – In numerical analysis, the results.

Slides:



Advertisements
Similar presentations
Don’t Ever Give Up!.
Advertisements

Chapter 11-Functions of Several Variables
Numerical Integration
Crystal diffraction Laue Nobel prize Max von Laue
Numerical Methods.  Polynomial interpolation involves finding a polynomial of order n that passes through the n+1 points.  Several methods to obtain.
Reciprocal lattice How to construct reciprocal lattice
EEE539 Solid State Electronics
CHAPTER 2 : CRYSTAL DIFFRACTION AND PG Govt College for Girls
Solid State Physics 2. X-ray Diffraction 4/15/2017.
Chapter 7 Numerical Differentiation and Integration
CE33500 – Computational Methods in Civil Engineering Differentiation Provided by : Shahab Afshari
Expression of d-dpacing in lattice parameters
ES 240: Scientific and Engineering Computation. InterpolationPolynomial  Definition –a function f(x) that can be written as a finite series of power functions.
Lecture 3: Integration. Integration of discrete functions
Chapter 1 Introduction The solutions of engineering problems can be obtained using analytical methods or numerical methods. Analytical differentiation.
Curve-Fitting Regression
Curve-Fitting Polynomial Interpolation
John Bargar 2nd Annual SSRL School on Hard X-ray Scattering Techniques in Materials and Environmental Sciences May 15-17, 2007 What use is Reciprocal Space?
16 MULTIPLE INTEGRALS.
Chapter 7 Differentiation and Integration
Analysis of crystal structure x-rays, neutrons and electrons
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Numerical Differentiation and Integration Standing.
VIII. Kinematical Theory of Diffraction 8-1. Total Scattering Amplitude The path difference between beams scattered from the volume element apart is The.
NUMERICAL DIFFERENTIATION The derivative of f (x) at x 0 is: An approximation to this is: for small values of h. Forward Difference Formula.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Numerical Differentiation and Integration Standing.
Analysis of crystal structure x-rays, neutrons and electrons
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Numerical Differentiation and Integration Part 6 Calculus.
CpE- 310B Engineering Computation and Simulation Dr. Manal Al-Bzoor
SE-280 Dr. Mark L. Hornick Numerical Integration.
MECN 3500 Inter - Bayamon Lecture Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
Simulation of Random Walk How do we investigate this numerically? Choose the step length to be a=1 Use a computer to generate random numbers r i uniformly.
CMPS1371 Introduction to Computing for Engineers NUMERICAL METHODS.
CSE 330 : Numerical Methods
Interpolation. Interpolation is important concept in numerical analysis. Quite often functions may not be available explicitly but only the values of.
MA2213 Lecture 4 Numerical Integration. Introduction Definition is the limit of Riemann sums I(f)
Introduction to integrals Integral, like limit and derivative, is another important concept in calculus Integral is the inverse of differentiation in some.
Today’s class Spline Interpolation Quadratic Spline Cubic Spline Fourier Approximation Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 1.
Chapter 8 Curve Fitting.
Curve-Fitting Regression
1 Spring 2003 Prof. Tim Warburton MA557/MA578/CS557 Lecture 8.
Electronic Band Structures electrons in solids: in a periodic potential due to the periodic arrays of atoms electronic band structure: electron states.
Lecture 22 Numerical Analysis. Chapter 5 Interpolation.
Characteristic vibrations of the field. LL2 section 52.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 6 - Chapter 21.
ACSL, POSTECH1 MATLAB 입문 CHAPTER 8 Numerical calculus and differential equations.
Protein Structure Determination Lecture 4 -- Bragg’s Law and the Fourier Transform.
Principles of Extrapolation
Antiderivatives and Indefinite Integration
DOUBLE INTEGRALS OVER RECTANGLES
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 5 Integration and Differentiation.
2. Wave Diffraction and Reciprocal Lattice Diffraction of Waves by Crystals Scattered Wave Amplitude Brillouin Zones Fourier Analysis of the Basis Quasicrystals.
ESTIMATION METHODS We know how to calculate confidence intervals for estimates of  and  2 Now, we need procedures to calculate  and  2, themselves.
Fourier transform from r to k: Ã(k) =  A(r) e  i k r d 3 r Inverse FT from k to r: A(k) = (2  )  3  Ã(k) e +i k r d 3 k X-rays scatter off the charge.
Ø. Prytz Introduction to diffraction Øystein Prytz January
Computational Physics (Lecture 4) PHY4370. Random Variable, density function and distribution function.
Computational Physics (Lecture 12) PHY4370. The Euler and Picard methods Numerically, we can rewrite the velocity as: Here, i is the ith time step. Let.
Computational Physics (Lecture 14) PHY4061. What happens if the string is not light, and/or carries a mass density ρ(x) that is not a constant? This is.
Interpolation - Introduction
NUMERICAL DIFFERENTIATION Forward Difference Formula
High Accuracy Differentiation Formulas
Part 6 - Chapter 21.
Interpolation Estimation of intermediate values between precise data points. The most common method is: Although there is one and only one nth-order.
Chapter 18.
Interpolation.
Chapter 18.
Chapter 23.
Today’s class Multiple Variable Linear Regression
SKTN 2393 Numerical Methods for Nuclear Engineers
SKTN 2393 Numerical Methods for Nuclear Engineers
Presentation transcript:

Computational Physics (Lecture 3) PHY4370

Interpolation Computer is a system with finite number of discrete states. – In numerical analysis, the results obtained from computations are always approximations of the desired quantities and in most cases are within some uncertainties. Interpolation is needed – When we need to infer some information from discrete data.

The simplest way to obtain the approximation of f (x) for x ∈ [xi, xi+1] is to construct a straight line between xi and xi+1. Lagrange interpolation and Aitken method. – How to obtain the generalized interpolation formula passing through n data points?

Least-square approximation The global behavior of a set of data in order to understand the trend. – The most common approximation: based on the least squares of the differences between the approximation p m (x) and the data f (x).

Spline approximation A set of data that varies rapidly over the range of interest – A typical spectral measurement that contains many peaks and dips. – fit the function locally and to connect each piece of the function smoothly. – A spline interpolates the data locally through a polynomial fits the data overall by connecting each segment of the interpolation polynomial by matching the function and its derivatives at the data points.

Numerical Calculus the heart of describing physical phenomena. – The velocity and the acceleration of a particle are the first-order and second-order time derivatives of the corresponding position vector…

Numerical differentiation Taylor exapnsion: f (x) = f (x 0 ) + (x − x 0 ) f ‘(x 0 ) + (x − x 0 ) 2 /2! f’’ (x 0 )+ · · The first-order derivative of a single-variable function f (x) around a point xi is defined from the limit – f ‘(xi ) = lim ( Δ x→0) [f (xi + Δx) − f (xi )] / Δ x divide the space into discrete points x i with evenly spaced intervals, h. – f i ’= (f i+1 − f i )/h + O(h). Can be improved if we expand around i+1 and i-1: – f i ’= (f i+1 − f i-1 )/2h+ O(h). A three point formula: For a second-order derivative. A three point formula is given by the combination:

Numerical Integrations For a integral: We just divide the region [a,b] into n slices with an interval of h.

Trapezoid rule In the standard integration method To evaluate the integration of each slice, we can approximate the f(x) in the region linearly. F(x) = fi+(x-x i )(f i+1 -f i )/h Integrating each slice, we have

Random method

Two Problems: Calculate: accurate value: x x x x x x x x x x x x x x x x x x x x x x x x x x x x 10 -1

F(x) Relative error as a function of N

Sample code to illustrate the simple sampling method // An example of integration with direct Monte Carlo // scheme with integrand f(x) = x*x. import java.lang.*; import java.util.Random; public class Monte { public static void main(String argv[]) { Random r = new Random(); int n = ; double s0 = 0; double ds = 0; for (int i=0; i<n; ++i) { double x = r.nextDouble(); double f = x*x; s0 += f; ds += f*f; } s0 /= n; ds /= n; ds = Math.sqrt(Math.abs(ds-s0*s0)/n); System.out.println("S = " + s0 + " +- " + ds); }

Example 2: Calculate: Accurate result: Using the above method: x x x x x x x x x x x x x x x x x x x x x

In this example The function is significant in the range of [2,4] So it’s no good to eventually divide [0,10]

Introduction to Crystal structure - continued

Important to study reciprocal lattice Primitive translation vectors t1, t2 and t3 In the reciprocal space, we have g1, g2 and g3 t i ∙g j =2 πδ ij 2 π factor is to simplify some expressions. If a crystal rotation of t1, t2, t3 is performed in the direct space, the same rotation of g1, g2, g3 occurs in the reciprocal space. The propagation of wavevector k of a general plane wave exp(ik∙r) has the reciprocal length dimension! reciprocal lattice

All the points defined by the vectors of the type: g m = m 1 g 1 + m 2 g 2 + m 3 g 3  Reciprocal lattice Note: Only related to the translation properties of the crystal and not to the basis. Solve that general equation, we have: g 1 =2  (t 2 x t 3 ) / Ω Ω = t 1 · (t 2 х t 3 ) volume of the primitive cell g 2 =2  (t 3 x t 1 ) / Ω g 3 =2  (t 1 x t 2 ) / Ω Examples : sc sc fcc bcc bcc fcc reciprocal space

Useful Properties The direct and reciprocal lattices obey some simple useful properties 1 , the volume Ω k of the unit cell in the reciprocal space is (2π) 3 times the reciprocal of the volume of the unit cell in the direct lattice. Will be assigned as a homework to prove this 2, g m ∙t n =integer∙2π 3, If a vector q satisfies the relation, q∙t n =integer∙2π for any t n, q has to be a reciprocacl lattice vector. 4, A plane wave exp(ik ∙r) has the lattice periodicity if and only if the wavevector k equals a reciprocal lattice vector. W(r) = exp(i g m ∙r)

Fourier expansion

g m ∙t n =integer∙2π Consider a family of planes in the direct space defined by the equations: g m ∙r =integer∙2π All translation vectors belong to the family of planes. The distance between two consecutive planes is d= 2π/ g m Every reciprocal lattice vector is normal to a family of parallel and equidistant planes containing all the direct lattice points. Distance between lattice planes

MAX VON LAUE 1914 Nobel Laureate in Physics for his discovery of the diffraction of X-rays by crystals.

Laue Condition and Bragg rule Laue Condition Introduce Fourier Components of Charge density Suppose G is the reciprocal vector K is the scattering vector: difference between the ingoing and outgoing wave vectors.

1915 Nobel Laureate in Physics for their services in the analysis of crystal structure by means of X-rays SIR WILLIAM HENRY BRAGG ( ) SIR WILLIAM LAWRENCE BRAGG ( )

k-k 0 =G elastic diffraction: |k 0 |= |k|= |k - G| Squared 2 k G = G 2 Bragg plane n  2d hkl sin  Laue condition => Bragg law

3, Show the packing fraction in the following crystal structures: bcc = (√3/8)pi, fcc = (√ 2/6)pi, and Diamond=(√ 3/16)pi. 4, write a small program to integrate f(x) = x 2 from [-1, +1] using trapezoidal rule and random sampling. Estimate the standard deviations and standard errors of both methods in your calculation. Submit your code and a brief report of this problem