From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 914/CH2/EX2.12/ex2_12.sce | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 914/CH2/EX2.12/ex2_12.sce (limited to '914/CH2/EX2.12') 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 -- cgit