summaryrefslogtreecommitdiff
path: root/172/CH4/EX4.1/ex1.sce
diff options
context:
space:
mode:
Diffstat (limited to '172/CH4/EX4.1/ex1.sce')
-rwxr-xr-x172/CH4/EX4.1/ex1.sce16
1 files changed, 16 insertions, 0 deletions
diff --git a/172/CH4/EX4.1/ex1.sce b/172/CH4/EX4.1/ex1.sce
new file mode 100755
index 000000000..70ebd2285
--- /dev/null
+++ b/172/CH4/EX4.1/ex1.sce
@@ -0,0 +1,16 @@
+//example 1
+//work done during different processes
+clear
+clc
+P1=200 //initial pressure inside cylinder in kPa
+V2=0.1 //in m^3
+V1=0.04 //initial volume of gas in m^3
+W1=P1*(V2-V1) //work done in isobaric process in kJ
+printf("\n hence,the work done during the isobaric process is W1 = %.3f kJ. \n",W1)
+W2=P1*V1*log(V2/V1) //work done in isothermal process in kJ
+printf("\n hence,the work done in isothermal process is W2 = %.3f kJ. \n",W2)
+P2=P1*(V1/V2)^(1.3) //final pressure according to the given process
+W3=(P2*V2-P1*V1)/(1-1.3)
+printf("\n hence,the work done during the described process is W3 = %.3f kJ. \n",W3)
+W4=0 //work done in isovolumic process
+printf("\n hence,the work done in the isovolumic process is W4 = %.3f kJ. \n",W4) \ No newline at end of file