DIFFERENTIAL EQUATIONS, INTEGRATION, POLYNOMIALS, RANDOM NUMBERS MEKANIKA SOFTWARE SEMINARS.

Slides:



Advertisements
Similar presentations
Boundary Value Problems and Partial Differential Equations (PDEs)
Advertisements

Partial Differential Equations
MATLAB EXAMPLES Initial-value problems
Numerical Differentiation and Quadrature (Integration) 1Daniel Baur / Numerical Methods for Chemical Engineers / Numerical Quadrature Daniel Baur ETH Zurich,
P. Venkataraman Mechanical Engineering P. Venkataraman Rochester Institute of Technology DETC2013 – 12269: Continuous Solution for Boundary Value Problems.
Point-wise Discretization Errors in Boundary Element Method for Elasticity Problem Bart F. Zalewski Case Western Reserve University Robert L. Mullen Case.
P. Venkataraman Mechanical Engineering P. Venkataraman Rochester Institute of Technology DETC2014 – 35148: Continuous Solution for Boundary Value Problems.
III Solution of pde’s using integral transforms Introduction Convolution theorem Application of Fourier Transforms, Sine and Cosine Transforms Application.
Ordinary Differential Equations
Total Recall Math, Part 2 Ordinary diff. equations First order ODE, one boundary/initial condition: Second order ODE.
Part 6 Chapter 22 Boundary-Value Problems PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill.
MECH300H Introduction to Finite Element Methods Lecture 2 Review.
Lecture 34 - Ordinary Differential Equations - BVP CVEN 302 November 28, 2001.
1 Chapter 9 NUMERICAL SOLUTION OF PARTIAL DIFFERENTIAL EQUATIONS.
Math 3120 Differential Equations with Boundary Value Problems
Ordinary Differential Equations Final Review Shurong Sun University of Jinan Semester 1,
Chap 1 First-Order Differential Equations
Ordinary Differential Equations S.-Y. Leu Sept. 21,28, 2005.
Numerical Methods for Partial Differential Equations
MATH 175: NUMERICAL ANALYSIS II CHAPTER 3: Differential Equations Lecturer: Jomar Fajardo Rabajante 2nd Sem AY IMSP, UPLB.
Ordinary Differential Equations (ODEs) 1Daniel Baur / Numerical Methods for Chemical Engineers / Explicit ODE Solvers Daniel Baur ETH Zurich, Institut.
Chapter 1: First-Order Differential Equations 1. Sec 1.1: Differential Equations and Mathematical Models Definition: Differential Equation An equation.
Ordinary Differential Equations (ODEs) 1Daniel Baur / Numerical Methods for Chemical Engineers / Explicit ODE Solvers Daniel Baur ETH Zurich, Institut.
Today’s class Boundary Value Problems Eigenvalue Problems
CMPS1371 Introduction to Computing for Engineers NUMERICAL METHODS.
ORDINARY DIFFERENTIAL EQUATION (ODE) LAPLACE TRANSFORM.
Mathematics for Computer Graphics (Appendix A) Won-Ki Jeong.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Introduction to MATLAB 7 for Engineers William J. Palm.
Chapter 17 Boundary Value Problems. Standard Form of Two-Point Boundary Value Problem In total, there are n 1 +n 2 =N boundary conditions.
ME451 Kinematics and Dynamics of Machine Systems Numerical Solution of DAE IVP Newmark Method November 1, 2013 Radu Serban University of Wisconsin-Madison.
Chapter 9 Laplace Transform §9.1 Definition of Laplace Transform §9.2 Properties of Laplace Transform §9.3 Convolution §9.4 Inverse Laplace Transform §9.5.
Newton's Method for Functions of Several Variables Joe Castle & Megan Grywalski.
Boundary Value Problems and Least Squares Minimization
Copyleft  2005 by Media Lab Ordinary Differential Equations Boundary Value Problems.
MATLAB for Engineers 4E, by Holly Moore. © 2014 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected by Copyright.
Integration of 3-body encounter. Figure taken from
6. Introduction to Spectral method. Finite difference method – approximate a function locally using lower order interpolating polynomials. Spectral method.
Boundary-Value Problems Boundary-value problems are those where conditions are not known at a single point but rather are given at different values of.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 6 - Chapter 24 Boundary Value Problems.
Beginning Programming for Engineers
Modelling & Simulation of Chemical Engineering Systems Department of Chemical Engineering King Saud University 501 هعم : تمثيل الأنظمة الهندسية على الحاسب.
Ordinary Differential Equations (ODEs) 1Michael Sokolov / Numerical Methods for Chemical Engineers / Explicit ODE Solvers Michael Sokolov ETH Zurich, Institut.
ACSL, POSTECH1 MATLAB 입문 CHAPTER 8 Numerical calculus and differential equations.
Recap Cubic Spline Interpolation Multidimensional Interpolation Curve Fitting Linear Regression Polynomial Regression The Polyval Function The Interactive.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 27.
ME451 Kinematics and Dynamics of Machine Systems Numerical Integration. Stiffness: Implicit Methods. October 30, 2013 Radu Serban University of Wisconsin-Madison.
Partial Derivatives bounded domain Its boundary denoted by
Partial Derivatives Example: Find If solution: Partial Derivatives Example: Find If solution: gradient grad(u) = gradient.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. A Concise Introduction to MATLAB ® William J. Palm III.
ACSL, POSTECH1 MATLAB 입문 CHAPTER 8 Numerical Calculus and Differential Equations.
Sec 232: The coefficient tableau 2ed order RK method Expand all f around (x,y) using Taylor expansion in 2d and then choose constants such that the equation.
First-order Differential Equations Chapter 2. Overview II. Linear equations Chapter 1 : Introduction to Differential Equations I. Separable variables.
Differential Equations
case study on Laplace transform
Introduction to Programming for Mechanical Engineers
Modeling and Simulation Dr. Mohammad Kilani
Numerical Methods by Dr. Laila Fouad.
CHAPTER 3 NUMERICAL METHODS.
Chapter 7 Differential Equation Problems
Sec:25.3 RUNGE-KUTTA METHODS.
MATH My research interests lie primarily in the area of numerical analysis and scientific computing, …
Objective Numerical methods Finite volume.
NUMERICAL INTEGRATION
Sec:5.4 RUNGE-KUTTA METHODS.
MATH-321 In One Slide MATH-321 & MATLAB Command.
Finite element method.
Introduction to Ordinary Differential Equations
6th Lecture : Numerical Methods
Y. Sumino (Tohoku Univ.) Evaluation of Master Integrals:
Programming assignment #1 Solving an elliptic PDE using finite differences Numerical Methods for PDEs Spring 2007 Jim E. Jones.
Presentation transcript:

