Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Applied Numerical Methods with MATLAB Part1 Chapter 1 Mathematical Modeling, Numerical Methods and Problem Solving 1-1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Why Study Numerical Methods? • As engineers we solve mathematical problems in order to – Understand Physical Systems – Create Designs – Verify Behavior 1-3 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Why Study Numerical Methods? • Not all problems are easy to solve analytically • Not all problems are POSSIBLE to solve analytically • Numerical methods offer us an alternative way to model complex systems 1-4 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Problem Solving Process • Define the Problem • Create a mathematical model • Solve either analytically, numerically or graphically • Communicate your results so that they can be implemented 1-5 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. • A mathematical model is represented as a functional relationship of the form Dependent Variable =f independent forcing variables, parameters, functions • Dependent variable: Characteristic that usually reflects the state of the system • Independent variables: Dimensions such as time and space along which the system’s behavior is being determined • Parameters: reflect the system’s properties or composition • Forcing functions: external influences acting upon the system 1-6 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Newton’s 2nd law of Motion • States that “the time rate change of momentum of a body is equal to the resulting force acting on it.” • The model is formulated as F = m a (Equation 1.2) F=net force acting on the body (N) m=mass of the object (kg) a=its acceleration (m/s2) 1-7 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. • Formulation of Newton’s 2nd law has several characteristics that are typical of mathematical models of the physical world: – It describes a natural process or system in mathematical terms – It represents an idealization and simplification of reality – Finally, it yields reproducible results, consequently, can be used for predictive purposes. 1-8 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. • Some mathematical models of physical phenomena may be much more complex. • Complex models may not be solved exactly or require more sophisticated mathematical techniques than simple algebra for their solution – Example, modeling of a falling bungee jumper: 1-9 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Example – A Falling Bungee Jumper • The jumper experiences two forces – Force due to gravity – Force due to drag (air resistance) 1-10 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. F ma F a m dv Ftotal dt m F FD FU FD mg dv mg cv dt m FU cv 2 2 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1-11 c 2 dv g v m dt • This is a differential equation and is written in terms of the differential rate of change dv/dt of the variable that we are interested in predicting. • If the jumper is initially at rest (v=0 at t=0), using calculus v(t ) gcd gm tanh t cd m Dependent variable Forcing function(g) Independent variable Parameters (m,cd ) Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1-13 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1-14 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Terminal Velocity • As you can see from the graph – the parachutist approaches a terminal velocity • At that point, the acceleration is equal to 0 - ie dv/dt = 0 1-15 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. dv c 2 g v 0 dt m m v g* c 2 68.1 v 9.8* 51.67m / s 0.25 1-16 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1-17 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Numerical Solution Euler’s Method dv c 2 g v dt m Differential Equation v(ti 1 ) v(ti ) dv v dt t ti 1 ti Finite Difference Approach 1-18 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. What happens as delta t gets smaller? dv v lim dt t 1-19 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. dv v(ti 1 ) v(ti ) c 2 g v(ti ) dt ti 1 ti m Rearrange to give: c 2 v(ti 1 ) v(ti ) g v(ti ) * ti 1 ti m dv dt Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1-20 Euler’s Method New value = old value + slope * step size 1-21 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. New value = old value + slope * step size 1-22 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. New value = old value + slope * step size 1-23 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Numerical Solution Analytical solution What happens when you change the value of h? Try it with the example code. 1-24 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Conservation Laws and Engineering • Conservation laws are the most important and fundamental laws that are used in engineering. Change = increases – decreases (1.13) • Change implies changes with time (transient). If the change is nonexistent (steady-state), Eq. 1.13 becomes Increases =Decreases 1-25 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Fig 1.6 • For steady-state incompressible fluid flow in pipes: Flow in = Flow out or 100 + 80 = 120 + Flow4 Flow4 = 60 1-26 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Conservation in Engineering • Mass Chemical Engineers • Momentum Civil and Mechanical • Charge Electrical 1-27 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1-28 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Summary of Numerical Methods • The book is divided into five categories of numerical methods: Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Next time – Chapter 4 • Chapters 2 and 3 are MATLAB review chapters • Chapter 4 covers a number of different concepts related to error measurements including the Taylor series 1-30 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.