diff options
Diffstat (limited to '1652/CH14/EX14.7/14_7.sce')
-rwxr-xr-x | 1652/CH14/EX14.7/14_7.sce | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/1652/CH14/EX14.7/14_7.sce b/1652/CH14/EX14.7/14_7.sce new file mode 100755 index 000000000..220b10f3c --- /dev/null +++ b/1652/CH14/EX14.7/14_7.sce @@ -0,0 +1,32 @@ +clc
+//Initialization of variables
+c=1*10^-6 //m
+K=1.754*10^-5 //m
+Kp=1.008*10^-14 //m^2
+//calculations
+mH=c
+//Iteration 1
+mOH=Kp/mH
+mA=mH-mOH
+mHA=mH*mA/K
+mH2=mH-mHA+mOH
+//Iteration 2
+mOH2=Kp/mH2
+mA2=mH2-mOH2
+mHA2=mH2*mA2/K
+mH3=mH2-mHA2+mOH2
+//From x2
+x2=sqrt(Kp)
+x1=c
+mOH3=Kp/x2
+y2=x1
+//From x1
+mOH4=Kp/c
+mA4=mH-mOH4
+mHA4=mH*mA4/K
+y1=c-mHA4-mA4
+//upon further iterations, we get
+mHplus=mH3
+//results
+printf("Concentration of H plus ions = %.2e m",mHplus)
+//The answer is a bit different due to rounding off error.
|