Function LAMBD(T0;T;a) //function to calculate the air factor knowing a (4 for CH4), T0 recatant initial temperature and T adiabatic temperature //CH4 + lambda (1+a/4) (O2 + 3.76 N2) <--> CO2 + 2 H2O + 3.76 lambda (1+a/4) N2 + (lambda-1) (1+a/4)O2 num= enthalpy(CH4;T=T0)-enthalpy(CO2;T=T)-a/2*enthalpy(H2O;T=T)+(1+a/4)*enthalpy(O2;T=T) denom=(1+a/4)*3,76*(enThalpy(N2;T=T)-enthalpy(N2;T=T0)) +(1+a/4)*(enthalpy(O2;T=T)-enthalpy(O2;T=T0)) LAMBD= num/denom END Function h_products(T;a;lambda) //function to calculate the enthalpy of reactants knowing a (4 for CH4), air factor lambda and temperature T //CH4 + lambda (1+a/4) (O2 + 3.76 N2) <--> CO2 + (1+a/4) H2O + 3.76 lambda (1+a/4) N2 + (lambda-1) (1+a/4) O2 nb_moles=(1+(1+a/4)+3,76*lambda*(1+a/4)+(lambda-1)*(1+a/4)) molar_mass=MolarMass(CO2)/nb_moles+MolarMass(H2O)*(1+a/4)/nb_moles+MolarMass(N2)*3,76*lambda*(1+a/4)/nb_moles+MolarMass(O2)*(lambda-1)*(1+a/4)/nb_moles fract_CO2=1/nb_moles*MolarMass(CO2)/molar_mass fract_H2O=(1+a/4)/nb_moles*MolarMass(H2O)/molar_mass fract_N2=3,76*lambda*(1+a/4)/nb_moles*MolarMass(N2)/molar_mass fract_O2=(lambda-1)*(1+a/4)/nb_moles*MolarMass(O2)/molar_mass h_products=enThalpy(CO2;T=T)*fracT_CO2+enthalpy(H2O;T=T)*fract_H2O+enthalpy(N2;T=T)*fract_N2+enthalpy(O2;T=T)*fract_O2 END Function s_products(T;P;a;lambda) //function to calculate the enthalpy of reactants knowing a (4 for CH4), air factor lambda and temperature T //CH4 + lambda (1+a/4) (O2 + 3.76 N2) <--> CO2 + (1+a/4) H2O + 3.76 lambda (1+a/4) N2 + (lambda-1) (1+a/4) O2 nb_moles=(1+(1+a/4)+3,76*lambda*(1+a/4)+(lambda-1)*(1+a/4)) molar_mass=MolarMass(CO2)/nb_moles+MolarMass(H2O)*(1+a/4)/nb_moles+MolarMass(N2)*3,76*lambda*(1+a/4)/nb_moles+MolarMass(O2)*(lambda-1)*(1+a/4)/nb_moles fract_CO2=1/nb_moles*MolarMass(CO2)/molar_mass fract_H2O=(1+a/4)/nb_moles*MolarMass(H2O)/molar_mass fract_N2=3,76*lambda*(1+a/4)/nb_moles*MolarMass(N2)/molar_mass fract_O2=(lambda-1)*(1+a/4)/nb_moles*MolarMass(O2)/molar_mass mixEntropy=-8,314/molar_mass*(1/nb_moles*ln(1/nb_moles)+(a/2)/nb_moles*ln((a/2)/nb_moles)+3,76*lambda*(1+a/4)/nb_moles*ln(3,76*lambda*(1+a/4)/nb_moles)+(lambda-1)*(1+a/4)/nb_moles*ln((lambda-1)*(1+a/4)/nb_moles)) s0=entropy(CO2;T=T;P=P)*fract_CO2+entropy(H2O;T=T;P=P)*fract_H2O+entropy(N2;T=T;P=P)*fract_N2+entropy(O2;T=T;P=P)*fract_O2 s_products= s0 +mixEntropy END //EQUATIONS //Units: SI, Temperatures in Celsius, pressures in bar //Project file: D:\_classement\_Thopt\THERMOPTIM_Pro_282\proj\Optim2P_US_HXIsentr.prj //Date and Time: 2024-08-19 18:46:46 //Flow rate unit: kg/s //GAS COMPOSITIONS //burnt gases //CO2 0.05483373324921322 //H2O 0.04174104768863614 //O2 0.15050172258919256 //N2 0.7407539462282163 //Ar 0.012169550244741714 //Montoir natural gas //CH4 ` methane 0.7589660273748472 //C2H6 ` ethane 0.14372793810423284 //C3H8 ` propane 0.05987758826605583 //C4H10 ` n-butane 0.025255914824295813 //N2 0.012172531430568422 //air //N2 0.7555302216468832 //Ar 0.012416359476160373 //O2 0.2320534188769565 //PROCESSES //Process: GT ex3 // Comment = isobaricExchange //Equation: 1 p_Tg3 = p_Tg2 // Upstream point - Tg 2 - Downstream point - Tg 3 // Comment = //Exchange process connected to a heat exchanger //Process: LP condenser //Equation: 2 m_dot_LPcondenser = m_dot_LPturb // Upstream process - LP turb // Comment = isobaricExchange //Equation: 3 p_TvapBPcond = p_TvapLPturb // Upstream point - Tvap LP turb - Downstream point - Tvap BP cond // Comment = mDeltaH not set //Equation: 4 Q_dot_LPcondenser/m_dot_LPcondenser = h_TvapBPcond - h_TvapLPturb // Upstream point - Tvap LP turb - Downstream point - Tvap BP cond - DeltaH/flow //Process: HP condenser //Equation: 5 m_dot_HPcondenser = m_dot_HPturb // Upstream process - HP turb // Comment = isobaricExchange //Equation: 6 p_TvapHPcond = p_TvapHPturb // Upstream point - Tvap HP turb - Downstream point - Tvap HP cond // Comment = mDeltaH not set //Equation: 7 Q_dot_HPcondenser/m_dot_HPcondenser = h_TvapHPcond - h_TvapHPturb // Upstream point - Tvap HP turb - Downstream point - Tvap HP cond - DeltaH/flow //Process: air inlet //Equation: 8 m_dot_airinlet = 100.0 // Given value //Equation: 9 T_airinlet = 10.0// Given value (Celsius) //Equation: 10 p_airinlet = 1.0// Given value (bar) //Equation: 11 h_airinlet = calcH_TP("air";T = T_airinlet ;P = p_airinlet) // Downstream point - air inlet //Equation: 12 m_dot_compressor = m_dot_airinlet //Flow propagation //Process: fuel //Equation: 13 m_dot_fuel = 2.0280902 // Given value //Equation: 14 T_fuel = 26.850000000000023// Given value (Celsius) //Equation: 15 p_fuel = 1.0// Given value (bar) //Equation: 16 h_fuel = calcH_TP("Montoir natural gas";T = T_fuel ;P = p_fuel) // Downstream point - fuel //Process: ECOHP1 vap //Equation: 17 m_dot_ECOHP1vap = m_dot_HPpump // Upstream process - HP pump // Comment = //Exchange process connected to a heat exchanger //Process: ECOHP2 vap //Equation: 18 m_dot_ECOHP2vap = m_dot_ECOHP1vap // Upstream process - ECOHP1 vap // Comment = //Exchange process connected to a heat exchanger //Process: ECOLP //Equation: 19 m_dot_ECOLP = m_dot_LPpump // Upstream process - LP pump // Comment = //Exchange process connected to a heat exchanger //Process: EVHP vap //Equation: 20 m_dot_EVHPvap = m_dot_ECOHP2vap // Upstream process - ECOHP2 vap // Comment = //Exchange process connected to a heat exchanger //Process: EVLP vap //Equation: 21 m_dot_EVLPvap = m_dot_ECOLP // Upstream process - ECOLP // Comment = //Exchange process connected to a heat exchanger //Process: SHHP1 vap //Equation: 22 m_dot_SHHP1vap = m_dot_EVHPvap // Upstream process - EVHP vap // Comment = //Exchange process connected to a heat exchanger //Process: SHLP vap //Equation: 23 m_dot_SHLPvap = m_dot_EVLPvap // Upstream process - EVLP vap // Comment = //Exchange process connected to a heat exchanger //Process: HP turb //Equation: 24 m_dot_HPturb = m_dot_SHHP1vap // Upstream process - SHHP1 vap //Equation: 25 s_TvapHP5 = calcS_PH("water";P = p_TvapHP5;H = h_TvapHP5) // Upstream point - Tvap HP 5 - Downstream point - Tvap HP turb // Comment = Polytropic reference //Equation: 26 ds_TvapHPturb = -(1 - etaT_HPturb)*8.314/M_TvapHP5*ln(p_TvapHPturb/p_TvapHP5) // Upstream point - Tvap HP 5 - Downstream point - Tvap HP turb //Equation: 27 s_TvapHPturb = s_TvapHP5 + ds_TvapHPturb // Entropy - Tvap HP turb //Equation: 28 M_TvapHP5 = 18.01528 // Molar mass - Tvap HP turb //Equation: 29 etaT_HPturb = 0.8196// Polytropic efficiency // Comment = Polytropic coefficient: k = -Math.log(aval.p/amont.p)/Math.log(aval.V/amont.V) //Equation: 30 xl_TvapHPturb = 0.// Saturated liquid quality //Equation: 31 Tl_TvapHPturb = T_TvapHPturb- 0.01// Saturated liquid temperature //Equation: 32 xv_TvapHPturb = 1.// Saturated vapor quality //Equation: 33 Tv_TvapHPturb = T_TvapHPturb+ 0.01// Saturated vapor temperature //Equation: 34 sl_TvapHPturb = calcS_TP("water";T = Tl_TvapHPturb;P = p_TvapHPturb)// Saturated liquid entropy //Equation: 35 sv_TvapHPturb = calcS_TP("water";T = Tv_TvapHPturb;P = p_TvapHPturb)// Saturated vapor entropy //Equation: 36 x_TvapHPturb = (s_TvapHPturb - sl_TvapHPturb)/(sv_TvapHPturb - sl_TvapHPturb)// Quality //Equation: 37 T_TvapHPturb = calcTsat("water";P = p_TvapHPturb ;X = x_TvapHPturb) // Downstream point - Tvap HP turb //Equation: 38 h_TvapHPturb = calcH_TPx("water";T = T_TvapHPturb;P = p_TvapHPturb;X = x_TvapHPturb) // Enthalpy // Comment = Given outlet pressure //Equation: 39 p_TvapHPturb = 0.03// Outlet pressure //Equation: 40 W_dot_HPturb = m_dot_HPturb*(h_TvapHPturb - h_TvapHP5) // DeltaH //Process: LP turb //Equation: 41 m_dot_LPturb = m_dot_SHLPvap // Upstream process - SHLP vap //Equation: 42 s_TvapLP4 = calcS_PH("water";P = p_TvapLP4;H = h_TvapLP4) // Upstream point - Tvap LP 4 - Downstream point - Tvap LP turb // Comment = Polytropic reference //Equation: 43 ds_TvapLPturb = -(1 - etaT_LPturb)*8.314/M_TvapLP4*ln(p_TvapLPturb/p_TvapLP4) // Upstream point - Tvap LP 4 - Downstream point - Tvap LP turb //Equation: 44 s_TvapLPturb = s_TvapLP4 + ds_TvapLPturb // Entropy - Tvap LP turb //Equation: 45 M_TvapLP4 = 18.01528 // Molar mass - Tvap LP turb //Equation: 46 etaT_LPturb = 0.82328// Polytropic efficiency // Comment = Polytropic coefficient: k = -Math.log(aval.p/amont.p)/Math.log(aval.V/amont.V) //Equation: 47 xl_TvapLPturb = 0.// Saturated liquid quality //Equation: 48 Tl_TvapLPturb = T_TvapLPturb- 0.01// Saturated liquid temperature //Equation: 49 xv_TvapLPturb = 1.// Saturated vapor quality //Equation: 50 Tv_TvapLPturb = T_TvapLPturb+ 0.01// Saturated vapor temperature //Equation: 51 sl_TvapLPturb = calcS_TP("water";T = Tl_TvapLPturb;P = p_TvapLPturb)// Saturated liquid entropy //Equation: 52 sv_TvapLPturb = calcS_TP("water";T = Tv_TvapLPturb;P = p_TvapLPturb)// Saturated vapor entropy //Equation: 53 x_TvapLPturb = (s_TvapLPturb - sl_TvapLPturb)/(sv_TvapLPturb - sl_TvapLPturb)// Quality //Equation: 54 T_TvapLPturb = calcTsat("water";P = p_TvapLPturb ;X = x_TvapLPturb) // Downstream point - Tvap LP turb //Equation: 55 h_TvapLPturb = calcH_TPx("water";T = T_TvapLPturb;P = p_TvapLPturb;X = x_TvapLPturb) // Enthalpy // Comment = Given outlet pressure //Equation: 56 p_TvapLPturb = 0.03// Outlet pressure //Equation: 57 W_dot_LPturb = m_dot_LPturb*(h_TvapLPturb - h_TvapLP4) // DeltaH //Process: HP pump //Equation: 58 s_TvapHPcond = calcS_PH("water";P = p_TvapHPcond;H = h_TvapHPcond) // Upstream point - Tvap HP cond - Downstream point - Tvap HP 1 // Comment = Isentropic reference //Equation: 59 hs_TvapHP1 = calcH_PS("water";P = p_TvapHP1;S = s_TvapHPcond) // Downstream point - Tvap HP 1 //Equation: 60 etaT_HPpump = 0.95// Isentropic efficiency //Equation: 61 v_TvapHP1 = calcV_PH("water";P = p_TvapHP1 ;H = h_TvapHP1) // Downstream point volume - //Equation: 62 h_TvapHP1 = h_TvapHPcond + v_TvapHP1*(p_TvapHP1 - p_TvapHPcond)/100. // Liquid compression //Equation: 63 T_TvapHP1 = calcT_PH("water";P = p_TvapHP1 ;H = h_TvapHP1) // Downstream point - Tvap HP 1 // Comment = Given outlet pressure //Equation: 64 p_TvapHP1 = 100.0// Outlet pressure //Equation: 65 W_dot_HPpump = m_dot_HPpump*(h_TvapHP1 - h_TvapHPcond) // DeltaH //Process: LP pump //Equation: 66 s_TvapBPcond = calcS_PH("water";P = p_TvapBPcond;H = h_TvapBPcond) // Upstream point - Tvap BP cond - Downstream point - Tvap LP 1 // Comment = Isentropic reference //Equation: 67 hs_TvapLP1 = calcH_PS("water";P = p_TvapLP1;S = s_TvapBPcond) // Downstream point - Tvap LP 1 //Equation: 68 etaT_LPpump = 0.95// Isentropic efficiency //Equation: 69 v_TvapLP1 = calcV_PH("water";P = p_TvapLP1 ;H = h_TvapLP1) // Downstream point volume - //Equation: 70 h_TvapLP1 = h_TvapBPcond + v_TvapLP1*(p_TvapLP1 - p_TvapBPcond)/100. // Liquid compression //Equation: 71 T_TvapLP1 = calcT_PH("water";P = p_TvapLP1 ;H = h_TvapLP1) // Downstream point - Tvap LP 1 // Comment = Given outlet pressure //Equation: 72 p_TvapLP1 = 5.0// Outlet pressure //Equation: 73 W_dot_LPpump = m_dot_LPpump*(h_TvapLP1 - h_TvapBPcond) // DeltaH //Process: Tg stack //Equation: 74 m_dot_Tgstack = 102.0280902 // Given value //Process: compressor //Equation: 75 m_dot_compressor = m_dot_airinlet // Upstream process - air inlet //Equation: 76 s_airinlet = calcS_PH("air";P = p_airinlet;H = h_airinlet) // Upstream point - air inlet - Downstream point - 2 // Comment = Isentropic reference //Equation: 77 hs_2 = calcH_PS("air";P = p_2;S = s_airinlet) // Downstream point - 2 //Equation: 78 etaT_compressor = 0.853915// Isentropic efficiency //Equation: 79 h_2 = h_airinlet + (hs_2 - h_airinlet)/etaT_compressor // Upstream point - air inlet - Downstream point - 2 //Equation: 80 T_2 = calcT_PH("air";P = p_2 ;H = h_2) // Downstream point - 2 // Comment = Given outlet pressure //Equation: 81 p_2 = 20.0// Outlet pressure //Equation: 82 W_dot_compressor = m_dot_compressor*(h_2 - h_airinlet) // DeltaH //Process: turbine //Equation: 83 m_dot_turbine = m_dot_combustionchamber // Upstream process - combustion chamber //Equation: 84 s_3 = calcS_PH("burnt gases";P = p_3;H = h_3) // Upstream point - 3 - Downstream point - 4 // Comment = Isentropic reference //Equation: 85 hs_4 = calcH_PS("burnt gases";P = p_4;S = s_3) // Downstream point - 4 //Equation: 86 etaT_turbine = 0.92973// Isentropic efficiency //Equation: 87 h_4 = h_3 - etaT_turbine*(h_3 - hs_4) // Upstream point - 3 - Downstream point - 4 //Equation: 88 T_4 = calcT_PH("burnt gases";P = p_4 ;H = h_4) // Downstream point - 4 //Equation: 89 s_4 = calcS_PH("burnt gases";P = p_4;H = h_4) // Entropy // Comment = Given outlet pressure //Equation: 90 p_4 = 1.0// Outlet pressure //Equation: 91 W_dot_turbine = m_dot_turbine*(h_4 - h_3) // DeltaH //Process: combustion chamber // Comment = Calculate lambda simplified model oxidizer air, fuel CH4 //Equation: 92 T_3 = 1220.0// Given value (Celsius) //Equation: 93 a_combustionchamber = 4// for CH4 //Equation: 94 lambda_combustionchamber = LAMBD(T_2;T_3;a_combustionchamber)// air factor lambda //Equation: 95 h_3 = h_products(T_3;a_combustionchamber;lambda_combustionchamber)// enthalpy of the reactants //Equation: 96 hfict_2 = h_products(T_2;a_combustionchamber;lambda_combustionchamber)// enthalpy of a fictitious inlet point for calculating the heat released //Equation: 97 m_dot_combustionchamber = m_dot_compressor + m_dot_fuel // Upstream process - compressor - Fuel process fuel - Downstream process - combustion chamber //Equation: 98 Q_dot_combustionchamber = (h_3 - hfict_2)*m_dot_combustionchamber // DeltaH //Equation: 99 DeltaHr_combustionchamber = (-(-74850) +(-393520)+a_combustionchamber/2*(-242000))/16 // DeltaHr (kJ/kg) = (-(-74850) +(-393520) + a/2* (-242000))/16 for methane //Equation: 100 m_dot_fuel = abs(Q_dot_combustionchamber/DeltaHr_combustionchamber) // fuel flow rate // Comment = Isobaric process //Equation: 101 p_3 = p_2// Isopressure //Equation: 102 T_fuel = 26.850000000000023// Given value (Celsius) //Equation: 103 p_fuel = 1.0// Given value (bar) //Equation: 104 h_fuel = calcH_TP("Montoir natural gas";T = T_fuel ;P = p_fuel) // Fuel point - fuel //Process: GT exhaust_0 //Equation: 105 m_dot_GTexhaust_0 = m_dot_turbine // Upstream process - turbine // Comment = isobaricExchange //Equation: 106 p_GTexhaust_0 = p_4 // Upstream point - 4 - Downstream point - GT exhaust_0 // Comment = //Exchange process connected to a heat exchanger //Process: GT exhaust_1 //Equation: 107 m_dot_GTexhaust_1 = m_dot_GTexhaust_0 // Upstream process - GT exhaust_0 // Comment = isobaricExchange //Equation: 108 p_Tg1 = p_GTexhaust_0 // Upstream point - GT exhaust_0 - Downstream point - Tg 1 // Comment = //Exchange process connected to a heat exchanger //Process: GT ex2_0 // Comment = isobaricExchange //Equation: 109 p_GTex2_0 = p_Tg1 // Upstream point - Tg 1 - Downstream point - GT ex2_0 // Comment = //Exchange process connected to a heat exchanger //Process: GT ex2_1 // Comment = isobaricExchange //Equation: 110 p_GTex2_1 = p_Tg1 // Upstream point - Tg 1 - Downstream point - GT ex2_1 // Comment = //Exchange process connected to a heat exchanger //Process: GT ex4_0 // Comment = isobaricExchange //Equation: 111 p_GTex4_0 = p_Tg3 // Upstream point - Tg 3 - Downstream point - GT ex4_0 // Comment = //Exchange process connected to a heat exchanger //Process: GT ex4_1 // Comment = isobaricExchange //Equation: 112 p_GTex4_1 = p_Tg3 // Upstream point - Tg 3 - Downstream point - GT ex4_1 // Comment = //Exchange process connected to a heat exchanger //NODES //Node: MIX_GT ex2 // Comment = Mixer //Equation: 113 m_dot_GTex3 = m_dot_GTex2_0 + m_dot_GTex2_1 // Downstream process - GT ex3 //Equation: 114 h_Tg2 = ( m_dot_GTex2_0*h_GTex2_0 + m_dot_GTex2_1*h_GTex2_1)/m_dot_GTex3 // Downstream point - Tg 2 //Node: DIV_GT ex2 // Comment = Divider //Equation: 115 m_dot_GTexhaust_1 = m_dot_GTex2_0 + m_dot_GTex2_1 // Upstream process - GT exhaust_1 //Equation: 116 m_dot_GTex2_0 = m_dot_GTexhaust_1*0.9054858306070694 // Divider flow factor - GT ex2_0 //Equation: 117 m_dot_GTex2_1 = m_dot_GTexhaust_1*0.0945141674326861 // Divider flow factor - GT ex2_1 //Node: MIX_GT ex4 // Comment = Mixer //Equation: 118 m_dot_Tgstack = m_dot_GTex4_0 + m_dot_GTex4_1 // Downstream process - Tg stack //Equation: 119 h_Tgstack = ( m_dot_GTex4_0*h_GTex4_0 + m_dot_GTex4_1*h_GTex4_1)/m_dot_Tgstack // Downstream point - Tg stack //Node: DIV_GT ex4 // Comment = Divider //Equation: 120 m_dot_GTex3 = m_dot_GTex4_0 + m_dot_GTex4_1 // Upstream process - GT ex3 //Equation: 121 m_dot_GTex4_0 = m_dot_GTex3*0.7041305963796233 // Divider flow factor - GT ex4_0 //Equation: 122 m_dot_GTex4_1 = m_dot_GTex3*0.29586940166013226 // Divider flow factor - GT ex4_1 //HEAT EXCHANGERS //Heat exchanger: SHHP1 //Equation: 123 mCp_SHHP1vap = (h_TvapHP5 - h_TvapHP4)/(T_TvapHP5 - T_TvapHP4)*m_dot_SHHP1vap // mCpf =deltaH/deltaT - SHHP1 vap //Equation: 124 mCp_GTexhaust_0 = (h_GTexhaust_0 - h_4)*m_dot_GTexhaust_0/(T_GTexhaust_0 - T_4) // mCpc =-deltaH/deltaT - GT exhaust_0 // Comment = mCpc>mCpf //Equation: 125 UA_SHHP1 = NTU_SHHP1 *mCp_SHHP1vap // Cold fluid - SHHP1 vap //Equation: 126 R_SHHP1 = mCp_SHHP1vap /mCp_GTexhaust_0 // Hot fluid - GT exhaust_0 - Cold fluid - SHHP1 vap //Equation: 127 T_TvapHP5 = T_TvapHP4 + epsilon_SHHP1*(T_4 - T_TvapHP4) // Hot fluid outlet temperature //Equation: 128 h_TvapHP5 = calcH_TP("water";T = T_TvapHP5;P = p_TvapHP5)// Enthalpy //Equation: 129 h_GTexhaust_0 = - m_dot_SHHP1vap /m_dot_GTexhaust_0*(h_TvapHP5 - h_TvapHP4) + h_4 // Hot fluid - GT exhaust_0 - Cold fluid - SHHP1 vap //Equation: 130 T_GTexhaust_0 = calcT_PH("burntgases";P = p_GTexhaust_0;H = h_GTexhaust_0)// Hot fluid outlet temperature // Comment = epsilon given value //Equation: 131 epsilon_SHHP1 = 0.7029268569616665 // Given value //Equation: 132 argLn_SHHP1 = (1 - epsilon_SHHP1*R_SHHP1)/(1 - epsilon_SHHP1) //Equation: 133 NTU_SHHP1 = 1/(1 - R_SHHP1)*ln(argLn_SHHP1) // Counterflow heat exchanger //Equation: 134 Q_dot_GTexhaust_0 = m_dot_GTexhaust_0*(h_GTexhaust_0 - h_4) // DeltaH hot fluid //Equation: 135 Q_dot_SHHP1vap = m_dot_SHHP1vap*(h_TvapHP5 - h_TvapHP4) // DeltaH cold fluid //Heat exchanger: EVHP //Equation: 136 mCp_EVHPvap = (h_TvapHP4 - h_TvapHP3)/(T_TvapHP4 - T_TvapHP3)*m_dot_EVHPvap // mCpf =deltaH/deltaT - EVHP vap //Equation: 137 mCp_GTexhaust_1 = (h_Tg1 - h_GTexhaust_0)*m_dot_GTexhaust_1/(T_Tg1 - T_GTexhaust_0) // mCpc =-deltaH/deltaT - GT exhaust_1 // Comment = mCpcmCpf //Equation: 151 UA_SHLP = NTU_SHLP *mCp_SHLPvap // Cold fluid - SHLP vap //Equation: 152 R_SHLP = mCp_SHLPvap /mCp_GTex2_1 // Hot fluid - GT ex2_1 - Cold fluid - SHLP vap //Equation: 153 T_TvapLP4 = T_TvapLP3 + epsilon_SHLP*(T_Tg1 - T_TvapLP3) // Hot fluid outlet temperature //Equation: 154 h_TvapLP4 = calcH_TP("water";T = T_TvapLP4;P = p_TvapLP4)// Enthalpy //Equation: 155 h_GTex2_1 = - m_dot_SHLPvap /m_dot_GTex2_1*(h_TvapLP4 - h_TvapLP3) + h_Tg1 // Hot fluid - GT ex2_1 - Cold fluid - SHLP vap //Equation: 156 T_GTex2_1 = calcT_PH("burntgases";P = p_GTex2_1;H = h_GTex2_1)// Hot fluid outlet temperature // Comment = epsilon given value //Equation: 157 epsilon_SHLP = 0.7003973940537223 // Given value //Equation: 158 argLn_SHLP = (1 - epsilon_SHLP*R_SHLP)/(1 - epsilon_SHLP) //Equation: 159 NTU_SHLP = 1/(1 - R_SHLP)*ln(argLn_SHLP) // Counterflow heat exchanger //Equation: 160 Q_dot_GTex2_1 = m_dot_GTex2_1*(h_GTex2_1 - h_Tg1) // DeltaH hot fluid //Equation: 161 Q_dot_SHLPvap = m_dot_SHLPvap*(h_TvapLP4 - h_TvapLP3) // DeltaH cold fluid //Heat exchanger: ECO HP 2 //Equation: 162 mCp_ECOHP2vap = (h_TvapHP3 - h_TvapHP2)/(T_TvapHP3 - T_TvapHP2)*m_dot_ECOHP2vap // mCpf =deltaH/deltaT - ECOHP2 vap //Equation: 163 mCp_GTex2_0 = (h_GTex2_0 - h_Tg1)*m_dot_GTex2_0/(T_GTex2_0 - T_Tg1) // mCpc =-deltaH/deltaT - GT ex2_0 // Comment = mCpc>mCpf //Equation: 164 UA_ECOHP2 = NTU_ECOHP2 *mCp_ECOHP2vap // Cold fluid - ECOHP2 vap //Equation: 165 R_ECOHP2 = mCp_ECOHP2vap /mCp_GTex2_0 // Hot fluid - GT ex2_0 - Cold fluid - ECOHP2 vap //Equation: 166 T_TvapHP3 = T_TvapHP2 + epsilon_ECOHP2*(T_Tg1 - T_TvapHP2) // Hot fluid outlet temperature //Equation: 167 h_TvapHP3 = calcH_TP("water";T = T_TvapHP3;P = p_TvapHP3)// Enthalpy //Equation: 168 h_GTex2_0 = - m_dot_ECOHP2vap /m_dot_GTex2_0*(h_TvapHP3 - h_TvapHP2) + h_Tg1 // Hot fluid - GT ex2_0 - Cold fluid - ECOHP2 vap //Equation: 169 T_GTex2_0 = calcT_PH("burntgases";P = p_GTex2_0;H = h_GTex2_0)// Hot fluid outlet temperature // Comment = epsilon given value //Equation: 170 epsilon_ECOHP2 = 0.9091565047293645 // Given value //Equation: 171 argLn_ECOHP2 = (1 - epsilon_ECOHP2*R_ECOHP2)/(1 - epsilon_ECOHP2) //Equation: 172 NTU_ECOHP2 = 1/(1 - R_ECOHP2)*ln(argLn_ECOHP2) // Counterflow heat exchanger //Equation: 173 Q_dot_GTex2_0 = m_dot_GTex2_0*(h_GTex2_0 - h_Tg1) // DeltaH hot fluid //Equation: 174 Q_dot_ECOHP2vap = m_dot_ECOHP2vap*(h_TvapHP3 - h_TvapHP2) // DeltaH cold fluid //Heat exchanger: EVLP //Equation: 175 mCp_EVLPvap = (h_TvapLP3 - h_TvapLP2)/(T_TvapLP3 - T_TvapLP2)*m_dot_EVLPvap // mCpf =deltaH/deltaT - EVLP vap //Equation: 176 mCp_GTex3 = (h_Tg3 - h_Tg2)*m_dot_GTex3/(T_Tg3 - T_Tg2) // mCpc =-deltaH/deltaT - GT ex3 // Comment = mCpcmCpf //Equation: 190 UA_ECOLP = NTU_ECOLP *mCp_ECOLP // Cold fluid - ECOLP //Equation: 191 R_ECOLP = mCp_ECOLP /mCp_GTex4_1 // Hot fluid - GT ex4_1 - Cold fluid - ECOLP //Equation: 192 T_TvapLP2 = T_TvapLP1 + epsilon_ECOLP*(T_Tg3 - T_TvapLP1) // Hot fluid outlet temperature //Equation: 193 h_TvapLP2 = calcH_TP("water";T = T_TvapLP2;P = p_TvapLP2)// Enthalpy //Equation: 194 h_GTex4_1 = - m_dot_ECOLP /m_dot_GTex4_1*(h_TvapLP2 - h_TvapLP1) + h_Tg3 // Hot fluid - GT ex4_1 - Cold fluid - ECOLP //Equation: 195 T_GTex4_1 = calcT_PH("burntgases";P = p_GTex4_1;H = h_GTex4_1)// Hot fluid outlet temperature // Comment = epsilon given value //Equation: 196 epsilon_ECOLP = 0.9247653349350559 // Given value //Equation: 197 argLn_ECOLP = (1 - epsilon_ECOLP*R_ECOLP)/(1 - epsilon_ECOLP) //Equation: 198 NTU_ECOLP = 1/(1 - R_ECOLP)*ln(argLn_ECOLP) // Counterflow heat exchanger //Equation: 199 Q_dot_GTex4_1 = m_dot_GTex4_1*(h_GTex4_1 - h_Tg3) // DeltaH hot fluid //Equation: 200 Q_dot_ECOLP = m_dot_ECOLP*(h_TvapLP2 - h_TvapLP1) // DeltaH cold fluid //Heat exchanger: ECO HP 1 //Equation: 201 mCp_ECOHP1vap = (h_TvapHP2 - h_TvapHP1)/(T_TvapHP2 - T_TvapHP1)*m_dot_ECOHP1vap // mCpf =deltaH/deltaT - ECOHP1 vap //Equation: 202 mCp_GTex4_0 = (h_GTex4_0 - h_Tg3)*m_dot_GTex4_0/(T_GTex4_0 - T_Tg3) // mCpc =-deltaH/deltaT - GT ex4_0 // Comment = mCpc>mCpf //Equation: 203 UA_ECOHP1 = NTU_ECOHP1 *mCp_ECOHP1vap // Cold fluid - ECOHP1 vap //Equation: 204 R_ECOHP1 = mCp_ECOHP1vap /mCp_GTex4_0 // Hot fluid - GT ex4_0 - Cold fluid - ECOHP1 vap //Equation: 205 T_TvapHP2 = T_TvapHP1 + epsilon_ECOHP1*(T_Tg3 - T_TvapHP1) // Hot fluid outlet temperature //Equation: 206 h_TvapHP2 = calcH_TP("water";T = T_TvapHP2;P = p_TvapHP2)// Enthalpy //Equation: 207 h_GTex4_0 = - m_dot_ECOHP1vap /m_dot_GTex4_0*(h_TvapHP2 - h_TvapHP1) + h_Tg3 // Hot fluid - GT ex4_0 - Cold fluid - ECOHP1 vap //Equation: 208 T_GTex4_0 = calcT_PH("burntgases";P = p_GTex4_0;H = h_GTex4_0)// Hot fluid outlet temperature // Comment = epsilon given value //Equation: 209 epsilon_ECOHP1 = 0.8649366904842106 // Given value //Equation: 210 argLn_ECOHP1 = (1 - epsilon_ECOHP1*R_ECOHP1)/(1 - epsilon_ECOHP1) //Equation: 211 NTU_ECOHP1 = 1/(1 - R_ECOHP1)*ln(argLn_ECOHP1) // Counterflow heat exchanger //Equation: 212 Q_dot_GTex4_0 = m_dot_GTex4_0*(h_GTex4_0 - h_Tg3) // DeltaH hot fluid //Equation: 213 Q_dot_ECOHP1vap = m_dot_ECOHP1vap*(h_TvapHP2 - h_TvapHP1) // DeltaH cold fluid //Number of equations: 213 //POINTS WITH SATURATION TEMPERATURE SET //Point Tvap LP 2 //Outlet point of process ECOLP //Equation: 214 p_TvapLP2 = 5.0// P (bar) //Equation: 215 x_TvapLP2 = 0.0// Quality //Equation: 216 dTsat_TvapLP2 = 0.0// Deviation from Tsat //Equation: 217 T_TvapLP2 = calcTsat("water";P = p_TvapLP2;X = x_TvapLP2)+dTsat_TvapLP2// set Tsat (Celsius) //Equation: 218 h_TvapLP2 = calcH_TPx("water";T = T_TvapLP2;P = p_TvapLP2;X = x_TvapLP2)// Enthalpy //Point Tvap LP 3 //Outlet point of process EVLP vap //Equation: 219 p_TvapLP3 = 5.0// P (bar) //Equation: 220 x_TvapLP3 = 1.0// Quality //Equation: 221 dTsat_TvapLP3 = 0.0// Deviation from Tsat //Equation: 222 T_TvapLP3 = calcTsat("water";P = p_TvapLP3;X = x_TvapLP3)+dTsat_TvapLP3// set Tsat (Celsius) //Equation: 223 h_TvapLP3 = calcH_TPx("water";T = T_TvapLP3;P = p_TvapLP3;X = x_TvapLP3)// Enthalpy //Point Tvap HP 3 //Outlet point of process ECOHP2 vap //Equation: 224 p_TvapHP3 = 100.0// P (bar) //Equation: 225 x_TvapHP3 = 0.0// Quality //Equation: 226 dTsat_TvapHP3 = 0.0// Deviation from Tsat //Equation: 227 T_TvapHP3 = calcTsat("water";P = p_TvapHP3;X = x_TvapHP3)+dTsat_TvapHP3// set Tsat (Celsius) //Equation: 228 h_TvapHP3 = calcH_TPx("water";T = T_TvapHP3;P = p_TvapHP3;X = x_TvapHP3)// Enthalpy //Point Tvap HP 4 //Outlet point of process EVHP vap //Equation: 229 p_TvapHP4 = 100.0// P (bar) //Equation: 230 x_TvapHP4 = 1.0// Quality //Equation: 231 dTsat_TvapHP4 = 0.0// Deviation from Tsat //Equation: 232 T_TvapHP4 = calcTsat("water";P = p_TvapHP4;X = x_TvapHP4)+dTsat_TvapHP4// set Tsat (Celsius) //Equation: 233 h_TvapHP4 = calcH_TPx("water";T = T_TvapHP4;P = p_TvapHP4;X = x_TvapHP4)// Enthalpy //Point Tvap HP turb //Outlet point of process HP turb //Equation: 234 x_TvapHPturb = 0.820178871// Quality //Equation: 235 dTsat_TvapHPturb = 0.0// Deviation from Tsat //Equation: 236 T_TvapHPturb = calcTsat("water";P = p_TvapHPturb;X = x_TvapHPturb)+dTsat_TvapHPturb// set Tsat (Celsius) //Equation: 237 h_TvapHPturb = calcH_TPx("water";T = T_TvapHPturb;P = p_TvapHPturb;X = x_TvapHPturb)// Enthalpy //Point Tvap LP turb //Outlet point of process LP turb //Equation: 238 x_TvapLPturb = 0.903683183// Quality //Equation: 239 dTsat_TvapLPturb = 0.0// Deviation from Tsat //Equation: 240 T_TvapLPturb = calcTsat("water";P = p_TvapLPturb;X = x_TvapLPturb)+dTsat_TvapLPturb// set Tsat (Celsius) //Equation: 241 h_TvapLPturb = calcH_TPx("water";T = T_TvapLPturb;P = p_TvapLPturb;X = x_TvapLPturb)// Enthalpy //Point Tvap HP cond //Outlet point of process HP condenser //Equation: 242 x_TvapHPcond = 0.0// Quality //Equation: 243 dTsat_TvapHPcond = 0.0// Deviation from Tsat //Equation: 244 T_TvapHPcond = calcTsat("water";P = p_TvapHPcond;X = x_TvapHPcond)+dTsat_TvapHPcond// set Tsat (Celsius) //Equation: 245 h_TvapHPcond = calcH_TPx("water";T = T_TvapHPcond;P = p_TvapHPcond;X = x_TvapHPcond)// Enthalpy //Point Tvap BP cond //Outlet point of process LP condenser //Equation: 246 x_TvapBPcond = 0.0// Quality //Equation: 247 dTsat_TvapBPcond = 0.0// Deviation from Tsat //Equation: 248 T_TvapBPcond = calcTsat("water";P = p_TvapBPcond;X = x_TvapBPcond)+dTsat_TvapBPcond// set Tsat (Celsius) //Equation: 249 h_TvapBPcond = calcH_TPx("water";T = T_TvapBPcond;P = p_TvapBPcond;X = x_TvapBPcond)// Enthalpy //OTHER POINTS WITH PRESSURE SET //Equation: 250 T_TvapHP2 = 143.62// Given value (°C) //Equation: 251 T_TvapHP5 = 450.0// Given value (°C) //Equation: 252 T_TvapLP4 = 275.0// Given value (°C) //SET FLOW RATES //Equation: 253 m_dot_HPpump = 11.3// Given flow //Equation: 254 m_dot_LPpump = 3.88// Given flow //OVERALL BALANCE //Equation: 255 useful_Energy = W_dot_HPturb + W_dot_LPturb + W_dot_HPpump + W_dot_LPpump + W_dot_compressor + W_dot_turbine //Equation: 256 purchased_Energy = Q_dot_combustionchamber //Equation: 257 eta_global = abs(useful_Energy/purchased_Energy) //Equation: 259 p_TvapLP4 = 5 //Equation: 260 T_Tg2 = 237 //Equation: 261 p_TvapHP2 = 100 //Equation: 262 p_TvapHP5 = 100 //Equation: 263 p_Tg2 = 1