10.07.2015 Views

x - IfB

x - IfB

x - IfB

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Susceptibility(T )TTcγ = 7/4 (2d)γ ≈ 1.24 (3d)numerical data from a finite system27MC of the Ising ModelSingle flip Metropolis:new configurationold configuration• Choose one site i (having spin σ i ).• Calculate ΔE = E(Y) -E(X) = 2Jσ i h i .• If ΔE < 0 then flip spin: σ i → - σ i .• If ΔE > 0 flip with probability exp(-ΔE/kT).where h i is the local field at site iapplethi nn of ij28


Binary mixtures(lattice gas)Consider two species A and B distributed withgiven concentrations on the sites of a lattice.E AA is energy of A-A A A bond.E BB is energy of B-B B B bond.E AB is energy of A-B A B bond.Set E AA = E BB = 0 and E AB = 1.Number of each species is constant.29Kawasaki dynamics• Choose any A-B bond.• Calculate ΔE for A-B → B-A.• Metropolis: If ΔE ≤ 0 flip, elseflip with p = exp(-βΔE).• Glauber: Flip with probabilityp = exp(- βΔE)/(1+ exp(- βΔE)).β = 1/kTKyozi Kawasaki30


Interfaces31InterfacesABAsurface tension fA+BfA32


Shape of dropL = 257, V = 6613, g = 0.001after 51057 MC updatesaveraged over 20 samples.Contact angle θ is functionof temperature and vanisheswhen approaching T c .θ39Solving equationsFinding the solution (root)) of an equation:f (x)) = 0is equivalent to the optimization problemof finding the minimum (ormaximum) ) of F(x)given by:d F ( x )dx 073


Newton methodBe x 0 a first guess, then linearize around x 0 :f( x ) f( x ) ( x x ) f '( x ) 01 0 1 0 0x n1x nf( x )fn'( x )n74Secant methodIf derivative of f is not known analytically:ff( x ) f( x )n n1'( xn) xn xn1x x ( x x)n1 n n n1f( x )nf( x ) f( x )nn175


Secant method76Bisection methodTake two starting values x 1 and x 2with f (x 1 ) < 0 and f (x 2 ) > 0.Define mid-pointx m as x m = (x(1 + x 2 ) / 2 .If sign(f (x m )) = sign(f (x 1 ))then replace x 1 by x motherwise replace x 2 by x m .77


Bisection method78Regula falsiTake two starting values x 1 and x 2with f (x 1 ) < 0 and f (x 2 ) > 0.Approximate f by a straight line betweenf (x 1 ) and f (x 2 ) and calculate its root as:x m = (f((x 1 ) x 2 – f (x 2 ) x 1 ) / (f (x 1 ) – f (x 2 )).If sign(f (x m )) = sign(f (x 1 )), thenreplace x 1 by x m otherwise replace x 2 by x m .79


Regula falsi80N-dimensionalequationsBex a N-dimensionalvector.System of N coupled equations: f ( x)0corresponding to the N-dimensionaloptimization problem: ( x F ) 081


N-dimensional Newton methodJDefine the Jacobi matrix:i,j fi( x)( x) xj x x J f xMust be non-singularandalso well-conditionedfor numerical inversion. 1( )n1n n82System of linear equationsb 11 x 1 +. . . . + b 1N x N = c 1. . . . . .. . . . . .b N1 x 1 + . . . + b NN x N = c N Bxcsolution:x B1c83


System of linear equations f( x) Bxc 0J Bapply Newton method: 1 1x n 1x nB ( Bx nc) B c exact solution in one step x x J f x 1( )n1n n84N-dimensionalsecant methodIf the derivatives are not known analytically:Ji,j( x) f ( xh e ) f ( x)i j j ihjwhere h j should be chosen as:being ε the machine precision,i.e. ≈ 10 -16for a 64 bit computer.hj x j85


Other techniquesRelaxation method: f( x) 0 x g ( x , j i), i 1,...,Ni i jStart with x i (0) and iterate: x i (t+1) = g i (x j (t)).Gradient methods:1. Steepest descent2. Conjugate gradient86Ordinary differential equationsFirst order ODE, initial value problem:dydt f( y, t)with y (t 0 ) = y 0examples:radioactive decaycoffee coolingdTdtdNdtN( T T)room87


Euler methodexplicit forward integration algorithmchoose small Δt, , Taylor expansion:dy2y( t0 t) y( t0) t ( t0) O( t)dt y t f( y , t ) O( t) y( t ) y20 0 0 1 1convention:tn t0 nt , yn y( tn)88Euler methodStart with y 0 and iterate:y y t f y t O t 2n1 n(n,n) ( )This is the simplest finite difference method.Since the error goes with Δ 2 t one needs a verysmall Δt and that is numerically very expensive.89


Euler method for N coupled ODEsN coupled ODEsof first order:dydtif ( y ,..., y , t) , i ,..., Ni1 N1iterate with a small Δt :y t y t t f y t y t t O t2i( n1) i( n) i( 1( n),..., N( n), n) ( )witht t ntn092The order of a methodIf the error at one time-stepis O(Δ n t) themethod is „locallyof order n“. . To consider afixed time interval T one needs T /Δt time-stepsso that the total error is:T O t O ttnn1( ) ( )and therefore the method is „globallyof order n-1“.The Euler method is globally of first order.93

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!