Combine the stock, carrot, celery, whole onion, beef, ham hock if you’re using it, bay leaf, and beans in a stockpot; bring to a boil, then cover partially and adjust the heat so the mixture simmers steadily. Cook until the meat and beans are very tender, at least 2 hours. Remove the bay leaf and vegetables and discard. Remove the beef and cool, then cut it into chunks.