diff options
Diffstat (limited to '779/CH4/EX4.5/4_5.sce')
-rwxr-xr-x | 779/CH4/EX4.5/4_5.sce | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/779/CH4/EX4.5/4_5.sce b/779/CH4/EX4.5/4_5.sce new file mode 100755 index 000000000..ae1d1ee99 --- /dev/null +++ b/779/CH4/EX4.5/4_5.sce @@ -0,0 +1,17 @@ +V1 = 0.03;
+P1 = 170e03;
+P2 = 400e03;
+V2 = 0.06;
+U = 3.15*(P2*V2-P1*V1);
+B = [P1 P2]';
+A = [1 V1; 1 V2];
+x = inv(A)*B;
+a = x(1); b = x(2);
+function P = pressure(V)
+ P = a+b*V;
+endfunction;
+W = intg(V1,V2,pressure);
+Q = U+W;
+disp("J",W,"The work done by the system is")
+disp("J",U,"The internal energy change of the system is")
+disp("J",Q,"The heat flow into the system is")
|