Determining density, viscosity, concentration or composition