summaryrefslogtreecommitdiff
path: root/914/CH2/EX2.12/ex2_12.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /914/CH2/EX2.12/ex2_12.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '914/CH2/EX2.12/ex2_12.sce')
-rwxr-xr-x914/CH2/EX2.12/ex2_12.sce28
1 files changed, 28 insertions, 0 deletions
diff --git a/914/CH2/EX2.12/ex2_12.sce b/914/CH2/EX2.12/ex2_12.sce
new file mode 100755
index 000000000..015b49623
--- /dev/null
+++ b/914/CH2/EX2.12/ex2_12.sce
@@ -0,0 +1,28 @@
+clc;
+warning('off');
+printf("\n\n example2.12 - pg52");
+// given
+T=53+273.15; //[K] - temperature
+mu1=1.91*10^-5;
+mu2=2.10*10^-5;
+T1=313.15; //[K] - temperature
+T2=347.15; //[K] - temperature
+// for air
+// using linear interpolation of the values in table 2.2
+function b=f(a)
+ b=log(mu1/a)/log(T1);
+endfunction
+function y=g(a)
+ y=log(mu2)-log(a)-f(a)*log(T2);
+endfunction
+a1=10^-7;
+A=fsolve(a1,g);
+B=f(A);
+// using the formula ln(mu)=lnA+Bln(t)
+mu=%e^(log(A)+B*log(T))*10^3; //[cP]
+printf("\n\n the viscosity of air at %fdegC is %fcP",T-273.15,mu);
+// similarly for water
+BdivR=1646;
+A=3.336*10^-8;
+mu=A*%e^(BdivR/T)*10^5 //[cP]
+printf("\n\n the viscosity of water at %fdegC is %fcP",T-273.15,mu); \ No newline at end of file