Fluid Properties & Viscosity | Fluid Mechanics with Python | Skill-Lync Resources

50% OFF - Ends Soon!

Lesson 2 of 13 25 min

Fluid Properties & Viscosity

Why does honey pour slowly while water gushes? Why does a pump need more power on a cold morning? The answer is viscosity — the property that measures a fluid's internal resistance to flow. Understanding viscosity and related properties is essential for everything from lubricating an engine to designing a pipeline.

In this lesson, we'll quantify viscosity, model how it changes with temperature, and explore surface tension, vapor pressure, and compressibility.

Newton's Law of Viscosity

Imagine fluid sheared between two plates: the bottom plate is fixed and the top moves at velocity $U$. Because of the no-slip condition, the fluid velocity varies linearly from $0$ at the bottom to $U$ at the top. The shear stress required to maintain this motion is:

Sponsored

Gaurav Jadhav is now a CAE Engineer

Practical projects and mock interviews made the difference

See His Journey

$$\tau = \mu \frac{du}{dy}$$

Where:

  • $\tau$ = shear stress (Pa)
  • $\mu$ = dynamic (absolute) viscosity (Pa·s)
  • $du/dy$ = velocity gradient or shear rate (1/s)

This linear relationship defines a Newtonian fluid.

Sponsored

Ranjith switched from IT to core automotive industry

His inspiring career transition story with video

See His Journey

Dynamic vs Kinematic Viscosity

Kinematic viscosity is dynamic viscosity divided by density:

$$\nu = \frac{\mu}{\rho}$$

It has units of m²/s and represents the ratio of momentum diffusion to inertia.

Fluid (20°C)$\mu$ (Pa·s)$\nu$ (m²/s)
Air$1.81\times10^{-5}$$1.51\times10^{-5}$
Water$1.00\times10^{-3}$$1.00\times10^{-6}$
SAE 30 oil$0.29$$3.25\times10^{-4}$
Glycerin$1.49$$1.18\times10^{-3}$
Honey$\approx 10$$\approx 7\times10^{-3}$

Newtonian vs Non-Newtonian Fluids

For Newtonian fluids, viscosity is constant — the stress vs shear-rate line is straight through the origin. Many real fluids deviate:

Sponsored

175+ hours of industry projects & 12 IIT faculty sessions

Master CATIA, NX, LS-DYNA, HyperMesh and more

View Full Curriculum
TypeBehaviorExamples
Newtonian$\tau \propto \dot\gamma$ (constant $\mu$)Water, air, oil
Shear-thinning (pseudoplastic)$\mu$ decreases with shear ratePaint, blood, ketchup
Shear-thickening (dilatant)$\mu$ increases with shear rateCornstarch-water, wet sand
Bingham plasticNo flow until a yield stress $\tau_0$Toothpaste, drilling mud

A common model is the power law: $\tau = K\dot\gamma^{\,n}$, where $n<1$ is shear-thinning, $n=1$ is Newtonian, and $n>1$ is shear-thickening. A Bingham plastic follows $\tau = \tau_0 + \mu_p\dot\gamma$ once $\tau > \tau_0$.

Plotting Couette Flow Velocity Profile and Shear Stress

import numpy as np
import matplotlib.pyplot as plt

# Couette flow: fluid between a fixed bottom plate and a top plate
# moving at velocity U. Gap height h.
mu = 1.0e-3       # water dynamic viscosity (Pa.s)
U = 2.0           # top plate velocity (m/s)
h = 0.005         # gap (m)

y = np.linspace(0, h, 100)
u = U * y / h                 # linear velocity profile
tau = mu * (U / h)            # constant shear stress

print(f"Velocity gradient du/dy = {U/h:.1f} 1/s")
print(f"Shear stress tau = {tau:.4f} Pa")

fig, ax = plt.subplots(1, 2, figsize=(11, 5))
ax[0].plot(u, y * 1000, 'b-', linewidth=2)
ax[0].set_xlabel('Velocity u (m/s)')
ax[0].set_ylabel('Height y (mm)')
ax[0].set_title('Couette Flow Velocity Profile')
ax[0].grid(True, alpha=0.3)

