Final output hw3 - Homework 3 Bryan Weber (Mostly Correct) PDF

Title Final output hw3 - Homework 3 Bryan Weber (Mostly Correct)
Author Asa Guest
Course Applied Thermodynamics
Institution University of Connecticut
Pages 16
File Size 553.6 KB
File Type PDF
Total Downloads 18
Total Views 127

Summary

Homework 3 Bryan Weber (Mostly Correct)...


Description

Homework 3-1

Imports In [1]: from thermostate import State, Q_, units, SystemInternational as SI import matplotlib.pyplot as plt from numpy import linspace

Definitions In [2]: substance = 'water' T_1 = Q_(560.0, 'degC') p_1 = Q_(16.0, 'MPa') mdot_1 = Q_(120.0, 'kg/s') p_2 = Q_(2.0, 'MPa') p_3 = Q_(8.0, 'kPa') x_4 = Q_(0.0, 'percent') x_6 = Q_(0.0, 'percent') p_low = Q_(0.1, 'MPa') p_high = Q_(7.5, 'MPa')

Problem Statement Water is the working fluid in an ideal regenerative Rankine cycle with one open feedwater heater. Superheated vapor enters the first-stage turbine at 16.0 MPa, 560.0 celsius with a mass flow rate of 120.0 kg/s. Steam expands through the first-stage turbine to 2.0 MPa where it is extracted and diverted to the open feedwater heater. The remainder expands through the second-stage turbine to the condenser pressure of 8.0 kPa. Saturated liquid exits the feedwater heater at 2.0 MPa. Determine 1. 2. 3. 4.

the net power developed, in MW the rate of heat transfer to the steam passing through the boiler, in MW the overall cycle thermal efficiency For extraction pressures (p2 ) ranging from plow = 0.1 MPa to phigh = 7.5 MPa, calculate the extracted mass fraction y and the overall cycle thermal efficiency. Sketch a plot of η (on the y-axis) vs. y (on the x-axis). Use at least 10 values to construct the plot. Discuss any trends you find.

1

Hint To do the plotting, we will construct a list that contains pressures from 0.1 MPa to 7.5 MPa and use a for loop to iterate over that list. As we do the iteration, we will fix the values for the states that have changed, and re-compute y and η on each iteration. We will store the value for y and η at each pressure in a list, then plot the lists. To create the list of pressures, we will use a function from the numpy library called linspace that creates a range of numbers when the start, stop, and number of values are input. If we multiply the range by the units that we want, it will work out. Note: Not all of the state change every time the extraction pressure is changed. You only need to recompute the states that change. The code will look something like this: y_values = [] eta_values = [] for p_2 in linspace(p_low, p_high, 10)*units.MPa: # State 2 is definitely going to change :-) st_2 = State(substance, p=p_2, s=s_2) # Now fix the rest of the states that have changed ... 2

y = ... y_values.append(y) Wdot_net = ... Qdot_in = ... eta = ... eta_values.append(eta) plt.plot(y_values, eta_values, label='eta') plt.legend(loc='best') plt.title('$\eta$ vs. $y$') plt.xlabel('$y$ ($\dot{m}_2/\dot{m}_1$)') plt.ylabel('$\eta$'); The syntax for the plotting function is plt.plot(x_values, y_values, label='line label name') The rest of the code below the plotting is to make the plot look nicer. Feel free to copy-paste this code into your solution.

Solution Write your engineering model, equations, and explanation of your process here. In [3]: st_1 = State(substance, T=T_1, p=p_1) st_2 = State(substance, s=st_1.s, p=p_2) st_3 = State(substance, p=p_3, s=st_2.s) st_4 = State(substance, x=x_4, T=st_3.T) st_6 = State(substance, x=x_6, p=p_2) st_5 = State(substance, p=st_6.p, s=st_4.s) st_7 = State(substance, p=p_1, s= st_6.s) y= (st_6.h-st_5.h)/(st_2.h-st_5.h) print(y) 0.2702317642984455 dimensionless

