The differential and algebraic equations based power system model is established for analyzing power system transient voltage security problem first; and the transient voltage security constrained optimal power flow model is then presented to solve the preventive control optimization problem. In this model, Transient voltage security constrains include two aspects of avoiding transient voltage instability and transient delayed voltage recovery. The objective function is the operation cost of the systems, and the control variables include active power output, reactive power output of generators, ratio of on-load tap changing transformers, and switching susceptance of shunt capacitors. Based on the trajectory sensitivity method, the approximate linear relationship between transient voltage security constrained functions and control variables is found, and then the optimisation model is transformed to static nonlinear programming model. The nonlinear primal-dual interior-point algorithm is used to get the solution of the optimisation model, which incorporates a quadratic penalty function to deal with discrete control variables of transformer ratio and shunt capacitor switching susceptance in the optimization process. Case studies using the IEEE 39-bus system validate the proposed optimisation model and algorithm.