blob: c2d40a4da4b1eb074915fee81e218a325fe4bebd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
clc
//initialization of variables
w=1 //lbm
T1=492 //R
T2=672 //R
cp=1 //B/lbm F
//calculations
dQ=cp*(T2-T1)
function [s]=ds(T)
s=1/T
endfunction
entropy=intg(T1,T2,ds)
//results
printf("Entropy change = %.3f B/lbm R",entropy)
|