summaryrefslogtreecommitdiff
path: root/1019/CH5/EX5.1/Example_5_1.sce
blob: 1730cf5107663b52ec7e46bb4387ad350df7ea19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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