Fundamentals of Programming For Chemical Engineers Methods in Solving Engg Problems
Fundamentals of Programming For Chemical Engineers Methods in Solving Engg Problems
Fundamentals of Programming
for Chemical EngineersIntroductory Concepts
Leandro T. De Castro
Methods in Solving
Engineering Problems
4/14/2016
: =
: =
Round-off Errors
To minimize loss of accuracy due to round-off
errors:
a. Reformulate the problem
b. Reduce the number of error-producing
computation
c. Use High-order digit arithmetic
4/14/2016
Convergence Rate
Suppose that a sequence {Xn} converges to a real
number X*. We say the convergence is of order l (where
k>=1) provided that for some positive number C, the
following inequality will eventually true:
In general, higher values of k give faster convergence.
If a sequence converges at k=1, it is lineartly convergent
If a sequence converges at k=2, it converges
quadratically.
4/14/2016
Bisection Method
- Based on the intermediate value theorem
Assumptions:
1. f(x) is continuous
2. On [a,b], f(a), f(b) have opposite signs
3. Tolerance = tol >0 is prescribed
Bisection Method
f(b)
root r
f(a)
4/14/2016
Bisection Method
Method will iteratively construct a sequence xn that
converges to the root r and will stop when it can be
guaranteed that |r-xn| < tol.
The difficulty though with the error expression, i.e.,
=
is that the roor of a function is rarely
known beforehand.
As the limiting criterion to the number of iterations, the
following may be used:
1.
<
2.
<
3.
<
4.
<
4/14/2016
Regula Falsi
4/14/2016
) , else set
4/14/2016
Secant Method
4/14/2016
4. If error
< tol; : stop
5. Goto 3 using the two most recently generated points
4/14/2016
Newtons Method
10
4/14/2016
11