Project

SIMPLE IDEAL RANKINE CYCLE SIMULATOR

Comments By Grader

1.Try to have the sf,sg curve in the plot and infer cycle characteristics from the same.

PROJECT-2

TITLE :- SIMPLE IDEAL RANKINE CYCLE SIMULATOR

RANKINE CYCLE - It is an idealized thermodynamic cycle of a heat engine that converts heat into mechanical work while undergoing phase change.

It closely describes the process by which steam operated heat engine commonly found in thermal power generation plants generate power.

Working fluid in rankine cycle - water (which changes its phase during the cycle loop)

it may be any other substance but water is usually the fluid of choice due to its favorable properties such as non-toxic and unreactive chemistry,abundance,low cost as well as its thermodynamics properties.

so, there are total four ideal processes in the rankine cycle

1) ISENTROPIC EXPANSION (Reversible Adiabatic) AT TURBINE

2)CONSTANT PRESSURE HEAT REJECTION(Reversible) AT CONDENSER

3)ISENTROPIC COMPRESSION(Reversible Adiabatic) AT PUMP

4)CONSTANT PRESSURE HEAT ADDITION(Reversible) AT BOILER

In this project ,we have to calculate the thermodynamic variables(i.e T,P,H,S) at each state points , based on the user's input using Standard XSteam library which contains steam table data of water.

user will get a prompt to input three different values

1) pressure at turbine inlet

2) temperature at turbine inlet

3)pressure at the condenser inlet (pressure exit)

after that with the help of XSteam function we will calculate thermodynamics variables at particular state , keeping in mind about all process through which we are passing on.

like in isentropic process ,entropy remains same for state 1 and state 2

similarly in case of Isentropic compression

in case of constant pressure heat addition& rejection , pressure remain same

and various properties variation ,when water changes its state.

MAIN PROGRAM

