Abstract This study presents a novel numerical investigation of double-diffusive convection in an S-shaped porous cavity filled with Nano-Encapsulated Phase Change Material (NEPCM), subjected to localized thermal and solutal sources under magnetic field influence. A distinctive contribution of this work lies in the integration of geometric variations (length and height of heat/mass sources), time-dependent phase transition analysis, and magnetohydrodynamic effects, combined with XGBoost-based artificial intelligence modeling for predictive analytics. The framework uniquely couples double-diffusive NEPCM transport with localized thermal/solutal actuation and inclined-field MHD in an S-shaped porous cavity, and augments high-fidelity ISPH with an XGBoost surrogate for fast prediction and sensitivity; unlike tri-hybrid nanofluid studies, the focus is NEPCM and its coupled physics. The results demonstrate that increasing the source length from L = 0.2 to L = 1.4 enhances thermal penetration and melting zones, leading to a 62.5 % rise in heat capacity ratio ( Cr ). Additionally, increasing the vertical height H from 0.5 to 1.2 expands the phase-change region by approximately 58 %. Reducing the Darcy number from 10 −2 to 10 −5 suppresses convective circulation, decreasing the peak velocity by over 85 %, while increasing the Soret number from 0.1 to 2.0 enhances solutal gradients and convective transport by 74 %. Moreover, increasing the Hartmann number from 0 to 50 dampens convection intensity by approximately 60 %, reflecting magnetic suppression. AI-based predictions using XGBoost yielded an accurate estimate of the average Nusselt (Nu avg ) and Sherwood (Sh avg ) numbers, closely matching simulation results. These findings provide critical insights for optimizing NEPCM thermal storage systems in magnetically actuated porous domains. Using ±10 % one at a time elasticities and a global variance-based design (500 LHS samples with an XGBoost surrogate and SHAP interpretation), total-order Sobol indices confirm a consistent ranking: Da ≳ Ra ≈ Ha > L > H > Sr for both Nu avg and Sh avg .
Alhejaili et al. (Thu,) studied this question.