Help in solving Matlab question Bomb calorimeters are used t
Help in solving Matlab question
Bomb calorimeters are used to determine the energy released during chemical reactions. The total heat capacity of a bomb calorimeter is defined as the sum of the product of the mass of each component and the specific heat capacity of each component. That is: where: m_i: is the mass of each component (in grams) C_i: is the heat capacity of each component (in J/gK) CP: is the total heat capacity (in J/K) Find the total capacity of a bomb calorimeter with the following components:Solution
%Script to calculate total heat capacity for a bomb calorimeter given
%various values of heat capacities and weights of components.
%declaring values of mass and heat capacities of components
m = [250, 100, 10];
C = [0.45, 4.2, 0.9];
%intialising total heat capacity to 0
CP = 0;
%iterating through all the components
for i=1:1:3
CP = CP + m(i)*C(i); %adding to total heat capacity
end
%displaying the value of total heat capacity
disp([\'Total heat capacity = \', num2str(CP)]);
