The temperature dependence of the viscosity of a gas can be
The temperature dependence of the viscosity of a gas can be expressed with the Sutherland equation mu = bT^3/2/T + s where mu is the viscosity, T is the absolute temperature, and b and s are empirical constants. Given mu(T) data, values of b and s can be obtained from a least-square fit to T^3/2/mu = T/b + s/b Use the following data to find values of b and s for air. (You may write it as a script file instead of a function file.)
Solution
T = [0 20 40 60 80 100 127 177 227];
mu = [1.720*exp(-5) 1.817*exp(-5) 1.911*exp(-5) 2.002*exp(-5) 2.091*exp(-5) 2.177*exp(-5) 2.294*exp(-5) 2.493*exp(-5) 2.701*exp(-5)];
fun = @(x) (T.^1.5)/mu - T/x(1) + x(2)/x(1);
b0 = 1.0;
s0 = 1.0;
[b, s] = lsqnonlin(fun, [b0, s0], -Inf, Inf, options);
disp(b);
disp(s);
