//EQUATIONS //Units: SI, Temperatures in Celsius, pressures in bar //Project file: D:\_classement\_Thopt\THERMOPTIM_Pro_282\proj\PWR_Extract.prj //Date and Time: 2024-08-11 14:00:47 //Flow rate unit: t/s //PROCESSES //Process: extraction //Equation: 1 m_dot_extraction = 0.2 // Given value //Process: liq_HP_turb //Equation: 2 //m_dot_liq_HP_turb = 0.14070175729 // Given value //Process: condenser //Equation: 3 m_dot_condenser = m_dot_LPturbine // Upstream process - LP turbine // Comment = mDeltaH not set //Equation: 4 Q_dot_condenser = m_dot_condenser*(h_D - h_C) // Upstream point - C - Downstream point - D - DeltaH/flow //Process: superheating //Equation: 5 m_dot_superheating = m_dot_superheatingvalve // Upstream process - superheating valve // Comment = isobaricExchange //Equation: 6 p_K = p_F // Upstream point - F - Downstream point - K // Comment = //Exchange process connected to a heat exchanger //Process: steam superheating // Comment = isobaricExchange //Equation: 7 p_I = p_I0 // Upstream point - I0 - Downstream point - I // Comment = //Exchange process connected to a heat exchanger //Process: generator //Equation: 8 m_dot_generator = m_dot_economizer // Upstream process - economizer // Comment = mDeltaH not set //Equation: 9 Q_dot_generator = m_dot_generator*(h_A - h_N) // Upstream point - N - Downstream point - A - DeltaH/flow //Process: economizer // Comment = mDeltaH not set //Equation: 10 Q_dot_economizer = m_dot_economizer*(h_N - h_M) // Upstream point - M - Downstream point - N - DeltaH/flow //Process: HP valve // Comment = Isenthalpic throttling //Equation: 11 p_B = 50.0// Given outlet pressure //Equation: 12 xl_B = 0.// Saturated liquid quality //Equation: 13 Tl_B = T_B- 0.01// Saturated liquid temperature //Equation: 14 xv_B = 1.// Saturated vapor quality //Equation: 15 Tv_B = T_B+ 0.01// Saturated vapor temperature //Equation: 16 hl_B = hsat_Px("water",p_B,xl_B)// Saturated liquid enthalpy //Equation: 17 hv_B = hsat_Px("water",p_B,xv_B)// Saturated vapor enthalpy //Equation: 18 x_B = (h_A - hl_B)/(hv_B - hl_B)// Quality //Equation: 19 T_B = Tsat_P("water",p_B) // Downstream point - B //Equation: 20 h_B = hsat_Px("water",p_B,x_B) // Enthalpy //Process: HP turbine //Equation: 21 m_dot_HPturbine = m_dot_HPvalve // Upstream process - HP valve //Equation: 22 s_B = s_Ph("water",p_B,h_B) // Upstream point - B - Downstream point - G // Comment = Polytropic reference //Equation: 23 ds_G = -(1 - etaT_HPturbine)*8.314/M_B*ln(p_G/p_B) // Upstream point - B - Downstream point - G //Equation: 24 s_G = s_B + ds_G // Entropy - G //Equation: 25 M_B = 18.01528 // Molar mass - G //Equation: 26 etaT_HPturbine = 0.91// Polytropic efficiency // Comment = Polytropic coefficient: k = -Math.log(aval.p/amont.p)/Math.log(aval.V/amont.V) //Equation: 27 xl_G = 0.// Saturated liquid quality //Equation: 28 Tl_G = T_G- 0.01// Saturated liquid temperature //Equation: 29 xv_G = 1.// Saturated vapor quality //Equation: 30 Tv_G = T_G+ 0.01// Saturated vapor temperature //Equation: 31 sl_G = s_PT("water",p_G,Tl_G)// Saturated liquid entropy //Equation: 32 sv_G = s_PT("water",p_G,Tv_G)// Saturated vapor entropy //Equation: 33 x_G = (s_G - sl_G)/(sv_G - sl_G)// Quality //Equation: 34 T_G = Tsat_P("water",p_G) // Downstream point - G //Equation: 35 h_G = hsat_Px("water",p_G,x_G) // Enthalpy // Comment = Given outlet pressure //Equation: 36 p_G = 15.0// Outlet pressure //Equation: 37 W_dot_HPturbine = m_dot_HPturbine*(h_G - h_B) // DeltaH //Process: superheating valve // Comment = Isenthalpic throttling //Equation: 38 p_F = 51.5// Given outlet pressure //Equation: 39 xl_F = 0.// Saturated liquid quality //Equation: 40 Tl_F = T_F- 0.01// Saturated liquid temperature //Equation: 41 xv_F = 1.// Saturated vapor quality //Equation: 42 Tv_F = T_F+ 0.01// Saturated vapor temperature //Equation: 43 hl_F = hsat_Px("water",p_F,xl_F)// Saturated liquid enthalpy //Equation: 44 hv_F = hsat_Px("water",p_F,xv_F)// Saturated vapor enthalpy //Equation: 45 x_F = (h_A - hl_F)/(hv_F - hl_F)// Quality //Equation: 46 T_F = Tsat_P("water",p_F) // Downstream point - F //Equation: 47 h_F = hsat_Px("water",p_F,x_F) // Enthalpy //Process: LP turbine //Equation: 48 m_dot_LPturbine = m_dot_steamsuperheating // Upstream process - steam superheating //Equation: 49 s_I = s_Ph("water",p_I,h_I) // Upstream point - I - Downstream point - C // Comment = Isentropic reference //Equation: 50 hs_C = h_Ps("water",p_C,s_I) // Downstream point - C //Equation: 51 etaT_LPturbine = 0.85// Isentropic efficiency //Equation: 52 h_C = h_I - etaT_LPturbine*(h_I - hs_C) // Upstream point - I - Downstream point - C //Equation: 53 xl_C = 0.// Saturated liquid quality //Equation: 54 Tl_C = T_C- 0.01// Saturated liquid temperature //Equation: 55 xv_C = 1.// Saturated vapor quality //Equation: 56 Tv_C = T_C+ 0.01// Saturated vapor temperature //Equation: 57 hl_C = hsat_Px("water",p_C,xl_C)// Saturated liquid enthalpy //Equation: 58 hv_C = hsat_Px("water",p_C,xv_C)// Saturated vapor enthalpy //Equation: 59 x_C = (h_C - hl_C)/(hv_C - hl_C)// Quality //Equation: 60 T_C = Tsat_P("water",p_C) // Downstream point - C //Equation: 61 s_C = s_Ph("water",p_C,h_C) // Entropy // Comment = Given outlet pressure //Equation: 62 p_C = 0.07// Outlet pressure //Equation: 63 W_dot_LPturbine = m_dot_LPturbine*(h_C - h_I) // DeltaH //Process: extraction pump //Equation: 64 m_dot_extractionpump = m_dot_condenser // Upstream process - condenser // Comment = Isentropic reference //Equation: 65 s_D = s_Ph("water",p_D,h_D) // Upstream point - D - Downstream point - L //Equation: 66 hs_L = h_Ps("water",p_L,s_D) // Downstream point - L //Equation: 67 etaT_extractionpump = 0.9// Isentropic efficiency //Equation: 68 v_L = v_Ph("water",p_L,h_L) // Downstream point volume - //Equation: 69 h_L = h_D + v_L*(p_L - p_D)/100. // Liquid compression //Equation: 70 T_L = T_Ph("water",p_L,h_L) // Downstream point - L // Comment = Given outlet pressure //Equation: 71 p_L = 15.0// Outlet pressure //Equation: 72 W_dot_extractionpump = m_dot_extractionpump*(h_L - h_D) // DeltaH //Process: LP tank throttling //Equation: 73 m_dot_LPtankthrottling = m_dot_extractionpump // Upstream process - extraction pump // Comment = Isenthalpic throttling //Equation: 74 p_L2 = 11.0// Given outlet pressure //Equation: 75 xl_L2 = 0.// Saturated liquid quality //Equation: 76 Tl_L2 = T_L2- 0.01// Saturated liquid temperature //Equation: 77 xv_L2 = 1.// Saturated vapor quality //Equation: 78 Tv_L2 = T_L2+ 0.01// Saturated vapor temperature //Equation: 79 hl_L2 = hsat_Px("water",p_L2,xl_L2)// Saturated liquid enthalpy //Equation: 80 hv_L2 = hsat_Px("water",p_L2,xv_L2)// Saturated vapor enthalpy //Equation: 81 x_L2 = (h_L - hl_L2)/(hv_L2 - hl_L2)// Quality //Equation: 82 h_L2 = h_L // Enthalpy //Equation: 83 s_L2 = s_Ph("water",p_L2,h_L2) // Enthalpy //Equation: 84 T_L2 = T_Ph("water",p_L2,h_L2) // Downstream point - L2 //Process: liquid compression // Comment = Isentropic reference //Equation: 85 s_P = s_Ph("water",p_P,h_P) // Upstream point - P - Downstream point - E //Equation: 86 hs_E = h_Ps("water",p_E,s_P) // Downstream point - E //Equation: 87 etaT_liquidcompression = 0.9// Isentropic efficiency //Equation: 88 v_E = v_Ph("water",p_E,h_E) // Downstream point volume - //Equation: 89 h_E = h_P + v_E*(p_E - p_P)/100. // Liquid compression //Equation: 90 T_E = T_Ph("water",p_E,h_E) // Downstream point - E // Comment = Given outlet pressure //Equation: 91 p_E = 70.0// Outlet pressure //Equation: 92 W_dot_liquidcompression = m_dot_liquidcompression*(h_E - h_P) // DeltaH //Process: throttling superheating-tank //Equation: 93 m_dot_throttlingsuperheatingtank = m_dot_superheating // Upstream process - superheating // Comment = Isenthalpic throttling //Equation: 94 p_K2 = 11.0// Given outlet pressure //Equation: 95 xl_K2 = 0.// Saturated liquid quality //Equation: 96 Tl_K2 = T_K2- 0.01// Saturated liquid temperature //Equation: 97 xv_K2 = 1.// Saturated vapor quality //Equation: 98 Tv_K2 = T_K2+ 0.01// Saturated vapor temperature //Equation: 99 hl_K2 = hsat_Px("water",p_K2,xl_K2)// Saturated liquid enthalpy //Equation: 100 hv_K2 = hsat_Px("water",p_K2,xv_K2)// Saturated vapor enthalpy //Equation: 101 x_K2 = (h_K - hl_K2)/(hv_K2 - hl_K2)// Quality //Equation: 102 T_K2 = Tsat_P("water",p_K2) // Downstream point - K2 //Equation: 103 h_K2 = hsat_Px("water",p_K2,x_K2) // Enthalpy //Process: IP turbine //Equation: 104 //s_G = s_Ph("water",p_G,h_G) // Upstream point - G - Downstream point - H // Comment = Polytropic reference //Equation: 105 ds_H = -(1 - etaT_IPturbine)*8.314/M_G*ln(p_H/p_G) // Upstream point - G - Downstream point - H //Equation: 106 s_H = s_G + ds_H // Entropy - H //Equation: 107 M_G = 18.01528 // Molar mass - H //Equation: 108 etaT_IPturbine = 0.91// Polytropic efficiency // Comment = Polytropic coefficient: k = -Math.log(aval.p/amont.p)/Math.log(aval.V/amont.V) //Equation: 109 xl_H = 0.// Saturated liquid quality //Equation: 110 Tl_H = T_H- 0.01// Saturated liquid temperature //Equation: 111 xv_H = 1.// Saturated vapor quality //Equation: 112 Tv_H = T_H+ 0.01// Saturated vapor temperature //Equation: 113 sl_H = s_PT("water",p_H,Tl_H)// Saturated liquid entropy //Equation: 114 sv_H = s_PT("water",p_H,Tv_H)// Saturated vapor entropy //Equation: 115 x_H = (s_H - sl_H)/(sv_H - sl_H)// Quality //Equation: 116 T_H = Tsat_P("water",p_H) // Downstream point - H //Equation: 117 h_H = hsat_Px("water",p_H,x_H) // Enthalpy // Comment = Given outlet pressure //Equation: 118 p_H = 9.0// Outlet pressure //Equation: 119 W_dot_IPturbine = m_dot_IPturbine*(h_H - h_G) // DeltaH //NODES //Node: SG outlet // Comment = Divider //Equation: 120 m_dot_generator = m_dot_HPvalve + m_dot_superheatingvalve // Upstream process - generator //Node: drier // Comment = Separator //Equation: 121 m_dot_liq_HP_turb = m_dot_IPturbine*(1. - x_H) // liquid process - liq_HP_turb //Equation: 122 m_dot_steamsuperheating = m_dot_IPturbine*x_H // vapor process - steam superheating // Comment = Isobaric separator //Equation: 123 p_I0 = p_H// outlet pressure //Equation: 124 p_J = p_H// outlet pressure //Node: feed water tank // Comment = Mixer //Equation: 125 m_dot_liquidcompression = m_dot_LPtankthrottling + m_dot_liq_HP_turb + m_dot_throttlingsuperheatingtank // Downstream process - liquid compression //Equation: 126 h_P = ( m_dot_LPtankthrottling*h_L2 + m_dot_liq_HP_turb*h_J + m_dot_throttlingsuperheatingtank*h_K2)/m_dot_liquidcompression // Downstream point - P //Node: extraction // Comment = Divider //Equation: 127 m_dot_HPturbine = m_dot_extraction + m_dot_IPturbine // Upstream process - HP turbine //Node: preheating // Comment = Mixer //Equation: 128 //m_dot_economizer = m_dot_liquidcompression + m_dot_extraction // Downstream process - economizer //Equation: 129 h_M = ( m_dot_liquidcompression*h_E + m_dot_extraction*h_G)/m_dot_economizer // Downstream point - M //HEAT EXCHANGERS //Heat exchanger: MSR //Equation: 130 mCp_steamsuperheating = (h_I - h_I0)/(T_I - T_I0)*m_dot_steamsuperheating // mCpf =deltaH/deltaT - steam superheating //Equation: 131 mCp_superheating = (h_K - h_F)*m_dot_superheating/(T_K - T_F) // mCpc =-deltaH/deltaT - superheating // Comment = mCpc>mCpf //Equation: 132 UA_MSR = NTU_MSR *mCp_steamsuperheating // Cold fluid - steam superheating //Equation: 133 R_MSR = mCp_steamsuperheating /mCp_superheating // Hot fluid - superheating - Cold fluid - steam superheating //Equation: 134 T_I = T_I0 + epsilon_MSR*(T_F - T_I0) // Hot fluid outlet temperature //Equation: 135 h_I = h_PT("water",p_I,T_I)// Enthalpy //Equation: 136 h_K = - m_dot_steamsuperheating /m_dot_superheating*(h_I - h_I0) + h_F // Hot fluid - superheating - Cold fluid - steam superheating //Equation: 137 //T_K = T_Ph("water",p_K,h_K)// Hot fluid outlet temperature // Comment = epsilon given value //Equation: 138 epsilon_MSR = 0.8949974956232079 // Given value //Equation: 139 argLn_MSR = (1 - epsilon_MSR*R_MSR)/(1 - epsilon_MSR) //Equation: 140 NTU_MSR = 1/(1 - R_MSR)*ln(argLn_MSR) // Counterflow heat exchanger //Equation: 141 Q_dot_superheating = m_dot_superheating*(h_K - h_F) // DeltaH hot fluid //Equation: 142 Q_dot_steamsuperheating = m_dot_steamsuperheating*(h_I - h_I0) // DeltaH cold fluid //Number of equations: 142 //POINTS WITH SATURATION TEMPERATURE SET //Point N //Outlet point of process economizer //Equation: 143 p_N = 65.0// P (bar) //Equation: 144 x_N = 0.0// Quality //Equation: 145 dTsat_N = 0.0// Deviation from Tsat //Equation: 146 T_N = Tsat_P("water",p_N)+dTsat_N// set Tsat (Celsius) //Equation: 147 h_N = hsat_Px("water",p_N,x_N)// Enthalpy //Point A //Outlet point of process generator //Equation: 148 p_A = 56.0// P (bar) //Equation: 149 x_A = 1.0// Quality //Equation: 150 dTsat_A = 0.0// Deviation from Tsat //Equation: 151 T_A = Tsat_P("water",p_A)+dTsat_A// set Tsat (Celsius) //Equation: 152 h_A = hsat_Px("water",p_A,x_A)// Enthalpy //Point K //Outlet point of process superheating //Equation: 153 x_K = 0.0// Quality //Equation: 154 dTsat_K = -0.1// Deviation from Tsat //Equation: 155 T_K = Tsat_P("water",p_K)+dTsat_K// set Tsat (Celsius) //Equation: 156 //h_K = hsat_Px("water",p_K,x_K)// Enthalpy //Point J //Outlet point of process liq_HP_turb //Equation: 157 //p_J = 9.0// P (bar) //Equation: 158 x_J = 0.0// Quality //Equation: 159 dTsat_J = 0.0// Deviation from Tsat //Equation: 160 T_J = Tsat_P("water",p_J)+dTsat_J// set Tsat (Celsius) //Equation: 161 h_J = hsat_Px("water",p_J,x_J)// Enthalpy //Point D //Outlet point of process condenser //Equation: 162 p_D = 0.07// P (bar) //Equation: 163 x_D = 0.0// Quality //Equation: 164 dTsat_D = 0.0// Deviation from Tsat //Equation: 165 T_D = Tsat_P("water",p_D)+dTsat_D// set Tsat (Celsius) //Equation: 166 h_D = hsat_Px("water",p_D,x_D)// Enthalpy //Point I0 //Equation: 167 //p_I0 = 9.0// P (bar) //Equation: 168 x_I0 = 1.0// Quality //Equation: 169 dTsat_I0 = 0.0// Deviation from Tsat //Equation: 170 T_I0 = Tsat_P("water",p_I0)+dTsat_I0// set Tsat (Celsius) //Equation: 171 h_I0 = hsat_Px("water",p_I0,x_I0)// Enthalpy //OTHER POINTS WITH PRESSURE SET //SET FLOW RATES //Equation: 172 //m_dot_extraction = 0.2// Given flow //Equation: 173 m_dot_economizer = 1.4000000003// Given flow //Equation: 174 m_dot_superheatingvalve = 0.11// Given flow //OVERALL BALANCE //Equation: 175 usefulEnergy = W_dot_HPturbine + W_dot_LPturbine + W_dot_extractionpump + W_dot_liquidcompression + W_dot_IPturbine //Equation: 176 purchasedEnergy = Q_dot_generator + Q_dot_economizer //Equation: 177 eta0 = usefulEnergy/purchasedEnergy //Equation: 178 eta = abs(eta0) //m_dot_IPturbine p_P = 11 //m_dot_HPvalve