You are on page 1of 5

ChE 401: Computational Methods in Chemical Engineering -,,.

- 3=| -,,,| -== :


Summer 1430/1431 (2010) Prof. Ibrahim S. Al-Mutaz
1

King Saud University
College of Engineering
Chemical Engineering Department

ChE 401: Computational Methods in Chemical Engineering -,,.- 3=| -,,,| -== :
Summer 1430/1431 (2010) Prof. Ibrahim S. Al-Mutaz

Selected Problems Part1

Problem 1:
Solve the following system of equations
(a) 4x
1
+ x
2
+ x
3
= 4 (b) x
1
+ x
2
x
3
= 2
x
1
+ 4x
2
2x
3
= 4 2x
1
+ 3x
2
+ 5x
3
= 3
3x
1
+ 2x
2
4x
3
= 6 3x
1
+ 2x
2
3x
3
= 6
(i) by the Gauss elimination method with partial pivoting,
(ii) by the decomposition method with u
11
= u
22
= u
33
= 1.

Problem 2:
Show that the following matrix is nonsingular but it cannot be written as the product of lower
and upper triangular matrices, that is, as LU.
1 2 3
2 4 1
1 0 2
A


=




Problem 3:
Show that there is no solution to the following linear system:
4x
1
x
2
+2x
3
+ 3x
4
= 20
0x
2
+ 7x
3
4x
4
= -7
6x
3
+ 5x
4
= 4
3x
4
= 6

Problem 4:
Determine whether the following matrix is singular:
2.1 0.6 1.1
3.2 4.7 0.8
3.1 6.5 4.1






Problem 5:
Determine the number of terms necessary to approximate cos (x) to 8 significant figures using
Taylor series approximation, cos(x) = 1 - x^2/2! + x^4/4! - x^6/4! + ... etc. Calculate the
approximation using a value of x=2B. Write a program to determine your result.

Problem 6:
Given the two following equations: 4x
1
8x
2
= 4 and x
1
+ 6x
2
=9.
(a) Solve them by Gaussian elimination;
(b) Write Matlab code to solve by left division (backslash) operator.
(c) Write Matlab code to solve them by first performing LU decomposition, and then using
the matrices L and U for the solution.

ChE 401: Computational Methods in Chemical Engineering -,,.- 3=| -,,,| -== :
Summer 1430/1431 (2010) Prof. Ibrahim S. Al-Mutaz
2

Problem 7:
Solve the equations Ax = b, where
8 6 2 28
4 11 7 40
4 7 6 33
A b


= =




Knowing that the LU decomposition of the coefficient matrix is:

2 0 0 4 3 1
1 2 0 0 4 3
1 1 1 0 0 2
A LU b


= = =





Problem 8:
Use Gauss elimination to solve the equations Ax = B, where

6 4 1 14 22
4 6 4 36 18
1 4 6 6 7
A B


= =





Problem 9:
Solve the equations
1
2
3
4 1 1 12
1 4 2 1
1 2 4 5
x
A x
x


= =





Problem 10:
Use Gauss elimination to solve the following equations:
4x
1
+ x
2
x
3
= -2
5x
1
+ x
2
+ 2x
3
=4
6x
1
+ x
2
+ x
3
= 6
Employ partial pivoting and check your answer by substituting them into the original equations.

Problem 11:
Use Gauss elimination to decompose the following system of equations:
7x
1
+ 2x
2
3x
3
= -12
2x
1
+ 5x
2
3x
3
= -20
x
1
x
2
6x
3
= -26
Then, multiply the resulting [L] and [U] to determine that [A] is produced.
Also use LU decomposition to solve this system of equations. Show all the steps in the
computation.

Problem 12:
Solve the following system of equation using LU decomposition with partial pivoting.
-5x
1
+ 12x
3
= 60, 4x
1
x
2
x
3
= -2, x
1
2x
2
+ 12x
3
= -86

ChE 401: Computational Methods in Chemical Engineering -,,.- 3=| -,,,| -== :
Summer 1430/1431 (2010) Prof. Ibrahim S. Al-Mutaz
3
Problem 13:
Solve the system of equations
4x
1
+ 2x
2
+ x
3
= 4, x
1
+ 3x
2
+ x
3
= 4, 3x
1
+ 2x
2
+ 6x
3
= 7
using the Gauss-Seidel method, directly and in error format. Perform three iterations
using the initial approximation, x(0) = [0.1 0.8 0.5].

Problem 14:
Use the Gauss-Seidel method to solve the following equations (= 0.09 and g
s
= 5%).
-5x
1
+ 12x
3
= 80, 4x
1
x
2
x
3
= -2, 6x
1
+ 8x
2
= 45
If necessary, make sure to rearrange the equations to achieve convergence.

Problem 15:
Determine the real roots of f(x) = -0.4x
2
+ 2.2x + 4.7;
a) Graphically.
b) Using the quadratic formula.
c) Using three iterations of the bisection method to determine the highest root. Employ
initial guesses of x
l
=5 and x
u
=10. Compute the estimated error g
e
and the true error g
t