clear allclose allclcfprintf("\t\t SIMPLE IDEAL RANKINE CYCLE SIMULATOR\n\n")fprintf("1->2 Isentropic Expansion in the Turbine\n2->3 Const Pressure Heat Rejection by the Condenser")fprintf("\n3->4 Isentropic Compression in the Pump \n4->1 Const Pressure Heat Addition by the Boiler\n")p_turbine = input('Enter the Pressure at the Turbine Inlet( in bars) :  ');t_turbine = input('Enter the Temperature at the Turbine Inlet(in degC) :  ');p_condenser = input('Enter the Pressure at the Condenser (in bars):  ');%Calculation of State varibles p,t,h,s at the state points%AT STATE POINT 1fprintf(" THERMODYNAMIC VARIABLES AT STATE POINT 1\n")fprintf("P1 = %f bars \nT1 = %f degC\n",p_turbine,t_turbine)h_turbine = XSteam('h_pT',p_turbine,t_turbine);s_turbine = XSteam('s_pT',p_turbine,t_turbine);fprintf("H1 = %f KJ/Kg\nS1 = %f KJ/Kg K\n",h_turbine,s_turbine);%AT STATE POINT 2fprintf(" THERMODYNAMIC VARIABLES AT STATE POINT 2")t_condenser = XSteam('Tsat_p',p_condenser);fprintf("\nP2 = %f bars \nT2 = %f degC\n",p_condenser,t_condenser)sf2 = XSteam('sL_p',p_condenser);sg2 = XSteam('sV_p',p_condenser);X2 = (s_turbine - sf2)/(sg2 - sf2); hf2 = XSteam('hL_p',p_condenser);hg2 = XSteam('hV_p',p_condenser);h_condenser = hf2 + X2*(hg2 - hf2);fprintf("H2 = %f KJ/Kg\nS2 = %f KJ/Kg K\n",h_condenser,s_turbine)%AT STATE POINT 3fprintf(" THERMODYNAMIC VARIABLES AT STATE POINT 3")t_pump = XSteam('Tsat_p',p_condenser);h_pump = XSteam('hL_p',p_condenser);s_pump = XSteam('sL_p',p_condenser);fprintf("\nP3 = %f bars \nT3 = %f degC\n",p_condenser,t_pump)fprintf("H3 = %f KJ/Kg\nS3 = %f KJ/Kg K\n",h_pump,s_pump)V3f = XSteam('vL_p',p_condenser);H3f = XSteam('hL_p',p_condenser);%AT STATE POINT 4fprintf(" THERMODYNAMIC VARIABLES AT STATE POINT 4")h_boiler = H3f + V3f*(p_turbine - p_condenser)*100;t_boiler = XSteam('T_ph',p_turbine,h_boiler);fprintf("\nP4 = %f bars \nT4 = %f degC\n",p_turbine,t_boiler)fprintf("H4 = %f KJ/Kg\nS4 = %f KJ/Kg K\n",h_boiler,s_pump)fprintf("\t\tRESULTS\n")WT = h_turbine - h_condenser;fprintf(" WT = %f KJ/Kg\n",WT)WP = h_boiler - h_pump;fprintf(" WP = %f KJ/kg\n",WP)Wnet = WT - WP;fprintf("Wnet = %f KJ/Kg\n",Wnet)Qin = h_turbine - h_boiler;fprintf("Qin = %f KJ/Kg\n",Qin)Nther = (Wnet/Qin)*100 ;fprintf("Nther = %f percent\n",Nther)Steam_rate = 3600/Wnet;fprintf("Specific Steam Consumption = %f Kg/kwh\n",Steam_rate)temprange = linspace(t_boiler,t_turbine,1500);for i = 1:length(temprange)    S(i) = XSteam('s_pT',p_turbine,temprange(i));endfigure(1)hold onplot(s_turbine,t_turbine,'ro')plot([s_turbine s_turbine],[t_turbine t_condenser],'color','b')plot(s_turbine,t_condenser,'ro')plot([s_turbine s_pump],[t_condenser t_condenser],'color','b')plot(s_pump,t_pump,'ro')plot([s_pump s_pump],[t_condenser t_boiler],'color','b')plot(s_pump,t_boiler,'ro')plot(S,temprange,'color','b')xlabel('ENTROPY (S) KJ/Kg K')ylabel('TEMPERATURE (T) K')S23 = linspace(s_pump,s_turbine,1500);for j = 1:length(S23)    H23(j) = XSteam('h_ps',p_condenser,S23(j)); % finding values of H inbetween process 2->3  endS41 = linspace(s_pump,s_turbine,1500);for k =1:length(S41)    H41(k) = XSteam('h_ps',p_turbine,S41(k)); % finding values of H inbetween process 4->1end figure(2)hold onplot(s_turbine,h_turbine,'ro')plot([s_turbine s_turbine],[h_turbine h_condenser],'color','b')plot(s_turbine,h_condenser,'ro')plot(S23,H23,'color','b')plot(s_pump,h_pump,'ro')plot([s_pump s_pump],[h_pump h_boiler],'color','b')plot(s_pump,h_boiler,'ro')plot(S41,H41,'color','b')xlabel('ENTROPY (S) KJ/Kg K')ylabel('ENTHALPY (H) KJ/Kg')

OUTPUT SCREEN

In SECOND PART OF QUESTION ,WE HAVE TO MAKE PLOT BETWEEN (T-S) AND (H-S)

in case of T-S plot , process 1-2 ,2-3,3-4 goes in a smooth way, since for 1-2,3-4 process is Isentropic i.e no change in S value and for process 2-3 which is constant pressure heat rejection , it involves conversion of mixture of water and steam to saturated liquid ,since whole process goes on a constant pressure ,therefore temperature in this region of conversion is also constant

but for process 4-1 , which is constant pressure heat additon we have to calculate each values of S in between the process because here temperature is not constant for all region, so according to each temperature coordinate we have to calculate S (in between temperature range from t_boiler to t_turbine) .

In case of H-S plot process 1-2 and 3-4 goes in a smooth way for same reason. but for process 2-3 and 3-4 values of H changes as a function of S at a particular pressure which is maintained constant during these two process.

therefore we have to calculate H values w.r.t S individually for two process 2-3 and 3-4 which are at different const. pressure

PLOTS

T-S Graph

Since state 3 and state 4 are too close ,so they cant be seen as spearated point in this graph

H-S GRAPH

here also , 3 ,4 state cant be seen because of very close value of H3 and H4 , as at state four water is in compressed state so , change in h after pump process is not much .

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.