Computer_Applications_Lecture_1
Computer_Applications_Lecture_1
in Mechanical Engineering
Ch. 1
Mathematical Modeling, Numerical
Methods, and Problem Solving
Computer Applications 1
©2017 by Roshdy Abo-Shanab
Chapter Objectives
The primary objective of this chapter is to provide you with a concrete
idea of what numerical methods are and how they relate to engineering
and scientific problem solving.
Specific objectives and topics covered are:
• Learning how mathematical models can be formulated on the basis of
scientific principles to simulate the behavior of a simple physical
system.
• Understanding how numerical methods afford a means to generate
solutions in a manner that can be implemented on a digital computer.
• Understanding the different types of conservation laws that lie beneath
the models used in the various engineering disciplines and
appreciating the difference between steady-state and dynamic
solutions of these models.
• Learning about the different types of numerical methods we will cover
in this book. Computer Applications 2
©2017 by Roshdy Abo-Shanab
You’ve got a problem
• A bungee-jumping company hires you.
• Your task: predicting the velocity of a
jumper as a function of time during the free-
fall part of the jump.
• First, we need to model this physical system.
• Scientific principles: Acceleration should
equal the ratio of the net force to the mass
(Newton’s second law).
• Net force = gravity force – Air resistance.
• Gravity force = 𝑚 𝑔
• Air resistance = 𝑐𝑑 𝑣 2
Computer Applications 3
©2017 by Roshdy Abo-Shanab
𝑑𝑣 σ 𝐹 𝑚 𝑔 − 𝑐𝑑 𝑣 2
𝐹 = 𝑚 𝑎 = 𝑚 𝑔 − 𝑐𝑑 𝑣 2 𝑎= = =
𝑑𝑡 𝑚 𝑚
𝑑𝑣 𝑐𝑑 2
=𝑔− 𝑣
𝑑𝑡 𝑚
This equation represents the mathematical model of the system.
Simple Mathematical Model
A Mathematical Model is defined as a formulation or equation
that expresses the essential features of a physical system or
process in mathematical terms.
In a very general sense, it can be represented as a functional
relationship of the form:
𝑑𝑒𝑝𝑒𝑛𝑒𝑑𝑒𝑛𝑡 𝑖𝑛𝑑𝑒𝑝𝑒𝑛𝑑𝑒𝑛𝑡 𝑓𝑜𝑟𝑐𝑖𝑛𝑔
=𝑓 , 𝑝𝑎𝑟𝑎𝑚𝑒𝑡𝑒𝑟𝑠,
𝑣𝑎𝑟𝑖𝑎𝑏𝑙𝑒 𝑣𝑎𝑟𝑖𝑎𝑏𝑙𝑒𝑠 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛𝑠
Computer Applications 4
©2017 by Roshdy Abo-Shanab
𝑑𝑣 𝑐𝑑 2
=𝑔− 𝑣
𝑑𝑡 𝑚
This equation is a model that related the acceleration of the falling
object to the forces that acting on it.
It is a differential equation because it is written in terms of the
differential rate of the variable that we are interested in predicting.
For the above model, an exact solution or analytic solution can be
obtained using advanced techniques such as calculus.
For example, if the jumper is initially at rest (𝑣 = 0 𝑎𝑡 𝑡 = 0),
using calculus we get the following solution:
𝑔𝑚 𝑔𝑐𝑑
𝑣 𝑡 = tanh 𝑡
𝑐𝑑 𝑚
Here, v(t) is the dependent variable, t is the independent variable,
𝑐𝑑 and m are parameters, and g is the forcing function.
Computer Applications 5
©2017 by Roshdy Abo-Shanab
Example 1.1 Analytical solution to the Bungee Jumper Problem
A bungee jumper. m = 68.1 kg, v=?? for the first 12 s of free fall.
Use drag coefficient 𝑐𝑑 = 0.25 kg/m.
Computer Applications 6
©2017 by Roshdy Abo-Shanab
Notes:
• According to the model, the jumper accelerates rapidly.
• A velocity of 49.4214 m/s (about 110 mi/hr) is attained after 10 s.
• After a sufficiently long time, a constant velocity, called the
terminal velocity, of 51.6983 m/s (115.6 mi/hr) is reached.
• This velocity is constant because, eventually, the force of gravity
will be in balance with the air resistance. Thus, the net force is
zero and acceleration has ceased.
Computer Applications 7
©2017 by Roshdy Abo-Shanab
Numerical Methods are those in which the mathematical
problem is reformulated so it can be solved by arithmetic operations.
Computer Applications 8
©2017 by Roshdy Abo-Shanab
Notice that the term in brackets is the right-hand side of the
differential equation itself. That is, it provides a means to compute
the rate of change or slope of v. Thus, the equation can be rewritten
more concisely as:
We can now see that the differential equation has been transformed into
an equation that can be used to determine the velocity algebraically at
t(i+1) using the slope and previous values of v and t.
Computer Applications 10
©2017 by Roshdy Abo-Shanab
The calculation is continued in a similar fashion to obtain
additional values:
Computer Applications 12
©2017 by Roshdy Abo-Shanab
Flow in = Flow out
Computer Applications 13
©2017 by Roshdy Abo-Shanab
Case study: it is a real drag
Computer Applications 14
©2017 by Roshdy Abo-Shanab
Case study: it is a real drag (cont.)
Computer Applications 18
©2017 by Roshdy Abo-Shanab