See: Mixed formulation: Solution data length inconsistent with the mesh -> impossible to visualise - #2 by dokken and I would suggest reading: Mixed finite element problems — FEniCS Workshop