Porous materials, characterized by the presence of interconnected pores, have been found to exhibit unique properties that differ from their bulk counterparts. One area of interest is the influence of pores on 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 impact the martensitic variant structure, leading to its thinning. This thinning effect has been found to enhance the damping performance of the alloy. Experimental observations have indicated that there is no relief of martensitic variants around the metal-air interface, and there is non-transformed regions present. 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 allows for a comprehensive understanding of the evolution of martensitic variants and their interaction with the constrained interfaces. Remarkably, the simulation results align 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 tailor the mechanical properties of SMAs for specific applications. In conclusion, the presence of metal-air interface in porous materials significantly influences the evolution of the martensitic transformation in SMAs. Experimental observations have shown 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 interfaces. The simulation results emphasize the importance of specific surface area in obtaining fine martensitic variant structures. These findings contribute to a deeper understanding of the role of porous materials in shaping the properties of SMAs and provide valuable insights for their design and application in various fields.