diff options
Diffstat (limited to '555/CH4/EX4.4/4.sce')
-rw-r--r-- | 555/CH4/EX4.4/4.sce | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/555/CH4/EX4.4/4.sce b/555/CH4/EX4.4/4.sce new file mode 100644 index 000000000..e60c6acba --- /dev/null +++ b/555/CH4/EX4.4/4.sce @@ -0,0 +1,24 @@ +// Implementation of example 4.4
+// Basic and Applied Thermodynamics by P.K.Nag
+
+clc
+clear
+
+//Initial pressure p1 volume V1, final pressure p2 volume V2
+//internal energy u = 3.56*p*v+84, pv^n=constant
+p1=500;//kPa
+V1=0.22;//m^3
+p2=100;//kPa
+n=1.2;
+V2=V1*(p1/p2)^(1/n);
+//change in internal energy 'dU'
+dU = 3.56*(p2*V2-p1*V1);
+//Work done 'Wa'
+Wa = (p2*V2-p1*V1)/(1-n);
+//Heat transfer 'Qa'
+Qa=dU+Wa;
+//Part b
+Qb = 30;//kJ
+Wb=Qb-dU;
+printf(' (a):Change in internal energy = %0.0f kJ \n Work done W = %0.1f kJ \n Heat transfer Q = %0.1f kJ \n (b): W = %0.0f kJ \n The work in (b) is not equal to integral of pdV since the process is not quasi-static',dU,Wa,Qa,Wb);
+// end
\ No newline at end of file |