//EQUATIONS //Units: SI, Temperatures in Celsius, pressures in bar //Project file: D:\_classement\_Thopt\THERMOPTIM_Pro_282\proj\refrig_light_SC10.prj //Date and Time: 2024-08-24 18:06:07 //Flow rate unit: - //GAS COMPOSITIONS //PROCESSES //Process: refrigeration effect //Equation: 1 m_dot_refrigerationeffect = m_dot_throttling // Upstream process - throttling // Comment = mDeltaH not set //Equation: 2 Q_dot_refrigerationeffect = m_dot_refrigerationeffect*(h_1 - h_4) // Upstream point - 4 - Downstream point - 1 - DeltaH/flow //Process: condenser //Equation: 3 m_dot_condenser = m_dot_desuperheating // Upstream process - desuperheating // Comment = mDeltaH not set //Equation: 4 Q_dot_condenser = m_dot_condenser*(h_3 - h_3a) // Upstream point - 3a - Downstream point - 3 - DeltaH/flow //Process: desuperheating //Equation: 5 m_dot_desuperheating = m_dot_compressor // Upstream process - compressor // Comment = mDeltaH not set //Equation: 6 Q_dot_desuperheating = m_dot_desuperheating*(h_3a - h_2) // Upstream point - 2 - Downstream point - 3a - DeltaH/flow //Process: compressor //Equation: 7 m_dot_compressor = m_dot_refrigerationeffect // Upstream process - refrigeration effect //Equation: 8 s_1 = calcS_PH("R134a";P = p_1;H = h_1) // Upstream point - 1 - Downstream point - 2 // Comment = Isentropic reference //Equation: 9 hs_2 = calcH_PS("R134a";P = p_2;S = s_1) // Downstream point - 2 //Equation: 10 etaT_compressor = 0.75// Isentropic efficiency //Equation: 11 h_2 = h_1 + (hs_2 - h_1)/etaT_compressor // Upstream point - 1 - Downstream point - 2 //Equation: 12 T_2 = calcT_PH("R134a";P = p_2 ;H = h_2) // Downstream point - 2 // Comment = Given outlet pressure //Equation: 13 p_2 = 12.0// Outlet pressure //Equation: 14 W_dot_compressor = m_dot_compressor*(h_2 - h_1) // DeltaH //Process: throttling // Comment = Isenthalpic throttling //Equation: 15 p_4 = 1.78// Given outlet pressure //Equation: 16 xl_4 = 0.// Saturated liquid quality //Equation: 17 Tl_4 = T_4- 0.01// Saturated liquid temperature //Equation: 18 xv_4 = 1.// Saturated vapor quality //Equation: 19 Tv_4 = T_4+ 0.01// Saturated vapor temperature //Equation: 20 hl_4 = calcH_TPx("R134a";T = Tl_4;P = p_4;X = xl_4)// Saturated liquid enthalpy //Equation: 21 hv_4 = calcH_TPx("R134a";T = Tv_4;P = p_4;X = xv_4)// Saturated vapor enthalpy //Equation: 22 x_4 = (h_3 - hl_4)/(hv_4 - hl_4)// Quality //Equation: 23 T_4 = calcTsat("R134a";P = p_4 ;X = x_4) // Downstream point - 4 //Equation: 24 h_4 = calcH_TPx("R134a";T = T_4;P = p_4;X = x_4) // Enthalpy //NODES //HEAT EXCHANGERS //Number of equations: 24 //POINTS WITH SATURATION TEMPERATURE SET //Point 1 //Outlet point of process refrigeration effect //Equation: 25 p_1 = 1.78// P (bar) //Equation: 26 x_1 = 1.0// Quality //Equation: 27 dTsat_1 = 5.0// Deviation from Tsat //Equation: 28 T_1 = calcTsat("R134a";P = p_1;X = x_1)+dTsat_1// set Tsat (Celsius) //Equation: 29 h_1 = calcH_TPx("R134a";T = T_1;P = p_1;X = x_1)// Enthalpy //Point 3a //Outlet point of process desuperheating //Equation: 30 p_3a = 12.0// P (bar) //Equation: 31 x_3a = 1.0// Quality //Equation: 32 dTsat_3a = 0.0// Deviation from Tsat //Equation: 33 T_3a = calcTsat("R134a";P = p_3a;X = x_3a)+dTsat_3a// set Tsat (Celsius) //Equation: 34 h_3a = calcH_TPx("R134a";T = T_3a;P = p_3a;X = x_3a)// Enthalpy //Point 3 //Outlet point of process condenser //Equation: 35 p_3 = 12.0// P (bar) //Equation: 36 x_3 = 0.0// Quality //Equation: 37 dTsat_3 = -10.0// Deviation from Tsat //Equation: 38 T_3 = calcTsat("R134a";P = p_3;X = x_3)+dTsat_3// set Tsat (Celsius) //Equation: 39 h_3 = calcH_TPx("R134a";T = T_3;P = p_3;X = x_3)// Enthalpy //Point 4 //Equation: 40 p_4 = 1.78// P (bar) //Equation: 41 x_4 = 0.328174791// Quality //Equation: 42 dTsat_4 = 0.0// Deviation from Tsat //Equation: 43 T_4 = calcTsat("R134a";P = p_4;X = x_4)+dTsat_4// set Tsat (Celsius) //Equation: 44 h_4 = calcH_TPx("R134a";T = T_4;P = p_4;X = x_4)// Enthalpy //OTHER POINTS WITH PRESSURE SET //SET FLOW RATES //OVERALL BALANCE //Equation: 45 useful_Energy = Q_dot_refrigerationeffect //Equation: 46 purchased_Energy = W_dot_compressor //Equation: 47 eta_global = abs(useful_Energy/purchased_Energy)