You are on page 1of 5

Winter Semester – 2020 / 21

CHE3001 – COMPUTATIONAL METHODS IN PROCESS ENGINEERING


Experiment- 3
NAME: SISAY AMARE NIGUSSIE
REG NO: 18BCM0149
PROBLEM STATMENT
A liquid-liquid extraction process conducted in the Electrochemical
Materials Laboratory involved the extraction of nickel from the
aqueous phase into an organic phase. A typical set of experimental
data from the laboratory is given below.
Ni aqueous 3 2 4
phase, a (g/l)
Ni organic 9.31 8 13
phase, g
(g /l)

Assuming g is the amount of Ni in the organic phase and a is the


amount of Ni in the aqueous phase, the quadratic interpolant that
estimates g is given by g = x1a 2 + x2a + x3, 3  a  4 Develop a Gauss
elimination MATLAB code to find the values of x1 , x2 , and x3 .
Solution:
Equations
9x1+3x2+x3=9.31
4x1+2x2+x3=8
16x1+4x2+x3=13

AIM
Gauss Elimination involves combining equations to eliminate
unknowns. Although it is one of the earliest methods for solving
simultaneous equations. it remains among the most important
algorithms in use now a days and is the basis for linear equation
solving on many popular software packages.
THEORY
In the method of Gauss Elimination, the fundamental idea is to add
multiples of one equation to the others in order to eliminate a
variable and to continue this process until only one variable is left.
Once this final variable is determined, its value is substituted back
into the other equations in order to evaluate the remaining
unknowns. This method characterized by step-by step elimination of
the variables.

To perform row reduction on a matrix, one uses a sequence of


elementary row operations to modify the matrix until the lower left-
hand corner of the matrix is filled with zeros, as much as possible.
There are three types of elementary row operations
1. Swapping two rows

2. Multiplying a row by a non-zero number.


3. Adding a multiple of one row to another tow.

Flowchart
Equations
9x1+3x2+x3=9.31
4x1+2x2+x3=8
16x1+4x2+x3=13
Mat lab code of gauss elimination
Input code
clc
A=[9 3 1;4 2 1;16 4 1];
b=[9.31;8;13];
[n,~]=size(A);
x=zeros(n-1);
for i=1:(n-1)
m=A(i+1:n,i)/A(i,i);
A(i+1:n,:)=A(i+1:n,:)-m*A(i,:);
b(i+1:n,:)=b(i+1:n,:)-m*b(i,:);
end
x(n,:)=b(n,:)/A(n,n);
for i=n-1:-1:1
x(i,:)=(b(i,:)-A(i,i+1:n)*x(i+1:n,:))/A(i,i);
end
x;

out put
x =

1.1900 1.1900
-4.6400 -4.6400
12.5200 12.5200

RESULT AND DISCUSSION


x =

1.1900 1.1900
-4.6400 -4.6400
12.5200 12.5200

You might also like