summaryrefslogtreecommitdiff
path: root/1922/CH4/EX4.9/4_9.sce
diff options
context:
space:
mode:
Diffstat (limited to '1922/CH4/EX4.9/4_9.sce')
-rwxr-xr-x1922/CH4/EX4.9/4_9.sce28
1 files changed, 28 insertions, 0 deletions
diff --git a/1922/CH4/EX4.9/4_9.sce b/1922/CH4/EX4.9/4_9.sce
new file mode 100755
index 000000000..7fed8f217
--- /dev/null
+++ b/1922/CH4/EX4.9/4_9.sce
@@ -0,0 +1,28 @@
+clc
+clear
+//Initialization of variables
+R=8.314
+cp=35.58
+n=100/16
+T1=300 //K
+T2=500 //K
+k=1.305
+P2=3 //Mpa
+P1=0.5 //Mpa
+Ts=290 //K
+//calculations
+cv=cp-R
+Wi=n*R*T1/(k-1) *((P2/P1)^((k-1)/k) -1)
+Hi=Wi
+Ha=n*cp*(T2-T1)
+eta=abs(Hi/Ha)
+dss1=cp*log(T2/T1) - R*log(P2/P1)
+Wl1=Ts*dss1
+dss2=n*cp*log(T2/T1)
+dss3=abs(Ha/Ts)
+dsst=dss2+dss3
+Wl2=-Ts*dss2 +Ha
+Wlost=Wl1+Wl2
+//results
+printf("Thermodynamic efficiency = %.3f",eta)
+printf("\n Net work lost = %d kJ",Wlost)