after each iteration.

Problem 16:
Determine the real roots of f(x) = - 2 + 7x - 5x
2
+ 6x
3
;
a) Graphically.
b) Using bisection method to locate the lowest root. Employ initial guesses of x
l
=0 and x
u
=1
and iterate until the estimated error g
e
below a level of g
t
=10%.

Problem 17:
The derivative of f(x)= 1/(3- 2x
2
) is given by 4x /(3 2x
2
)
2
. Do you expect to have difficulties
evaluating this function at x= 1.22? Try it using 3 and 4 digit arithmetic with chopping.

Problem 18:
The saturation of dissolved oxygen in freshwater can be calculated with the equation:

5 7 10 11
2 3 4
1.575701 10 6.642308 10 1.243800 10 8.621949 10
ln ( ) 139.34411
sf
a a a a
x x x x
O
T T T T
= + +
Where O
sf
= the saturation concentration of dissolved oxygen in freshwater at 1 atm in mg/L and
T
a
= absolute temperature in K. Remember that T
a
= t + 273.15, where t = temperature in
o
C.
According to this equation, saturation decreases with increasing temperature. For typical natural
waters in temperature climates, the equation can be used to determine that oxygen concentration
ranges from 14.621 mg/L at 0
o
C to 6.949 mg/L at 35
o
C. Given a value of oxygen concentration,
this formula and the bisection method can be used to solve for temperature in
o
C.
a) If the initial guesses are set at 0 and 35
o
C, how many bisection iteration would be
required to determine temperature to an absolute error of 0.05
o
C.
b) Based on a), develop and test a bisection program to determine T as function of a given
oxygen concentration. Test your program for O
sf
= 8, 10 and 14 mg/L. Check your results

For a desired error E
a,d
the number of iteration can be found from the following equation:
log( / )
,
,
log(2)
o o o
where x x x
u l
o
x E
a d
n =

=
ChE 401: Computational Methods in Chemical Engineering -,,.- 3=| -,,,| -== :
Summer 1430/1431 (2010) Prof. Ibrahim S. Al-Mutaz
4


Problem 19:
A mass balance for a pollutant in a well-mixed lake can be written as follows:

c
dc
V W Q k V c
dt
=
Given the parameter values V=1x10
6
m
3
, Q= 1x10
5
m
3
/yr, W= 1x10
6
g/yr and k=0.02
m
0.5
/g
0.5
/yr, use the modified secant method to solve the steady-state concentration. Employ an
initial guess of c=4 g/m
3
and * =0.5. Perform two iterations and determine the percentage relative
error after the second iteration.
If the root can be located with fixed-point iteration as follows
( )
W Q W kV c
c
c or as c
kV Q

= =
Only one will work all the time for initial guesses of c >1. Select the correct one and demonstrate
why it always works.
( ) ( ) '
( )
f x x f x
i i i
f x
x
i

+

Where * = a small perturbation fraction to yield the following iterative equation:
( )
1
( ) ( )
x f x
i i
x x
i i
f x x f x
i i i

=
+
+



Problem 20:


ChE 401: Computational Methods in Chemical Engineering -,,.- 3=| -,,,| -== :
Summer 1430/1431 (2010) Prof. Ibrahim S. Al-Mutaz
5


Problem 21:
An irreversible first order reaction (A
k
B) takes place in four well-mixed reactor as show
in the figure. The rate at which A is transformed to B can be represented as R
ab
= k V
c
.
The reactors have different volumes and because they are operated at different temperatures, each
has a different reaction rate as shown below:


Reactor V, L k, h
-1

1 25 0.05
2 75 0.1
3 100 0.5
4 25 0.1





Determine the concentration of A and B in each of reactor at steady state.

Problem 22:
The pH of water has great significant to environmental and chemical engineers. It can be releated
to processes ranging from pipe corrosion to acid rain. The pH is releated to hydrogen ion
concentration by the relation: pH= - log
10
[H
+
].
The five equations govern the concentrations of mixture of carbon dioxide and water for a closed
system:
2
[ ][ ]
[ ][ ]
3 3
, , [ ][ ]
1 2
2 [ ]
3
2
[ ] [ ] [ ] [ ] 2[ ] [ ] [ ]
2 3 3 3 2
H CO
H HCO
K K K H OH
w
CO
HCO
C CO HCO CO and Alk HCO CO OH H
T
+
+
+
= = =

+
= + + = + +


Where Alk = the alkalinity, C
T
= total inorganic carbon and the K's are equilibrium coefficients.
The five unknown are [CO
2
]= carbon dioxide, [HCO
3
-
]= bicarbonate, [CO
3
2-
]= carbonate, [H
+
]=
hydrogen ion and [OH
-
]=hydroxyl ion. Solve for the five unknowns given that Alk=2x10
-3
,
C
T
=3x10
-3
, K
1
=10
-6.3
, K
2
=10
-10.3
, K
w
=10
-14
. Also calculate the solution's pH.




B BB BEST EST EST EST W WW WISHES ISHES ISHES ISHES

You might also like