Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % Problem 1
- % Opening the excel file in octave
- pkg load io;
- data = xlsread('Air properties.xlsx');
- temp = data(:,1);
- h = data(:,2);
- pr = data(:,3);
- u = data(:,4);
- vr = data(:,5);
- s = data(:,6);
- % given data:
- p1 = 100;
- p2 = 1000;
- p3 = 1000;
- p4 = 100;
- t1 = 300;
- t3 = 1400;
- flowrate = 5;
- % finding h1
- index1 = find(temp == t1);
- h1 = h(index1);
- % finding pr1 and pr2
- pr1 = pr(index1);
- pr2 = pr1 * (p2/p1);
- % interpolating h2
- h2 = interp1(pr, h, pr2);
- % finding h3
- index2 = find(temp == t3);
- h3 = h(index2);
- % interpolating h4
- pr3 = pr(index2);
- pr4 = pr3 * (p4/p3);
- h4 = interp1(pr, h, pr4);
- % a) finding the thermal efficiency
- therm_eff = ((h3 - h4) - (h2 - h1))/(h3 - h2);
- % b) back work ratio
- bwr = (h2 - h1)/(h3 - h4);
- % c) Net power in KW
- m_dot = ((flowrate * (10^5))/((8.314/28.97)*300)) * (1/10^3);
- W_cycle = m_dot * ((h3 - h4) - (h2 - h1));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement