In recent years, digital human model is increasingly applied to simulation-based product design. Safely manual operation often requires avoiding collision with obstacles in the workspace. How to detect possible collisions and predict viable work posture to avoid obstacles will be an important tool for computer-aided ergonomics and optimization of system design in the early stage of a design process. In this paper, an optimization-based method is presented to predict work posture in presence of obstacles. In order to predict realistic and safe work posture, we consider the discomfort level of human performance measure as the optimization goal, and we address the problem by incorporating sparse nonlinear optimizer (SNOPT) toolkit, which is suitable for large-scale constrained optimization. Firstly, we describe the digital human model in Jack. Secondly, we define the variables and constraints for this constrained optimization problem, introduce an approximate approach to test whether collision constraints violates, and give the formulation of the problem. Finally, we adopt the optimization model to predict posture, which minimizes the discomfort level function with the subject to collision-free constraints. Unlike the existing methods to predict work posture of upper limbs, our method mainly focuses on realistic and collision-free posture, and we develop an optimization model to address the problem. Our simulation results indicate that the proposed method is feasible for predicting obstacle avoidance posture.