summaryrefslogtreecommitdiff
path: root/629/CH2/EX2.2/example2_2.sce
diff options
context:
space:
mode:
Diffstat (limited to '629/CH2/EX2.2/example2_2.sce')
-rw-r--r--629/CH2/EX2.2/example2_2.sce21
1 files changed, 21 insertions, 0 deletions
diff --git a/629/CH2/EX2.2/example2_2.sce b/629/CH2/EX2.2/example2_2.sce
new file mode 100644
index 000000000..961a4bf37
--- /dev/null
+++ b/629/CH2/EX2.2/example2_2.sce
@@ -0,0 +1,21 @@
+clear
+clc
+//Example 2.2 CALCULATING VISCOSITY OF LIQUID AS A FUNCTION OF TEMPERATURE
+T1=20+273; //[K]
+T2=40+273; //[K]
+mu1=10^-3; //[N.s/m^2]
+mu2=6.53*10^-4; //[N.s/m^2]
+
+//ln(mu)=ln(C)+b/T
+A=[1 1/T1;1 1/T2]
+B=[log(mu1);log(mu2)]
+//Az=B, z=[log(C);b]
+z=inv(A)*B
+C=exp(z(1))
+b=z(2) //[K]
+
+//At T=30°C,
+T=30+273; //[K]
+//Viscosity
+mu=C*exp(b/T)*10^4 //in 10^-4 N.s/m^2
+printf("\n The viscosity of water at 30°C = %.2f*10^(-4) N.s/m^2. \n",mu)