DIFFERENTIAL EQUATIONS, INTEGRATION, POLYNOMIALS, RANDOM NUMBERS MEKANIKA SOFTWARE SEMINARS

ODE INITIAL VALUE PROBLEMS ODE solvers handle the following types of first-order ODE’s: –Explicit ODEs –Linearly implicit ODEs –Fully implicit ODEs ODE IVP solvers include: –ode45, ode23, ode113 (non-stiff DE’s) –ode23t, ode23tb (moderately stiff DE’s) –ode15s, ode23s (stiff DE’s) –ode15i (fully implicit DE’s) All ODE’s must be reduced to first order DE’s by substitutions before MATLAB can actually solve them.

ODE IVP SYNTAX ODE syntax : –[t,y] = solver (odefun, tspan, y0) –[t,y] = ode15i (odefun, tspan, y0, yp0) The odefun is generally given as a function handle: where function defines the ODE. Another parameter may be included in certain cases in the syntax, viz. options For ode15i one must endeavor to use the decic function in MATLAB to compute consistent initial conditions. [y0mod,yp0mod] = decic (odefun,t0,y0,fixed_y0,yp0,fixed_yp0)

ODE BOUNDARY VALUE PROBLEMS Just as IVP’s require the initial conditions to be explicitly specified, BVP’s require boundary conditions to be specified. While solving BVP’s we must give MATLAB a consistent and continuous initial solution from where to begin its iterations. To do this, we use the bvpinit function as: solinit = bvpinit( x, yinit, parameters) This generates an initial mesh from which bvpinit can form a good starting point for the BVP solver The BVP solver is bvp4c, which solves 2-point BVP’s using a 3-stage finite difference Lobatto-Illa formula which is 4 th order uniformly accurate.

ODE BVP SYNTAX sol = bvp4c(odefun,bcfun,solinit) bcfun is a function that computes the residual in the boundary conditions. –res = bcfun (ya,yb) solinit is a structure containing the initial guess for a solution.

PARTIAL DIFFERENTIAL EQUATIONS c * δu/δt = x -m * f + s –c : coupling matrix; diagonal –m : symmetry of the problem –f : flux vector –s : source vector –all of the above are expressed as some function of (x, t, u, δu/δx) The PDE holds for t 0 <t<t f and a<x<b and must satisfy : –IC : u(x, t 0 ) = u 0 (x) –BC : p(x,t,u) + q(x,t)*f = 0

PDE SOLVER SYNTAX sol = pdepe (m,pdefun,icfun,bcfun,xmesh,tspan) –[c,f,s] = pdefun (x,t,u,dudx) –u = icfun(x) –[pl,ql,pr,qr] = bcfun(xl,ul,xr,ur,t) –Vector [x0, x1,..., xn] –Vector [t0, t1,..., tf] sol is a 3-dimensional vector where sol(i, j, k) gives component k of the solution at time tspan(i) and the mesh point xmesh(j) [uout,DuoutDx] = pdeval (m,x,u(j,:),xout)

NUMERICAL INTEGRATION Numerically evaluate with adaptive Simpson quadrature –q = quad(fun,a,b,tol) Numerically evaluate with adaptive Lobatto quadrature –q = quadl(fun,a,b,tol) Double integration –q = dblquad(fun,xmin,xmax,ymin,ymax,tol) Triple Integration –triplequad(fun,xmin,xmax,ymin,ymax,zmin,zmax)

IMPORTANT TRANSFORMS FOURIER TRANSFORM : F = fourier(f) LAPLACE TRANSFORM : L = laplace(F) Z-TRANSFORM : F = ztrans(f) INVERSE FOURIER : F = ifourier(f) INVERSE LAPLACE : L = ilaplace(F) INVERSE Z-TRANSFORM : F = iztrans(f)

POLYNOMIAL MANIPULATION CONVOLUTION : w = conv(u,v) DECONVOLUTION : [q,r] = deconv(v,u) RESIDUE : [r,p,k] = residue(b,a) DERIVATIVE : k = polyder(p) INTEGRATION : polyint(p,k) CURVE FITTING : [p,S,mu] = polyfit(x,y,n) EVALUATION : [y,delta] = polyval(p,x,S,mu)

RANDOM NUMBER GENERATION UNIFORM RANDOM NUMBERS : Y = rand(m,n) NORMAL RANDOM NUMBERS : Y = randn(m,n) RANDOM PERMUTATION : p = randperm(n)