Sei sulla pagina 1di 9

MA-513 Numerical Analysis, Mini Project

Mukund Mishra (13510017), Mukesh Verma (13510016), Shaurya Seth (11110095)


April 29, 2015

Problem 1:

Steady-State Analysis of a System of Reactors: Consider the following


set of five interconnected reactors

Figure 1: Five reactors linked by pipes


where ci denotes the concentration in reactor i, c0j denotes the concentration
entering the reactor j and Qij denotes the volumetric flow rate from reactor i
to reactor j. All the volumetric flow rate values are shown in figure 1 and we
wish to estimate the ci s. It is assumed that every entity is in appropriate units.

Idea used to develop the necessary equations


Conservation of mass (or Mass balance) is an important principle which is frequently used in Chemical Engineering which simply states that
Accumulation = Inputs - Outputs

Figure 2: A schematic representation of mass balance


If a system is in steady-state then the accumulation term equals zero and the
mass balance equation becomes
Inputs = Outputs

Mathematical Modeling of the Problem


We will use the following equation for each of the five reactors
Inputs = Outputs
For reactor 1,
Q01 c01 + Q31 c3 = Q12 c1 + Q15 c1
which upon substitution of the given values reduces to
6c1 c3 = 50
For reactor 2,
Q12 c1 = Q23 c2 + Q24 c2 + Q25 c2
which upon substitution of the given values reduces to
3c1 + 3c2 = 0
For reactor 3,
Q03 c03 + Q23 c2 = Q31 c3 + Q34 c3
which upon substitution of the given values reduces to
c2 + 9c3 = 160
For reactor 4,
Q24 c2 + Q34 c3 + Q54 c5 = Q44 c4
which upon substitution of the given values reduces to
c2 8c3 + 11c4 2c5 = 0
For reactor 5,
Q15 c1 + Q25 c2 = Q54 c5 + Q55 c5
which upon substitution of the given values reduces to
3c1 c2 + 4c5 = 0
We now have the following set of algebraic equations
6c1 c3 = 50
3c1 + 3c2 = 0
c2 + 9c3 = 160
c2 8c3 + 11c4 2c5 = 0
3c1 c2 + 4c5 = 0

Numerical Solution
We use the Gauss-Seidel iterative technique to find the numerical solution of
the problem above (Please refer to the MATLAB codes: gaussseidel.m and
Problem1.m).
The numerical
 solution upto four decimal places is

11.5094 11.5094 19.0566 16.9983 11.5094
i.e.
c1 = 11.5094
c2 = 11.5094
c3 = 19.0566
c4 = 16.9983
c5 = 11.5094
Reasons for choosing Gauss-Siedel method
Gauss-Siedel method usually converges faster than the Jacobi method.

Convergence
We applied the Gauss-Seidel iterative techniques for 20 iterations and all the
ci s seemed to converge by iteration number 10 to their respective values

Figure 3: Convergence of concentrations

Error analysis
We computed the solution by the Gauss-Seidel iterative technique as well as the
analytical technique (Problem1.m). Following was the error corresponding to
6
each ci s in the order
 of 10 upto four decimal places

0.0251 0.0251 0.0415 0.2558 0.1122
It is evident that the Gauss-Seidel iterative technique gives a very small error if
the number of iterations is not too small.

Interpretation of the solution


The error is very small so the numerical solution gives nearly the same
value as the analytical solution.
The concentration in each reactor in appropriate units is as follows:
c1 = 11.5094
c2 = 11.5094
c3 = 19.0566
c4 = 16.9983
c5 = 11.5094

Problem 2

Unsteady-State Analysis of Reactors: Consider the same problem as problem 1. We will now consider the unsteady state problem and determine the ci s.
Please refer to figure 1 for reference. Symbols have similar meanings and every
entity is in appropriate units.

Mathematical Modeling of the Problem


We will use the following equation for each of the five reactors
Accumulation = Inputs - Outputs
The volume of reactors is
Reactor 1: V1 = 50
Reactor 2: V2 = 20
Reactor 3: V3 = 40
Reactor 4: V4 = 80
Reactor 5: V5 = 100
For reactor 1,
dc1
= Q01 c01 + Q31 c3 Q12 c1 Q15 c1
dt
which upon substitution of the given values reduces to
V1

dc1
= 0.12c1 + 0.02c3 + 1
dt
For reactor 2,
dc2
= Q12 c1 Q23 c2 Q24 c2 Q25 c2
dt
which upon substitution of the given values reduces to
V2

dc2
= 0.15c1 0.15c2
dt
For reactor 3,
dc3
= Q03 c03 + Q23 c2 Q31 c3 Q34 c3
dt
which upon substitution of the given values reduces to
V3

dc3
= 0.025c2 0.225c3 + 4
dt
For reactor 4,
V4

dc4
= Q24 c2 + Q34 c3 + Q54 c5 Q44 c4
dt
6

which upon substitution of the given values reduces to


dc4
= 0.1c3 0.1375c4 + 0.025c5
dt
For reactor 5,
dc5
= Q15 c1 + Q25 c2 Q54 c5 Q55 c5
dt
which upon substitution of the given values reduces to
V5

dc5
= 0.03c1 + 0.01c2 0.04c5
dt
We have the following set of differential equations equations
dc1
= 0.12c1 + 0.02c3 + 1
dt
dc2
= 0.15c1 0.15c2
dt
dc3
= 0.025c2 0.225c3 + 4
dt
dc4
= 0.1c3 0.1375c4 + 0.025c5
dt
dc5
= 0.03c1 + 0.01c2 0.04c5
dt

Numerical Solution
We used Runge-Kutta method for systems of differential equations with h = 0.2
to solve our system (Please refer to MATLAB code: Problem2.m).
The numerical
 solution upto four decimal places is

11.5094 11.5093 19.0566 15.9085 11.3401
i.e.
c1 = 11.5094
c2 = 11.5093
c3 = 19.0566
c4 = 15.9085
c5 = 11.3401
Reasons for choosing Runge-Kutta 4th order method
Runge-Kutta 4th order method is employed for this purpose because it gives
better approximation to the actual solution as compared to the Euler or the
modified-Euler formula.

Convergence
We applied the Runge-Kutta method for systems of differential equations for
600 iterations and all the ci s seemed to converge by iteration number 500 to
their respective values

Figure 4: Convergence of concentrations

Error Analysis
It is difficult to estimate the actual error but we find the estimated error between
our last iteration and second last iteration. Following was the error corresponding to each ci s upto
 four decimal places

0.0000 0.0000 0.0000 0.0003 0.0014
We can say that since the number of iterations is high the solution seems to be
converging to the actual solution. We can minimize the error by increasing the
number of iterations.

Interpretation of the solution


We can see that every ci is converging to a fixed value and since we are
using fourth order Runge-Kutta method we can assume that our solution
gives us a very good approximation. Also, these solution values are similar
to those for the steady state analysis of reactors because the number of
iteration is large.
The concentration in each reactor in appropriate units is as follows:
c1 = 11.5094
8

c2 = 11.5093
c3 = 19.0566
c4 = 15.9085
c5 = 11.3401

Potrebbero piacerti anche