Computational Methods in Engineering Che 374
Computational Methods in Engineering Che 374
Computational Methods in Engineering Che 374
FR Upward force
Computational Methods in Engineering
ChE 374
Modelling Examples
FD Downward force
1 2
3 4
Forces Acting on the Falling Object The net force is the difference between the
downward force and the upward force
Air Resistance Linear
approximation
Air resistance is proportional to velocity: dv F mg kv
(8)
dt m m
Linear
approximation FR kv (7)
or
dv k
k = proportionality constant
g v (9)
(drag coefficient kg/s for linear) dt m
accounts for properties of the falling body
e.g. shape, surface roughness, etc. A mathematical model which relates to the acceleration of a
5
falling object to Forces acting on it !!! 6
Example # 1
If the object is initially at rest (v = 0 at t = 0), we can use
calculus to find the solution of the differential equation:
Analytical solution to the falling sphere
Problem statement
dv k A sphere of mass 20 g is falling in a large environment
g v Use the equation developed (equation 10) to compute
dt m the velocity of the sphere. The resistance coefficient
as is k = 0.015 kg/s.
gm
v (t )
k
1 e
k /m t
(10) SOLUTION
v(t )
gm
1 e( k / m)t
The velocity at any time is given by
k
Where:
v(t ) dependent variable 9.81(20 103 )
Inserting parameters in the model v(t )
0.015
3
1 e (0.015/2010 ) t
t the independent variable
k, m parameters
g the forcing function v(t ) 13.11 e0..75t
7 8
We can use the model to compute v at different times Plot of velocity vs. time
t, s v, m/s
0 0 14
Terminal velocity
1 6.91 12
2 10.18 10
Velocity (m/s)
3 11.72 8
4 12.45 6
4
5 12.79
2
10 13.09
0
20 13.10 0 5 10 15 20
Terminal T im e (s)
Net force=0 13.10 Velocity
a=0 9 10
gm Numerical Methods
v(t )
k
1 e ( k / m )t
• Numerical methods are techniques by
which a mathematical problem is re-
• The equation is called an analytical or exact
solution because it satisfies the original formulated so that it can be solved by
differential equation exactly. arithmetic operations !!!!
• Many mathematical models cannot be
solved exactly
• Alternative is to develop a numerical solution
that approximates the exact solution !!! Let’s reformulate the falling sphere problem so that
it can be solved by arithmetic operations !!!
11 12
Approximation of DERIVATIVES
Substitute in equation (9) to obtain
rate change of velocity
dv v
true slope
dt t
v(ti 1 )
v(ti )
Approximate slope
v v(ti 1 ) v(ti )
t
ti 1 ti
Which can be rearranged to yield
(12)
ti
dv v v(ti 1 ) v(ti )
ti 1
(11)
The differential equation has been transformed into an
equation that can be solved algebraically at different times
using the slope and previous values of v and t
dt t ti 1 ti 13 14
Example # 2
Numerical solution of the falling object problem For the next interval (from t = 0.5 to 1.0 s), the
Problem statement: computation is repeated, with the result
• Perform the same computation as in example #1 but
use equation (12) to compute the velocity 0.015
v(1) 4.90 9.8 (1) (1 0.5) 7.97 m/s
20 103
Solution:
At the start of the computation (ti = 0), the velocity of the sphere is
The computations are repeated in similar fashion
zero. Using this information and parameter values from example #1, t,s 0 0.5 1 1.5 2 2.5 3.0 inf
equation (12) can be used to compute the velocity at ti+1 = 0.5 s:
v, 0.00 4.90 7.97 9.87 11.83 12.30 12.59 13.10
m/s
0.015
v (0.5) 0 9.8 (0) (0.5 0) 4.9 m/s
20 103 The REPETITION Process is called ITERATION in
numerical lingo !!
15 16
6
specified task.
4
• We shall develop and implement
2
algorithms for computing approximate
solutions to mathematical problems
0
0 0.5 1 1.5 2 2.5
Time (s)
3 3.5 4 4.5 5
relevant to engineering !!
17 18
19 20
Numerical 12
Velocity (m/s)
8
Analytical
10
6
8
4 6
4
2
2
0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 0
0 2 4 6 8 10 12 14 16 18 20
Time (s)
Time (s)
21 22
500 12
Numerical
400 10
Analytical
Velocity (m/s)
300 8
Numerical
Velocity (m/s)
200 Analytical 6
100 4
0 2
-100 0
0 2 4 6 8 10 12 14 16 18 20
Time (s)
-200
0 2 4 6 8 10 12 14 16 18 20
Time (s)
23 24