Download presentation
Presentation is loading. Please wait.
Published byMeryl Parrish Modified over 9 years ago
1
ES 240: Scientific and Engineering Computation. Chapter 1 Chapter 1: Mathematical Modeling, Numerical Methods and Problem Solving Uchechukwu Ofoegbu Temple University
2
ES 240: Scientific and Engineering Computation. Chapter 1 Model Function Dependent variable - a characteristic that usually reflects the behavior or state of the system Independent variables - dimensions, such as time and space, along which the system’s behavior is being determined Parameters - constants reflective of the system’s properties or composition Forcing functions - external influences acting upon the system
3
ES 240: Scientific and Engineering Computation. Chapter 1 Model Function Example Assuming a bungee jumper is in mid-flight, an analytical model for the jumper’s velocity, accounting for drag, is Dependent variable - velocity v Independent variables - time t Parameters - mass m, drag coefficient c d Forcing function - gravitational acceleration g
4
ES 240: Scientific and Engineering Computation. Chapter 1 Model Example Let the mass of the jumper be 68.1 kg, and assuming a drag coefficient of 0.25 kg/m. We know that g = 9.81 Therefore: We can now easily compute the jumper’s velocity at different time periods
5
ES 240: Scientific and Engineering Computation. Chapter 1 Model Example Let’s fill in the table below by computing the velocity analytically Time (s)Velocity (m/s) 00 218.7291 433.1117 642.0761 846.9574 1049.4213 1250.6175 ∞51.6938
6
ES 240: Scientific and Engineering Computation. Chapter 1 Model Results We can use a computer program to represent the model graphically: Let’s generate the graph below using Matlab
7
ES 240: Scientific and Engineering Computation. Chapter 1 Numerical Modeling Models can be represented by –Functions –differential equations - these can be solved either using analytical methods or numerical methods. Example: – the bungee jumper velocity equation from before is the analytical solution to the differential equation Net Force = Downward - Upward
8
ES 240: Scientific and Engineering Computation. Chapter 1 Numerical Methods To solve the problem using a numerical method, note that the time rate of change of velocity can be approximated as: Therefore: This can be summarized as: Finite Difference Method dv i /dt ∆t New Value = Old Value + Slope * Step Size Euler’sMethod
9
ES 240: Scientific and Engineering Computation. Chapter 1 Numerical Solution Let’s fill in the table below by computing the velocity numerically Time (s)Velocity (m/s) 00 218.7291 433.1117 642.0761 846.9574 1049.4213 1250.6175 ∞51.6938
10
ES 240: Scientific and Engineering Computation. Chapter 1 Numerical Results Let’s generate the two graph below using Matlab
11
ES 240: Scientific and Engineering Computation. Chapter 1 Group exercise Compute the jumper’s velocity for 0-12 seconds using a step size of 1 Tabulate your results, also include the absolute error for each case For t = 12, plot of absolute error versus step size
12
ES 240: Scientific and Engineering Computation. Chapter 1 Solution – Step Size = 1 second Time (s)Numerical Velocity (m/s) Analytical Velocity (m/s) Absolute Error (%) 0000 19.81009.69381.20 219.266718.72912.87 327.714026.61474.13 434.704433.11174.81 5 40.093038.21534.91 644.001942.07614.58 746.704144.91443.98 8 48.506546.95743.30 949.678948.40572.63 1050.428749.42142.04 11 50.903050.12821.55 1251.200850.61751.15
13
ES 240: Scientific and Engineering Computation. Chapter 1 Absolute Error Analysis Step SizeAbsolute Error (%) 0.50.61 11.15 21.91
14
ES 240: Scientific and Engineering Computation. Chapter 1 Bases for Numerical Models Conservation laws provide the foundation for many model functions. Change = increase – decrease Steady State: Change = 0; Different fields of engineering and science apply these laws to different paradigms within the field. Among these laws are: –Conservation of mass – chemical engineering –Conservation of momentum – civil and mechanical engr. –Conservation of charge – electrical engineering –Conservation of energy– electrical engineering
15
ES 240: Scientific and Engineering Computation. Chapter 1 Summary of Numerical Methods The book is divided into five categories of numerical methods:
16
ES 240: Scientific and Engineering Computation. Chapter 1Puzzle The longest repeated word WRITE A METHOD THAT TAKES A SIMPLE STRING AS INPUT, AND OUTPUTS ITS LONGEST REPEATED SUBSTRING. WHEN THERE ARE TWO OF EQUAL LENGTH, OUTPUT WHICHEVER IS FIRST LEXICOGRAPHICALLY. EXAMPLES abba should return ’a’ abracadabra should return ’abra’ Mississippi should return ’iss’
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.