Dr. Guy Tel-Zur Computational Physics Differential Equations Autumn Colors, by Bobby Mikul, Mikul Autumn Colors,

Slides:



Advertisements
Similar presentations
Lecture on Numerical Analysis Dr.-Ing. Michael Dumbser
Advertisements

Formal Computational Skills
Chapter 6 Differential Equations
Numerical Solution for Initial Value Problem Numerical Analysis.
MATLAB EXAMPLES Initial-value problems
Beginning Programming for Engineers
Computational Physics Numerical Integration Dr. Guy Tel-Zur Tulips by Anna Cervova, publicdomainpictures.net.
ECE 8443 – Pattern Recognition EE 3512 – Signals: Continuous and Discrete Objectives: Response to a Sinusoidal Input Frequency Analysis of an RC Circuit.
Solving Systems of ODE’s Dr. Mohammed Alsayed. Again we need the dsolve function. Example: For the system y 1 ' = y 2, y 2 ' = -y 1 + sin(5 t) with the.
SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM Read , 26-2, 27-1 CISE301_Topic8L8&9 KFUPM.
South China University of Technology Oscillator motions Xiaobao Yang Department of Physics
HAMPIRAN NUMERIK SOLUSI PERSAMAAN DIFERENSIAL (lanjutan) Pertemuan 12 Matakuliah: METODE NUMERIK I Tahun: 2008.
Numeriska beräkningar i Naturvetenskap och Teknik 1. Numerical differentiation and quadrature Discrete differentiation and integration Trapezoidal and.
Computational Physics Lecture 3 - Admin Dr. Guy Tel-Zur Coral. Picture by Anna Cervova, publicdomainpictures.net.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 32 Ordinary Differential Equations.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 31 Ordinary Differential Equations.
Initial-Value Problems
Dr. Jie Zou PHY Chapter 9 Ordinary Differential Equations: Initial-Value Problems Lecture (II) 1 1 Besides the main textbook, also see Ref.: “Applied.
NUMERICAL SOLUTION OF ORDINARY DIFFERENTIAL EQUATIONS
CISE301_Topic8L31 SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM (Term 101) Section 04 Read , 26-2,
Ordinary Differential Equations (ODEs) 1Daniel Baur / Numerical Methods for Chemical Engineers / Explicit ODE Solvers Daniel Baur ETH Zurich, Institut.
Fin500J Topic 7Fall 2010 Olin Business School 1 Fin500J Mathematical Foundations in Finance Topic 7: Numerical Methods for Solving Ordinary Differential.
PART 7 Ordinary Differential Equations ODEs
Ordinary Differential Equations (ODEs) 1Daniel Baur / Numerical Methods for Chemical Engineers / Explicit ODE Solvers Daniel Baur ETH Zurich, Institut.
-S.SIVARAJA Dept of MATHEMATICS.  N-NUMERICAL  M-METHODS EASY TO LEARN & EASY TO SCORE.
Boyce/DiPrima 9th ed, Ch 8.4: Multistep Methods Elementary Differential Equations and Boundary Value Problems, 9th edition, by William E. Boyce and Richard.
Lecture 35 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
Computational Physics Differential Equations
EE3561_Unit 8Al-Dhaifallah14351 EE 3561 : Computational Methods Unit 8 Solution of Ordinary Differential Equations Lesson 3: Midpoint and Heun’s Predictor.
Scientific Computing Lecture 5 Dr. Guy Tel-Zur Autumn Colors, by Bobby Mikul, Mikul Autumn Colors, by Bobby Mikul,
Beginning Programming for Engineers
Scientific Computing Home Assignment #1 Dr. Guy Tel-Zur.
Ordinary Differential Equations (ODEs) 1Michael Sokolov / Numerical Methods for Chemical Engineers / Explicit ODE Solvers Michael Sokolov ETH Zurich, Institut.
Linear approximation and differentials (Section 2.9)
Numerical Analysis – Differential Equation
Today’s class Ordinary Differential Equations Runge-Kutta Methods
Lecture 40 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
10.1 Definition of differential equation, its order, degree,
Lecture 39 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 6 - Chapters 22 and 23.
CISE301_Topic8L71 CISE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM (Term 101) Section 04 Read , 26-2,
Linear approximation and differentials (Section 3.9)
Engineering Problem Solution
Integrators of higher order
Numerical Methods by Dr. Laila Fouad.
Ordinary Differential Equations
ECE 576 – Power System Dynamics and Stability
Class Notes 18: Numerical Methods (1/2)
Numerical Solutions of Ordinary Differential Equations
SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM (Term 101) Section 04 Read , 26-2, 27-1 CISE301_Topic8L4&5.
Class Notes 19: Numerical Methods (2/2)
Section Euler’s Method
Sec:25.3 RUNGE-KUTTA METHODS.
Chapter 26.
Sec:5.4 RUNGE-KUTTA METHODS.
Numerical Analysis Lecture 37.
SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM (Term 101) Section 04 Read , 26-2, 27-1 CISE301_Topic8L2.
ME 123 Computer Applications I Lecture 23: Advanced Graphics 4/17/03
Numerical Analysis Lecture 38.
MATH 175: NUMERICAL ANALYSIS II
Numerical solution of first-order ordinary differential equations
SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM (Term 101) Section 04 Read , 26-2, 27-1 CISE301_Topic8L6.
SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM Read , 26-2, 27-1 CISE301_Topic8L3 KFUPM.
Linear approximation and differentials (Section 3.9)
Numerical Computation and Optimization
Differential equations
Numerical Analysis Lecture 36.
CISE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM Read , 26-2, 27-1 CISE301_Topic8L7 KFUPM.
Numerical solution of first-order ordinary differential equations 1. First order Runge-Kutta method (Euler’s method) Let’s start with the Taylor series.
Presentation transcript:

Dr. Guy Tel-Zur Computational Physics Differential Equations Autumn Colors, by Bobby Mikul, Mikul Autumn Colors, by Bobby Mikul, Mikul Version :30

Agenda MHJ Chapter 13 & Koonin Chapter 2 How to solve ODE using Matlab Scilab

Topics Defining the scope of the discussion Simple methods Multi-Step methods Runge-Kutta Case Studies - Pendulum

The scope of the discussion For a higher order ODE  a set of coupled 1 st order equations:

Simple methods Euler method: Integration using higher order accuracy: Taylor series expansion:

Local error! Better than Euler’s method but useful only when it is easy to differentiate f(x,y)

Example Let’s solve:

FORTRAN code

Multi-Step methods

Adams-Bashforth 2 steps: 4 steps:

(So far) Explicit methods Future = Function(Present && Past) Implicit methods Future = Function(Future && Present && Past)

Let’s calculate dy/dx at a mid way between lattice points: Rearrange: This is a recursion relation! Let’s replace:

A simplification occurs if f(x,y)=y*g(x), then the recursion equation becomes: An example, suppose g(x)=-x y n+1 =(1-x n h/2)/(1+x n+1 h/2)y n This can be easily calculated, for example: Calculate y(x=1) for h=0.5 X0=0, y(0)=1 X1=0.5, y(0.5)=? x2=1.0, y(1.0)=?

The solution:

Predictor-Corrector method

Runge-Kutta

Proceed to: Physics examples: Ideal harmonic oscillator – section

Physics Project – The pendulum, 13.7 I use a modified the C++ code from: fout.close  fout.close() Demo on folder: C:\Users\telzur\Documents\BGU\Teaching\ComputationalPhysics\2011A\Lectures\05\CPP

ODEs in Matlab function dydt = odefun(t,y) a=0.001; b=1.0; dydt -=b*t*sin(t)+a*t*t; function dydt = odefun(t,y) a=0.001; b=1.0; dydt -=b*t*sin(t)+a*t*t; Usage: [t1, 100],0); Plot(t1,y1,’r’); hold on plot(t2,y2,’b’); hold off Usage: [t1, 100],0); Plot(t1,y1,’r’); hold on plot(t2,y2,’b’); hold off Demo folder: Users\telzur\Documents\BGU\Teaching\ComputationalPhysics\2011A\Lectures\05\Matlab

Output

Parallel tools for Multi-Core and Distributed Parallel Computing

In preparation Parallel execution A new function (parallel_run) allows parallel computations and leverages multicore architectures and their capacities. Parallel execution A new function (parallel_run) allows parallel computations and leverages multicore architectures and their capacities.

Xcos demo