Answer: .27

1. the net power developed 1) Water is not an ideal gas 2) negligible KE and PE 3) no stray heat transfer 3

4) Closed system Wt2 + Wt1 − |Wp1 | − |Wp2 | = Wnet Wt1 = m˙ 1 ( h1 − h2 ) Wt2 = m˙ 3 ( h2 − h3 ) Wp1 = m˙3 ( h4 − h5 ) Wp2 = m˙1 ( h6 − h7 ) In [4]: W_t1 = (st_1.h-st_2.h) W_t2 = (1-y)*(st_2.h-st_3.h) W_p1 = (1-y)*(st_4.h-st_5.h) W_p2 = (st_6.h-st_7.h) W_net = mdot_1*(W_t1+W_t2+W_p1+W_p2) print(W_net.to('MW')) 141.84062640456122 megawatt

Answer: 141.84 MW

2. the heat transfer input Qin = m ˙ 1 ( h1 − h7 ) In [5]: Q_in = mdot_1*(st_1.h-st_7.h) print(Q_in.to('MW')) 305.07356449313215 megawatt

Answer: 305.1 MW

3. the overall cycle thermal efficiency eta =

Wcycle Qin

In [6]: eta = W_net/Q_in print(eta) 0.4649390931011144 dimensionless

Answer: .46

4

4. plot η vs y Write your engineering model, equations, and explanation of your process here. In [7]: y_values = [] eta_values = [] for p_2 in linspace(p_low, p_high, 10)*units.MPa: st_2 = State(substance, p=p_2, s=st_1.s) st_5 = State(substance, p=st_6.p, s=st_4.s) st_6 = State(substance, x=x_6, p=p_2) st_3 = State(substance, p=p_3, s=st_2.s) st_7 = State(substance, p=p_1, s= st_6.s) y = y= (st_6.h-st_5.h)/(st_2.h-st_5.h) y_values.append(y) W_t1 = (st_1.h-st_2.h) W_t2 = (1-y)*(st_2.h-st_3.h) W_p1 = (1-y)*(st_4.h-st_5.h) W_p2 = (st_6.h-st_7.h) Q_in = mdot_1*(st_1.h-st_7.h) Wdot_net = mdot_1*(W_t1+W_t2+W_p1+W_p2) Qdot_in = mdot_1*(st_1.h-st_7.h) eta = Wdot_net/Qdot_in eta_values.append(eta) print(p_2)

plt.plot(y_values, eta_values, label='eta') plt.legend(loc='best') plt.title('$\eta$ vs. $y$') plt.xlabel('$y$ ($\dot{m}_2/\dot{m}_1$)') plt.ylabel('$\eta$'); 0.1 megapascal 0.9222222222222223 megapascal 1.7444444444444447 megapascal 2.566666666666667 megapascal 3.3888888888888893 megapascal 4.211111111111111 megapascal 5.033333333333333 megapascal 5.855555555555556 megapascal 6.677777777777778 megapascal 7.5 megapascal

5

Answer: As the pressure increases the ratio of m_2 / m_1 (y) increases and the thermal efficiency also increases and then seems to plateau at a value of about .23 then drops off at a value of .26. To find the most cost efficient thermal efficiency we would need to do a cost benefit analysis and a societal cost benefit analysis

6

Homework 3-2

Imports In [1]: from thermostate import State, Q_, units, SystemInternational as SI import matplotlib.pyplot as plt from numpy import linspace

Definitions In [2]: substance = 'water' T_1 = Q_(560.0, 'degC') p_1 = Q_(16.0, 'MPa') mdot_1 = Q_(120.0, 'kg/s') p_2 = Q_(2.0, 'MPa') p_3 = Q_(8.0, 'kPa') x_4 = Q_(0.0, 'dimensionless') x_7 = Q_(0.0, 'dimensionless') p_low = Q_(0.01, 'MPa') p_high = Q_(5.0, 'MPa')

