Challenge

Project 2 - Rankine cycle Simulator

AIM:

To write a program, to simulate the rankine cycle by calculating and plotting the points corresponding to the state points and joining the gap between them and identify them as processes on both T-S and H-S plots along with the net work and back power ratio.

INTRODUCTION:

Rankine cycle is a vapour power cycle that is used in steam power plants. It is similar to the carnot cycle, its use is more popular because, it is much more practical than the carnot cycle with good efficiency rates. It also has a scope to improve the efficiency by a lot of methods such as regeneration and reheating. This makes the rankine cycle an ideal cycle for the steam turbines.

 The rankine cycle has 4 basic processes namely,

(with reference to the diagram above)

1) 1-2, isentropic compression process

After going through the condenser, the water gets into liquid state. In this process, the pump transfers the water towards the boiler. Here, the pump increases the pressure, by compression and leaves it to boiler. Hence, isentropic compression occurs at this process.

2) 2-3, isobaric heat addition process

 The high-pressure liquid enters a boiler, where it is heated at constant pressure by an external heat source to become a dry saturated vapour. Since the inlet of the turbine needs to be fed with water at high pressure and temperature, this step is necessary. Hence, isobaric heat addition occurs at this stage, with the help of the boiler.

3) 3-4, isentropic expansion process

In this process, the hot steam coming out from the boiler is fed to the turbines. Where, the the superheated water hits the blade of the turbine at high temperature and high pressure. This results in rotation of the turbine blade and as a result, the water loses its temperature and pressure. The walls of the turbine are assumed to be adiabatic, hence no heat transfer occurs in the process. Hence isentropic expanasion occurs in this process.

4) 4-1, isobaric heat rejection process

The output leftover product from the turbines are fed into the condenser. To reuse the water again, it has to be brought back to the saturated liquid state. Hence the condenser absrobs heat from the water and brings it to saturated water state at constant pressure. Hence, isobaric heat rejection occurs at this process.

In this cycle, work is obtained frrom the turbine and work is consumed from the pump. Along with this, hear is supplied at the boiler and rejected at the condenser. By this information, we can find the net work, efficiency and the back power ration of the cycle.

By repeating the above cycle, a net work is obtained, that is equal to, 

Wnet=Wt-Wp

efficiency = (Wnet/Qs)x100

 where, Q is the net heat supplied.

 and similarly, 

back power ratio = Wp/Wt

were, Wp and Wt are the work done by the turbine and pump respectively

MAIN CODE: 

% program to simulate a rankine cycle
close all
clear all
clc

% writing the fixed values

fprintf('                              RANKINE CYCLE SIMULATOR\n\n')
    fprintf('\n 1-2 is Isentropic expansion in the turbine')
    fprintf('\n 2-3 is Constant pressure heat rejection by the turbine')
    fprintf('\n 3-4 is Isentropic compression in the pump')
    fprintf('\n 4-1 is Constant pressure heat addition by the boiler')
    
% taking inputs from the user about the initial conditions
p1 = input('\n\n Enter the pressure at the turbine inlet(in bars): ');
t_sat = XSteam('Tsat_p',p1);
t1 = input('Enter the temperature at the turbine inlet(degree celcius): ');
if(t1

 OUTPUT SCREENSHOT:

 OUTPUT COMMAND WINDOW:

                              RANKINE CYCLE SIMULATOR


 1-2 is Isentropic expansion in the turbine
 2-3 is Constant pressure heat rejection by the turbine
 3-4 is Isentropic compression in the pump
 4-1 is Constant pressure heat addition by the boiler

 Enter the pressure at the turbine inlet(in bars): 44
Enter the temperature at the turbine inlet(degree celcius): 600
Enter the pressure at the condenser inlet(in bars): 9
                                 RESULTS
At State point 1:
P1 is :44.000000 Bar
T1 is :600.000000 Degree Celcius
H1 is :3671.648204 kJ/kg
S1 is :7.323653 kJ/kgk

At State point 2:
P2 is :9.000000 Bar
T2 is :175.357822 Degree Celcius
H2 is :3088.074793 kJ/kg
S2 is :7.323653 kJ/kgk

At State point 3:
P3 is :9.000000 Bar
T3 is :175.357822 Degree Celcius
H3 is :742.724615 kJ/kg
S3 is :2.094405 kJ/kgk

At State point 4:
P4 is :44.000000 Bar
T4 is :363.132007 Degree Celcius
H4 is :746.644120 kJ/kg
S4 is :2.094405 kJ/kgk

Wt is :583.573411 kJ/kg
Wp is :3.919505 kJ/kg
Wnet is :579.653906 kJ/kg
Ntherm is :19.817200 percent
Back power ratio is :0.006716>> 

CODE STEPS:

For the successful plotting of the T-S and H-S plots, i had to first plot the vapor dome, plot the state points corresponding to the four processes, and then finalyy join those points with lines. 

To obtain the values of the state variables at the four state points, i had to take the help of the XSteam library. It is a type of function, that contains all the values of state variables like a steam table. Upon calling the function with appropriate parameters, we can access all the state point variables at the state points.

I accessed the values of the state variabes step by step with each state point by calling the function when needed. And eventually after obtaining all the vairables and performing all the calculations, i was able to locate all the four state points. Then, i calculated the efficiency and the back ratio by using appropriate formula. 

To plot the vapor dome, i used a for loop to access all the values of the state variables corresponding to the saturated liquid and saturated vapour region and stored those values in four separate matrics and then used those matrices to plot the curve.

Finally, after plotting the state points and the dome curve, i joined all the four state points to obtaion the required rankine cycle graph. 

PROBLEMS ENCOUNTERED:

1. While using text command to mark the statepoints, the numbers and line got on the same position. But, after using the "HorizontalAllignment" parameter, i could place the markers correctly.

2. Using the wrong parameter to call data resulted in error, indicating insufficient parameters. Which was fixed after searching for the correct parameter.

Finding the correct parameters to assign values for the state variables was the most challenging task as the plot would get disoriented even on a slight change in input parameters.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.