On the platform of general chemical process simulation software(it was named Optimization Engineer, OPEN), a general optimization algorithm for chemical process simulation is developed using C++ code. The algorithm is based on Sequential Quadratic Programming (SQP). We adopt the activity set algorithm and the rotation axis algorithm to generate the activity set to solve the quadratic programming sub-problem. The active set method can simplify the number of constraints and speed up the calculation. At the same time, we used limited memory BFGS algorithm (L-BFGS) to simplify the solution of second derivative matrix. The special matrix storage mode of L-BFGS algorithm can save the storage space and speed up the computing efficiency. We use exact penalty function and traditional step-size rule in the algorithm. These two methods can ensure the convergence of the algorithm, a more correct search direction and suitable search step. The example shows that the advanced optimization function can meet the requirements of General Chemical Process Calculation. The number of iterations can reduce by about 6.0% . The computation time can reduce by about 6.5% . We combined this algorithm with chemical simulation technology to develop the optimization function of chemical engineering simulation. This optimization function can play an important role in the process optimization calculation aiming at energy saving and green production.