Workpackage 5 - Ordinary Differential Equations

Size: px
Start display at page:

Download "Workpackage 5 - Ordinary Differential Equations"

Transcription

1 Mathematics for I Workpackage 5 - Ordinary Differential Equations Introduction During this laboratory you will be introduced to some of Matlab s facilities for solving ordinary differential equations (ode). Many mathematical models are based on differential equations and it is not always possible to find an analytical solution. When classical methods fail numerical techniques can be used to find an approximate solution that is often accurate enough for our needs. (As potential engineers you may like to think about what the term accurate enough really means). The iterative nature of numerical methods makes them ideally suited for software implementation and Matlab provides the technology for doing so, not to mention all the facilities for plotting results. In addition to using Matlab s ode functions, you will also have opportunity to write your own ode solver based on Euler s method. To this end, Matlab function files are introduced. These are a type of M-file that is in a function format and enables users to develop their own specialised commands to augment the set already provided by Matlab. Objectives By the end of this experiment you should be able to : write and execute Matlab function files implement Euler s Method for simple ode problems use Matlab s functions to solve ordinary differential equations comment on the sources of error found in numerical methods appreciate the accuracy and performance of the various numerical techniques used oprionally tackle a more difficult dynamical problem using ode s (the moon lander) What must I give in and when? A copy of all your Matlab function files consisting of the commands and a full explanation of the code using comments should be placed in your h:\maths1 directory. Suggested names for the files are given in the text below (highlighted in bold) and to ensure that your work is marked please make sure that the filenames used are exactly as given. Your files should be self-contained, providing appropriate help information and producing/plotting their results. You should create a file called WP5.m and use it to guide the assessor of this workpackage through the solutions that you have achieved. Assume that the assessor will run your file WP5 and with appropriate fprintf statements, figures and any other means, guide them in a user-friendly and helpful way through your the achievements in this exercise. Assessment To assess your work, your Script File WP5.m will be examined on the screen, and then run. The assessor may optionally look at the specific m files called for below. The grade you are given will depend on two things: A judgement of the quality of the MATLAB in your solutions. A judgement of how well the results are presented when your script file is run. The optional exercise at the end of this workpackage asks for an additional file moonlander.m, and is worth 0% of the grade. The best you can get without attempting it is 80%. All exercises must be completed by the end of Monday 8th December 00. 1

2 Mathematics for I Laboratory Work Matlab Function Files Function files increase the usefulness and flexibility of Matlab. They are user-defined functions that are a special kind of M-file. By allowing the user to create Matlab functions using the Matlab language itself you can create new problem-specific functions which have the same status as other Matlab functions. A brief description of Matlab functions and an example is given below. More information can be found from the Help Window. Open the window, click on the Contents tab and then navigate to MATLAB, Using MATLAB, Programming and Data Types, M-File Programming and then Functions. function a = my_function(x,y) % a = my_function(x,y) % a = x^ + y^ a = x.^ + y.^; Open a new M-file and copy the above text into it. From the File menu choose Save and save as my_function.m which should be the name suggested. When writing function M-files it is important that the filename is the same as that of the function. The structure of the first line is function [output1,output, outputn] = function_name(input1,input, inputm) where the word function is used to differentiate function files from the Matlab script files that you encountered in the previous workpackage. Input1, input etc are the function s input variables and output1, output, etc are the output variables; these variables may be scalars or vectors or matrices. The second and third lines are comments. It is good practice to make the first comment line echo the command line as this provides the information needed to run the function. Other comments can be added to explain the operation of the function. To run the function type >> c = my_function(3,4) Here the values 3 and 4 are passed to the input variables, the calculations performed and the value of a passed back at the end of the function. It s just as easy to pass variables to functions, for example >> x=; >> y = 3; >> c = my_function(x,y) The input and output variables are internal to the function and so changing them inside the function has no effect on the variable in Matlab s main workspace. Try modifying your function file so that is passed 3 input variables, a, b and c and returns output variables, d and e where d = a^ + b^; e = a + b + c; Save this function as my_function.m. More information about Matlab Functions can be found from the Help Window. Open the window, click on the Contents tab and then navigate to MATLAB, Using MATLAB, Programming and Data Types, M-File Programming and then Functions.

3 Mathematics for I Ordinary Differential Equation Exercises It s the end of the first semester and freezing cold. Unfortunately the heating in your University accommodation is turned off at 10:00pm. The Accommodation Office believes that the radiators will stay hot all night but you think otherwise. To determine what actually happens to the temperature over time Newton s Law of Cooling can be used, given by dθ = k( θ θs ), with θ = θ 0 at time t=0 where θ S is the temperature of the surroundings, k is a constant depending on the liquid and θ(t) is the temperature of the liquid at time t. Time is taken in minutes with t=0 minutes being 10:00pm at which the temperature θ 0 =80 0 C and θ S = 0 0 C. A suitable value for k is 0.1. Using this information solve this equation analytically to find the time taken for the radiator to decrease to 3 0 C. This exact solution can be used to evaluate the accuracy of numerical methods for solving ordinary differential equations. Matlab cannot solve ordinary differential equations analytically but it can use numerical techniques to find an approximate solution. In many instances (such as the advanced exercise below) an exact solution cannot be found and a numerical methods is the only practical approach. The first numerical technique that we will look at is Euler s method. This technique uses the instantaneous gradient to predict the value after a time step. Substituting the above values gives dθ/ = -0.1θ. In 1 minute the radiator will have cooled by 0.1*80 = 8 0 C, so the temperature after 1 minute is 80 8 = 7 0 C. The new temperature gradient dθ/ = -0.1*7 = 7. 0 C, so after another time step of 1 minute the temperature lowers to 7 7. = C. For a fuller description of Euler s method see Croft, Davison and Hargraves pages Matlab function that uses Euler s method to find a numerical solution for the length of time the radiator takes to cool down to 3 0 C is given below. Include your numerical solution as a comment in the function file you write below. Write a Matlab function file euler.m that uses Euler s method to find a numerical solution for the length of time the radiator takes to cool down to 3 0 C for a given initial temperature and step size. The function file should produce output vectors of time and temperature (t and y respectively) which can be plotted using the command plot(t,y);. Use the following for the first line of the function file function [t,y] = euler(init_temp,step) It is likely that you will need to use a loop within your function file, for example see below: while init_temp>3 %your code here: % using the current temperature, calculate the temperature after the next time step % and save the time and temperature in their respective vectors end One difficulty you may encounter is that you do not know the size of the vectors of time and temperature vectors initially, as the number time steps it takes to reach 3 0 C is what you are trying to find! A neat way around this problem is to append the new values on to the old values, thus forming a vector. For example t = [t time]; 3

