1. Introduction
Natural convection in enclosures filled with nanofluids and subjected to magnetic fields has attracted significant attention for its applications in advanced thermal systems. The study in [
1] laid foundational insights by examining MHD natural convection and entropy generation in a ferrofluid-filled trapezoidal cavity using the Buongiorno model and Galerkin FEM, emphasizing the roles of Hartmann and Darcy numbers in suppressing convective flow. Building on this, Zhang et al. [
2] explored transient ferrofluid behavior in porous cavities, highlighting the sensitivity of velocity profiles to Rayleigh, Darcy, and Hartmann numbers. A similar direction was pursued in [
3], where a non-Darcy porous semi-annular cavity was analyzed for entropy production and flow instabilities using CVFEM. The role of Brownian motion and thermophoresis in nanoparticle transport under magnetic fields was further addressed in [
4], which showed enhanced performance due to field-induced diffusion mechanisms.
Nanofluid behavior in closed square enclosures with internal hot and cold tubes was detailed in [
5], revealing how geometry and Rayleigh number transition heat transfer from conduction to convection. Studies such as [
6,
7] incorporated cavity inclination and multiple heat-generating elements, demonstrating how geometry and tilt modulate flow strength and thermal distribution in nanofluid systems. In [
8], triangular heated cylinders embedded in lid-driven cavities were found to significantly influence convective heat transfer, with the Richardson number and nanoparticle volume fraction playing crucial roles. The use of wavy geometries, central obstacles, and entropy analysis was introduced in [
9], where Brinkmann–Forchheimer modeling captured the complex interplay between Ha, Ra, and porosity on heat transfer. Similarly, Nadeem et al. [
10] studied corrugated circular enclosures, concluding that corrugation and nanoparticle loading increase heat transport but only up to an optimal point. This idea was echoed in [
11,
12], where nanoparticle concentration and cavity wall undulations were shown to affect Nusselt number and entropy production, particularly in wavy and crown-shaped enclosures.
More complex interactions were explored in [
13,
14], integrating MHD, internal heat sources, and wall undulations. They emphasized that internal heating configurations and geometric features, such as wave amplitude, significantly alter flow regimes. Hybrid nanofluids were introduced in [
15,
16], where composite nanoparticles enhanced heat transfer in trapezoidal and circular cavities more than mono-nanofluids, especially under strong magnetic suppression. These observations were validated by studies such as [
17,
18], which revealed that inner cylinder placement and layered porous structures further modulate performance. Geometric optimization was a key theme in [
19,
20], where wavy circular heaters and varying obstacle sizes inside enclosures influenced entropy and heat transport behavior. Hybrid nanofluids again demonstrated dominance in [
21,
22], particularly in hexagonal and trapezoidal domains. In contrast, the placement of heated blocks or walls proved critical in [
23,
24]. Modified cavity shapes, such as the tooth-shaped and diamond configurations in [
25,
26], were shown to intensify convective zones and optimize local thermal gradients.
The interplay of complex geometries, non-Newtonian fluids, and MHD damping was further dissected in [
27] through Casson fluid modeling in wavy trapezoidal domains, supporting the need for multidimensional optimization seen in [
28]. Theoretical grounding for nanofluid thermophysical behavior was provided in [
29], which emphasized the limitations of classical models and proposed improvements that incorporate Brownian motion and thermophoresis. Entropy-focused analysis was revisited in [
30], where grooved cavities with magnetic damping showcased the trade-off between heat transfer and irreversibility. Bottom sinusoidal heating and inclined magnetic fields studied in [
31] echoed the benefits of hybrid nanofluids under complex boundary conditions. Unsteady flow dynamics and time-varying entropy generation in trapezoidal cavities were tackled in [
32], highlighting the need for transient modeling.
Temperature-dependent thermophysical properties were shown to improve model realism in [
33], especially in cavities with Al
2O
3 nanofluids. Meanwhile, rotating cylinders in corrugated trapezoidal cavities using hybrid nanofluids were analyzed in [
34], which validated enhancements resulting from nanoparticle design and boundary manipulation. Additional studies like [
10,
11] emphasized the role of Darcy and Hartmann numbers in modulating flow under corrugated and crown-shaped cavities. Sensitivity and optimization analysis using statistical methods were presented in [
35], which investigated hybrid nanofluids in star-obstacle-driven cavities. Internal heater configurations and magnetic dipole interactions were central to [
36], reinforcing the importance of heat source placement in optimizing Nusselt numbers. Wavy wall cavities with diamond-shaped obstacles were revisited in [
37], confirming their thermal enhancement through undulation and the sizing of obstacles. Fractal geometries and combined heat/mass transfer under MHD influence were introduced in [
38], showing how internal complexity enhances performance. Meanwhile, [
39] explored internal heat-generating cylinders of varying geometries, revealing that shape and proximity to walls critically affect heat transport.
Conjugate heat transfer under local thermal non-equilibrium (LTNE) conditions was investigated in [
40], where the interactions between rotating cylinders and porous media were analyzed. Hybrid nanofluids and rotating bodies under MHD in zigzag cavities were examined in [
41], showing that rotation and structural design enhance heat transfer while reducing entropy. Structural alterations such as base inclination and corrugation in MHD systems were found in [
42] to fine-tune heat and entropy performance. Radiative effects in high-temperature MHD nanofluid systems were the focus of [
43], revealing their importance in optically active enclosures. Corrugated internal structures within circular cavities were explored in [
44], where FEM modeling captured flow disturbances that enhanced thermal mixing. In [
45], it was demonstrated that fin configurations in hybrid nanofluid-filled open cavities can offset MHD damping through radiation-driven enhancements. The combined effects of magnetic fields and wavy-wall geometry significantly altered entropy generation and heat transfer behavior in a Cu–Al
2O
3/water-filled H-wavy enclosure, as demonstrated in [
46]. Lastly, Entropy generation under MHD effects was analyzed for a chamber containing heat-generating liquid and solid elements, demonstrating how Joule heating significantly influences irreversibility and thermal transport [
47].
Despite the extensive investigations across diverse geometries, nanofluid types, and magnetic field applications, a clear research gap remains in comprehensively analyzing the combined influence of nanofluid type, magnetic field strength, Rayleigh number, and nanoparticle volume fraction within a wavy trapezoidal cavity featuring internally heated square obstacles. Most prior studies have focused on isolated factors or simpler geometries, often overlooking the thermodynamic and ecological implications of entropy generation and ECOP under such compounded conditions. This study addresses that gap by conducting a detailed performance evaluation of Cu–H2O, Al2O3–H2O, and Fe3O4–H2O nanofluids subjected to MHD natural convection within a complex cavity structure. The novelty lies in the integrated assessment of flow dynamics, heat transfer, entropy generation, and ecological performance within a geometrically irregular domain under varying magnetic intensities and nanoparticle concentrations. Such a configuration closely mimics real-world thermal management systems, providing practical insights for applications like electronic cooling, solar thermal systems, and energy-efficient enclosures.
2. Materials and Methods
The physical model consists of a two-dimensional wavy trapezoidal cavity filled with nanofluid and subjected to natural convection under the influence of a horizontal magnetic field. The cavity features two identical, centrally located square-shaped internal heated blocks, serving as volumetric heat sources. The cavity geometry includes a wavy top wall defined by the sinusoidal equation y = H + asin(2πfx/Lt), where a = 0.045L is the wave amplitude and f = 9.5 is the wave frequency.
The left and right sidewalls are slanted at an angle
γ = 20°, while the bottom boundary is inclined at an angle
λ = 30°. Three nanofluids, Cu–H
2O, Fe
3O
4–H
2O, and Al
2O
3–H
2O, are investigated, and their configurations within the cavity are illustrated in
Figure 1.
Appropriate thermal and flow boundary conditions are imposed on all cavity walls and solid surfaces. The top wavy wall and the vertical sidewalls are maintained at a constant cold temperature
Tc, providing isothermal conditions that enhance surface heat exchange. The inclined bottom wall is thermally insulated, ensuring no heat loss. The internal heated blocks generate uniform volumetric heat, modeled as constant heat flux
q =
Q = const. All solid-fluid interfaces satisfy the no-slip condition, enforcing zero velocity at the walls. A uniform horizontal magnetic field
B =
B0 î is applied across the domain, introducing Lorentz forces and modeled using the Hartmann number (Ha). Gravitational acceleration acts vertically, driving buoyancy-induced flow from the heated blocks toward the cold boundaries. The boundary conditions applied to each surface are summarized in
Table 1.
The nanofluids’ effective thermophysical properties are evaluated based on established mixture models that consider the base fluid (water) and nanoparticles (Cu, Fe
3O
4, Al
2O
3) at a reference temperature of 300 K. These properties include mass density, specific heat, thermal conductivity, thermal expansion coefficient, electrical conductivity, and dynamic viscosity, as detailed in
Table 2. The nanoparticle volume fraction
φ is varied across 0.00, 0.02, and 0.04 to assess its impact on thermodynamic and flow behavior. The nanofluid model incorporates thermal dispersion, electrical conductivity enhancement, and viscosity variations using established correlations for each constituent.
Table 1.
Geometric, thermal, and magnetic boundary conditions.
Table 1.
Geometric, thermal, and magnetic boundary conditions.
| Boundary Element | Label/Equation | Type | Mathematical Condition | Physical Description |
|---|
| Top Wavy Wall | y = H + asin(2πfx/Lt) | Isothermal (Cold) | T = Tc | Wavy top maintained at constant cold temperature; enhances surface area and mixing. |
| Bottom Inclined Wall | Inclined at angle λ | Thermally insulated (Adiabatic) | ∂T/∂n = 0 | The Bottom wall is thermally insulated, which prevents heat loss. |
| Left & Right Walls | Slanted at angle γ | Isothermal (Cold) | T = Tc | Left and Right walls are maintained at a constant cold temperature, which enhances surface area and mixing. |
Internal Shaped Blocks | R = R0 + Acos(Nθ) | Heat Generation (Solid) | q = Q = const | Internal heat sources embedded in nanofluid; modeled with volumetric heat generation. |
| All Solid Surfaces | Cavity and block boundaries | No-slip Velocity | u = 0, v = 0 | Viscous boundary layers form due to fluid-solid interaction. |
| Entire Fluid Domain | Volume enclosed by walls and blocks | Magnetic Field (MHD) | B = B0 î | Uniform horizontal magnetic field introduces Lorentz force; quantified via Hartmann number. |
| Gravity | ↓ | Buoyancy-driven flow | Acts in y direction | Drives natural convection from heated blocks to cold boundaries. |
Table 2.
Thermo-physical properties of Water, Cu, Fe
3O
4, and Al
2O
3 at
Tm = 300 K [
19,
24,
36].
Table 2.
Thermo-physical properties of Water, Cu, Fe
3O
4, and Al
2O
3 at
Tm = 300 K [
19,
24,
36].
| Name of Property | Symbol | Unit | Water | Cu | Fe3O4 | Al2O3 |
|---|
| Mass Density | ρ | Kg·m−3 | 996.6 | 8933 | 5200 | 3970 |
| Specific Heat at Constant Pressure | Cp | J·kg−1·K−1 | 4179.2 | 385 | 670 | 752 |
| Thermal Conductivity | k | W·m−1·K−1 | 0.6102 | 401 | 6 | 36.6 |
| Volumetric Thermal Expansion Coefficient | β | K−1 | 26.6 × 10−5 | 49.9 × 10−6 | 1.18 × 10−5 | 0.85 × 10−5 |
| Electrical Conductivity | σ | S·m−1 | 0.05 | 59.6 × 10−6 | 25,000 | 35 × 10−6 |
| Dynamic viscosity | μ | kg·m−1·s−1 | 8.538 × 10−4 | - | - | - |
The problem is governed by the continuity, Navier–Stokes momentum, and energy equations, applied to both the fluid and solid domains, along with an entropy generation equation that captures effects from both heat transfer and viscous dissipation. These equations are non-dimensionalized using appropriate scaling parameters, introducing key dimensionless numbers such as the Rayleigh (
Ra), Prandtl (
Pr), and Hartmann (
Ha) numbers, as well as output metrics like the average Nusselt number (
Nu), entropy generation (
ST), and ecological coefficient of performance (
ECOP). The full set of governing equations is detailed in Equations (1) to (26) [
19,
24,
36].
Here,
u and
v denote velocity components in the
x- and
y-directions, respectively, and
p and
T represent pressure and temperature, respectively. The fluid properties are mass density (
ρ), thermal conductivity (
k), specific heat at constant pressure (
Cp), volumetric thermal expansion coefficient (
β), and electrical conductivity (
σ).
The local entropy generation due to heat transfer (
) in solid and fluid domains, volumetric entropy production due to viscous flow dissipation (
), and external magnetic effects (
) can be described using the following formulas:
To get the non-dimensional governing equations, the following scales are used:
The thermal behavior of the chamber under different operating conditions is assessed by analyzing the average Nusselt number (
Nu) of the heated strips and the average fluid temperature (
Θav) inside the domain. The definitions of these quantities are as follows:
Here,
A represents the non-dimensional surface area of the fluid domain,
X and
Y are the dimensionless Cartesian coordinates,
U and
V indicate dimensionless velocity components, and
P and Θ are the non-dimensional pressure and temperature of the nanofluid, respectively. Equation (22) is formulated by integrating the local Nusselt number over the active heated surfaces of the internal square blocks located symmetrically within the cavity, where constant heat flux is applied. The average Nusselt number captures the net thermal transport from these blocks into the surrounding nanofluid. Similarly, the domain-averaged temperature is calculated as a surface integral over the fluid region, representing the overall thermal response of the system.
The total entropy generation, expressed as a dimensionless quantity, can be obtained using the following expression:
where
A represents the surface area of the computational domain.
The problem is solved using the finite element method (FEM), which efficiently handles the complex geometry, nonlinear coupled equations, and boundary conditions to provide accurate predictions of thermal and flow fields.
3. Numerical Validation
The accuracy of the present numerical model was validated by comparing its results with two established benchmarks. The first validation, shown in
Figure 2a, aligns well with the isotherm contours from Abdelmalek et al. [
19], while the second, shown in
Figure 2b, confirms streamline agreement with the study by Tasnim et al. [
47], demonstrating strong consistency in both thermal and flow behavior.
Figure 2a displays isotherm contours at
Ra = 10
4 that closely match those from the reference study, while
Table 3 confirms that the Nusselt number deviation across all
Ra values remains below 1.5%, validating the accuracy of the present numerical model.
Figure 2b compares the streamlines at
Ra = 10
4 and
Ha = 0 between the present study and Tasnim et al. [
47], both incorporating a heat-generating block, and reveals strong agreement in vortex structure and flow symmetry—validating the accuracy and robustness of the present numerical model.
A grid sensitivity analysis was performed to ensure numerical stability and mesh independence of the finite element results. The computational mesh was refined in the vicinity of the wavy top wall and along the solid–fluid interfaces of the internal obstacles to accurately capture the steep temperature and velocity gradients.
Figure 3a–c illustrates the mesh distribution for various grid densities: Finer, Extra Fine, and Extremely Fine. The refinement pattern clearly demonstrates increased mesh resolution around heated obstacles and along the wavy boundaries, ensuring higher numerical precision in regions with strong convective flow and thermal variations.
The quantitative comparison of mesh effects is summarized in
Table 4, which lists the Nusselt number (Nu) for different mesh types at
Pr = 5.856,
Ra = 10
6,
φ = 0.02,
Ha = 0, and
λ = 45°. As the number of elements increases from 17210 (Fine) to 47733 (Extremely Fine), the variation in
Nu becomes negligible, with only a 0.0013% deviation between the two finest grids. This confirms that the Extra Fine mesh (39587 elements) is sufficient for achieving mesh independence while maintaining computational efficiency.
The grid sensitivity trend is further illustrated in
Figure 4, where the Nusselt number increases slightly with mesh refinement and then stabilizes, confirming convergence. The near-horizontal slope at higher element counts validates that additional refinement has an insignificant impact on the solution, indicating strong numerical stability.
For future research, a broader range of nanofluid combinations, non-uniform magnetic fields, or transient flow scenarios can be explored. Experimental validation of entropy generation patterns and real-time thermal imaging may further bridge the gap between simulations and real-world applications. Additionally, the insights gained from this study can be applied to industrial applications, such as cooling high-density electronic devices, enhancing heat exchanger performance, and improving solar collector performance.
5. Conclusions
This study numerically analyzed MHD natural convection in a wavy trapezoidal cavity with a centrally heated square obstacle using Cu–H2O, Fe3O4–H2O, and Al2O3–H2O nanofluids. Key parameters investigated include Rayleigh number (Ra = 103–106), Hartmann number (Ha = 0–50), and nanoparticle volume fraction (φ = 0.00, 0.02, 0.04), focusing on their impact on average Nusselt number, Entropy generation (ST), and Ecological Coefficient of Performance (ECOP). Results showed that increasing Ra enhanced the average Nusselt number by up to 680% across all nanofluids, while higher Ha reduced heat transfer efficiency due to magnetic damping. Among the nanofluids, Cu–H2O achieved the highest Nusselt number and ECOP, improving heat transfer by approximately 14.7% over Fe3O4–H2O and 20.3% over Al2O3–H2O at Ra = 106 and φ = 0.04. In contrast, Fe3O4–H2O performed better under high Ha due to its superior magnetic responsiveness. Entropy generation was reduced by over 30% when φ increased from 0.00 to 0.04, particularly in Fe3O4–H2O, indicating improved thermodynamic efficiency. These findings highlight the synergistic influence of nanoparticle type, magnetic fields, and cavity design on thermal and ecological performance. Future work may extend to hybrid nanofluids, transient conditions, rotating blocks, and porous structures, along with experimental validation to support these simulations.