Problem Statement Water is the working fluid in an ideal regenerative Rankine cycle with one closed feedwater heater. Superheated vapor enters the first-stage turbine at 16.0 MPa, 560.0 celsius with a mass flow rate of 120.0 kg/s. Steam expands through the first-stage turbine to 2.0 MPa where it is extracted and diverted to the closed feedwater heater. The remainder expands through the second-stage turbine to the condenser pressure of 8.0 kPa. Condensate drains from the feedwater heater as a saturated liquid at 2.0 MPa and goes through a steam trap before entering the condenser. The feedwater leaves the heater at 16.0 MPa and a temperature equal to the saturation temperature at p7 . Determine 1. 2. 3. 4.

the net power developed, in MW the rate of heat transfer to the steam passing through the boiler, in MW the overall cycle thermal efficiency For extraction pressures (p2 ) ranging from plow = 0.01 MPa to phigh = 5.0 MPa, calculate the extracted mass fraction y and the overall cycle thermal efficiency. Sketch a plot of η (on the y-axis) vs. y (on the x-axis). Use at least 10 values to construct the plot. Discuss any trends you find.

1

Hint To do the plotting, we will construct a list that contains pressures from 0.01 MPa to 5.0 MPa and use a for loop to iterate over that list. As we do the iteration, we will fix the values for the states that have changed, and re-compute y and η on each iteration. We will store the value for y and η at each pressure in a list, then plot the lists. To create the list of pressures, we will use a function from the numpy library called linspace that creates a range of numbers when the start, stop, and number of values are input. If we multiply the range by the units that we want, it will work out. Note: Not all of the state change every time the extraction pressure is changed. You only need to recompute the states that change. The code will look something like this: y_values = [] eta_values = [] for p_2 in linspace(p_low, p_high, 10)*units.MPa: # State 2 is definitely going to change :-) st_2 = State(substance, p=p_2, s=s_2)

2

# Now fix the rest of the states that have changed ... y = ... y_values.append(y) Wdot_net = ... Qdot_in = ... eta = ... eta_values.append(eta) plt.plot(y_values, eta_values, label='eta') plt.legend(loc='best') plt.title('$\eta$ vs. $y$') plt.xlabel('$y$ ($\dot{m}_2/\dot{m}_1$)') plt.ylabel('$\eta$'); The syntax for the plotting function is plt.plot(x_values, y_values, label='line label name') The rest of the code below the plotting is to make the plot look nicer. Feel free to copy-paste this code into your solution.

Solution 1) Open system 2) Water is not an ideal gas 3) Neglect Stray heat transfer 4) Ideal regenerative 5) Negligible ∆ KE or ∆ PE 0 = h5 + y( h2 ) − y( h7 ) − h6 y=

h6 − h5 h2 − h7 m3

m4 = m5 = m6 = m1 m2 = m7 = m8 In [6]: st_1 st_2 st_3 st_4

= = = =

State(substance, State(substance, State(substance, State(substance,

T=T_1, p=p_1) s=st_1.s, p=p_2) s=st_1.s, p=p_3) x=x_4, p=p_3) 3

st_7 = State(substance, x=x_7, p=p_2) st_6 = State(substance, T=st_7.T, p=p_1) st_8 = State(substance, h=st_7.h, p=p_3) st_5 = State(substance, s=st_4.s, p=st_6.p) y = (st_6.h -st_5.h)/(st_2.h-st_7.h) Answer:

1. the net power developed Wt1 = h1 − h2 Wt2 = m3 ∗ ( h2 − h3 ) Wp = h4 − h5 In [7]: W_t1 = (st_1.h-st_2.h) W_t2 = (1-y)*(st_2.h-st_3.h) W_p = st_4.h-st_5.h W_net = (W_t1+W_t2+W_p)*mdot_1 print(W_net.to('MW')) 132.32522548297368 megawatt

Answer: 132.33 MW

