You are on page 1of 4

Interpolation

Exercise 5.2.1

Question:

Determine the saturation temperature, specific liquid enthalpy, specific enthalpy of evaporation

and specific enthalpy of dry steam at a pressure of 2.04 MPa.

Solution:

On Matlab, we write the script :

Script Function
pressure=[2.1 2.0]; Data that has been known in the
sat_temp=[214.9 212.4]; table above (table 5.2)
h_f=[920 908.6];
h_fg=[1878.2 1888.6];
h_g=[2798.2 2797.2];

sat_temp_new=interp1(pressure,sat_temp,2.04) Interpolation to determine the value


of saturation temperature at
pressure 2.04 MPa
h_f_new=interp1(pressure,h_f,2.04) Interpolation to determine the value
of specific liquid enthalpy at
pressure 2.04 MPa
h_fg_new=interp1(pressure,h_fg,2.04) Interpolation to determine the value
of spesific evaporation enthalpy at
pressure 2.04 MPa
h_g_new=interp1(pressure,h_g,2.04) Interpolation to determine the value
of specific enthalpy of dry steam at
pressure 2.04 MPa

After we run the script, we get all values on command window:

sat_temp_new = 1.8844e+03

213.4000 h_g_new =

h_f_new = 2.7976e+03

913.1600

h_fg_new =

So, the value of saturation temperature at pressure 2.04 MPa is 213.4 oC, the value of specific Liquid
enthalpy is 913.16 (kJ/kg), the value of specific evaporation enthalpy is 1.8844e+03 (kJ/kg), and the
value of specific enthalpy of dry steam is 2.7976e+03 (kJ/kg).
Exercise 5.2.2

Question:

The following table gives data for the specific heat as it changes with temperature for a

perfect gas.

Using interp1 function calculate the specific heat for 30 F, 70 F and 145 F.

Solution:

On Matlab, we run the script:

Script Function
clear all Data that has been
clc known in the table
5.3
temperature=[25;50;75;100;125;150];
specific_heat=[0.118;0.120;0.123;0.125;0.128;0.131];
specific_heatAt30=interp1(temperature,specific_heat,30) Interpolation to
determine the
value of specific
heat for 30 F
specific_heatAt70=interp1(temperature,specific_heat,70) Interpolation to
determine the
value of specific
heat for 70 F
specific_heatAt145=interp1(temperature,specific_heat,145) Interpolation to
determine the
value of specific
heat for 145 F

After we run The script, we get all values on Command Window:

specific_heatAt30 = 0.1224

0.1184 specific_heatAt145 =

specific_heatAt70 = 0.1304
So, The value of specific heat for 30 F is 0.1184 [BTU/lbmF], the value of specific heat for 70 F is
0.1224 [BTU/lbmF], and the value of specific heat for 145 F is 0.1304 [BTU/lbmF].

Exercise 5.2.3

Question:

For the problem above (Exercise 5.2.2), create a more detailed table in which temperature varies
between 25 and 150 with 5 F increments and corresponding specific heat values.

Solution:

On MATLAB we run the script:

Script Function
clear all Data that
clc has been
known in the
temperature=[25;50;75;100;125;150];
specific_heat=[0.118;0.120;0.123;0.125;0.128;0.131];
table 5.3
new_temperature=[25:5:150];
new_specific_heat=interp1(temperature,specific_heat,new_tempe To find
rature) which
temperature
varies
between 25
and 150 with
5F
increments
and
correspondi
ng specific
heat values.
reshape (new_specific_heat,[26,1]) reshape(A,sz
) reshapes A
using the
size vector,
sz, to define
size the new
specific heat

So we can Determine the values on Matlab:

New Specific Heat


[BTU/lbmF]
0.118
0.1184
0.1188
0.1192
0.1196
0.12
0.1206
0.1212
0.1218
0.1224
0.123
0.1234
0.1238
0.1242
0.1246
0.125
0.1256
0.1262
0.1268
0.1274
0.128
0.1286
0.1292
0.1298
0.1304
0.131

You might also like