Effect of viscosity and density gradients on turbulent channel flows