2. the heat transfer input in the boiler Qin = m1 ∗ ( h1 − h6 ) In [8]: Q_in =st_1.h -st_6.h print(((Q_in)*mdot_1).to('MW')) 306.4422882983304 megawatt

Answer: 306.44 MW

3. the thermal efficiency of the cycle eta =

Wcycle Qin

In [9]: eta = (W_net/(Q_in*mdot_1)) print(eta) 4

0.4318112432124618 dimensionless

Answer: 43.2%

4. plot η vs. y Write your engineering model, equations, and explanation of your process here. In [10]: y_values = [] eta_values = [] for p_2 in linspace(p_low, p_high, 10)*units.MPa:

st_2 = State(substance, s=st_1.s, p=p_2) st_3 = State(substance, s=st_1.s, p=p_3) st_7 = State(substance, x=x_7, p=p_2) st_6 = State(substance, T=st_7.T, p=p_1) st_8 = State(substance, h=st_7.h, p=p_3) y = (st_6.h -st_5.h)/(st_2.h-st_7.h) W_t1 = (st_1.h-st_2.h) W_t2 = (1-y)*(st_2.h-st_3.h) W_p = st_4.h-st_5.h y_values.append(y) Wdot_net = (W_t1+W_t2+W_p) Qdot_in = st_1.h - st_6.h eta = Wdot_net/Qdot_in eta_values.append(eta) print(y,eta, p_2) plt.plot(y_values, eta_values, label='eta') plt.legend(loc='best') plt.title('$\eta$ vs. $y$') plt.xlabel('$y$ ($\dot{m}_2/\dot{m}_1$)') plt.ylabel('$\eta$'); 0.008437520067143156 dimensionless 0.43326007663629224 dimensionless 0.01 megapascal 0.24216604555166824 dimensionless 0.45300647828902785 dimensionless 0.5644444444444445 megap 0.30349685498104995 dimensionless 0.44546842622655525 dimensionless 1.118888888888889 megapa 0.3454690732410493 dimensionless 0.4369872504456497 dimensionless 1.6733333333333336 megapas 0.37851699042735737 dimensionless 0.4281616051283507 dimensionless 2.227777777777778 megapas 0.40641051497558195 dimensionless 0.4191904066869452 dimensionless 2.7822222222222224 megapa 0.4309333134333752 dimensionless 0.4101317101329328 dimensionless 3.336666666666667 megapasc 0.4530801401383833 dimensionless 0.4009989264442133 dimensionless 3.8911111111111114 megapas 0.4734679090304101 dimensionless 0.39178905225651817 dimensionless 4.445555555555556 megapas 5

0.4925088195037986 dimensionless 0.3824922821817045 dimensionless 5.0 megapascal

Answer: The Increase inthermal effieciency as the pressure increases until y = .26 then the thermal efficiency begins to decrease. The changes in thermal effieiciency in the positively sloped region do not change drastically and it may or may not be worth the extra money to increase the pressure.

6

Homework 3-3

Imports In [1]: from thermostate import State, Q_, units, SystemInternational as SI

Definitions In [2]: substance = 'water' T_1 = Q_(480.0, 'degC') p_1 = Q_(12.0, 'MPa') p_2 = Q_(2.0, 'MPa') p_3 = p_2 T_3 = Q_(440.0, 'degC') p_4 = p_7 = p_8 = p_12 = Q_(0.3, 'MPa') p_5 = Q_(6.0, 'kPa') x_6 = Q_(0.0, 'dimensionless') x_8 = Q_(0.0, 'dimensionless') p_10 = Q_(12.0, 'MPa') T_10 = Q_(210.0, 'degC') x_11 = Q_(0.0, 'dimensionless') p_11 = p_2

