1 / 9

Lecture on Numerical Analysis

Lecture on Numerical Analysis. Dr.-Ing. Michael Dumbser. 17 / 12 / 2007. Ordinary Differential Equations. An equation of the form. is called a nonlinear ordinary differential equation (ODE) of first order. The simplest first order ODE is the equation. with.

casey-guy
Download Presentation

Lecture on Numerical Analysis

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture on Numerical Analysis Dr.-Ing. Michael Dumbser 17 / 12 / 2007

  2. Ordinary Differential Equations An equation of the form is called a nonlinear ordinary differential equation (ODE) of first order. The simplest first order ODE is the equation with The exact solution of this simple ODE is obtained as follows:

  3. Ordinary Differential Equations A simple nonlinear ordinary differential equation (ODE) of first order is given by with The exact solution of this simple nonlinear ODE can be computed in a similar way:

  4. Numerical Methods for the Integration of ODE The simplest numerical method for the integration of first order ODEs is theso-called explicit (forward) Euler method, invented already in the 18th century by the mathematician Leonhard Euler. It corresponds to the use of a first order accuratefinite difference scheme to approximate the derivative on the left hand side of the ODEand to compute the operator on the right hand side at the current state yn and time tn: Computing the function f on the right hand side at the unknown time tn+1, weobtain the so-called implicit (backward) Euler method:

  5. Numerical Methods for the Integration of ODE A simple modification of the forward Euler scheme, which yields a second order accurate method, is based on the following approach: Integrate the ODE from time level tn to time level tn+1: The integral on the right hand side is now evaluated using a one-point Gaussian quadrature formula (the midpoint is the integration point): Unfortunately, the value of y is not known at tn+1/2, but we can approximate it making a half time-step of the forward Euler scheme. This means, that first, a so-called predictor is computed at the half time-step Dt/2: The corrector is then:

  6. Numerical Methods for the Integration of ODE One of the most famous and mostly commonly used schemes for ODE integration is the explicit fourth-order scheme of Runge and Kutta:

  7. Exercise 1 • Write a MATLAB script ODECompare.m that integrates the following two ODE: • Use the explicit (forward) Euler method, using different time steps and compare with the exact solutions. • Use the modified second order Euler method (=second order Runge-Kutta scheme) with different time steps, and compare with the exact solutions. • Use the fourth order Runge-Kutta scheme with various time steps. Compare with the exact solutions.

  8. Exercise 2 Wite a MATLAB script Springs.m that integrates the linear ODE system for position and velocity for a system of N point masses, connected by springs as follows: mi+1 mN mi mi-1 m1 The ODE system for the positions of the point masses is simply: The forces acting on point mass i are Where ki are the spring stiffnesses and Li are the lengths of the springs in their undeformed state. The ODE system for the velocities of the point masses is then Use the second order Runge-Kutta scheme (modified Euler method).

  9. Exercise 3 Wite a MATLAB script Orbit.m that integrates the linear ODE system for position and velocity for a planet, turning around a star. The ODE system for the position vector of the planet is: The gravitation force of the star, acting on the planet, is given by: The ODE system for the velocity vector of the planet is Use the second order Runge-Kutta time integration scheme (modified Euler method).

More Related