Heat transfer model is the basis for control and optimization of continuous casting of steel.In this paper, a three dimensional (3D) real-time heat transfer model has been presented for continuous casting blooms, especially for the initial and final casting stages. To be real-time, an algorithm based on inheritable variable non-uniform grid and variable time steps has been developed, accelerating the 3D heat transfer model by 110~200 times. Meanwhile, the discrete parameters including grid and time step have been optimized, and the influence of central processing units (CPUs) and programming languages has also been studied. Then the relative calculation time, which is the ratio of calculation time to physical time, has been reduced to 0.62 while numerical errors are within 0.74%. Further, to reduce the uncertainty of the model, the machine-dependent parameters appearing in the thermo-physical properties and the boundary conditions have been calibrated with measurements of surface temperature by thermometer and shell-thickness by nail-shooting, then the corresponding optimization problem of minimizing the errors between calculation and measurements has been solved by particle swarm optimization algorithm. After calibration, the model's uncertainty has been obviously reduced. Finally, the calibrated model has been verified by online surface temperature measurement and it shows good agreement as the errors between calculation and measurements are less than ±10℃.