4 Mathematics for I will append the new value of time on to the previous values when included in the while loop loop above. Temperature (y) can be treated likewise. To investigate the affect of step size on the accuracy of the solution find the time taken when the step size = 10 minutes, 1 minute and 0.1 minutes and add these to your file as comments. Modify the program so that the temperature of the surroundings (Ts) is included in the formula and is passed as an input variable together with the constant k and the temperature to stop at (Tend). Finally, include an additional input variable that defines the maximum number of iterations for the routine. If this maximum number is reached the program should terminate and display an appropriate error message. Save this file as euler.m Matlab s ODE solvers Matlab has its own set of ready-made ordinary differential equation solvers. The most widely applicable of these is ode45 based on the Runge-Kutta method, see the Helpdesk for further information. This technique is a fairly fast and accurate method, although it does not allow the programmer to fully control the step size and requires the time interval for the integration to be defined Ode45 requires that the equations to be solved are placed in a function file that is called by the ode45 function during its execution. For example, to solve Q5. (a) from your Mathematics notes, the equation y = cos t can be represented by the following function file. function dy = ode_demo(t,y) % example ode45 file for y = cos t dy = cos(t); The initial conditions and time span to solve over are provided when calling the ode45 function >>[t, y] = ode45( ode_demo,[0 0],1); Here, the equation is solved for t = 0 to 0, subject to initial condition that y(0) = 1. Use plot(t, y) to see the result. Use ode45 to find a solution to the radiator exercise above. Save your differential equation as ode_radiator.m and include the appropriate command line function call and the time to cool to 3 0 C as comments. How does this method compare with your Euler technique in terms of accuracy and easy of computation? 4

5 Mathematics for I Advanced Exercise For full marks in this workpackage, try the final exercise in this section given below. Without this the most you can achieve id an 80% grade in this workpackage. It is conceptually difficult but the solution is not (necessarily) lengthy and it s also fun! Moon Lander A spacecraft approaches a dense spherical body. It has a speed of 10 4 ms -1 when at an altitude of 10 6 metres above the surface. Its initial mass is 10 5 kilograms and its engines develop 10 7 Newtons of thrust. The craft is heading directly for the centre of the body which has a radius of 10 5 m and the product of its mass and the universal gravitational constant is 10 1 Newton metres per kilogram. The equation governing the spacecraft s motion is where m = mass of spacecraft y = altitude R = radius of body GM = 10 1 Nm /kg d y = Thrust GM m ( y + R) The spacecraft s engine uses fuel as it thrusts, so the mass of the craft changes when the engine is on. The rate of change is given by dm = Thrust Because the mass is changing with time when the engine is on, this is a NONLINEAR problem that lacks a mathematical solution. The only way to solve it is with a numerical method. Your mission, should you choose to accept it, is to find the time at which the engine must be ignited to bring the vehicle to rest within 00m of the planet s surface. The first step to finding a solution is to reduce the above equations to a first order form that is suitable for numerical methods, see the first page for the Mathematics notes for Ordinary Differential Equations. Once this has been done both Euler s and the Runge-Kutta method used by ode45 can be used to find a solution. Note that sets of differential equations apply: one describing the motion before the engine is ignited, and one describing the motion afterwards. To obtain a solution to the problem try investigating the altitude that the spacecraft comes to rest (velocity=0) as a function of ignition time; this will get you close to the answer. Try writing your own Euler s method for this problem, saving it as euler_rocket.m. Does it seem likely that Euler s method is capable of providing a solution at all, let alone an accurate one? Next, try applying Matlab s Runge-Kutta ode solver, ode45, to this problem. You will probably have to create different M-file containing the differential equations before and after the engine is ignited. Use this method to try and find a solution by using the same approach as for Euler s method. To have this exercise marked, create the file moonlander.m to guide the assessor through your solution. Even if you have not succeeded fully, try to present your efforts and whatever results there are as best you can. 5

ChE 400: Applied Chemical Engineering Calculations Tutorial 6: Numerical Solution of ODE Using Excel and Matlab

ChE 400: Applied Chemical Engineering Calculations Tutorial 6: Numerical Solution of ODE Using Excel and Matlab ChE 400: Applied Chemical Engineering Calculations Tutorial 6: Numerical Solution of ODE Using Excel and Matlab Tutorial 6: Numerical Solution of ODE Gerardine G. Botte This handout contains information

More information

Application 7.6A The Runge-Kutta Method for 2-Dimensional Systems

Application 7.6A The Runge-Kutta Method for 2-Dimensional Systems Application 7.6A The Runge-Kutta Method for -Dimensional Systems Figure 7.6. in the text lists TI-85 and BASIC versions of the program RKDIM that implements the Runge-Kutta iteration k (,, ) = f tn xn

More information

MAT 275 Laboratory 3 Numerical Solutions by Euler and Improved Euler Methods (scalar equations)

