summaryrefslogtreecommitdiff
path: root/2168/CH5/EX5.6/Chapter5_example6.sce
blob: bfbd98bb672ca8bbf55c4e630cc603c56b8310c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
clc
clear
//Input data
T=[500,2000]//Change in temperature in K
x=[11.515,-172,1530]//Cp=11.515-172/sqrt(T)+1530/T in kcal/kg mole.K
mO2=32//Molecular weight of oxygen

//Calculations
function y=f(T),y=(x(1)+(x(2)/sqrt(T))+(x(3)/T)),endfunction
I=-intg(T(2),T(1),f)//Integration
dh=(I/mO2)//Change in enthalpy in kcal/kg

//Output
printf('The change in enthalpy is %3.1f kcal/kg',dh)