Abstract. For the control and adjustment of the infiltration quality of the magnesium alloy liquid in porous perform, the coupling effect of temperature and pressure should be considered simultaneously. The thermodynamic characteristics of the local region can be adjusted by changing the boundary temperature of the porous performs. In this study, the mathematical model of the flow and heat transfer process of magnesium alloy liquid in carbon fiber perform was established. The numerical solution of the partial differential equation system is developed. The effects of the constant heating temperature and the linear heating temperature on the infiltration characteristics of the porous perform are investigated. The results showed that the linear non-isothermal heating condition could change the flow characteristics of the magnesium alloy liquid close to the inner wall of the porous perform. The fluid velocity along the flow direction tended to be average in the region close to the heating wall. Imposing temperature gradient on porous media was an effective way to regulate and control the infiltration quality. The numerical predictions were compared with the experiment data, and good agreement had been found between them. In addition, the numerical models could be developed to predict the appearance of defects in the end product and to study the evolution of the deformation of fibrous preform during metal infiltration.