ax[1].axvline(tau, color='r', linewidth=2)
ax[1].set_xlabel('Shear stress tau (Pa)')
ax[1].set_ylabel('Height y (mm)')
ax[1].set_title('Shear Stress (constant across gap)')
ax[1].set_ylim(0, h * 1000)
ax[1].grid(True, alpha=0.3)
plt.tight_layout()
plt.show()
Output:
Velocity gradient du/dy = 400.0 1/s
Shear stress tau = 0.4000 Pa
🎯 3,000+ Engineers Placed
Sponsored
Harshal Sukenkar

Harshal

Fiat Chrysler

Abhishek

Abhishek

TATA ELXSI

Srinithin

Srinithin

Xitadel

Ranjith

Ranjith

Core Automotive

Gaurav Jadhav

Gaurav

Automotive Company

Bino K Biju

Bino

Design Firm

Aseem Shrivastava

Aseem

EV Company

Puneet

Puneet

Automotive Company

Vishal Kumar

Vishal

EV Startup

Temperature Dependence of Viscosity

Viscosity changes strongly with temperature — and in opposite directions for liquids and gases:

  • Liquids: viscosity decreases as temperature rises (molecules move past each other more easily).
  • Gases: viscosity increases as temperature rises (more molecular momentum exchange).

For gases, Sutherland's law gives an accurate fit:

$$\mu = \mu_{ref}\left(\frac{T}{T_{ref}}\right)^{3/2}\frac{T_{ref}+S}{T+S}$$

For air, $\mu_{ref} = 1.716\times10^{-5}$ Pa·s at $T_{ref}=273.15$ K and $S=110.4$ K.

Viscosity vs Temperature Plot

import numpy as np
import matplotlib.pyplot as plt

# Sutherland's law for air
mu_ref = 1.716e-5   # Pa.s
T_ref = 273.15      # K
S = 110.4           # K

def sutherland(T):
    return mu_ref * (T / T_ref)**1.5 * (T_ref + S) / (T + S)

T = np.linspace(250, 1000, 200)
mu_air = sutherland(T)

# Sample values
for Tc in [0, 20, 100, 500]:
    Tk = Tc + 273.15
    print(f"Air at {Tc:3d} C: mu = {sutherland(Tk)*1e5:.3f} x10^-5 Pa.s")

plt.figure(figsize=(8, 5))
plt.plot(T - 273.15, mu_air * 1e5, 'r-', linewidth=2)
plt.xlabel('Temperature (C)')
plt.ylabel('Dynamic viscosity (x10^-5 Pa.s)')
plt.title("Air Viscosity vs Temperature (Sutherland's Law)")
plt.grid(True, alpha=0.3)
plt.show()
Output:
Air at   0 C: mu = 1.716 x10^-5 Pa.s
Air at  20 C: mu = 1.813 x10^-5 Pa.s
Air at 100 C: mu = 2.174 x10^-5 Pa.s
Air at 500 C: mu = 3.574 x10^-5 Pa.s

For accurate liquid and gas properties at any state, the CoolProp library is ideal: PropsSI('V', 'T', 293, 'P', 101325, 'Water') returns water's viscosity directly.

Surface Tension and Capillary Rise

Surface tension ($\sigma$, units N/m) arises from unbalanced cohesive forces at a liquid's surface. It causes droplets to bead up and liquids to rise or fall in narrow tubes. For water at 20°C, $\sigma = 0.0728$ N/m.

The capillary rise in a circular tube of radius $r$ is:

$$h = \frac{2\sigma\cos\theta}{\rho g r}$$

Where $\theta$ is the contact angle ($\approx 0°$ for water on clean glass).

Capillary Rise Calculation

import numpy as np

sigma = 0.0728     # surface tension of water (N/m)
theta = 0.0        # contact angle (rad) for water-glass
rho = 998.0        # kg/m^3
g = 9.81           # m/s^2

