//EQUATIONS //Units: SI, Temperatures in Celsius, pressures in bar //Project file: D:\_classement\_Thopt\THERMOPTIM_Pro_282\proj\refrigIT_R134a.prj //Date and Time: 2024-08-14 14:12:26 //Flow rate unit: kg/s //GAS COMPOSITIONS //PROCESSES //Process: Compressor //Equation: 1 m_dot_Compressor = m_dot_Evaporator // Upstream process - Evaporator //Equation: 2 s_1 = s_Ph("R134a",p_1,h_1) // Upstream point - 1 - Downstream point - 2 // Comment = Isentropic reference //Equation: 3 hs_2 = h_Ps("R134a",p_2,s_1) // Downstream point - 2 //Equation: 4 etaT_Compressor = 0.8// Isentropic efficiency //Equation: 5 h_2 = h_1 + (hs_2 - h_1)/etaT_Compressor // Upstream point - 1 - Downstream point - 2 //Equation: 6 T_2 = T_Ph("R134a",p_2,h_2) // Downstream point - 2 // Comment = Given outlet pressure //Equation: 7 p_2 = 14.0088// Outlet pressure //Equation: 8 W_dot_Compressor = m_dot_Compressor*(h_2 - h_1) // DeltaH //Process: Desuperheating //Equation: 9 m_dot_Desuperheating = m_dot_Compressor // Upstream process - Compressor // Comment = isobaricExchange //Equation: 10 p_3a = p_2 // Upstream point - 2 - Downstream point - 3a // Comment = mDeltaH not set //Equation: 11 Q_dot_Desuperheating/m_dot_Desuperheating = h_3a - h_2 // Upstream point - 2 - Downstream point - 3a - DeltaH/flow //Process: Condensor //Equation: 12 m_dot_Condensor = m_dot_Desuperheating // Upstream process - Desuperheating // Comment = isobaricExchange //Equation: 13 p_3 = p_3a // Upstream point - 3a - Downstream point - 3 // Comment = mDeltaH not set //Equation: 14 Q_dot_Condensor/m_dot_Condensor = h_3 - h_3a // Upstream point - 3a - Downstream point - 3 - DeltaH/flow //Process: Evaporator // Comment = isobaricExchange //Equation: 15 p_1 = p_4 // Upstream point - 4 - Downstream point - 1 // Comment = mDeltaH not set //Equation: 16 Q_dot_Evaporator/m_dot_Evaporator = h_1 - h_4 // Upstream point - 4 - Downstream point - 1 - DeltaH/flow //Process: Expansion valve //Equation: 17 m_dot_Expansionvalve = m_dot_Condensor // Upstream process - Condensor // Comment = Isenthalpic throttling //Equation: 18 p_4 = 4.49// Given outlet pressure //Equation: 19 xl_4 = 0.// Saturated liquid quality //Equation: 20 Tl_4 = T_4- 0.01// Saturated liquid temperature //Equation: 21 xv_4 = 1.// Saturated vapor quality //Equation: 22 Tv_4 = T_4+ 0.01// Saturated vapor temperature //Equation: 23 hl_4 = hsat_Px("R134a",p_4,xl_4)// Saturated liquid enthalpy //Equation: 24 hv_4 = hsat_Px("R134a",p_4,xv_4)// Saturated vapor enthalpy //Equation: 25 x_4 = (h_3 - hl_4)/(hv_4 - hl_4)// Quality //Equation: 26 T_4 = Tsat_P("R134a",p_4) // Downstream point - 4 //Equation: 27 h_4 = hsat_Px("R134a",p_4,x_4) // Enthalpy //NODES //HEAT EXCHANGERS //Number of equations: 27 //POINTS WITH SATURATION TEMPERATURE SET //Point 3 //Outlet point of process Condensor //Equation: 28 x_3 = 0.0// Quality //Equation: 29 dTsat_3 = 0.0// Deviation from Tsat //Equation: 30 T_3 = Tsat_P("R134a",p_3)+dTsat_3// set Tsat (Celsius) //Equation: 31 h_3 = hsat_Px("R134a",p_3,x_3)// Enthalpy //Point 3a //Outlet point of process Desuperheating //Equation: 32 x_3a = 1.0// Quality //Equation: 33 dTsat_3a = 0.0// Deviation from Tsat //Equation: 34 T_3a = Tsat_P("R134a",p_3a)+dTsat_3a// set Tsat (Celsius) //Equation: 35 h_3a = hsat_Px("R134a",p_3a,x_3a)// Enthalpy //Point 4 //Equation: 36 //p_4 = 4.49// P (bar) //Equation: 37 //x_4 = 0.309543457// Quality //Equation: 38 dTsat_4 = 0.0// Deviation from Tsat //Equation: 39 T_4 = Tsat_P("R134a",p_4)+dTsat_4// set Tsat (Celsius) //Equation: 40 //h_4 = hsat_Px("R134a",p_4,x_4)// Enthalpy //Point 1 //Outlet point of process Evaporator //Equation: 41 x_1 = 1.0// Quality //Equation: 42 dTsat_1 = 0.0// Deviation from Tsat //Equation: 43 T_1 = Tsat_P("R134a",p_1)+dTsat_1// set Tsat (Celsius) //Equation: 44 h_1 = hsat_Px("R134a",p_1,x_1)// Enthalpy //OTHER POINTS WITH PRESSURE SET //SET FLOW RATES //Equation: 45 m_dot_Evaporator = 0.0088// Given flow //OVERALL BALANCE //Equation: 46 usefulEnergy = Q_dot_Evaporator //Equation: 47 purchasedEnergy = W_dot_Compressor //Equation: 48 eta0 = usefulEnergy/purchasedEnergy //Equation: 49 eta = abs(eta0)