summaryrefslogtreecommitdiff
path: root/3856/CH5/EX5.1/Ex5_1.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3856/CH5/EX5.1/Ex5_1.sce
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '3856/CH5/EX5.1/Ex5_1.sce')
-rw-r--r--3856/CH5/EX5.1/Ex5_1.sce25
1 files changed, 25 insertions, 0 deletions
diff --git a/3856/CH5/EX5.1/Ex5_1.sce b/3856/CH5/EX5.1/Ex5_1.sce
new file mode 100644
index 000000000..60dd2ed74
--- /dev/null
+++ b/3856/CH5/EX5.1/Ex5_1.sce
@@ -0,0 +1,25 @@
+//Calculate the Entropy change when Ideal gas are expand to Isothermaly ,Estimate the probability that the gas will contract spontaneously from the final volume to initial volume
+
+//Example 5.1
+
+clc;
+
+clear;
+
+n=2; //Number of moles of gas in mol
+
+R=8.314; //Gas consant in J K^-1 mol^-1
+
+V2=2.4; //final volume of the gas in L
+
+V1=1.5; //initial volume of the gas in L
+
+delS=n*R*log(V2/V1); //Entropy change in J K^-1
+
+printf("Entropy change = %.1f J K^-1",delS);
+
+Kb=1.381*10^-23; //Boltzman's constant in J K^-1
+
+r=exp(-delS/Kb); //probability for spontaneous contraction=W1/W2 (Probability for spontaneous contraction is zero butit must be with the aid of external force)
+
+printf("\nProbability for spontaneous contraction = %.0f",r);