summaryrefslogtreecommitdiff
path: root/1019/CH2/EX2.4/Example_2_4.sce
blob: 129a9631c976aebf45bc3aba8525122fd77d6b5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//Example 2.4
clear;
clc;

//Given
pH=7.4;//pH of the body fluid
v=3;//volume of gastric juice produced per day in dm^3
R=8.314;// gas constant in J K^-1 mol^-1
T=310;// temperature in K
ph=1;// pH of the gastric juice produced

// To determine minimum work required
c1=10^((-1)*pH);// hydrogen ion concentration of body fluid in mol dm^-3
c2=10^((-1)*ph);//hydrogen ion concentration of the gastric juice in mol dm^-3
n=c2*v;//moles of hydrogen ions in given volume of gastric juice
w=n*R*T* log(c2/c1);// w in joule
W=w*0.001;//w in kJ
mprintf('minimum work required (w) = %f kJ',W);
//end