Existence of weak solutions to the Ericksen‐Leslie model for a general class of free energies