summaryrefslogtreecommitdiff
path: root/1019/CH5/EX5.1/Example_5_1.sce
diff options
context:
space:
mode:
Diffstat (limited to '1019/CH5/EX5.1/Example_5_1.sce')
-rw-r--r--1019/CH5/EX5.1/Example_5_1.sce15
1 files changed, 15 insertions, 0 deletions
diff --git a/1019/CH5/EX5.1/Example_5_1.sce b/1019/CH5/EX5.1/Example_5_1.sce
new file mode 100644
index 000000000..1730cf510
--- /dev/null
+++ b/1019/CH5/EX5.1/Example_5_1.sce
@@ -0,0 +1,15 @@
+//Example 5.1
+clear;
+clc;
+
+//Given
+n=4;//moles of gas
+P1=2.02;//initial pressure in 10^5 N m^-2
+P2=4.04;//final pressure in 10^5 N m^-2
+R=8.314;//gas constant in J K^-1 mol^-1
+T=300//temperature in K
+
+//To determine the free energy change delG
+delG=n*R*T*log(P2/P1);//the free energy change in J
+mprintf('Free energy change = %f J',delG);
+//end \ No newline at end of file