summaryrefslogtreecommitdiff
path: root/2339/CH3/EX3.22.1/Ex3_22.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2339/CH3/EX3.22.1/Ex3_22.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '2339/CH3/EX3.22.1/Ex3_22.sce')
-rwxr-xr-x2339/CH3/EX3.22.1/Ex3_22.sce27
1 files changed, 27 insertions, 0 deletions
diff --git a/2339/CH3/EX3.22.1/Ex3_22.sce b/2339/CH3/EX3.22.1/Ex3_22.sce
new file mode 100755
index 000000000..e0fd6156f
--- /dev/null
+++ b/2339/CH3/EX3.22.1/Ex3_22.sce
@@ -0,0 +1,27 @@
+clc
+clear
+
+//Inputs
+//The Values in the program are as follows:
+//Temperature in Celcius converted to Kelvin(by adding 273)
+//Pressure in bar converted to kPa (by multiplying 100)
+//Volume in m^3
+//Value of R,Cp and Cv in kJ/kg K
+V1=0.091;
+P1=2.73;
+T1=187+273;
+T2=27+273;
+Cp=1.005;
+Cv=0.718;
+
+R=Cp-Cv;
+
+m=(P1*100*V1)/(R*T1);
+Q=m*Cp*(T2-T1);
+printf('The Value of heat transferred: %1.2f kJ',Q);
+printf('\n')
+
+V2=(T2*V1)/T1;
+W=P1*100*(V2-V1);
+printf('The Value of Work done: %1.2f kJ',W);
+printf('\n')