In this paper, we investigate an optimal control problem (OCP) for three-dimensional (3D) unsteady partial differential equations with convection term (UPDECT), extensively applied to the solidification process of billets. Firstly, we introduce the mathematical model of OCP and adopt a life cycle model method (LCMM) to numerically solve the 3D UPDECT. Secondly, the Lipschitz continuity of the cost function gradient is proved using the adjoint approach as a numerical method for designing optimal control systems. The cost function gradient of OCP for 3D UPDECT is analyzed based on a Hamiltonian costate system. Thirdly, we propose a modified trinomial conjugate gradient method (MTCGM) to solve the OCP for 3D UPDECT and prove the global convergence of MTCGM. Finally, the MTCGM is applied to the experimental simulation of continuous casting. According to experiment results, the optimizer based on MTCGM can significantly accelerate the convergence speed and reduce the iterative numbers, and the MTCGM provides a more stable temperature control effect.