I need the matlab code for this

Task 3 This task will focus on the properties of superheated steam at constant pressure 200 kPa. Table 2 contains the different properties of superheated steam at different temperatures. The Ideal-gas specific heat at constant volume, Cy, of water vapor as a function of temperature, in Kelvin, is given by: C,(T) = a +bT + ct? + dT3 where a = 32.24, b = 0.1923 x 10-2, C = 1.055 x 10-5, d = -3.595 x 10″. Additionally, the water’s heat capacity at constant pressure can be obtained as Cp = C, +R, where R = 0.4615 is the universal gas constant. Table 2. Properties of superheated steam at 200 kPa Temp °C 150 200 250 300 350 400 450 500 600 700 800 900 1000 Volume (m/kg) 0.960 1.081 1.199 1.316 1.433 1.549 1.666 1.781 2.013 2.244 2.476 2.707 2.938 200 kPa Energy Enthalpy (kJ/kg) (kJ/kg) 2577.1 2706.2 2654.6 2769.1 2731.4 2870.7 2808.8 2971.2 2887.3 3072.1 2967.1 3173.9 3048. 5 3277.0 3131.4 3381.6 3302. 21 3487.7 3479. 9 3704.8 3664. 7 3928.8 3856.3 4159.8 4054.8 4397. 6 Entropy s(kJ/kg.K) 7.127 7.281 7.508 7.710 7.894 8.064 8.224 8.373 8.515 8.779 9.022 9.248 9 .460 1 1273 To complete this task, you will use the different integration and differentiation methods to calculate the change in internal energy and entropy, as follows: 1. Use Simpson’s 1/3 rule for data to compute the change in internal energy of steam from 150°C to 1000°C, as Au = cdt Calculate Cp for each temperature and perform the integration of the obtained dataset. 2. Calculate the derivative of the heat capacity, cp) using forward differentiation for the first element, backward differentiation for the last element and centered differentiation for all the elements in between and generate a new vector of data. 3. Use trapezoidal rule and the data from new data set obtained in Task 3.2 above to compute the change in entropy of the steam as As = S, 7(27″) + 18.015 ‘n (,-) where Ti = 150°C , T2 = 1000°C, and v4 and v2 are the volumes at T and T2 respectively. Show transcribed image text Task 3 This task will focus on the properties of superheated steam at constant pressure 200 kPa. Table 2 contains the different properties of superheated steam at different temperatures. The Ideal-gas specific heat at constant volume, Cy, of water vapor as a function of temperature, in Kelvin, is given by: C,(T) = a +bT + ct? + dT3 where a = 32.24, b = 0.1923 x 10-2, C = 1.055 x 10-5, d = -3.595 x 10″. Additionally, the water’s heat capacity at constant pressure can be obtained as Cp = C, +R, where R = 0.4615 is the universal gas constant. Table 2. Properties of superheated steam at 200 kPa Temp °C 150 200 250 300 350 400 450 500 600 700 800 900 1000 Volume (m/kg) 0.960 1.081 1.199 1.316 1.433 1.549 1.666 1.781 2.013 2.244 2.476 2.707 2.938 200 kPa Energy Enthalpy (kJ/kg) (kJ/kg) 2577.1 2706.2 2654.6 2769.1 2731.4 2870.7 2808.8 2971.2 2887.3 3072.1 2967.1 3173.9 3048. 5 3277.0 3131.4 3381.6 3302. 21 3487.7 3479. 9 3704.8 3664. 7 3928.8 3856.3 4159.8 4054.8 4397. 6 Entropy s(kJ/kg.K) 7.127 7.281 7.508 7.710 7.894 8.064 8.224 8.373 8.515 8.779 9.022 9.248 9 .460 1 1273 To complete this task, you will use the different integration and differentiation methods to calculate the change in internal energy and entropy, as follows: 1. Use Simpson’s 1/3 rule for data to compute the change in internal energy of steam from 150°C to 1000°C, as Au = cdt Calculate Cp for each temperature and perform the integration of the obtained dataset. 2. Calculate the derivative of the heat capacity, cp) using forward differentiation for the first element, backward differentiation for the last element and centered differentiation for all the elements in between and generate a new vector of data. 3. Use trapezoidal rule and the data from new data set obtained in Task 3.2 above to compute the change in entropy of the steam as As = S, 7(27″) + 18.015 ‘n (,-) where Ti = 150°C , T2 = 1000°C, and v4 and v2 are the volumes at T and T2 respectively.

## Expert Answer

Answer to Task 3 This task will focus on the properties of superheated steam at constant pressure 200 kPa. Table 2 contains the di…