Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
2 views

Computer_Applications_Lecture_1

This chapter discusses the role of mathematical modeling and numerical methods in solving engineering problems, specifically using the example of predicting a bungee jumper's velocity during free fall. It covers the formulation of mathematical models based on scientific principles, the use of numerical methods like Euler's method for approximating solutions, and the importance of conservation laws in engineering. The chapter also highlights the differences between analytical and numerical solutions, emphasizing the need for numerical methods when exact solutions are not feasible.

Uploaded by

gomaa
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Computer_Applications_Lecture_1

This chapter discusses the role of mathematical modeling and numerical methods in solving engineering problems, specifically using the example of predicting a bungee jumper's velocity during free fall. It covers the formulation of mathematical models based on scientific principles, the use of numerical methods like Euler's method for approximating solutions, and the importance of conservation laws in engineering. The chapter also highlights the differences between analytical and numerical solutions, emphasizing the need for numerical methods when exact solutions are not feasible.

Uploaded by

gomaa
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Computer Applications

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.

9.81 (68.1) 9.81 ∗ 0.25


𝑣 𝑡 = tanh 𝑡
0.25 68.1
𝑣 𝑡 = 51.6938 tanh 0.18977 𝑡

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.

• This solution is called an analytical or closed-form solution


because it exactly satisfies the original differential equation.
• Unfortunately, there are many mathematical models that cannot
be solved exactly.
• In many of these cases, the only alternative is to develop a
numerical solution that approximates the exact solution.

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.

This form is called finite-difference


approximation of the derivative at
time t i .
Remember from calculus that:

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.

New value = old value + slope × step size


This approach is formally called Euler’s method.
Computer Applications 9
©2017 by Roshdy Abo-Shanab
Example 1.2 Numerical 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.
Perform the same computation as in Example 1.1 but use Euler’s
method to compute velocity with. Employ a step size of 2 s for the
calculation.

Computer Applications 10
©2017 by Roshdy Abo-Shanab
The calculation is continued in a similar fashion to obtain
additional values:

The numerical method captures the essential features of the exact


solution. However, because we have employed straight-line segments to
approximate a continuously curving function, there is some discrepancy
between the two results.
Computer Applications 11
©2017 by Roshdy Abo-Shanab
Conservation Laws in Engineering and Science

Change = increases − decreases


This is precisely the format that we employed when using Newton’s
law to develop a force balance for the bungee jumper.

Although simple, the above equation embodies one of the most


fundamental ways in which conservation laws are used in engineering
and science. that is, to predict changes with respect to time.

Aside from predicting changes, another way in which conservation


laws are applied is for cases where change is nonexistent. If change
is zero, then:
Change = 0 = increases − decreases
Increases = decreases

Computer Applications 12
©2017 by Roshdy Abo-Shanab
Flow in = Flow out

A flow balance for steady incompressible


fluid flow at the junction of pipes.

Computer Applications 13
©2017 by Roshdy Abo-Shanab
Case study: it is a real drag

The drag force was represented by the following form:


𝐹𝑑 = −𝑐𝑑 𝑣 2
The above equation doesn’t take into account the direction of the drag
force. A more detailed representation of the drag force (by Lord
Rayleigh) can be written as:
1 2
𝐹𝑑 = − 𝜌𝑣 𝐴 𝐶𝑑 𝑣റ
2
𝑣:
റ a unit vector indicating the direction of the velocity.
1
𝑐𝑑 = 𝜌𝐴 𝐶𝑑
2
The following simple modification allows the sign to be incorporated
in the drag force:
1
𝐹𝑑 = − 𝜌𝑣 𝑣 𝐴 𝐶𝑑 or 𝐹𝑑 = −𝑐𝑑 𝑣 𝑣
2

Computer Applications 14
©2017 by Roshdy Abo-Shanab
Case study: it is a real drag (cont.)

The differential equation to be solved will be:


𝑑𝑣 𝑐𝑑
=𝑔− 𝑣 𝑣
𝑑𝑡 𝑚
𝑑𝑥
In order to determine the jumper’s position: = −𝑣
𝑑𝑡
Using Euler’s method:
𝑥𝑖+1 = 𝑥𝑖 − 𝑣 𝑡𝑖 ∆𝑡
Assuming that the jumper’s initial position is defined as 𝑥 0 = 0,
then the velocity and distance (at 𝑡 = 2 𝑠) can be computed as:
0.25
𝑣 2 = −40 + 9.81 − −40 40 2 = −8.63 m/s
68.1
𝑥 2 = 0 − −40 2 = 80 m
at 𝑡 = 4 𝑠
0.25
𝑣 4 = −8.63 + 9.81 − −8.63 8.63 2 = 11.5346 m/s
68.1
𝑥 4 = 80 − −8.63 2 = 97.2651 m
Computer Applications 15
©2017 by Roshdy Abo-Shanab
Plots of the velocity for the free-falling bungee jumper with an
upward (negative) initial velocity generated with Euler’s method.
Results for both the correct and incorrect drag formulations are
displayed.
Computer Applications 16
©2017 by Roshdy Abo-Shanab
Plots of the height for the free-falling bungee jumper with an upward
(negative) initial velocity generated with Euler’s method.
Results for both the correct and incorrect drag formulations are
displayed.
Computer Applications 17
©2017 by Roshdy Abo-Shanab
Homework

1.2, 1.5, 1.7, 1.9, 1.12, 1.17, 1.20

Computer Applications 18
©2017 by Roshdy Abo-Shanab

You might also like