Abstract:By referring to the single- and dual-fluid heat exchanger models integrated in the commercial software STAR-CCM+, a porous-media-based heat exchanger model grounded in the Darcy–Forchheimer theory has been developed in this work. Equivalent algorithms were implemented within the OpenFOAM open-source framework as follows: (1) a temperature equation module incorporating heat exchanger source terms was introduced into the simpleFOAM solver; (2) a single-fluid heat exchanger algorithm was realized, wherein the phase change of hot-side steam was approximated using a segmented reference temperature field; (3) a dual-fluid heat exchanger algorithm was implemented, employing a mapping-coupling framework constructed from multiple mesh sets. A dedicated solver for thermal-fluid temperature calculation and a boundary-value update script were designed to facilitate the coupled solution of the two fluids based on total heat exchange power. Validation was conducted for two vehicle models under multiple operating conditions. Results indicate that the heat exchanger algorithm enables stable computation and achieves accuracy comparable to that of STAR-CCM+: the maximum mean temperature errors at the cold-fluid inlet/outlet sections were 0.72% and 0.64% for the two vehicle models, respectively, while those for the hot-fluid inlet/outlet sections were 0.50% and 0.16%, respectively. This algorithm enhances OpenFOAM’s capabilities in automotive heat exchanger simulation, providing an open-source alternative for full-vehicle thermal system analysis.