Modeling flux pinning in thin undoped and BaZrO3-doped YBCO films