Scientists have claimed to have solved the mystery of why coffee never tastes as good as it smells.