for d_mm in [0.5, 1.0, 2.0, 5.0]:
    r = (d_mm / 1000) / 2          # tube radius (m)
    h = 2 * sigma * np.cos(theta) / (rho * g * r)
    print(f"Tube diameter {d_mm:.1f} mm -> capillary rise = {h*1000:6.2f} mm")
Output:
Tube diameter 0.5 mm -> capillary rise =  59.55 mm
Tube diameter 1.0 mm -> capillary rise =  29.77 mm
Tube diameter 2.0 mm -> capillary rise =  14.89 mm
Tube diameter 5.0 mm -> capillary rise =   5.95 mm

The rise is inversely proportional to tube diameter — that's why capillary effects dominate in tiny tubes but vanish in large pipes.

Vapor Pressure and Cavitation

Vapor pressure ($p_v$) is the pressure at which a liquid boils at a given temperature. For water at 20°C, $p_v \approx 2.34$ kPa. When local pressure in a flowing liquid drops below $p_v$ — such as on the suction side of a pump or the back of a propeller blade — the liquid vaporizes, forming bubbles that collapse violently. This is cavitation, and it causes noise, vibration, and surface erosion.
# Check for cavitation risk at a pump inlet
p_local = 2.0e3    # local absolute pressure (Pa)
p_vapor = 2.34e3   # water vapor pressure at 20 C (Pa)

if p_local <= p_vapor:
    print(f"CAVITATION RISK: p_local ({p_local/1e3:.2f} kPa) "
          f"<= p_vapor ({p_vapor/1e3:.2f} kPa)")
else:
    print("No cavitation: local pressure above vapor pressure")
Output:
CAVITATION RISK: p_local (2.00 kPa) <= p_vapor (2.34 kPa)

Bulk Modulus and Compressibility

The bulk modulus $K$ measures resistance to compression:

$$K = -V\frac{dp}{dV} = \rho\frac{dp}{d\rho}$$

For water, $K \approx 2.2$ GPa — enormous, which is why liquids are usually treated as incompressible. The speed of sound follows $a = \sqrt{K/\rho}$.

import numpy as np

K = 2.2e9      # bulk modulus of water (Pa)
rho = 998.0    # kg/m^3

a = np.sqrt(K / rho)
print(f"Speed of sound in water: {a:.1f} m/s")

# Fractional volume change under 10 MPa pressure rise
dp = 10e6
dV_over_V = -dp / K
print(f"Volume change at 10 MPa: {dV_over_V*100:.3f} %")
Output:
Speed of sound in water: 1484.9 m/s
Volume change at 10 MPa: -0.455 %

Even a 10 MPa pressure rise compresses water by less than half a percent — confirming the incompressible assumption for most liquid flows.

Common Pitfalls

  • Confusing $\mu$ and $\nu$. Dynamic viscosity is Pa·s; kinematic is m²/s. The Reynolds number uses $\nu$ (or $\mu/\rho$), not $\mu$ alone.
  • Using liquid temperature trends for gases. Heating a liquid lowers its viscosity; heating a gas raises it.
  • Ignoring units in old data. Viscosity is often tabulated in poise (1 P = 0.1 Pa·s) or centipoise (1 cP = $10^{-3}$ Pa·s).
  • Forgetting cavitation uses absolute pressure. Compare local absolute pressure to vapor pressure, never gauge.

Key Takeaways

  • Newton's law of viscosity: $\tau = \mu\,du/dy$ defines Newtonian fluids.
  • Kinematic viscosity $\nu = \mu/\rho$ controls momentum diffusion and appears in the Reynolds number.
  • Non-Newtonian fluids (shear-thinning, shear-thickening, Bingham) have variable or yield-dependent viscosity.
  • Sutherland's law models gas viscosity vs temperature; liquids trend the opposite way.
  • Surface tension, vapor pressure/cavitation, and bulk modulus complete the property picture for design.

In the next lesson, we'll apply these properties to fluids at rest — hydrostatics and buoyancy.

3,000+ Engineers Placed in Top Companies
Career Growth

3,000+ Engineers Placed in Top Companies

Join the ranks of successful engineers at Bosch, Tata, L&T, and 500+ hiring partners.