You have been tasked with expanding the steam tables. The tables are used to cal
ID: 3778510 • Letter: Y
Question
You have been tasked with expanding the steam tables. The tables are used to calculate the amount of energy, work in an engine cycle. To do this the following data is given to you. T=[100, 150, 200, 250, 300, 400, 500]; Cv=[1.6958, 1.9364, 2.172, 2.46, 2.639, 3.103, 3.565]; U=[2506.7, 2582.8, 2658.1, 2733.7, 2810.4, 2967.9, 3131.6]; T is the temperature in degrees C, Cv is the specific volume in m^3/kg and U is the Internal energy in kJ/kg. Plot the Specific volume and the Internal Energy against Temperature on horizontal subplots use both a symbol and a line for plotting (different symbols for each) Verify that both are linear. Calculate the slope for all the points given of Specific volume and internal energy with respect to Temperature. Average each of the slopes Use that value to calculate the Cv and U at temperatures of 700, 800, 900 degrees C Plot them together with the previous data, making sure they have different symbols than used beforeExplanation / Answer
T = [100 150 200 250 300 400 500];
Cv = [1.6958 1.9364 2.172 2.46 2.639 3.103 3.565];
U = [2506.7 2582.8 2658.1 2733.7 2810.4 2967.9 3131.6];
slopes_Cv = [];
slopes_U = [];
for i=1:size(T,2)
if i==1
slopes_Cv(end+1) = (Cv(2)-Cv(1))/2.0;
slopes_U(end+1) = (U(2)-U(1))/(T(2)-T(1));
else
slopes_Cv(end+1) = (Cv(i)-Cv(i-1))/(T(i)-T(i-1));
slopes_U(end+1) = (U(i)-U(i-1))/(T(i)-T(i-1));
end
end
av_cv = mean(slopes_Cv);
fprintf('Average slope of cv: %f ', av_cv);
av_u = mean(slopes_U);
fprintf('Average slope of u: %f ', av_u);
constant_cv = (sum(Cv) - av_cv*sum(T))/size(T,2);
constant_u = (sum(U) - av_u*sum(T))/size(T,2);
Cv_700 = av_cv*700 + constant_cv;
fprintf('Cv at 700: %f ', Cv_700);
Cv_800 = av_cv*800 + constant_cv;
fprintf('Cv at 800: %f ', Cv_800);
Cv_900 = av_cv*900 + constant_cv;
fprintf('Cv at 900: %f ', Cv_900);
U_700 = av_u*700 + constant_u;
fprintf('U at 700: %f ', U_700);
U_800 = av_u*800 + constant_u;
fprintf('U at 800: %f ', U_800);
U_900 = av_u*900 + constant_u;
fprintf('U at 900: %f ', U_900);
figure
subplot(2,1,1)
hold on
plot(T, Cv, 'r*')
plot(700, Cv_700, 'r^')
plot(800, Cv_800, 'r^')
plot(900, Cv_900, 'r^')
subplot(2,1,2)
hold on
plot(T, U, 'go')
plot(700, U_700, 'd')
plot(800, U_800, 'd')
plot(900, U_900, 'd')
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.