Advertisement
shamzed

aiman-problem1

Jul 17th, 2022
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 1.00 KB | None | 0 0
  1. pkg load io;
  2. airproperties = xlsread ('Air properties.xlsx');
  3. temperature = airproperties(:,1);
  4. enthalpy  = airproperties(:,2);
  5. pressure = airproperties(:,3);
  6. u = airproperties(:,4);
  7. vr = airproperties(:,5);
  8. s = airproperties(:,6);
  9. temperature1 = 300; temperature3 = 1400; flowrate = 5; p1 = 100; ratio1 = 10; ratio2 = 0.1;
  10. x = 0;
  11. for x = 1:numel(temperature)
  12.     if temperature(x) == temperature1
  13.         break
  14.     end
  15. end
  16. pr1 = pressure(x);
  17. enthalpy1 = enthalpy(x);
  18. pr2 = pr1 * (ratio1);
  19. enthalpy2 = interp1(pressure, enthalpy, pr2);
  20. pr3 = interp1(temperature, pressure, temperature3);
  21. enthalpy3 = interp1(pressure, enthalpy, pr3);
  22. pr4 = pr3 * (ratio2);
  23. enthalpy4 = interp1 (pressure, enthalpy, pr4);
  24. efficiency = ((enthalpy3-enthalpy4)-(enthalpy2-enthalpy1))/(enthalpy3-enthalpy2)
  25. backworkratio = (enthalpy2 - enthalpy1)/(enthalpy3 - enthalpy4)
  26. mass_dot = ((flowrate*p1*(10^3 ))/((8.314/28.97)*temperature1))*(1/10^3);
  27. w_dot_cycle = mass_dot*((enthalpy3 - enthalpy4) - (enthalpy2 - enthalpy1))
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement