MODULE I
INTRODUCTION
Lesson 1 Mathematical modelling
and Engineering
Problem Solving
Lesson 2 Programming and
Software
Lesson 3 Approximations and
Round-off Errors
EEPC102 Module I
2
MODULE I
MODELLING, COMPUTERS AND ERROR ANALYSIS
INTRODUCTION
Numerical methods are techniques by which mathematical problems
are formulated so that they can be solved with arithmetic operations.
Although there are many kinds of numerical methods, they have one common
characteristic: they invariably involve large numbers of tedious arithmetic
calculations. It is little wonder that with the development of fast, efficient
digital computers, the role of numerical methods in engineering problem
solving has increased dramatically in recent years.
OBJECTIVES
After studying the module, you should be able to:
1. Understand the relevance of numerical methods in engineering
problem solving.
2. Define the concept of approximation and precision in solving
mathematical equations using numerical methods
3. Explain errors in computations
EEPC102 Module I
3
DIRECTIONS/ MODULE ORGANIZER
There are three lessons in the module. Read each lesson carefully then
answer the exercises/activities to find out how much you have benefited from
it. Work on these exercises carefully and submit your output to your
instructor.
In case you encounter difficulty, discuss this with your instructor during
the face-to-face meeting.
EEPC102 Module I
4
Lesson 1
Mathematical Modelling and
Engineering Problem Solving
A mathematical model can be broadly 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
A Simple Mathematical Model
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
Modeling: Newton’s Second Law of Motion
Statement:The time rate of change of momentum of a body is equal to the
resultant force acting on it
Forcing function
𝐹 = 𝑚𝑎 (net force acting on the object)
𝐹
≫ 𝑎=
Dependent variable
𝑚
(acceleration) Parameter
(mass of object)
–No independent variable is involved
–E.g., it can be used to determine the terminal velocity of a freefalling body
near the earth’s surface
EEPC102 Module I
5
More on Newton’s Second Law of Motion
• It describes a natural process or system in mathematical terms
• It represents an idealization and simplification of reality
–Ignore negligible details of the natural process and focus on its essential
manifestations
–Exclude the effects of “relativity” that are of minimal importance when
applied to object and forces that interact on or about the earth’s surface at
velocities and on scales visible to humans
• It yields reproducible results and can be used for predictive purposes
–Have generalization capabilities
Figure 1.1 The engineering problem-solving process.
EEPC102 Module I
6
Bungee-Jumping
•For a body falling within the vicinity of the earth, the net force is composed
of two opposing forces
𝐹 = 𝐹𝐷 + 𝐹𝑈
- The downward pull of gravity 𝐹𝐷
•The force due to gravity can be formulated as
𝐹𝐷 = 𝑚𝑔
– 𝑔 is the acceleration due to gravity (9.81𝑚/𝑠 2 )
- The upward force of air resistance 𝐹𝑈
• A good approximation is to formulate it as
𝐹𝑈 = −𝑐𝑑 𝑣 2
– 𝑣 is the velocity; 𝑐𝑑 is the lumped drag coefficient,
accounting for the properties of the falling object like shape
or surface roughness
»The greater the fall velocity, the greater the upward force
due to air resistance
• The net force therefore is the difference between downward and
upward force. We can a differential equation regarding the velocity
of the object
𝑑𝑣 𝑐𝑑
= 𝑔 − 𝑣2
𝑑𝑡 𝑚
• The exact solution of 𝑣 can not be obtained using simple algebraic
manipulation but rather using more advanced calculus techniques
(when 𝑣 (𝑡) = 0, 𝑡 = 0 )
𝑔𝑚 𝑔𝑐𝑑 Here 𝑡 is independent variable,
𝑣(𝑡) = √ 𝑐 tanh(√ 𝑡)
𝑑 𝑚 𝑣(𝑡) is dependent variable, 𝑐𝑑 and
𝑚 are parameters, and 𝑔 is the
forcing function.
(an analytical or closed-form solution that 𝑒 𝑥 − 𝑒 −𝑥
tanh(𝑥 ) =
𝑒 𝑥 + 𝑒 −𝑥
can exactly satisfy the original differential
equation)
EEPC102 Module I
7
Example 1.1
A bungee jumper with a mass of 68.1 kg leaps from a stationary hot air balloon
(the drag coefficient is 0.25 kg/m)
a. Compute the velocity for the first 12s of free fall
b. Determine the terminal velocity that will attained for an infinite long
cord
𝑔𝑚 𝑔𝑐𝑑 9.8(68.1) 9.8(0.25)
𝑣 (𝑡 ) = √ tanh(√ 𝑡) = √ tanh (√ 𝑡)
𝑐𝑑 𝑚 0.25 68.1
= 51.6678tanh (0.18967𝑡)
𝑣 (12) = 50.5895
𝑣 (∞) = 51.6678
• Using a computer (or a calculator), the model can be used to generate
a graphical representation of the system
𝑚𝑔 = 𝑐𝑑 𝑣 2
𝑔𝑚
𝑣=√
𝑐𝑑
An example of Numerical Modeling
1. Numerical methods are those in which the mathematical problem is
reformulated so it can be solved by arithmetic operations
EEPC102 Module I
8
–E.g., the time rate of change of velocity
mentioned earlier:
𝑑𝑣 ∆𝑣 𝑣(𝑡𝑖+1 ) − 𝑣(𝑡𝑖 )
≈ =
𝑑𝑡 ∆𝑡 𝑡𝑖+1 − 𝑡𝑖
A finite-difference approximation of
the derivative at time 𝑡𝑖
𝑑𝑣 ∆𝑣
Notice that = lim
𝑑𝑡 ∆𝑡→0 ∆𝑡
2. Substituting the finite difference into the differential equation gives
𝑑𝑣 𝑐𝑑
= 𝑔 − 𝑣2
𝑑𝑡 𝑚
𝑣(𝑡𝑖+1 ) − 𝑣(𝑡𝑖 ) 𝑐𝑑
= 𝑔 − 𝑣(𝑖)2
𝑡𝑖+1 − 𝑡𝑖 𝑚
Solve for
𝑐𝑑
𝑣 (𝑡𝑖+1 ) = 𝑣(𝑡𝑖 ) + [𝑔 − 𝑣 (𝑡𝑖 )2 ] ((𝑡𝑖+1 − 𝑡𝑖 )
𝑚
New = old + slope x step
This approach is formally called Euler’s method.
3. Applying Euler's method in 2 s intervals yields:
EEPC102 Module I
9
How do we improve the solution? –Smaller steps
Conservation laws
Conservation laws provide the foundation for many model functions
–They boil down
Change = increases - decreases
–Can be used to predict changes with respect to time by given it a
special name “the time-variable (or transient)” computation
–If no change occurs, the increases and decreases must be in balance
Change = 0 = increases - decreases
•It is given a special name, the “steady-state” calculation
1. Example: Fluid Flow
Figure 1.2 A flow balance for steady incompressible fluid flow at the junction
of pipes.
–For steady-state incompressible fluid flow in pipes
Flow in = Flow out
•The flow out of the fourth pipe must be 60
2. Different fields of engineering and science apply these laws to
different paradigms within the field
Among these laws are
–Conservation of mass
EEPC102 Module I
10
–Conservation of momentum
–Conservation of charge
–Conservation of energy
Table 1.1 Devices and types of balances that are commonly used in the four
major areas of engineering. For each case, the conservation law upon which
the balance is based is specified.
EEPC102 Module I