In this paper a 3D-model for simulation and dynamic control of the continuous casting process is presented. The diffusion convection equation with multiphase transition is used as a simulation model. The developed model is discretized by finite element method and the algebraic equations are solved using pointwise relaxation method. Two different type of methods are used to control the secondary cooling, namely PID and optimal control method. The numerical results are presented and analyzed