%0 Journal Article %T An Algorithm based on Predicting the Interface in Phase Change Materials %J International Journal of Engineering %I Materials and Energy Research Center %Z 1025-2495 %A Jadidi, A. M %A Jadidi, M %D 2018 %\ 05/01/2018 %V 31 %N 5 %P 799-804 %! An Algorithm based on Predicting the Interface in Phase Change Materials %K Phase change material %K numerical simulation %K finite difference %K Stephan Problem %R %X Phase change materials are substances that absorb and release thermal energy during the process of melting and freezing. This characteristic makes phase change material (PCM)  a favourite choice to integrate it in buildings. Stephan problem including melting and solidification in PMC materials is an practical problem in many engineering processes. The position of the moving boundary, its velocity and the temperature distribution within the domain are important for these applications. Well known numerical techniques have difficulties with time-dependent boundary conditions. Therefore, fine mesh and small time steps are needed to obtain accurate solutions. There are two main approaches to solve the Stefan problem: front-tacking and variable grid method. The most existing methods are not applicable to all situations and they cannot be easily implemeted in two-dimensional or three-dimensional geometries and all boundary conditions. In this paper, we proposed an algorithm to solve one-dimensional Stefan problem in all kind of boundary condition; also it can be easily extended for 2D and 3D Stephan problems using finite difference method. For validation, the results are compared with exact solution of constant boundary condition. Afterward, periodic boundary condition is considered. The results showed significant relationship between numerical and exact solution, and the maximum error was approximately  0.4%. %U https://www.ije.ir/article_73182_86cc7158cf32c0bd8aa0a140e4483dd9.pdf