Modeling of thin film solar cells: Uniform field approximation