MAT 275 Laboratory 3 Numerical Solutions by Euler and Improved Euler Methods (scalar equations) MAT 275 Laboratory 3 Numerical Solutions by Euler and Improved Euler Methods (scalar equations) In this session we look at basic numerical methods to help us understand the fundamentals of numerical approximations.

More information

MATH2071: LAB 2: Explicit ODE methods

MATH2071: LAB 2: Explicit ODE methods MATH2071: LAB 2: Explicit ODE methods 1 Introduction Introduction Exercise 1 Euler s method review Exercise 2 The Euler Halfstep (RK2) Method Exercise 3 Runge-Kutta Methods Exercise 4 The Midpoint Method

More information

MAT 275 Laboratory 3 Numerical Solutions by Euler and Improved Euler Methods (scalar equations)

MAT 275 Laboratory 3 Numerical Solutions by Euler and Improved Euler Methods (scalar equations) MATLAB sessions: Laboratory 3 1 MAT 275 Laboratory 3 Numerical Solutions by Euler and Improved Euler Methods (scalar equations) In this session we look at basic numerical methods to help us understand

More information

Modelling and Simulation for Engineers

Modelling and Simulation for Engineers Unit T7: Modelling and Simulation for Engineers Unit code: F/503/7343 QCF level: 6 Credit value: 15 Aim This unit gives learners the opportunity to develop their understanding of Ordinary Differential

More information

LAB #8 Numerical Methods

LAB #8 Numerical Methods LAB #8 Numerical Methods Goal: The purpose of this lab is to explain how computers numerically approximate solutions to differential equations. Required tools: Matlab routine dfield ; numerical routines

More information

Fall 2015 Math 337. Basic MatLab

Fall 2015 Math 337. Basic MatLab Fall 215 Math 337 Basic MatLab MatLab is a powerful software created by MathWorks, which is used extensively in mathematics, engineering, and the sciences. It has powerful numerical and graphic capabilities,

More information

Thursday 1/8 1 * syllabus, Introduction * preview reading assgt., chapter 1 (modeling) * HW review chapters 1, 2, & 3

Thursday 1/8 1 * syllabus, Introduction * preview reading assgt., chapter 1 (modeling) * HW review chapters 1, 2, & 3 Topics and Syllabus Class # Text Reading I. NUMERICAL ANALYSIS CHAPRA AND CANALE A. INTRODUCTION AND MATLAB REVIEW :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::Week

More information

dy = dx y dx Project 1 Consider the following differential equations: I. xy II. III.

dy = dx y dx Project 1 Consider the following differential equations: I. xy II. III. Project 1 Consider the following differential equations: dy = dy = y dy x + sin( x) y = x I. xy II. III. 1. Graph the direction field in the neighborhood of the origin. Graph approximate integral curves

More information

4 Visualization and. Approximation

4 Visualization and. Approximation 4 Visualization and Approximation b A slope field for the differential equation y tan(x + y) tan(x) tan(y). It is not always possible to write down an explicit formula for the solution to a differential

More information

=.1( sin(2πx/24) y) y(0) = 70.

=.1( sin(2πx/24) y) y(0) = 70. Differential Equations, Spring 2017 Computer Project 2, Due 11:30 am, Friday, March 10 The goal of this project is to implement the Euler Method and the Improved Euler Method, and to use these methods

More information

Mass-Spring Systems. Last Time?

Mass-Spring Systems. Last Time? Mass-Spring Systems Last Time? Implicit Surfaces & Marching Cubes/Tetras Collision Detection & Conservative Bounding Regions Spatial Acceleration Data Structures Octree, k-d tree, BSF tree 1 Today Particle

More information

Euler s Methods (a family of Runge- Ku9a methods)

Euler s Methods (a family of Runge- Ku9a methods) Euler s Methods (a family of Runge- Ku9a methods) ODE IVP An Ordinary Differential Equation (ODE) is an equation that contains a function having one independent variable: The equation is coupled with an

More information

over The idea is to construct an algorithm to solve the IVP ODE (9.1)

over The idea is to construct an algorithm to solve the IVP ODE (9.1) Runge- Ku(a Methods Review of Heun s Method (Deriva:on from Integra:on) The idea is to construct an algorithm to solve the IVP ODE (9.1) over To obtain the solution point we can use the fundamental theorem

More information

NUMERICAL METHODS, NM (4776) AS

NUMERICAL METHODS, NM (4776) AS NUMERICAL METHODS, NM (4776) AS Objectives To provide students with an understanding that many mathematical problems cannot be solved analytically but require numerical methods. To develop a repertoire

More information

Solution for Euler Equations Lagrangian and Eulerian Descriptions

Solution for Euler Equations Lagrangian and Eulerian Descriptions Solution for Euler Equations Lagrangian and Eulerian Descriptions Valdir Monteiro dos Santos Godoi valdir.msgodoi@gmail.com Abstract We find an exact solution for the system of Euler equations, following

More information

Module1: Numerical Solution of Ordinary Differential Equations. Lecture 6. Higher order Runge Kutta Methods

Module1: Numerical Solution of Ordinary Differential Equations. Lecture 6. Higher order Runge Kutta Methods Module1: Numerical Solution of Ordinary Differential Equations Lecture 6 Higher order Runge Kutta Methods Keywords: higher order methods, functional evaluations, accuracy Higher order Runge Kutta Methods

More information

Tutorial: Getting Started with the LabVIEW Simulation Module

Tutorial: Getting Started with the LabVIEW Simulation Module Tutorial: Getting Started with the LabVIEW Simulation Module - LabVIEW 8.5 Simulati... Page 1 of 10 Cart Help Search You are here: NI Home > Support > Product Reference > Manuals > LabVIEW 8.5 Simulation

More information

Excel Scientific and Engineering Cookbook

Excel Scientific and Engineering Cookbook Excel Scientific and Engineering Cookbook David M. Bourg O'REILLY* Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo Preface xi 1. Using Excel 1 1.1 Navigating the Interface 1 1.2 Entering Data

More information

Working Environment : Python #1

Working Environment : Python #1 Working Environment : Python #1 Serdar ARITAN Biomechanics Research Group, Faculty of Sports Sciences, and Department of Computer Graphics Hacettepe University, Ankara, Turkey 1 Physics has several aspects:

More information

Mars Pinpoint Landing Trajectory Optimization Using Sequential Multiresolution Technique

Mars Pinpoint Landing Trajectory Optimization Using Sequential Multiresolution Technique Mars Pinpoint Landing Trajectory Optimization Using Sequential Multiresolution Technique * Jisong Zhao 1), Shuang Li 2) and Zhigang Wu 3) 1), 2) College of Astronautics, NUAA, Nanjing 210016, PRC 3) School