Problem Statement Consider a regenerative vapor power cycle with two feedwater heaters, a closed one and an open one, and reheat. Steam enters the first turbine stage at 12.0 MPa, 480.0 celsius, and expands to 2.0 MPa. Some steam is extracted at 2.0 MPa and bled to the closed feedwater heater. The remainder is reheated at 2.0 MPa to 440.0 celsius and then expands through the second stage turbine, where an additional amount of steam is extracted and bled into the open feedwater heater operating at 0.3 MPa. The steam expanding through the third stage turbine exits at the condenser pressure of 6.0 kPa, and the steam exits the condenser as a saturated liquid at 6.0 kPa. Feedwater leaves the closed heater at 210.0 celsius, 12.0 MPa, and condensate exiting as saturated liquid at 2.0 MPa is trapped into the open feedwater heater. Saturated liquid at 0.3 MPa leaves the open feedwater heater. Assume all pumps and turbine stages operate isentropically. Determine for the cycle 1. the heat transfer to the working fluid passing through the steam generator and reheater, in kJ per kg of steam entering the first stage turbine 2. the thermal efficiency 3. the heat transfer from the working fluid passing through the condenser to the cooling water, in kJ per kg of steam entering the first stage turbine

1

In [3]: st_1 = State(substance, p=p_1, T=T_1 ) st_2 = State(substance, p=p_2, s=st_1.s) st_3 = State(substance, p=p_3, T=T_3 ) st_4 = State(substance, p=p_4, s= st_3.s) st_5 = State(substance, p=p_5, s= st_4.s ) st_6 = State(substance, x=x_6, p=st_5.p) st_7 = State(substance, p=p_7, s=st_6.s ) st_8 = State(substance,x=x_8,p=p_8) st_10 = State(substance, p=p_10, T=T_10) st_9 = State(substance, s=st_8.s, p=p_10) st_11 = State(substance, x=x_11, p=p_11) st_12 = State(substance,p=p_12,h=st_11.h )

CFW H : 0 = h9 + y′ h2 − h10 − y′ h11 y′ =

h10 − h9 h2 − h11

OPFW H : 0 = (1 − y′ − y′′ ) h7 + y′′ h4 + y′ h12 − h8 y′′ =

h8 − h7 − y′ ( h12 − h7 ) h4 − h7

2

In [4]: y1=(st_10.h-st_9.h)/(st_2.h-st_11.h) y2= (st_8.h-st_7.h-y1*(st_12.h-st_7.h))/(st_4.h-st_7.h) print(y1,y2) 0.16970140508166295 dimensionless 0.10464699875412278 dimensionless

Solution 1. the heat transfer in the steam generator and reheater 0 = Q + h˙ 10 + (1 − y′ ) h2 − h1 − (1 − y′ ) h3 In [5]: Q_in =-(st_10.h+(1-y1)*st_2.h-st_1.h-(1-y1)*st_3.h) print(Q_in.to('kJ/kg')) 2808.1521097734467 kilojoule / kilogram

Answer: 2808.15 kJ/kg

2. the thermal efficiency η=

Wcycle Qin

Wt1 = h1 − h2 Wt2 = (1 − y′ )( h3 − h4 ) Wt3 = (1 − y′ − y′′ )( h4 − h5 ) Wp1 = (1 − y′ − y′′ )( h6 − h7 ) Wp2 = h8 − h9 In [6]: Wt1 =st_1.h-st_2.h Wt2=(1-y1)*(st_3.h-st_4.h) Wt3 =(1-y1-y2)*(st_4.h-st_5.h) Wp1 =(1-y1-y2)*(st_6.h-st_7.h) Wp2=st_8.h-st_9.h eta = (Wt1+Wt2+Wt3+Wp1+Wp2)/Q_in print(eta) 0.46166755018694516 dimensionless

Answer: 46.17%

3

3. the rate of heat transfer out of the condenser into the cooling water 0 = Q + (1 − y′ − y”)( h5 − h7 ) In [7]: Q_out = -(1-y1-y2)*(st_5.h-st_7.h) print(Q_out.to('kJ/kg')) -1511.5046999455494 kilojoule / kilogram

Answer: -1511.50 kJ/kg

4...


Similar Free PDFs