Determining a density, viscosity, composition or concentration