More information

Mid-Year Report. Discontinuous Galerkin Euler Equation Solver. Friday, December 14, Andrey Andreyev. Advisor: Dr.

Mid-Year Report. Discontinuous Galerkin Euler Equation Solver. Friday, December 14, Andrey Andreyev. Advisor: Dr. Mid-Year Report Discontinuous Galerkin Euler Equation Solver Friday, December 14, 2012 Andrey Andreyev Advisor: Dr. James Baeder Abstract: The focus of this effort is to produce a two dimensional inviscid,

More information

Differential Equations (92.236) Listing of Matlab Lab Exercises

Differential Equations (92.236) Listing of Matlab Lab Exercises Differential Equations (92.236) Listing of Matlab Lab Exercises This page contains a summary list of the Matlab lab exercises available for this course. We will have roughly 10 12 lab sessions that highlight

More information

Implicit Function Explorations

Implicit Function Explorations Activities with Implicit Functions and Implicit Differentiation on the TI-89/Voyage 00 Dennis Pence Western Michigan University Kalamazoo, Michigan USA Abstract: Unfortunately the topic of implicit differentiation

More information

Flow and Heat Transfer in a Mixing Elbow

Flow and Heat Transfer in a Mixing Elbow Flow and Heat Transfer in a Mixing Elbow Objectives The main objectives of the project are to learn (i) how to set up and perform flow simulations with heat transfer and mixing, (ii) post-processing and

More information

over The idea is to construct an algorithm to solve the IVP ODE (8.1)

