//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-24 16:38:43 //Flow rate unit: t/s //GAS COMPOSITIONS //PROCESSES //Process: extraction //Equation: 1 m_dot_extraction = 0.2 // Given value //Process: liq_HP_turb //Equation: 2 m_dot_liq_HP_turb = 0.140701757 // 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 = calcH_TPx("water";T = Tl_B;P = p_B;X = xl_B)// Saturated liquid enthalpy //Equation: 17 hv_B = calcH_TPx("water";T = Tv_B;P = p_B;X = xv_B)// Saturated vapor enthalpy //Equation: 18 x_B = (h_A - hl_B)/(hv_B - hl_B)// Quality //Equation: 19 T_B = calcTsat("water";P = p_B ;X = x_B) // Downstream point - B //Equation: 20 h_B = calcH_TPx("water";T = T_B;P = p_B;X = x_B) // Enthalpy //Process: HP turbine //Equation: 21 m_dot_HPturbine = m_dot_HPvalve // Upstream process - HP valve //Equation: 22 s_B = calcS_PH("water";P = p_B;H = 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 = calcS_TP("water";T = Tl_G;P = p_G)// Saturated liquid entropy //Equation: 32 sv_G = calcS_TP("water";T = Tv_G;P = p_G)// Saturated vapor entropy //Equation: 33 x_G = (s_G - sl_G)/(sv_G - sl_G)// Quality //Equation: 34 T_G = calcTsat("water";P = p_G ;X = x_G) // Downstream point - G //Equation: 35 h_G = calcH_TPx("water";T = T_G;P = p_G;X = 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 = calcH_TPx("water";T = Tl_F;P = p_F;X = xl_F)// Saturated liquid enthalpy //Equation: 44 hv_F = calcH_TPx("water";T = Tv_F;P = p_F;X = xv_F)// Saturated vapor enthalpy //Equation: 45 x_F = (h_A - hl_F)/(hv_F - hl_F)// Quality //Equation: 46 T_F = calcTsat("water";P = p_F ;X = x_F) // Downstream point - F //Equation: 47 h_F = calcH_TPx("water";T = T_F;P = p_F;X = x_F) // Enthalpy //Process: LP turbine //Equation: 48 m_dot_LPturbine = m_dot_steamsuperheating // Upstream process - steam superheating //Equation: 49 s_I = calcS_PH("water";P = p_I;H = h_I) // Upstream point - I - Downstream point - C // Comment = Isentropic reference //Equation: 50 hs_C = calcH_PS("water";P = p_C;S = 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 = calcH_TPx("water";T = Tl_C;P = p_C;X = xl_C)// Saturated liquid enthalpy //Equation: 58 hv_C = calcH_TPx("water";T = Tv_C;P = p_C;X = xv_C)// Saturated vapor enthalpy //Equation: 59 x_C = (h_C - hl_C)/(hv_C - hl_C)// Quality //Equation: 60 T_C = calcTsat("water";P = p_C ;X = x_C) // Downstream point - C //Equation: 61 s_C = calcS_PH("water";P = p_C;H = 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 //Equation: 65 s_D = calcS_PH("water";P = p_D;H = h_D) // Upstream point - D - Downstream point - L // Comment = Isentropic reference //Equation: 66 hs_L = calcH_PS("water";P = p_L;S = s_D) // Downstream point - L //Equation: 67 etaT_extractionpump = 0.9// Isentropic efficiency //Equation: 68 v_L = calcV_PH("water";P = p_L ;H = h_L) // Downstream point volume - //Equation: 69 h_L = h_D + v_L*(p_L - p_D)/100. // Liquid compression //Equation: 70 T_L = calcT_PH("water";P = p_L ;H = 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 = calcH_TPx("water";T = Tl_L2;P = p_L2;X = xl_L2)// Saturated liquid enthalpy //Equation: 80 hv_L2 = calcH_TPx("water";T = Tv_L2;P = p_L2;X = 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 = calcS_PH("water";P = p_L2;H = h_L2) // Enthalpy //Equation: 84 T_L2 = calcT_PH("water";P = p_L2 ;H = h_L2) // Downstream point - L2 //Process: liquid compression //Equation: 85 s_P = calcS_PH("water";P = p_P;H = h_P) // Upstream point - P - Downstream point - E // Comment = Isentropic reference //Equation: 86 hs_E = calcH_PS("water";P = p_E;S = s_P) // Downstream point - E //Equation: 87 etaT_liquidcompression = 0.9// Isentropic efficiency //Equation: 88 v_E = calcV_PH("water";P = p_E ;H = h_E) // Downstream point volume - //Equation: 89 h_E = h_P + v_E*(p_E - p_P)/100. // Liquid compression //Equation: 90 T_E = calcT_PH("water";P = p_E ;H = 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 = calcH_TPx("water";T = Tl_K2;P = p_K2;X = xl_K2)// Saturated liquid enthalpy //Equation: 100 hv_K2 = calcH_TPx("water";T = Tv_K2;P = p_K2;X = xv_K2)// Saturated vapor enthalpy //Equation: 101 x_K2 = (h_K - hl_K2)/(hv_K2 - hl_K2)// Quality //Equation: 102 T_K2 = calcTsat("water";P = p_K2 ;X = x_K2) // Downstream point - K2 //Equation: 103 h_K2 = calcH_TPx("water";T = T_K2;P = p_K2;X = x_K2) // Enthalpy //Process: IP turbine //Equation: 104 s_G = calcS_PH("water";P = p_G;H = 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 = calcS_TP("water";T = Tl_H;P = p_H)// Saturated liquid entropy //Equation: 114 sv_H = calcS_TP("water";T = Tv_H;P = p_H)// Saturated vapor entropy //Equation: 115 x_H = (s_H - sl_H)/(sv_H - sl_H)// Quality //Equation: 116 T_H = calcTsat("water";P = p_H ;X = x_H) // Downstream point - H //Equation: 117 h_H = calcH_TPx("water";T = T_H;P = p_H;X = 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 = calcH_TP("water";T = T_I;P = p_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 = calcT_PH("water";P = p_K;H = h_K)// Hot fluid outlet temperature // Comment = epsilon given value //Equation: 138 epsilon_MSR = 0.8949955566932637 // 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 = calcTsat("water";P = p_N;X = x_N)+dTsat_N// set Tsat (Celsius) //Equation: 147 h_N = calcH_TPx("water";T = T_N;P = p_N;X = 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 = calcTsat("water";P = p_A;X = x_A)+dTsat_A// set Tsat (Celsius) //Equation: 152 h_A = calcH_TPx("water";T = T_A;P = p_A;X = 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 = calcTsat("water";P = p_K;X = x_K)+dTsat_K// set Tsat (Celsius) //Equation: 156 h_K = calcH_TPx("water";T = T_K;P = p_K;X = 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 = calcTsat("water";P = p_J;X = x_J)+dTsat_J// set Tsat (Celsius) //Equation: 161 h_J = calcH_TPx("water";T = T_J;P = p_J;X = 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 = calcTsat("water";P = p_D;X = x_D)+dTsat_D// set Tsat (Celsius) //Equation: 166 h_D = calcH_TPx("water";T = T_D;P = p_D;X = 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 = calcTsat("water";P = p_I0;X = x_I0)+dTsat_I0// set Tsat (Celsius) //Equation: 171 h_I0 = calcH_TPx("water";T = T_I0;P = p_I0;X = 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.4// Given flow //Equation: 174 m_dot_superheatingvalve = 0.11// Given flow //OVERALL BALANCE //Equation: 175 useful_Energy = W_dot_HPturbine + W_dot_LPturbine + W_dot_extractionpump + W_dot_liquidcompression + W_dot_IPturbine //Equation: 176 purchased_Energy = Q_dot_generator + Q_dot_economizer //Equation: 177 eta_global = abs(useful_Energy/purchased_Energy)