Documente Academic
Documente Profesional
Documente Cultură
YASH SHAH
9003001
RAVI AGARWAL 9003017
Heat Recovery Steam Generator (HRSG) is used to produce steam by using the waste heat
produced by a gas turbine or some processes where heat is a by-product.
The steam produced in the HRSG can be used to generate power (electrical or mechanical or
both) or it can be directly fed into some process where steam is required as input.
Because of better utilization of energy, the efficiency of the process increases with the use
of HRSG.
We have taken Lumped parameters while dealing with the differentia equations of the system.
Discrete entities that approximate the behaviour of the distributed system under certain
assumptions. Average values are taken over the system.
Mathematical models are developed for different HRSG components, using lumped
parameter, time dependent, mass and energy balances, with suitable simplifying
assumptions.
EVAPORATOR
ECONOMISER
SUPERHEATER 1
SUPERHEATER 2
The system of equations has been linearised to 10 linear equations with 10 variables.
These are equations are linearised and there are 10 dependent variables
VARIABLES:
1.
2.
3.
4.
5.
6.
CONSTANTS:
1. Cd is the coefficient of discharge of the turbine inlet valve.
2. Wd is the flow rate of cold fluid passing through the system
3. Watt is the flow rate of the fluid in attemperator
= -0.157*T1+0.142*h1;
= -0.00114-0.048h1+0.051*T1;
= -0.090*T2+0.017*g;
2=
-0.00312*h2+1.48*T2+0.00337*T1-0.279*g;
=0.00411;
g =0.0038-0.395*g+0.0374;
3 =-0.037*T3+0.069*h3+0.00672*g;
4 =-0.037*T4+0.094*h4+0.0036*g;
4 =0.032*h3-0.022*h2+0.012*h1-0.57*h4+0.212*T4-
0.00638*g+0.000382+0.000255
EXPERIMENTAL PROCEDURE:
At t=0 the system is at the steady state, i.e. all the variables are zero
We perturbed the system by changing parameters of any one chamber from the steady state
and then observe the system at different time intervals.
The deviations in each of these variables are obtained by solving the system of these 10
equations by Runge-Kutta method (we have propose)
Graphs are plotted between various dependent and independent-dependent variables and
the behaviour of the whole system is studied.
ALGORITHM:
Runge-Kutta Method:
4th order RK Method has been used for the system of 10 equations to get the required results
10 variables:
All these variables refer to the above mentioned Variables respectively.
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
a(1,i)
a(2i)
a(3,i)
a(4,i)
a(5,i)
a(6,i)
a(7,i)
a(8,i)
a(9,i)
a(10,i)
One of the chambers parameters (T1 and h1 to start with are given values instead of
zero to analyze its effect on the other variables)
Program Body:
The system is perturbed and the initial values of Ti and hi are changed from zero.
For (j=0; j<=5; j+5/h)
{
We Define 4 arrays p, q, r, s having 10 rows and (5/n + 1) columns
p = [10, 5/h + 1]
q = [10, 5/h + 1]
r = [10, 5/h + 1]
s = [10, 5/h + 1]
p, q, r, s will be defined separately for all the 10 functions
a[i, j+1] = a[i, j] + h/6 (p + 2q +2r + s)
}
Comparing the variables defines in the program with the General form of the RungeKutta method:
General form of p, q, r, s is same as the k1, k2, k3, k4
Example:
In this when we are dealing with a[2,j] only a(2) will be changed and we will take the latest value
(values calculated in the preceding step) of the remaining variables present in the particular
equation.
All the values of p, q, r, s will be found for each variable a[i] at different time intervals depending on
the step size and finally the values of each variable at different time intervals will be found out.
STEP 3
Step 2 is repeated 3 times by perturbing values of (T2, h2), (T3, h3), (T4, h4) sequentially.
STEP 4
We solve the same set of differential equations using the inbuilt Runge-Kutta function ode45.
STEP 5
We plot the graphs of all the variables versus time for each perturbation
1. (T1, h1)
2. (T2, h2),
3. (T3, h3),
4. (T4, h4)
Syntax:
Plot (0: h: 5, a(: ; : ))
STEP 6
To check the validity of our results we plot values of one variable calculated for different
step sizes and the values obtained using inbuilt function ode45 versus time.
Syntax:
For (i=1; i<=10; 1++)
a [i]
{
Subplot (5, 2, i)
Hold on
Plot 0.01 (t, a(i;:),colour)
Plot 0.05 (t, a(i;:),colour)
Plot 0.1 (t, a(i;:),colour)
Plot 1
(t, a(i;:),colour)
Hold off
/* we find the values of all the variables for Perturbation 1 at step sizes 0.05 and 0.01
additionally to check the validity of the results */
}
END
Following are the Graphs which shows us the behaviour of variables in the system.
System is perturbed in the following four different ways:
1.
2.
3.
4.
T1 = 10 Degree Celsius; h1 = 10 Joules and all the other values are zero
T2 = 10 Degree Celsius; h2 = 10 Joules and all the other values are zero
T3 = 10 Degree Celsius; h3 = 10 Joules and all the other values are zero
T4 = 10 Degree Celsius; h4 = 10 Joules and all the other values are zero
Case 1:
Conclusions:
Figure 1
Scale:
X-axis: 1 unit = 0.5 seconds
Y-axis: 1 unit = 2 Degree Celsius/ 2 Joules
Case 2:
Conclusions:
Figure 2
Scale:
X-axis: 1 unit = 0.5 seconds
Y-axis: 1 unit = 10 Degree Celsius/ 10 Joules
Case 3:
Conclusions:
a.
b.
c.
Figure 3
Scale:
X-axis: 1 unit = 0.5 seconds
Y-axis: 1 unit = 2 Degree Celsius/ 2 Joules
Case 4:
Conclusions:
Figure 4
Scale:
X-axis: 1 unit = 0.5 seconds
Y-axis: 1 unit = 2 Degree Celsius/ 2 Joules
DISCUSSIONS:
We sincerely thank Professor Dhiren Modi for introducing the concept of Engineering
Projects in this course which motivated us to learn Matlab, helped us to come across
various real life engineering problems and introduced us to the concept of report writing.
We have taken this project from Professor Manmohan Pandey. Two students from IIT
Guwahati have written research paper as their B.Tech Project on HRSG under Prof. Pandeys
guidance. The paper focuses on converting the non-linear equations into dimensionless
linear equations and solving them. After studying the equations an open and closed loop
control systems are generated for the Heat Recovery System Generation.
We wanted to know about the types of B.Tech projects taken by students in other Deemed
Engineering Institutes which would help us in deciding the level of our B.Tech projects two
years hence. Prof. Pandey introduced us to this project and we were more than happy to go
through it and solve the differential equations and make a beginning on doing projects and
report writing.
Also today Energy Conservation has become very important and almost any power plant,
manufacturing unit, vehicles have systems installed for energy efficiency. Heat Recovery
system generation is one such important system installed in power plants for generating
steam from the waste heat and using it to rotate turbines and generate power. Thus the
installation of the Heat Recovery System Generator (HRSG) is very important in present
power plants to increase the efficiency and from the economic point of view.
Figure 5
Scale:
X-axis: 1 unit = 0.002 Degree Celsius
Y-axis: 1 unit = 0.01 Joules
b. How will the Water in drum level vary when the temperature and enthalpy of
the Economiser is changed?
(Refer Figure 1)
c. When the temperature of the economiser is increased by say 100 C, after how
much time the temperature in the evaporator will reach its maximum rated
value?
How can we conclude that our method is correct and all the results we have obtained are
accurate and match the original values?
Below is the graph of all the variables with respect to time when we have perturbed the
system by changing two values T1 and h1.
Each graph has 4 values for the same variables calculated by Runge-Kutta method by varying
the step size
1.
2.
3.
4.
5.
h=0.01
h=0.05
h=0.1
h=1
By using ode45
FIGURE 6
FIGURE 7
FIGURE 8
From the third graph we can conclude that for small interval after the system is left open say 40
seconds, Runge-Kutta method is accurate with the inbuilt function
After 40 seconds, our calculations are accurate as we can see the graphs using different sizes
coincide but it shows variations with the ode45 solutions.
BIBLIOGRAPHY:
PROJECT TAKEN FROM RESEARCH PAPER
BY: AMIT NATH PANDEY AND BHARAT PANDEY
MENTOR: PROF. MANMOHAN PANDEY
APPENDIX:
VARIABLES:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
T1 =a1
T2 =a2
T3 =a3
T4 =a4
h5 =a5
h6 =a6
h7 =a7
h8 =a8
g =a9
V10out =a10
Matlab Program for the project (The following code gives the graph of FIGURE 6 ,
rest of the graphs are plotted accordingly by changing the initial values as per
mentioned below every graph. Also the function sole is made a separate
function [ da ] = sole( t,a )
%UNTITLED Summary of this function goes here
%
Detailed explanation goes here
da(1)=-0.157* a(2) + 0.142*a(5);
da(5)=-0.00114-0.048*a(5)+0.051*a(1);
da(2)=-0.090*a(2)+0.017*a(9);
da(6)=-0.00312*a(6)+1.48*a(2)+0.00337*a(1)-0.279*a(9);
da(10)=0.00411;
da(9)=0.0038-0.395*a(9)+0.0374;
da(3)=-0.037*a(3)+0.069*a(7)+0.00672*a(9);
da(7)=-0.28*a(7)+0.024*a(6)-0.0134*a(5)+0.128*a(3)-0.01*a(9)+0.000642;
da(4)=-0.037*a(4)+0.094*a(8)+0.0036*a(9);
da(8)=0.032*a(7)-0.022*a(6)+0.012*a(5)-0.57*a(8)+0.212*a(4)0.00638*a(9)+0.000382+0.000255;
da = da(:);
end
p=zeros(10,501);
q=zeros(10,501);
r=zeros(10,501);
s=zeros(10,501);
a=zeros(10,501);
a(1,1)=10;
a(2,1)=0;
a(3,1)=0;
a(4,1)=0;
a(5,1)=10;
a(6,1)=0;
a(7,1)=0;
a(8,1)=0;
a(9,1)=0;
a(10,1)=0;
for j = 1:500
s(1,j)=-0.157* a(2) + 0.142*a(5);
r(1,j)=s(1,j);
q(1,j)=r(1,j);
p(1,j)=q(1,j);
a(1,j+1)=a(1,j)+6*0.01/6*(p(1,j));
s(10,j)=0;
r(10,j)=s(10,j);
q(10,j)=r(10,j);
p(10,j)=q(10,j);
a(10,j+1)=a(10,j);
p(2,j)=-0.090*a(2)+0.017*a(9);
q(2,j)=-0.090*(a(2)+p(2,j)*0.01/2)+0.017*a(9);
r(2,j)=-0.090*(a(2)+q(2,j)*0.01/2)+0.017*a(9);
s(2,j)=-0.090*(a(2)+r(2,j)*0.01)+0.017*a(9);
a(2,j+1)=a(2,j)+0.01/6*(p(2,j)+2*q(2,j)+2*r(2,j)+s(2,j));
p(3,j)=-0.037*a(3)+0.069*a(7)+0.00672*a(9);
q(3,j)=-0.037*(a(3)+p(3,j)*0.01/2)+0.069*a(7)+0.00672*a(9);
r(3,j)=-0.037*(a(3)+q(3,j)*0.01/2)+0.069*a(7)+0.00672*a(9);
s(3,j)=-0.037*(a(3)+r(3,j)*0.01)+0.069*a(7)+0.00672*a(9);
a(3,j+1)=a(3,j)+0.01/6*(p(3,j)+2*q(3,j)+2*r(3,j)+s(3,j));
p(4,j)=-0.037*a(4)+0.094*a(8)+0.0036*a(9);
q(4,j)=-0.037*(a(4)+p(4,j)*0.01/2)+0.094*a(8)+0.0036*a(9);
r(4,j)=-0.037*(a(4)+q(4,j)*0.01/2)+0.094*a(8)+0.0036*a(9);
s(4,j)=-0.037*(a(4)+r(4,j)*0.01)+0.094*a(8)+0.0036*a(9);
a(4,j+1)=a(4,j)+0.01/6*(p(4,j)+2*q(4,j)+2*r(4,j)+s(4,j));
p(5,j)=-0.048*a(5)+0.051*a(1);
q(5,j)=-0.048*(a(5)+p(5,j)*0.01/2)+0.051*a(1);
r(5,j)=-0.048*(a(5)+q(5,j)*0.01/2)+0.051*a(1);
s(5,j)=-0.048*(a(5)+r(5,j)*0.01)+0.051*a(1);
a(5,j+1)=a(5,j) +0.01/6*(p(5,j)+2*q(5,j)+2*r(5,j)+s(5,j));
p(6,j)=-0.00312*a(6)+1.48*a(2)+0.00337*a(1)-0.279*a(9);
q(6,j)=-0.00312*(a(6)+p(6,j)*0.01/2)+1.48*a(2)+0.00337*a(1)0.279*a(9);
r(6,j)=-0.00312*(a(6)+q(6,j)*0.01/2)+1.48*a(2)+0.00337*a(1)0.279*a(9);
s(6,j)=-0.00312*(a(6)+r(6,j)*0.01)+1.48*a(2)+0.00337*a(1)0.279*a(9);
a(6,j+1)=a(6,j)+0.01/6*(p(6,j)+2*q(6,j)+2*r(6,j)+s(6,j));
p(7,j)=-0.28*a(7)+0.024*a(6)-0.0134*a(5)+0.128*a(3)-0.01*a(9);
q(7,j)=-0.28*(a(7)+p(7,j)*0.01/2)+0.024*a(6)-0.0134*a(5)+0.128*a(3)0.01*a(9);
r(7,j)=-0.28*(a(7)+q(7,j)*0.01/2)+0.024*a(6)-0.0134*a(5)+0.128*a(3)0.01*a(9);
s(7,j)=-0.28*(a(7)+r(7,j)*0.01)+0.024*a(6)-0.0134*a(5)+0.128*a(3)0.01*a(9);
a(7,j+1)=a(7,j)+0.01/6*(p(7,j)+2*q(7,j)+2*r(7,j)+s(7,j));
p(8,j)=0.032*a(7)-0.022*a(6)+0.012*a(5)-0.57*a(8)+0.212*a(4)0.00638*a(9);
q(8,j)=0.032*a(7)-0.022*a(6)+0.012*a(5)0.57*(a(8)+p(8,j)*0.01/2)+0.212*a(4)-0.00638*a(9);
r(8,j)=0.032*a(7)-0.022*a(6)+0.012*a(5)0.57*(a(8)+q(8,j)*0.01/2)+0.212*a(4)-0.00638*a(9);
s(8,j)=0.032*a(7)-0.022*a(6)+0.012*a(5)0.57*(a(8)+r(8,j)*0.01)+0.212*a(4)-0.00638*a(9);
a(8,j+1)=a(8,j)+0.01/6*(p(8,j)+2*q(8,j)+2*r(8,j)+s(8,j));
p(9,j)=-0.395*a(9);
q(9,j)=-0.395*(a(9)+p(9,j)*0.01/2);
r(9,j)=-0.395*(a(9)+q(9,j)*0.01/2);
s(9,j)=-0.395*(a(9)+r(9,j)*0.01);
a(9,j+1)=a(9,j)+ 0.01/6*(p(9,j)+2*q(9,j)+2*r(9,j)+s(9,j));
end
a
p=zeros(10,51);
q=zeros(10,51);
r=zeros(10,51);
s=zeros(10,51);
b=zeros(10,51);
b(1,1)=10;
b(2,1)=0;
b(3,1)=0;
b(4,1)=0;
b(5,1)=10;
b(6,1)=0;
b(7,1)=0;
b(8,1)=0;
b(9,1)=0;
b(10,1)=0;
for j = 1:50
s(1,j)=-0.157* b(2) + 0.142*b(5);
r(1,j)=s(1,j);
q(1,j)=r(1,j);
p(1,j)=q(1,j);
b(1,j+1)=b(1,j)+6*0.1/6*(p(1,j));
s(10,j)=0;
r(10,j)=s(10,j);
q(10,j)=r(10,j);
p(10,j)=q(10,j);
b(10,j+1)=b(10,j);
p(2,j)=-0.090*b(2)+0.017*b(9);
q(2,j)=-0.090*(b(2)+p(2,j)*0.1/2)+0.017*b(9);
r(2,j)=-0.090*(b(2)+q(2,j)*0.1/2)+0.017*b(9);
s(2,j)=-0.090*(b(2)+r(2,j)*0.1)+0.017*b(9);
b(2,j+1)=b(2,j)+0.1/6*(p(2,j)+2*q(2,j)+2*r(2,j)+s(2,j));
p(3,j)=-0.037*b(3)+0.069*b(7)+0.00672*b(9);
q(3,j)=-0.037*(b(3)+p(3,j)*0.1/2)+0.069*b(7)+0.00672*b(9);
r(3,j)=-0.037*(b(3)+q(3,j)*0.1/2)+0.069*b(7)+0.00672*b(9);
s(3,j)=-0.037*(b(3)+r(3,j)*0.1)+0.069*b(7)+0.00672*b(9);
b(3,j+1)=b(3,j)+0.1/6*(p(3,j)+2*q(3,j)+2*r(3,j)+s(3,j));
p(4,j)=-0.037*b(4)+0.094*b(8)+0.0036*b(9);
q(4,j)=-0.037*(b(4)+p(4,j)*0.1/2)+0.094*b(8)+0.0036*b(9);
r(4,j)=-0.037*(b(4)+q(4,j)*0.1/2)+0.094*b(8)+0.0036*b(9);
s(4,j)=-0.037*(b(4)+r(4,j)*0.1)+0.094*b(8)+0.0036*b(9);
b(4,j+1)=b(4,j)+0.1/6*(p(4,j)+2*q(4,j)+2*r(4,j)+s(4,j));
p(5,j)=-0.048*b(5)+0.051*b(1);
q(5,j)=-0.048*(b(5)+p(5,j)*0.1/2)+0.051*b(1);
r(5,j)=-0.048*(b(5)+q(5,j)*0.1/2)+0.051*b(1);
s(5,j)=-0.048*(b(5)+r(5,j)*0.1)+0.051*b(1);
b(5,j+1)=b(5,j) +0.1/6*(p(5,j)+2*q(5,j)+2*r(5,j)+s(5,j));
p(6,j)=-0.00312*b(6)+1.48*b(2)+0.00337*b(1)-0.279*b(9);
q(6,j)=-0.00312*(b(6)+p(6,j)*0.1/2)+1.48*b(2)+0.00337*b(1)0.279*b(9);
r(6,j)=-0.00312*(b(6)+q(6,j)*0.1/2)+1.48*b(2)+0.00337*b(1)0.279*b(9);
s(6,j)=-0.00312*(b(6)+r(6,j)*0.1)+1.48*b(2)+0.00337*b(1)-0.279*b(9);
b(6,j+1)=b(6,j)+0.1/6*(p(6,j)+2*q(6,j)+2*r(6,j)+s(6,j));
p(7,j)=-0.28*b(7)+0.024*b(6)-0.0134*b(5)+0.128*b(3)-0.01*b(9);
q(7,j)=-0.28*(b(7)+p(7,j)*0.1/2)+0.024*b(6)-0.0134*b(5)+0.128*b(3)0.01*b(9);
r(7,j)=-0.28*(b(7)+q(7,j)*0.1/2)+0.024*b(6)-0.0134*b(5)+0.128*b(3)0.01*b(9);
s(7,j)=-0.28*(b(7)+r(7,j)*0.1)+0.024*b(6)-0.0134*b(5)+0.128*b(3)0.01*b(9);
b(7,j+1)=b(7,j)+0.1/6*(p(7,j)+2*q(7,j)+2*r(7,j)+s(7,j));
p(8,j)=0.032*b(7)-0.022*b(6)+0.012*b(5)-0.57*b(8)+0.212*b(4)0.00638*b(9);
q(8,j)=0.032*b(7)-0.022*b(6)+0.012*b(5)0.57*(b(8)+p(8,j)*0.1/2)+0.212*b(4)-0.00638*b(9);
r(8,j)=0.032*b(7)-0.022*b(6)+0.012*b(5)0.57*(b(8)+q(8,j)*0.1/2)+0.212*b(4)-0.00638*b(9);
s(8,j)=0.032*b(7)-0.022*b(6)+0.012*b(5)0.57*(b(8)+r(8,j)*0.1)+0.212*b(4)-0.00638*b(9);
b(8,j+1)=b(8,j)+0.1/6*(p(8,j)+2*q(8,j)+2*r(8,j)+s(8,j));
p(9,j)=-0.395*b(9);
q(9,j)=-0.395*(b(9)+p(9,j)*0.1/2);
r(9,j)=-0.395*(b(9)+q(9,j)*0.1/2);
s(9,j)=-0.395*(b(9)+r(9,j)*0.1);
b(9,j+1)=b(9,j)+ 0.1/6*(p(9,j)+2*q(9,j)+2*r(9,j)+s(9,j));
end
b
p=zeros(10,6);
q=zeros(10,6);
r=zeros(10,6);
s=zeros(10,6);
c=zeros(10,6);
c(1,1)=10;
c(2,1)=0;
c(3,1)=0;
c(4,1)=0;
c(5,1)=10;
c(6,1)=0;
c(7,1)=0;
c(8,1)=0;
c(9,1)=0;
c(10,1)=0;
for j = 1:5
s(1,j)=-0.157* c(2) + 0.142*c(5);
r(1,j)=s(1,j);
q(1,j)=r(1,j);
p(1,j)=q(1,j);
c(1,j+1)=c(1,j)+4/6*(p(1,j));
s(10,j)=0;
r(10,j)=s(10,j);
q(10,j)=r(10,j);
p(10,j)=q(10,j);
p(2,j)=-0.090*c(2)+0.017*c(9);
q(2,j)=-0.090*(c(2)+p(2,j)*1/2)+0.017*c(9);
r(2,j)=-0.090*(c(2)+q(2,j)*1/2)+0.017*c(9);
s(2,j)=-0.090*(c(2)+r(2,j)*1)+0.017*c(9);
c(2,j+1)=c(2,j)+1/6*(p(2,j)+q(2,j)+r(2,j)+s(2,j));
p(3,j)=-0.037*c(3)+0.069*c(7)+0.00672*c(9);
q(3,j)=-0.037*(c(3)+p(3,j)*1/2)+0.069*c(7)+0.00672*c(9);
r(3,j)=-0.037*(c(3)+q(3,j)*1/2)+0.069*c(7)+0.00672*c(9);
s(3,j)=-0.037*(c(3)+r(3,j)*1)+0.069*c(7)+0.00672*c(9);
c(3,j+1)=c(3,j)+1/6*(p(3,j)+q(3,j)+r(3,j)+s(3,j));
p(4,j)=-0.037*c(4)+0.094*c(8)+0.0036*c(9);
q(4,j)=-0.037*(c(4)+p(4,j)*1/2)+0.094*c(8)+0.0036*c(9);
r(4,j)=-0.037*(c(4)+q(4,j)*1/2)+0.094*c(8)+0.0036*c(9);
s(4,j)=-0.037*(c(4)+r(4,j)*1)+0.094*c(8)+0.0036*c(9);
c(4,j+1)=c(4,j)+1/6*(p(4,j)+q(4,j)+r(4,j)+s(4,j));
p(5,j)=-0.048*c(5)+0.051*c(1);
q(5,j)=-0.048*(c(5)+p(5,j)*1/2)+0.051*c(1);
r(5,j)=-0.048*(c(5)+q(5,j)*1/2)+0.051*c(1);
s(5,j)=-0.048*(c(5)+r(5,j)*1)+0.051*c(1);
c(5,j+1)=c(5,j) +1/6*(p(5,j)+q(5,j)+r(5,j)+s(5,j));
p(6,j)=-0.00312*c(6)+1.48*c(2)+0.00337*c(1)-0.279*c(9);
q(6,j)=-0.00312*(c(6)+p(6,j)*1/2)+1.48*c(2)+0.00337*c(1)-0.279*c(9);
r(6,j)=-0.00312*(c(6)+q(6,j)*1/2)+1.48*c(2)+0.00337*c(1)-0.279*c(9);
s(6,j)=-0.00312*(c(6)+r(6,j)*1)+1.48*c(2)+0.00337*c(1)-0.279*c(9);
c(6,j+1)=c(6,j)+1/6*(p(6,j)+q(6,j)+r(6,j)+s(6,j));
p(7,j)=-0.28*c(7)+0.024*c(6)-0.0134*c(5)+0.128*c(3)-0.01*c(9);
q(7,j)=-0.28*(c(7)+p(7,j)*1/2)+0.024*c(6)-0.0134*c(5)+0.128*c(3)0.01*c(9);
r(7,j)=-0.28*(c(7)+q(7,j)*1/2)+0.024*c(6)-0.0134*c(5)+0.128*c(3)0.01*c(9);
s(7,j)=-0.28*(c(7)+r(7,j)*1)+0.024*c(6)-0.0134*c(5)+0.128*c(3)0.01*c(9);
c(7,j+1)=c(7,j)+1/6*(p(7,j)+q(7,j)+r(7,j)+s(7,j));
p(8,j)=0.032*c(7)-0.022*c(6)+0.012*c(5)-0.57*c(8)+0.212*c(4)0.00638*c(9);
q(8,j)=0.032*c(7)-0.022*c(6)+0.012*c(5)0.57*(c(8)+p(8,j)*1/2)+0.212*c(4)-0.00638*c(9);
r(8,j)=0.032*c(7)-0.022*c(6)+0.012*c(5)0.57*(c(8)+q(8,j)*1/2)+0.212*c(4)-0.00638*c(9);
s(8,j)=0.032*c(7)-0.022*c(6)+0.012*c(5)0.57*(c(8)+r(8,j)*1)+0.212*c(4)-0.00638*c(9);
c(8,j+1)=c(8,j)+1/6*(p(8,j)+q(8,j)+r(8,j)+s(8,j));
p(9,j)=-0.395*c(9);
q(9,j)=-0.395*(c(9)+p(9,j)*1/2);
r(9,j)=-0.395*(c(9)+q(9,j)*1/2);
s(9,j)=-0.395*(c(9)+r(9,j)*1);
c(9,j+1)=c(9,j)+ 1/6*(p(9,j)+q(9,j)+r(9,j)+s(9,j));
end
t = 0:.01:5;
t_1 = 0:.1:5;
t_2 = 0:5;
c
ic = [10 0 0 0 10 0 0 0 0 0];
[T,d] = ode45(@sole,[0:1:5], ic)
AF = d(6,:)
d=d';
figure
for i= 1:10
subplot(5,2,i)
hold on
plot(t,a(i,:),'r')
plot(t_1,b(i,:),'b')
plot(t_2,c(i,:),'g')
plot(t_2,d(i,:),'k')
xlabel('time(sec)')
legend(strcat('a(',num2str(i),')'),strcat('b(',num2str(i),')'),strcat('c(',
num2str(i),')'),strcat('d(',num2str(i),')'))
hold off
end