Ocean thermal energy is a type of renewable energy. The phase change process of the thermal glider propelled by ocean thermal energy was numerically and experimentally investigated in this paper. The gliding process was analyzed and optimized while the glider was operating in the ocean thermocline near the equator. The results showed that the time of a cycle decreases by 30% and the gliding depth decreases by 40% after optimization. The gliding process was also analyzed when the PCMs were partly melted with the volumetric expansion rate at 50%, 60%, 70%, 80% and 90% of the total value. With the decreasing of the volumetric expansion rate, the depth and the duration of a cycle decrease significantly, but the output work does not decrease obviously. It is helpful to reduce the manufacturing cost and prolong the duration of the glider. In addition, it can improve the energy harvest efficiency from the ocean thermocline. The vehicle's gliding process can be further investigated in different ocean thermoclines based on the numerical model presented in this paper, which can provide helpful information for optimal design of the thermal glider.