200 likes | 284 Views
Chapter 1: Mathematical Modeling, Numerical Methods and Problem Solving. Uchechukwu Ofoegbu Temple University. Model Function. Dependent variable - a characteristic that usually reflects the behavior or state of the system
E N D
Chapter 1: Mathematical Modeling, Numerical Methods and Problem Solving Uchechukwu Ofoegbu Temple University
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
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 cd • Forcing function - gravitational acceleration g
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
Model Example Let’s fill in the table below by computing the velocity analytically
Model Results • We can use a computer program to represent the model graphically: • Let’s generate the graph below using Matlab
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
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 dvi/dt ∆t Euler’s Method New Value = Old Value + Slope * Step Size
Numerical Solution Let’s fill in the table below by computing the velocity numerically
Numerical Results • Let’s generate the two graph below using Matlab
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
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
Summary of Numerical Methods • The book is divided into five categories of numerical methods:
Puzzle 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’