over The idea is to construct an algorithm to solve the IVP ODE (8.1) Runge- Ku(a Methods Review of Heun s Method (Deriva:on from Integra:on) The idea is to construct an algorithm to solve the IVP ODE (8.1) over To obtain the solution point we can use the fundamental theorem

More information

Columbus State Community College Mathematics Department Public Syllabus. Course and Number: MATH 1172 Engineering Mathematics A

Columbus State Community College Mathematics Department Public Syllabus. Course and Number: MATH 1172 Engineering Mathematics A Columbus State Community College Mathematics Department Public Syllabus Course and Number: MATH 1172 Engineering Mathematics A CREDITS: 5 CLASS HOURS PER WEEK: 5 PREREQUISITES: MATH 1151 with a C or higher

More information

CPIB SUMMER SCHOOL 2011: INTRODUCTION TO BIOLOGICAL MODELLING

CPIB SUMMER SCHOOL 2011: INTRODUCTION TO BIOLOGICAL MODELLING CPIB SUMMER SCHOOL 2011: INTRODUCTION TO BIOLOGICAL MODELLING 1 Getting started Practical 4: Spatial Models in MATLAB Nick Monk Matlab files for this practical (Mfiles, with suffix.m ) can be found at:

More information

Post Processing, Visualization, and Sample Output

Post Processing, Visualization, and Sample Output Chapter 7 Post Processing, Visualization, and Sample Output Upon successful execution of an ADCIRC run, a number of output files will be created. Specifically which files are created depends upon how the

More information

A First Course on Kinetics and Reaction Engineering Example S4.5

A First Course on Kinetics and Reaction Engineering Example S4.5 Example S4.5 Problem Purpose The purpose of this example is to illustrate how to use the MATLAB template file FitNumDifMR.m to perform a regression analysis for multiple response data with a model that

More information

Module 4: Fluid Dynamics Lecture 9: Lagrangian and Eulerian approaches; Euler's acceleration formula. Fluid Dynamics: description of fluid-motion

Module 4: Fluid Dynamics Lecture 9: Lagrangian and Eulerian approaches; Euler's acceleration formula. Fluid Dynamics: description of fluid-motion Fluid Dynamics: description of fluid-motion Lagrangian approach Eulerian approach (a field approach) file:///d /Web%20Course/Dr.%20Nishith%20Verma/local%20server/fluid_mechanics/lecture9/9_1.htm[5/9/2012

More information

Matlab Handout Nancy Chen Math 19 Fall 2004

Matlab Handout Nancy Chen Math 19 Fall 2004 Matlab Handout Nancy Chen Math 19 Fall 2004 Introduction Matlab is a useful program for algorithm development, numerical computation, and data analysis and visualization. In this class you will only need

More information

MATLAB Programming for Numerical Computation Dr. Niket Kaisare Department Of Chemical Engineering Indian Institute of Technology, Madras

MATLAB Programming for Numerical Computation Dr. Niket Kaisare Department Of Chemical Engineering Indian Institute of Technology, Madras MATLAB Programming for Numerical Computation Dr. Niket Kaisare Department Of Chemical Engineering Indian Institute of Technology, Madras Module No. #01 Lecture No. #1.1 Introduction to MATLAB programming

More information

Physics Tutorial 2: Numerical Integration Methods

Physics Tutorial 2: Numerical Integration Methods Physics Tutorial 2: Numerical Integration Methods Summary The concept of numerically solving differential equations is explained, and applied to real time gaming simulation. Some objects are moved in a

More information

Introduction to MATLAB

Introduction to MATLAB Introduction to MATLAB This note will introduce you to MATLAB for the purposes of this course. Most of the emphasis is on how to set up MATLAB on your computer. The purposes of this supplement are two.

More information

MEI STRUCTURED MATHEMATICS. MEI conference University of Hertfordshire June C3 COURSEWORK

MEI STRUCTURED MATHEMATICS. MEI conference University of Hertfordshire June C3 COURSEWORK MEI STRUCTURED MATHEMATICS MEI conference University of Hertfordshire June 29 2009 C3 COURSEWORK What is this coursework designed to do and how do we prepare students for it? Presenter: Val Hanrahan The

More information

Ordinary Differential Equations

Ordinary Differential Equations Next: Partial Differential Equations Up: Numerical Analysis for Chemical Previous: Numerical Differentiation and Integration Subsections Runge-Kutta Methods Euler's Method Improvement of Euler's Method

More information

Simulation in Computer Graphics. Particles. Matthias Teschner. Computer Science Department University of Freiburg

Simulation in Computer Graphics. Particles. Matthias Teschner. Computer Science Department University of Freiburg Simulation in Computer Graphics Particles Matthias Teschner Computer Science Department University of Freiburg Outline introduction particle motion finite differences system of first order ODEs second

More information

ODE IVP. An Ordinary Differential Equation (ODE) is an equation that contains a function having one independent variable:

ODE IVP. An Ordinary Differential Equation (ODE) is an equation that contains a function having one independent variable: Euler s Methods ODE IVP An Ordinary Differential Equation (ODE) is an equation that contains a function having one independent variable: The equation is coupled with an initial value/condition (i.e., value

More information

Getting Started in Matlab

Getting Started in Matlab Lesson 1: Getting Started in Matlab 1.1 Applied Problem. Heat transfer in a mass is very important for a number of objects such as cooling of electronic parts or the fabrication of large beams. Although

More information

Chapter 3 Limits and Derivative Concepts

Chapter 3 Limits and Derivative Concepts Chapter 3 Limits and Derivative Concepts 1. Average Rate of Change 2. Using Tables to Investigate Limits 3. Symbolic Limits and the Derivative Definition 4. Graphical Derivatives 5. Numerical Derivatives

More information

SIMULINK Tutorial. Select File-New-Model from the menu bar of this window. The following window should now appear.

SIMULINK Tutorial. Select File-New-Model from the menu bar of this window. The following window should now appear. SIMULINK Tutorial Simulink is a block-orientated program that allows the simulation of dynamic systems in a block diagram format whether they are linear or nonlinear, in continuous or discrete forms. To

More information

Final Report. Discontinuous Galerkin Compressible Euler Equation Solver. May 14, Andrey Andreyev. Adviser: Dr. James Baeder

Final Report. Discontinuous Galerkin Compressible Euler Equation Solver. May 14, Andrey Andreyev. Adviser: Dr. James Baeder Final Report Discontinuous Galerkin Compressible Euler Equation Solver May 14, 2013 Andrey Andreyev Adviser: Dr. James Baeder Abstract: In this work a Discontinuous Galerkin Method is developed for compressible

More information

EES Program Overview

EES Program Overview EES Program Overview EES (pronounced 'ease') is an acronym for Engineering Equation Solver. The basic function provided by EES is the numerical solution of a set of algebraic equations. EES can also be

More information

Experiment 8 SIMULINK

Experiment 8 SIMULINK Experiment 8 SIMULINK Simulink Introduction to simulink SIMULINK is an interactive environment for modeling, analyzing, and simulating a wide variety of dynamic systems. SIMULINK provides a graphical user

More information

METU Mechanical Engineering Department ME 582 Finite Element Analysis in Thermofluids Spring 2018 (Dr. C. Sert) Handout 12 COMSOL 1 Tutorial 3

METU Mechanical Engineering Department ME 582 Finite Element Analysis in Thermofluids Spring 2018 (Dr. C. Sert) Handout 12 COMSOL 1 Tutorial 3 METU Mechanical Engineering Department ME 582 Finite Element Analysis in Thermofluids Spring 2018 (Dr. C. Sert) Handout 12 COMSOL 1 Tutorial 3 In this third COMSOL tutorial we ll solve Example 6 of Handout

More information

Non-Newtonian Transitional Flow in an Eccentric Annulus

Non-Newtonian Transitional Flow in an Eccentric Annulus Tutorial 8. Non-Newtonian Transitional Flow in an Eccentric Annulus Introduction The purpose of this tutorial is to illustrate the setup and solution of a 3D, turbulent flow of a non-newtonian fluid. Turbulent

More information

Introduction to Scientific Computing Lecture 8

Introduction to Scientific Computing Lecture 8 Introduction to Scientific Computing Lecture 8 Professor Hanno Rein Last updated: October 30, 06 7. Runge-Kutta Methods As we indicated before, we might be able to cancel out higher order terms in the

More information

ADDITIONAL MATHEMATICS FORM 5 SBA

ADDITIONAL MATHEMATICS FORM 5 SBA ADDITIONAL MATHEMATICS FORM 5 SBA To determine the optimal angle, the sides of the trapezium should be bent to, in order to create the maximum carrying capacity. AIM OF PROJECT This project shows how realistic

More information

Math 5BI: Problem Set 2 The Chain Rule

Math 5BI: Problem Set 2 The Chain Rule Math 5BI: Problem Set 2 The Chain Rule April 5, 2010 A Functions of two variables Suppose that γ(t) = (x(t), y(t), z(t)) is a differentiable parametrized curve in R 3 which lies on the surface S defined

More information

MA 243 Calculus III Fall Assignment 1. Reading assignments are found in James Stewart s Calculus (Early Transcendentals)

MA 243 Calculus III Fall Assignment 1. Reading assignments are found in James Stewart s Calculus (Early Transcendentals) MA 43 Calculus III Fall 8 Dr. E. Jacobs Assignments Reading assignments are found in James Stewart s Calculus (Early Transcendentals) Assignment. Spheres and Other Surfaces Read. -. and.6 Section./Problems

More information

Ordinary differential equations solving methods

Ordinary differential equations solving methods Radim Hošek, A07237 radhost@students.zcu.cz Ordinary differential equations solving methods Problem: y = y2 (1) y = x y (2) y = sin ( + y 2 ) (3) Where it is possible we try to solve the equations analytically,

More information

Estimation of Model Parameters Using Limited Data for the Simulation of Electric Power Systems

Estimation of Model Parameters Using Limited Data for the Simulation of Electric Power Systems Estimation of Model Parameters Using Limited Data for the Simulation of Electric Power Systems Robert Kerestes Emerson Process Management Presentation Roadmap Embedded Simulator Overview Mathematical Modeling

More information

Module 2: Single Step Methods Lecture 4: The Euler Method. The Lecture Contains: The Euler Method. Euler's Method (Analytical Interpretations)

Module 2: Single Step Methods Lecture 4: The Euler Method. The Lecture Contains: The Euler Method. Euler's Method (Analytical Interpretations) The Lecture Contains: The Euler Method Euler's Method (Analytical Interpretations) An Analytical Example file:///g /Numerical_solutions/lecture4/4_1.htm[8/26/2011 11:14:40 AM] We shall now describe methods

More information

First Steps - Ball Valve Design

First Steps - Ball Valve Design COSMOSFloWorks 2004 Tutorial 1 First Steps - Ball Valve Design This First Steps tutorial covers the flow of water through a ball valve assembly before and after some design changes. The objective is to

More information

Mathematics 96 (3581) CA (Class Addendum) 2: Associativity Mt. San Jacinto College Menifee Valley Campus Spring 2013

Mathematics 96 (3581) CA (Class Addendum) 2: Associativity Mt. San Jacinto College Menifee Valley Campus Spring 2013 Mathematics 96 (3581) CA (Class Addendum) 2: Associativity Mt. San Jacinto College Menifee Valley Campus Spring 2013 Name This class addendum is worth a maximum of five (5) points. It is due no later than

More information

A Simplified Vehicle and Driver Model for Vehicle Systems Development

A Simplified Vehicle and Driver Model for Vehicle Systems Development A Simplified Vehicle and Driver Model for Vehicle Systems Development Martin Bayliss Cranfield University School of Engineering Bedfordshire MK43 0AL UK Abstract For the purposes of vehicle systems controller

More information

Approximating Square Roots

Approximating Square Roots Math 560 Fall 04 Approximating Square Roots Dallas Foster University of Utah u0809485 December 04 The history of approximating square roots is one of the oldest examples of numerical approximations found.

More information

Lab #5 Ocean Acoustic Environment

Lab #5 Ocean Acoustic Environment Lab #5 Ocean Acoustic Environment 2.S998 Unmanned Marine Vehicle Autonomy, Sensing and Communications Contents 1 The ocean acoustic environment 3 1.1 Ocean Acoustic Waveguide................................

More information

Solution for Euler Equations Lagrangian and Eulerian Descriptions

Solution for Euler Equations Lagrangian and Eulerian Descriptions Solution for Euler Equations Lagrangian and Eulerian Descriptions Valdir Monteiro dos Santos Godoi valdir.msgodoi@gmail.com Abstract We find an exact solution for the system of Euler equations, supposing

More information

Exam 2 Preparation Math 2080 (Spring 2011) Exam 2: Thursday, May 12.

Exam 2 Preparation Math 2080 (Spring 2011) Exam 2: Thursday, May 12. Multivariable Calculus Exam 2 Preparation Math 28 (Spring 2) Exam 2: Thursday, May 2. Friday May, is a day off! Instructions: () There are points on the exam and an extra credit problem worth an additional

More information

FMI WORKSHOP. INCOSE International Workshop, Los Angeles, CA, Contents. Introduction

FMI WORKSHOP. INCOSE International Workshop, Los Angeles, CA, Contents. Introduction FMI WORKSHOP INCOSE International Workshop, Los Angeles, CA, 2015 Contents Introduction...1 Model Overview...2 Model Systems...2 Model Features...3 Key Parameters...6 File Structure...6 Demonstration:

More information

HW #7 Solution Due Thursday, November 14, 2002

HW #7 Solution Due Thursday, November 14, 2002 12.010 HW #7 Solution Due Thursday, November 14, 2002 Question (1): (10-points) Repeat question 1 of HW 2 but this time using Matlab. Attach M-file and output. Write, compile and run a fortran program

More information

Chemical Reaction Engineering - Part 4 - Integration Richard K. Herz,

Chemical Reaction Engineering - Part 4 - Integration Richard K. Herz, Chemical Reaction Engineering - Part 4 - Integration Richard K. Herz, rherz@ucsd.edu, www.reactorlab.net Integrating the component balance for a batch reactor For a single reaction in a batch reactor,

More information

USING SPREADSHEETS AND DERIVE TO TEACH DIFFERENTIAL EQUATIONS

USING SPREADSHEETS AND DERIVE TO TEACH DIFFERENTIAL EQUATIONS USING SPREADSHEETS AND DERIVE TO TEACH DIFFERENTIAL EQUATIONS Kathleen Shannon, Ph.D. Salisbury State University Department of Mathematics and Computer Science Salisbury, MD 21801 KMSHANNON@SAE.SSU.UMD.EDU

More information

Introduction to Simulink

Introduction to Simulink Introduction to Simulink There are several computer packages for finding solutions of differential equations, such as Maple, Mathematica, Maxima, MATLAB, etc. These systems provide both symbolic and numeric

More information

Modeling and Prototypes

Modeling and Prototypes Modeling and Prototypes 4.4.1 Unit 4, Lesson 4 Explanation The Unit Big Idea The Engineering Design process is a systematic, iterative problem solving method which produces solutions to meet human wants

More information

SYNOPSIS This case study looks at the design of a small program to calculate escape velocity from the surface of a moon or planet.

SYNOPSIS This case study looks at the design of a small program to calculate escape velocity from the surface of a moon or planet. pracnique Escape Velocity SYNOPSIS This case study looks at the design of a small program to calculate escape velocity from the surface of a moon or planet. Type: Language: Compiler: Skills: Experience

More information

Chill Out: How Hot Objects Cool

Chill Out: How Hot Objects Cool Chill Out: How Hot Objects Cool Activity 17 When you have a hot drink, you know that it gradually cools off. Newton s law of cooling provides us with a model for cooling. It states that the temperature

More information

LAB 2: Linear Equations and Matrix Algebra. Preliminaries

LAB 2: Linear Equations and Matrix Algebra. Preliminaries Math 250C, Section C2 Hard copy submission Matlab # 2 1 Revised 07/13/2016 LAB 2: Linear Equations and Matrix Algebra In this lab you will use Matlab to study the following topics: Solving a system of

More information

Math Modeling in Java: An S-I Compartment Model

Math Modeling in Java: An S-I Compartment Model 1 Math Modeling in Java: An S-I Compartment Model Basic Concepts What is a compartment model? A compartment model is one in which a population is modeled by treating its members as if they are separated

More information

Double Pendulum. Freddie Witherden. February 10, 2009

Double Pendulum. Freddie Witherden. February 10, 2009 Double Pendulum Freddie Witherden February 10, 2009 Abstract We report on the numerical modelling of a double pendulum using C++. The system was found to be very sensitive to both the initial starting

More information

Isn t it Saturday? IMO Trainning Camp NUK, 2004_06_19 2

Isn t it Saturday? IMO Trainning Camp NUK, 2004_06_19 2 2004 6 19 Isn t it Saturday? IMO Trainning Camp NUK, 2004_06_19 2 But, I guess you want to be the IMO Trainning Camp NUK, 2004_06_19 3 So, let s go! IMO Trainning Camp NUK, 2004_06_19 4 Outline Brief introduction

More information

FEMLAB Exercise 1 for ChE366

FEMLAB Exercise 1 for ChE366 FEMLAB Exercise 1 for ChE366 Problem statement Consider a spherical particle of radius r s moving with constant velocity U in an infinitely long cylinder of radius R that contains a Newtonian fluid. Let

More information

Application 2.4 Implementing Euler's Method

Application 2.4 Implementing Euler's Method Application 2.4 Implementing Euler's Method One's understanding of a numerical algorithm is sharpened by considering its implementation in the form of a calculator or computer program. Figure 2.4.13 in

More information

Catholic Regional College Sydenham

Catholic Regional College Sydenham Week: School Calendar Term 1 Title: Area of Study /Outcome CONTENT Assessment 2 - B 2 nd February Substitution and transposition in linear relations, such as temperature conversion. Construction of tables

More information

Homework Set #2-3, Math 475B

Homework Set #2-3, Math 475B Homework Set #2-3, Math 475B Part I: Matlab In the last semester you learned a number of essential features of MATLAB. 1. In this instance, you will learn to make 3D plots and contour plots of z = f(x,

More information

The Space Propulsion Sizing Program

The Space Propulsion Sizing Program The Space Propulsion Sizing Program Michael D. Scher National Institute of Aerospace 100 Exploration Way; Hampton, VA 23666 David North Analytical Mechanics Associates, Inc. 303 Butler Farm Road, Suite

More information

UNIT I READING: GRAPHICAL METHODS

UNIT I READING: GRAPHICAL METHODS UNIT I READING: GRAPHICAL METHODS One of the most effective tools for the visual evaluation of data is a graph. The investigator is usually interested in a quantitative graph that shows the relationship

More information

MAT 275 Laboratory 1 Introduction to MATLAB

MAT 275 Laboratory 1 Introduction to MATLAB MATLAB sessions: Laboratory 1 1 MAT 275 Laboratory 1 Introduction to MATLAB MATLAB is a computer software commonly used in both education and industry to solve a wide range of problems. This Laboratory

More information

Domain Decomposition: Computational Fluid Dynamics

Domain Decomposition: Computational Fluid Dynamics Domain Decomposition: Computational Fluid Dynamics July 11, 2016 1 Introduction and Aims This exercise takes an example from one of the most common applications of HPC resources: Fluid Dynamics. We will

More information

PRACTICAL SESSION 4: FORWARD DYNAMICS. Arturo Gil Aparicio.

PRACTICAL SESSION 4: FORWARD DYNAMICS. Arturo Gil Aparicio. PRACTICAL SESSION 4: FORWARD DYNAMICS Arturo Gil Aparicio arturo.gil@umh.es OBJECTIVES After this practical session, the student should be able to: Simulate the movement of a simple mechanism using the

More information

International Conference Las Vegas, NV, USA March 7-9, 2014

International Conference Las Vegas, NV, USA March 7-9, 2014 International Conference Las Vegas, NV, USA March 7-9, 2014 Overview About ETS (engineering school) Why Nspire CAS? Why Computer Algebra? Examples in pre-calculus Examples in single variable calculus Examples

More information

Domain Decomposition: Computational Fluid Dynamics

Domain Decomposition: Computational Fluid Dynamics Domain Decomposition: Computational Fluid Dynamics December 0, 0 Introduction and Aims This exercise takes an example from one of the most common applications of HPC resources: Fluid Dynamics. We will

More information

Lab 6 - Ocean Acoustic Environment

Lab 6 - Ocean Acoustic Environment Lab 6 - Ocean Acoustic Environment 2.680 Unmanned Marine Vehicle Autonomy, Sensing and Communications Feb 26th 2019 Henrik Schmidt, henrik@mit.edu Michael Benjamin, mikerb@mit.edu Department of Mechanical

More information

Introduction to Matlab

Introduction to Matlab Introduction to Matlab Weichung Wang 2003 NCTS-NSF Workshop on Differential Equations, Surface Theory, and Mathematical Visualization NCTS, Hsinchu, February 13, 2003 DE, ST, MV Workshop Matlab 1 Main

More information

ODEs occur quite often in physics and astrophysics: Wave Equation in 1-D stellar structure equations hydrostatic equation in atmospheres orbits

ODEs occur quite often in physics and astrophysics: Wave Equation in 1-D stellar structure equations hydrostatic equation in atmospheres orbits Solving ODEs General Stuff ODEs occur quite often in physics and astrophysics: Wave Equation in 1-D stellar structure equations hydrostatic equation in atmospheres orbits need workhorse solvers to deal

More information

Using RecurDyn. Contents

Using RecurDyn. Contents Using RecurDyn Contents 1.0 Multibody Dynamics Overview... 2 2.0 Multibody Dynamics Applications... 3 3.0 What is RecurDyn and how is it different?... 4 4.0 Types of RecurDyn Analysis... 5 5.0 MBD Simulation

More information

CFD MODELING FOR PNEUMATIC CONVEYING

CFD MODELING FOR PNEUMATIC CONVEYING CFD MODELING FOR PNEUMATIC CONVEYING Arvind Kumar 1, D.R. Kaushal 2, Navneet Kumar 3 1 Associate Professor YMCAUST, Faridabad 2 Associate Professor, IIT, Delhi 3 Research Scholar IIT, Delhi e-mail: arvindeem@yahoo.co.in

More information

Lab 2: Introducing XPPAUT

Lab 2: Introducing XPPAUT Lab 2: Introducing XPPAUT In biological applications it is quite rare that the solutions of the appropriate differential equations can be obtained using paper and pencil. Thus we typically need to use

More information

[1] CURVE FITTING WITH EXCEL

[1] CURVE FITTING WITH EXCEL 1 Lecture 04 February 9, 2010 Tuesday Today is our third Excel lecture. Our two central themes are: (1) curve-fitting, and (2) linear algebra (matrices). We will have a 4 th lecture on Excel to further

More information

Effect of Uncertainties on UCAV Trajectory Optimisation Using Evolutionary Programming

Effect of Uncertainties on UCAV Trajectory Optimisation Using Evolutionary Programming 2007 Information, Decision and Control Effect of Uncertainties on UCAV Trajectory Optimisation Using Evolutionary Programming Istas F Nusyirwan 1, Cees Bil 2 The Sir Lawrence Wackett Centre for Aerospace

More information

Scientific Computing for Physical Systems. Spring semester, 2018

Scientific Computing for Physical Systems. Spring semester, 2018 Scientific Computing for Physical Systems Spring semester, 2018 Course Goals Learn a programming language (Python) Learn some numerical algorithms (e.g., for solving differential equations) Explore some

More information

Geophysics 224 B2. Gravity anomalies of some simple shapes. B2.1 Buried sphere

Geophysics 224 B2. Gravity anomalies of some simple shapes. B2.1 Buried sphere Geophysics 4 B. Gravity anomalies of some simple shapes B.1 Buried sphere Gravity measurements are made on a surface profile across a buried sphere. The sphere has an excess mass M S and the centre is

More information

Deep Learning for Visual Computing Prof. Debdoot Sheet Department of Electrical Engineering Indian Institute of Technology, Kharagpur

Deep Learning for Visual Computing Prof. Debdoot Sheet Department of Electrical Engineering Indian Institute of Technology, Kharagpur Deep Learning for Visual Computing Prof. Debdoot Sheet Department of Electrical Engineering Indian Institute of Technology, Kharagpur Lecture - 05 Classification with Perceptron Model So, welcome to today

More information

Introduction to Matlab. Summer School CEA-EDF-INRIA 2011 of Numerical Analysis

Introduction to Matlab. Summer School CEA-EDF-INRIA 2011 of Numerical Analysis Introduction to Matlab 1 Outline What is Matlab? Matlab desktop & interface Scalar variables Vectors and matrices Exercise 1 Booleans Control structures File organization User defined functions Exercise

More information

Lectures & Excercises

Lectures & Excercises TLTE.3120 Computer Simulation in Communication and Systems (5 ECTS) http://www.uva.fi/~timan/tlte3120 Lecture 1 9.9.2015 Timo Mantere Professor, Embedded systems University of Vaasa http://www.uva.fi/~timan

More information

AMSC/CMSC 460 Final Exam, Fall 2007

AMSC/CMSC 460 Final Exam, Fall 2007 AMSC/CMSC 460 Final Exam, Fall 2007 Show all work. You may leave arithmetic expressions in any form that a calculator could evaluate. By putting your name on this paper, you agree to abide by the university

More information

Isotropic Porous Media Tutorial

Isotropic Porous Media Tutorial STAR-CCM+ User Guide 3927 Isotropic Porous Media Tutorial This tutorial models flow through the catalyst geometry described in the introductory section. In the porous region, the theoretical pressure drop

More information