Porous materials, characterized by the presence of interconnected pores, exhibit the properties different from their bulk counterparts. One of properties of interest is that the pores can influence the martensitic transformation in shape memory alloys (SMAs), which directly affects the material's shape memory effect and mechanical properties. The martensitic transformation is accompanied by the formation of different martensitic variants, which determine the overall morphology, distribution, and self-accommodation effect of the transformed regions. Previous experimental studies have shown that the presence of pores, particularly at the metal-air interface, can significantly affect the martensitic variant structure, leading to its thinning. This thinning effect has been found to be able to improve the damping performance of the alloy. Experimental observations have indicated that no relief of martensitic variants was found around the metal-air interface, but non-transformed regions were observed. These observations suggest that the metal-air interface in porous materials is not a free surface and plays a crucial role in influencing the martensitic transformation. To further investigate the effect of martensitic variant self-accommodation on different constrained interfaces in porous materials, a three-dimensional phase-field model based on the time dependent Ginzburg-Landau (TDGL) function is proposed in this study. The phase-field model can give a comprehensive understanding of the evolution of martensitic variants and their interaction with the constrained interfaces. Remarkably, the simulation results accord well with the experimental findings, demonstrating the presence of fine martensitic variants near the metal-air interface. The simulations under different interface constraint conditions reveal that increasing the specific surface area of porous materials is an effective strategy to obtain a more refined martensitic variant structure. The system’s total energy is minimized by reducing the strain energy, which leads to the formation of a greater number of fine martensitic variants. This finding suggests that controlling the specific surface area of porous materials can be a promising approach to tailoring the mechanical properties of SMAs for specific applications. In conclusion, the presence of metal-air interface in porous material significantly influences the evolution of the martensitic transformation in SMA. Experimental observations show that the introduction of pore can modify the martensitic variant structure, resulting in improved damping performance. The proposed phase-field model successfully captures the behavior of martensitic variants near constrained interface. The simulation results emphasize the importance of specific surface area in obtaining fine martensitic variant structures. These findings contribute to a more in-depth understanding of the role of porous materials in shaping the properties of SMAs and provide a valuable insight into their design and application in various fields.