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-16 06:21:35 //Flow rate unit: kg/s //GAS COMPOSITIONS //burnt gases //CO2 0,05483373324921322 //H2O 0,04174104768863614 //O2 0,15050172258919256 //N2 0,7407539462282163 //Ar 0,012169550244741714 //CH4 //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 = enthalpy(Air;T = T_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 = enthalpy(CH4;T = T_fuel) // Downstream point - fuel //Equation: 17 //m_dot_combustionchamber = m_dot_fuel //Flow propagation //Process: ECOHP1 vap //Equation: 18 m_dot_ECOHP1vap = m_dot_HPpump // Upstream process - HP pump // Comment = //Exchange process connected to a heat exchanger //Process: ECOHP2 vap //Equation: 19 m_dot_ECOHP2vap = m_dot_ECOHP1vap // Upstream process - ECOHP1 vap // Comment = //Exchange process connected to a heat exchanger //Process: ECOLP //Equation: 20 m_dot_ECOLP = m_dot_LPpump // Upstream process - LP pump // Comment = //Exchange process connected to a heat exchanger //Process: EVHP vap //Equation: 21 m_dot_EVHPvap = m_dot_ECOHP2vap // Upstream process - ECOHP2 vap // Comment = //Exchange process connected to a heat exchanger //Process: EVLP vap //Equation: 22 m_dot_EVLPvap = m_dot_ECOLP // Upstream process - ECOLP // Comment = //Exchange process connected to a heat exchanger //Process: SHHP1 vap //Equation: 23 m_dot_SHHP1vap = m_dot_EVHPvap // Upstream process - EVHP vap // Comment = //Exchange process connected to a heat exchanger //Process: SHLP vap //Equation: 24 m_dot_SHLPvap = m_dot_EVLPvap // Upstream process - EVLP vap // Comment = //Exchange process connected to a heat exchanger //Process: HP turb //Equation: 25 m_dot_HPturb = m_dot_SHHP1vap // Upstream process - SHHP1 vap //Equation: 26 s_TvapHP5 = entropy(Water;P = p_TvapHP5;H = h_TvapHP5) // Upstream point - Tvap HP 5 - Downstream point - Tvap HP turb // Comment = Polytropic reference //Equation: 27 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: 28 s_TvapHPturb = s_TvapHP5 + ds_TvapHPturb // Entropy - Tvap HP turb //Equation: 29 M_TvapHP5 = 18,01528 // Molar mass - Tvap HP turb //Equation: 30 etaT_HPturb = 0,8196// Polytropic efficiency // Comment = Polytropic coefficient: k = -Math,log(aval,p/amont,p)/Math,log(aval,V/amont,V) //Equation: 31 xl_TvapHPturb = 0,// Saturated liquid quality //Equation: 32 Tl_TvapHPturb = T_TvapHPturb- 0,01// Saturated liquid temperature //Equation: 33 xv_TvapHPturb = 1,// Saturated vapor quality //Equation: 34 Tv_TvapHPturb = T_TvapHPturb+ 0,01// Saturated vapor temperature //Equation: 35 sl_TvapHPturb = entropy(Water;T = Tl_TvapHPturb;P = p_TvapHPturb)// Saturated liquid entropy //Equation: 36 sv_TvapHPturb = entropy(Water;T = Tv_TvapHPturb;P = p_TvapHPturb)// Saturated vapor entropy //Equation: 37 x_TvapHPturb = (s_TvapHPturb - sl_TvapHPturb)/(sv_TvapHPturb - sl_TvapHPturb)// Quality //Equation: 38 //T_TvapHPturb = T_sat(water;P = p_TvapHPturb) // Downstream point - Tvap HP turb //Equation: 39 h_TvapHPturb = enthalpy(Water;P = p_TvapHPturb;X = x_TvapHPturb) // Enthalpy // Comment = Given outlet pressure //Equation: 40 p_TvapHPturb = 0,03// Outlet pressure //Equation: 41 W_dot_HPturb = m_dot_HPturb*(h_TvapHPturb - h_TvapHP5) // DeltaH //Process: LP turb //Equation: 42 m_dot_LPturb = m_dot_SHLPvap // Upstream process - SHLP vap //Equation: 43 s_TvapLP4 = entropy(Water;P = p_TvapLP4;H = h_TvapLP4) // Upstream point - Tvap LP 4 - Downstream point - Tvap LP turb // Comment = Polytropic reference //Equation: 44 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: 45 s_TvapLPturb = s_TvapLP4 + ds_TvapLPturb // Entropy - Tvap LP turb //Equation: 46 M_TvapLP4 = 18,01528 // Molar mass - Tvap LP turb //Equation: 47 etaT_LPturb = 0,82328// Polytropic efficiency // Comment = Polytropic coefficient: k = -Math,log(aval,p/amont,p)/Math,log(aval,V/amont,V) //Equation: 48 xl_TvapLPturb = 0,// Saturated liquid quality //Equation: 49 Tl_TvapLPturb = T_TvapLPturb- 0,01// Saturated liquid temperature //Equation: 50 xv_TvapLPturb = 1,// Saturated vapor quality //Equation: 51 Tv_TvapLPturb = T_TvapLPturb+ 0,01// Saturated vapor temperature //Equation: 52 sl_TvapLPturb = entropy(Water;T = Tl_TvapLPturb;P = p_TvapLPturb)// Saturated liquid entropy //Equation: 53 sv_TvapLPturb = entropy(Water;T = Tv_TvapLPturb;P = p_TvapLPturb)// Saturated vapor entropy //Equation: 54 x_TvapLPturb = (s_TvapLPturb - sl_TvapLPturb)/(sv_TvapLPturb - sl_TvapLPturb)// Quality //Equation: 55 //T_TvapLPturb = T_sat(water;P = p_TvapLPturb) // Downstream point - Tvap LP turb //Equation: 56 h_TvapLPturb = enthalpy(Water;P = p_TvapLPturb;X = x_TvapLPturb) // Enthalpy // Comment = Given outlet pressure //Equation: 57 p_TvapLPturb = 0,03// Outlet pressure //Equation: 58 W_dot_LPturb = m_dot_LPturb*(h_TvapLPturb - h_TvapLP4) // DeltaH //Process: HP pump //Equation: 59 s_TvapHPcond = entropy(Water;P = p_TvapHPcond;H = h_TvapHPcond) // Upstream point - Tvap HP cond - Downstream point - Tvap HP 1 // Comment = Isentropic reference //Equation: 60 hs_TvapHP1 = enthalpy(Water;P = p_TvapHP1;S = s_TvapHPcond) // Downstream point - Tvap HP 1 //Equation: 61 etaT_HPpump = 0,95// Isentropic efficiency //Equation: 62 v_TvapHP1 = volume(Water;P = p_TvapHP1;H = h_TvapHP1) // Downstream point volume - //Equation: 63 h_TvapHP1 = h_TvapHPcond + v_TvapHP1*(p_TvapHP1 - p_TvapHPcond)/100, // Liquid compression //Equation: 64 T_TvapHP1 = temperature(Water;P = p_TvapHP1;H = h_TvapHP1) // Downstream point - Tvap HP 1 // Comment = Given outlet pressure //Equation: 65 p_TvapHP1 = 100,0// Outlet pressure //Equation: 66 W_dot_HPpump = m_dot_HPpump*(h_TvapHP1 - h_TvapHPcond) // DeltaH //Process: LP pump //Equation: 67 s_TvapBPcond = entropy(Water;P = p_TvapBPcond;H = h_TvapBPcond) // Upstream point - Tvap BP cond - Downstream point - Tvap LP 1 // Comment = Isentropic reference //Equation: 68 hs_TvapLP1 = enthalpy(Water;P = p_TvapLP1;S = s_TvapBPcond) // Downstream point - Tvap LP 1 //Equation: 69 etaT_LPpump = 0,95// Isentropic efficiency //Equation: 70 v_TvapLP1 = volume(Water;P = p_TvapLP1;H = h_TvapLP1) // Downstream point volume - //Equation: 71 h_TvapLP1 = h_TvapBPcond + v_TvapLP1*(p_TvapLP1 - p_TvapBPcond)/100, // Liquid compression //Equation: 72 T_TvapLP1 = temperature(Water;P = p_TvapLP1;H = h_TvapLP1) // Downstream point - Tvap LP 1 // Comment = Given outlet pressure //Equation: 73 p_TvapLP1 = 5,0// Outlet pressure //Equation: 74 W_dot_LPpump = m_dot_LPpump*(h_TvapLP1 - h_TvapBPcond) // DeltaH //Process: Tg stack //Equation: 75 //m_dot_Tgstack = 102,0280902 // Given value //Process: compressor //Equation: 76 //m_dot_compressor = m_dot_airinlet // Upstream process - air inlet //Equation: 77 s_airinlet = entropy(Air;P = p_airinlet;H = h_airinlet) // Upstream point - air inlet - Downstream point - 2 // Comment = Isentropic reference //Equation: 78 hs_2 = enthalpy(Air;P = p_2;S = s_airinlet) // Downstream point - 2 //Equation: 79 etaT_compressor = 0,853915// Isentropic efficiency //Equation: 80 h_2 = h_airinlet + (hs_2 - h_airinlet)/etaT_compressor // Upstream point - air inlet - Downstream point - 2 //Equation: 81 T_2 = temperature(Air;H = h_2) // Downstream point - 2 // Comment = Given outlet pressure //Equation: 82 p_2 = 20,0// Outlet pressure //Equation: 83 W_dot_compressor = m_dot_compressor*(h_2 - h_airinlet) // DeltaH //Process: turbine //Equation: 84 m_dot_turbine = m_dot_combustionchamber // Upstream process - combustion chamber //Equation: 85 //s_3 = entropy(burnt gases;P = p_3;H = h_3) // Upstream point - 3 - Downstream point - 4 s_3 = s_products(T_3;p_3;a_combustionchamber;lambda_combustionchamber)// entropy of the reactants // Comment = Isentropic reference //Equation: 86 //hs_4 = enthalpy(burnt gases;P = p_4;S = s_3) // Downstream point - 4 hs_4 = h_products(Tis;a_combustionchamber;lambda_combustionchamber) s_3 = s_products(Tis;P_4;a_combustionchamber;lambda_combustionchamber) //Equation: 87 etaT_turbine = 0,92973// Isentropic efficiency //Equation: 88 h_4 = h_3 - etaT_turbine*(h_3 - hs_4) // Upstream point - 3 - Downstream point - 4 //Equation: 89 //T_4 = temperature(burnt gases;H = h_4) // Downstream point - 4 h_4 = h_products(T_4;a_combustionchamber;lambda_combustionchamber) //Equation: 90 //s_4 = entropy(burnt gases;P = p_4;H = h_4) // Entropy s_4 = s_products(T_4;P_4;a_combustionchamber;lambda_combustionchamber) // Comment = Given outlet pressure //Equation: 91 p_4 = 1,0// Outlet pressure //Equation: 92 W_dot_turbine = m_dot_turbine*(h_4 - h_3) // DeltaH //Process: combustion chamber // Comment = Calculate lambda simplified model oxidizer air, fuel CH4 //Equation: 93 T_3 = 1220,0// Given value (Celsius) //Equation: 94 a_combustionchamber = 4// for CH4 //Equation: 95 lambda_combustionchamber = lambd(T_2;T_3;a_combustionchamber)// air factor lambda //Equation: 96 h_3 = h_products(T_3;a_combustionchamber;lambda_combustionchamber)// enthalpy of the reactants //Equation: 97 hfict_2 = h_products(T_2;a_combustionchamber;lambda_combustionchamber)// enthalpy of a fictitious inlet point for calculating the heat released //Equation: 98 m_dot_combustionchamber = m_dot_compressor + m_dot_fuel // Upstream process - compressor - Fuel process fuel - Downstream process - combustion chamber //Equation: 99 Q_dot_combustionchamber = (h_3 - hfict_2)*m_dot_combustionchamber // DeltaH //Equation: 100 DeltaHr_combustionchamber = (-(-74850) +(-393520)+a_combustionchamber/2*(-242000))/16 // DeltaHr (kJ/kg) = (-(-74850) +(-393520) + a/2* (-242000))/16 for methane //Equation: 101 m_dot_fuel = abs(Q_dot_combustionchamber/DeltaHr_combustionchamber) // fuel flow rate // Comment = Isobaric process //Equation: 102 p_3 = p_2// Isopressure //Equation: 103 //T_fuel = 26,850000000000023// Given value (Celsius) //Equation: 104 //p_fuel = 1,0// Given value (bar) //Equation: 105 //h_fuel = enthalpy(CH4;T = T_fuel) // Fuel point - fuel //Process: GT exhaust_0 //Equation: 106 m_dot_GTexhaust_0 = m_dot_turbine // Upstream process - turbine // Comment = isobaricExchange //Equation: 107 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: 108 m_dot_GTexhaust_1 = m_dot_GTexhaust_0 // Upstream process - GT exhaust_0 // Comment = isobaricExchange //Equation: 109 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: 110 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: 111 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: 112 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: 113 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: 114 m_dot_GTex3 = m_dot_GTex2_0 + m_dot_GTex2_1 // Downstream process - GT ex3 //Equation: 115 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: 116 m_dot_GTexhaust_1 = m_dot_GTex2_0 + m_dot_GTex2_1 // Upstream process - GT exhaust_1 //Equation: 117 //m_dot_GTex2_0 = m_dot_GTexhaust_1*0,9054858306070694 // Divider flow factor - GT ex2_0 //Equation: 118 m_dot_GTex2_1 = m_dot_GTexhaust_1*0,0945141674326861 // Divider flow factor - GT ex2_1 //Node: MIX_GT ex4 // Comment = Mixer //Equation: 119 m_dot_Tgstack = m_dot_GTex4_0 + m_dot_GTex4_1 // Downstream process - Tg stack //Equation: 120 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: 121 //m_dot_GTex3 = m_dot_GTex4_0 + m_dot_GTex4_1 // Upstream process - GT ex3 //Equation: 122 m_dot_GTex4_0 = m_dot_GTex3*0,7041305963796233 // Divider flow factor - GT ex4_0 //Equation: 123 m_dot_GTex4_1 = m_dot_GTex3*0,29586940166013226 // Divider flow factor - GT ex4_1 //HEAT EXCHANGERS //Heat exchanger: SHHP1 //Equation: 124 mCp_SHHP1vap = (h_TvapHP5 - h_TvapHP4)/(T_TvapHP5 - T_TvapHP4)*m_dot_SHHP1vap // mCpf =deltaH/deltaT - SHHP1 vap //Equation: 125 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: 126 UA_SHHP1 = NTU_SHHP1 *mCp_SHHP1vap // Cold fluid - SHHP1 vap //Equation: 127 R_SHHP1 = mCp_SHHP1vap /mCp_GTexhaust_0 // Hot fluid - GT exhaust_0 - Cold fluid - SHHP1 vap //Equation: 128 T_TvapHP5 = T_TvapHP4 + epsilon_SHHP1*(T_4 - T_TvapHP4) // Hot fluid outlet temperature //Equation: 129 h_TvapHP5 = enthalpy(Water;P = p_TvapHP5;T = T_TvapHP5)// Enthalpy //Equation: 130 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: 131 //T_GTexhaust_0 = temperature(burntgases;P = p_GTexhaust_0;H = h_GTexhaust_0)// Hot fluid outlet temperature h_GTexhaust_0 = h_products(T_GTexhaust_0;a_combustionchamber;lambda_combustionchamber)// enthalpy of the reactants // Comment = epsilon given value //Equation: 132 //epsilon_SHHP1 = 0,7029268569616665 // Given value //Equation: 133 argLn_SHHP1 = (1 - epsilon_SHHP1*R_SHHP1)/(1 - epsilon_SHHP1) //Equation: 134 NTU_SHHP1 = 1/(1 - R_SHHP1)*ln(argLn_SHHP1) // Counterflow heat exchanger //Equation: 135 Q_dot_GTexhaust_0 = m_dot_GTexhaust_0*(h_GTexhaust_0 - h_4) // DeltaH hot fluid //Equation: 136 Q_dot_SHHP1vap = m_dot_SHHP1vap*(h_TvapHP5 - h_TvapHP4) // DeltaH cold fluid //Heat exchanger: EVHP //Equation: 137 mCp_EVHPvap = (h_TvapHP4 - h_TvapHP3)/(T_TvapHP4 - T_TvapHP3)*m_dot_EVHPvap // mCpf =deltaH/deltaT - EVHP vap //Equation: 138 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: 152 UA_SHLP = NTU_SHLP *mCp_SHLPvap // Cold fluid - SHLP vap //Equation: 153 R_SHLP = mCp_SHLPvap /mCp_GTex2_1 // Hot fluid - GT ex2_1 - Cold fluid - SHLP vap //Equation: 154 T_TvapLP4 = T_TvapLP3 + epsilon_SHLP*(T_Tg1 - T_TvapLP3) // Hot fluid outlet temperature //Equation: 155 h_TvapLP4 = enthalpy(Water;P = p_TvapLP4;T = T_TvapLP4)// Enthalpy //Equation: 156 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: 157 //T_GTex2_1 = temperature(burntgases;P = p_GTex2_1;H = h_GTex2_1)// Hot fluid outlet temperature h_GTex2_1 = h_products(T_GTex2_1;a_combustionchamber;lambda_combustionchamber)// enthalpy // Comment = epsilon given value //Equation: 158 //epsilon_SHLP = 0,7003973940537223 // Given value //Equation: 159 argLn_SHLP = (1 - epsilon_SHLP*R_SHLP)/(1 - epsilon_SHLP) //Equation: 160 NTU_SHLP = 1/(1 - R_SHLP)*ln(argLn_SHLP) // Counterflow heat exchanger //Equation: 161 Q_dot_GTex2_1 = m_dot_GTex2_1*(h_GTex2_1 - h_Tg1) // DeltaH hot fluid //Equation: 162 Q_dot_SHLPvap = m_dot_SHLPvap*(h_TvapLP4 - h_TvapLP3) // DeltaH cold fluid //Heat exchanger: ECO HP 2 //Equation: 163 mCp_ECOHP2vap = (h_TvapHP3 - h_TvapHP2)/(T_TvapHP3 - T_TvapHP2)*m_dot_ECOHP2vap // mCpf =deltaH/deltaT - ECOHP2 vap //Equation: 164 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: 165 UA_ECOHP2 = NTU_ECOHP2 *mCp_ECOHP2vap // Cold fluid - ECOHP2 vap //Equation: 166 R_ECOHP2 = mCp_ECOHP2vap /mCp_GTex2_0 // Hot fluid - GT ex2_0 - Cold fluid - ECOHP2 vap //Equation: 167 T_TvapHP3 = T_TvapHP2 + epsilon_ECOHP2*(T_Tg1 - T_TvapHP2) // Hot fluid outlet temperature //Equation: 168 //h_TvapHP3 = enthalpy(water;P = p_TvapHP3;T = T_TvapHP3)// Enthalpy //Equation: 169 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: 170 //T_GTex2_0 = temperature(burntgases;P = p_GTex2_0;H = h_GTex2_0)// Hot fluid outlet temperature h_GTex2_0 = h_products(T_GTex2_0;a_combustionchamber;lambda_combustionchamber)// enthalpy of the reactants // Comment = epsilon given value //Equation: 171 //epsilon_ECOHP2 = 0,9091565047293645 // Given value //Equation: 172 argLn_ECOHP2 = (1 - epsilon_ECOHP2*R_ECOHP2)/(1 - epsilon_ECOHP2) //Equation: 173 NTU_ECOHP2 = 1/(1 - R_ECOHP2)*ln(argLn_ECOHP2) // Counterflow heat exchanger //Equation: 174 Q_dot_GTex2_0 = m_dot_GTex2_0*(h_GTex2_0 - h_Tg1) // DeltaH hot fluid //Equation: 175 Q_dot_ECOHP2vap = m_dot_ECOHP2vap*(h_TvapHP3 - h_TvapHP2) // DeltaH cold fluid //Heat exchanger: EVLP //Equation: 176 mCp_EVLPvap = (h_TvapLP3 - h_TvapLP2)/(T_TvapLP3 - T_TvapLP2)*m_dot_EVLPvap // mCpf =deltaH/deltaT - EVLP vap //Equation: 177 mCp_GTex3 = (h_Tg3 - h_Tg2)*m_dot_GTex3/(T_Tg3 - T_Tg2) // mCpc =-deltaH/deltaT - GT ex3 // Comment = mCpcmCpf //Equation: 191 UA_ECOLP = NTU_ECOLP *mCp_ECOLP // Cold fluid - ECOLP //Equation: 192 R_ECOLP = mCp_ECOLP /mCp_GTex4_1 // Hot fluid - GT ex4_1 - Cold fluid - ECOLP //Equation: 193 T_TvapLP2 = T_TvapLP1 + epsilon_ECOLP*(T_Tg3 - T_TvapLP1) // Hot fluid outlet temperature //Equation: 194 //h_TvapLP2 = enthalpy(water;P = p_TvapLP2;T = T_TvapLP2)// Enthalpy //Equation: 195 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: 196 //T_GTex4_1 = temperature(burntgases;P = p_GTex4_1;H = h_GTex4_1)// Hot fluid outlet temperature h_GTex4_1 = h_products(T_GTex4_1;a_combustionchamber;lambda_combustionchamber)// enthalpy // Comment = epsilon given value //Equation: 197 //epsilon_ECOLP = 0,9247653349350559 // Given value //Equation: 198 argLn_ECOLP = (1 - epsilon_ECOLP*R_ECOLP)/(1 - epsilon_ECOLP) //Equation: 199 NTU_ECOLP = 1/(1 - R_ECOLP)*ln(argLn_ECOLP) // Counterflow heat exchanger //Equation: 200 Q_dot_GTex4_1 = m_dot_GTex4_1*(h_GTex4_1 - h_Tg3) // DeltaH hot fluid //Equation: 201 Q_dot_ECOLP = m_dot_ECOLP*(h_TvapLP2 - h_TvapLP1) // DeltaH cold fluid //Heat exchanger: ECO HP 1 //Equation: 202 mCp_ECOHP1vap = (h_TvapHP2 - h_TvapHP1)/(T_TvapHP2 - T_TvapHP1)*m_dot_ECOHP1vap // mCpf =deltaH/deltaT - ECOHP1 vap //Equation: 203 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: 204 UA_ECOHP1 = NTU_ECOHP1 *mCp_ECOHP1vap // Cold fluid - ECOHP1 vap //Equation: 205 R_ECOHP1 = mCp_ECOHP1vap /mCp_GTex4_0 // Hot fluid - GT ex4_0 - Cold fluid - ECOHP1 vap //Equation: 206 T_TvapHP2 = T_TvapHP1 + epsilon_ECOHP1*(T_Tg3 - T_TvapHP1) // Hot fluid outlet temperature //Equation: 207 h_TvapHP2 = enthalpy(Water;P = p_TvapHP2;T = T_TvapHP2)// Enthalpy //Equation: 208 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: 209 //T_GTex4_0 = temperature(burntgases;P = p_GTex4_0;H = h_GTex4_0)// Hot fluid outlet temperature h_GTex4_0 = h_products(T_GTex4_0;a_combustionchamber;lambda_combustionchamber)// enthalpy of the reactants // Comment = epsilon given value //Equation: 210 //epsilon_ECOHP1 = 0,8649366904842106 // Given value //Equation: 211 argLn_ECOHP1 = (1 - epsilon_ECOHP1*R_ECOHP1)/(1 - epsilon_ECOHP1) //Equation: 212 NTU_ECOHP1 = 1/(1 - R_ECOHP1)*ln(argLn_ECOHP1) // Counterflow heat exchanger //Equation: 213 Q_dot_GTex4_0 = m_dot_GTex4_0*(h_GTex4_0 - h_Tg3) // DeltaH hot fluid //Equation: 214 Q_dot_ECOHP1vap = m_dot_ECOHP1vap*(h_TvapHP2 - h_TvapHP1) // DeltaH cold fluid //Number of equations: 214 //POINTS WITH SATURATION TEMPERATURE SET //Point Tvap LP 2 //Outlet point of process ECOLP //Equation: 215 p_TvapLP2 = 5,0// P (bar) //Equation: 216 x_TvapLP2 = 0,0// Quality //Equation: 217 dTsat_TvapLP2 = -0,5// Deviation from Tsat //Equation: 218 T_TvapLP2 = t_sat(Water;P = p_TvapLP2)+dTsat_TvapLP2// set Tsat (Celsius) //Equation: 219 h_TvapLP2 = enthalpy(Water;P = p_TvapLP2;X = x_TvapLP2)// Enthalpy //Point Tvap LP 3 //Outlet point of process EVLP vap //Equation: 220 p_TvapLP3 = 5,0// P (bar) //Equation: 221 x_TvapLP3 = 1,0// Quality //Equation: 222 dTsat_TvapLP3 = 0,0// Deviation from Tsat //Equation: 223 T_TvapLP3 = t_sat(Water;P = p_TvapLP3)+dTsat_TvapLP3// set Tsat (Celsius) //Equation: 224 h_TvapLP3 = enthalpy(Water;P = p_TvapLP3;X = x_TvapLP3)// Enthalpy //Point Tvap HP 3 //Outlet point of process ECOHP2 vap //Equation: 225 p_TvapHP3 = 100,0// P (bar) //Equation: 226 x_TvapHP3 = 0,0// Quality //Equation: 227 dTsat_TvapHP3 = -0,5// Deviation from Tsat //Equation: 228 T_TvapHP3 = t_sat(Water;P = p_TvapHP3)+dTsat_TvapHP3// set Tsat (Celsius) //Equation: 229 h_TvapHP3 = enthalpy(Water;P = p_TvapHP3;X = x_TvapHP3)// Enthalpy //Point Tvap HP 4 //Outlet point of process EVHP vap //Equation: 230 p_TvapHP4 = 100,0// P (bar) //Equation: 231 x_TvapHP4 = 1,0// Quality //Equation: 232 dTsat_TvapHP4 = 0,0// Deviation from Tsat //Equation: 233 T_TvapHP4 = t_sat(Water;P = p_TvapHP4)+dTsat_TvapHP4// set Tsat (Celsius) //Equation: 234 h_TvapHP4 = enthalpy(Water;P = p_TvapHP4;X = x_TvapHP4)// Enthalpy //Point Tvap HP turb //Outlet point of process HP turb //Equation: 235 //x_TvapHPturb = 0,820178871// Quality //Equation: 236 dTsat_TvapHPturb = 0,0// Deviation from Tsat //Equation: 237 T_TvapHPturb = t_sat(Water;P = p_TvapHPturb)+dTsat_TvapHPturb// set Tsat (Celsius) //Equation: 238 //h_TvapHPturb = enthalpy(water;P = p_TvapHPturb;X = x_TvapHPturb)// Enthalpy //Point Tvap LP turb //Outlet point of process LP turb //Equation: 239 //x_TvapLPturb = 0,903683183// Quality //Equation: 240 dTsat_TvapLPturb = 0,0// Deviation from Tsat //Equation: 241 T_TvapLPturb = t_sat(Water;P = p_TvapLPturb)+dTsat_TvapLPturb// set Tsat (Celsius) //Equation: 242 //h_TvapLPturb = enthalpy(water;P = p_TvapLPturb;X = x_TvapLPturb)// Enthalpy //Point Tvap HP cond //Outlet point of process HP condenser //Equation: 243 x_TvapHPcond = 0,0// Quality //Equation: 244 dTsat_TvapHPcond = 0,0// Deviation from Tsat //Equation: 245 T_TvapHPcond = t_sat(Water;P = p_TvapHPcond)+dTsat_TvapHPcond// set Tsat (Celsius) //Equation: 246 h_TvapHPcond = enthalpy(Water;P = p_TvapHPcond;X = x_TvapHPcond)// Enthalpy //Point Tvap BP cond //Outlet point of process LP condenser //Equation: 247 x_TvapBPcond = 0,0// Quality //Equation: 248 dTsat_TvapBPcond = 0,0// Deviation from Tsat //Equation: 249 T_TvapBPcond = t_sat(Water;P = p_TvapBPcond)+dTsat_TvapBPcond// set Tsat (Celsius) //Equation: 250 h_TvapBPcond = enthalpy(Water;P = p_TvapBPcond;X = x_TvapBPcond)// Enthalpy //OTHER POINTS WITH PRESSURE SET //Equation: 251 T_TvapHP2 = 143,62// Given value (°C) //Equation: 252 T_TvapHP5 = 450,0// Given value (°C) //Equation: 253 T_TvapLP4 = 275,0// Given value (°C) //SET FLOW RATES //Equation: 254 m_dot_HPpump = 11,3// Given flow //Equation: 255 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) p_TvapLP4 = 5 T_Tg2 = 237 p_TvapHP2 = 100 p_TvapHP5 = 100 p_Tg2 = 1