The rapid development of electronic devices, solar collectors, heating elements, heat exchangers, drying and lubricant techniques, it pushes us to find an effective way to increase the efficiency of heat transfer effectively and to reach that effectiveness it became necessary to use the combined method (passive-active). Using nanofluid and porous medium is an active method while the wall modification with sinusoidal style is the passive method. Lots industrial applications that depend on its work of lid-driven cavity such as chemical etching, film coating, industrial drying process, industrial coating, short dwell coaters utilizing for the manufacturing of high quality photographic films and papers, roll coating, several color printings, polymer processing apparatus design, Bingham plastics flow, dryers and solar collectors. Free and forced convection of heat transfer from nanofluids such as CNT-water has many applications such as cooling processes in industries which motivated the researchers to work on this phenomena1. Furthermore, different ways and techniques such as magnetic field applying and porous media usage is used to improve or control the heat transfer amount in those applications1,2. Hamida and Hatami3 used the electrical field in their square light emitting diode modeling to improve the cooling process from microchannel filled by nanofluid. Ghasemi et al.4 and Hamzah et al.5 used the magnetic field to improve the heat transfer in the solar radiation application and immersed rotating cylinder, respectively. Behzadnia et al.6,7 modeled the super-critical nanofluid flow for improving the cooling process in reactors and Hatami8, and Hatami and Safari9 improved the nanofluid heat transfer from cavities by using heated fins and cylinders, respectively. Recently, Nakhchi et al.10 investigated the CuO-water heat transfer from heat exchanger using the novel perforated turbulators as external devices.

Many researchers tried to improve the heat transfer of nanofluids using new technologies. Shaker et al.11 used the non-uniform magnetic field for the mixed convection of open cavity and found maximum 57.07% Nu improvements by magnetic number. Wang et al.12 used the porous twisted tapes for heat transfer improvement of silica-water (SiO2–H2O) nanofluids in rounds and triangular tubes. Al-Farhany and Abdulsahib13 considered the mixed convection of nanofluid in porous medium over a rotating cylinder and found the higher Darcy number and clockwise rotation causes a maximum Nusselt number. Nong et al.14 used the control volume finite element (CVFE) method to study the Lorentz force effect on the free convection of a wavy cavity and concluded that nanoparticles shape insignificantly influences the average Nusselt number. Abbas et al.15 used magnetic field and Ag/Ni-water hybrid nanofluids to improve the heat transfer over a cylinder, analytically. Electrical field applying to the nanofluids heat trasnfer is another technique which recently is used by researchers such as Chen et al.16, numerically. They concluded that the electric field forces modify the velocity field and temperature.

Among the studies on the external fields, magnetic field is more used by researchers than an electric field due to its more effect on the nanoparticles. Recently, Aly et al.17 investigated the effect of magnetic field on the finned cavity, including a rotating rectangle and reported that mean rates of heat and mass transfer decreased by increasing the Hartmann number. Berrahil et al.18 applied the magnetic field on the Al2O3/water, natural convection in an annular enclosure and found that the rate of the average Nu number, decrement caused by the magnetic field, is greater as the radius ratio λ decreases. Mourad et al.19 used the uniform magnetic field for the thermal performance of a wavy cavity filled by Fe3O4-MWCNT hybrid nanofluid and confirmed that Nu improves by Darcy and porosity number, while it reduced by Ha number. Alsabery et al.20 used at the same time magnetic field and rotating cylinders in a wavy surface and stated that rotation of the cylinders can enhance the Nu number up to 315%. Also, Zhang and Zhang21 studied the effect of magnetic field direction on the heat transfer of Fe3O4-water nanofluid, numerically. They described that 8% increase in convective heat transfer is observed when the magnetic direction was perpendicular to the flow direction. Also, in another study, they22 confirmed that the convective heat transfer coefficient increases with the increase of alternating frequency for the magnetic field, experimentally. Not only the magnetic field is used for heat transfer of nanofluids in cavities23, but also porous media are considered as a wavy of heat transfer improvement as seen in the literature24. Sara et al.25 in this review study deals with natural convection in multi-shapes cavities and effective parameters such as magnetic field, nanoparticle, porosity, obstruction body and inclination angle of the cavity. Mohammad et al.26 the aim of this work focused an enhance heat transfer in the helical tube heat exchanger having non-Newtonian nanofluid taking into account the following factors such as cost, dimensions, and thermal system energy storage. The result shows that maximum performance can reduce to 28%. Hamid et al.27 in the current study, an inclusive review was made of the utilized of nanofluid in heat pipe thermosyphon. The execution of thermosyphon relies on many factors such as types of nanofluid and its concentration, using of surfactant and the amount of heat supplied. Also the study deals with of nanofluid thermosyphon implementation is systems of energy. Ahmed et al.28 in the current work a very valuable historical review that deals with nanofluids, types of nanomaterial, base fluid and surfactant. Application in different energy systems, advantage and disadvantage in a very detailed and accurate manner. Sara et al.29 the study deals with the influence of using sound waves of measuring viscosity of ethylene glycol with SiO2 nanofluid. Many factors were student like temperature, mass fraction, rate of shear and time of a sound wave and its effect on viscosity by two method step. Quyan et al.30,31,32,33 in this works, a numerical investigation was used to simulate heat transfer, fluid flow and entropy generation in three different channels, the first one is double pipe wavy wall heat exchanger, the second one is corrugated wall with triangular shape and the third is a microchannel injection from top wall. The working fluid, a novel admixture of FMWNT-water (Functionilized Multi-Walled Carbon Nano-Tubes) based water is exercised as the working fluid. The flow is subjected to magnetic strength with constant value. The results show that using magnetic flux with this type of nanofluid was effective in improving heat transfer and reducing the entropy generation. Masoud et al.34 during this search, controlling heat transfer by applying the magnetic field technique to the conductive electrical fluid (melting gallium) in circular enclosure was displayed. Many parameters are studied, magnetic field angle, Rayleigh number, magnetic strength and inner to outer radius ratio, The results indicated that increasing magnetic field angle, Rayleigh and radius ratio lead to increase the heat transfer Nusselt number. Ehsan et al.35 calculated the thermal conductivity and viscosity of FMWCN (Functionalized Multi-Walled Carbon Nanotubes) from experimental results and using this properties to simulate heat transfer and fluid flow of non-Newtonian fluid in circular pipe and constant heat flux. Results indicate that this type of nanoparticles was more convenient with great shear fluid rate. Liang et el.36 the aim of this study is to make a comparison between the common rectangular channel and corrugated one in the presence of discrete heat sources in the upper straight surface. The results display that when the discrete heat source near the peak of undulation surface has more effective than other cases.

Abanoub et al.37 in the recent current study, the problem of lid-driven of two dimensional incompressible flow using a finite difference technique. In this work, most of industrial applications in which it is possible to be noticed the phenomenon of mixed convection by lid-driven.

So, in this study, it is trying to do a complete study on the mixed convection heat transfer of nanofluids under the magnetic field in a porous medium which has a movable wavy wall with different boundary conditions, numerically. The study goes for the first time that dealing with lid-drive having wavy in shape and movement with presence of many factors such as CNT-nanomaterial, porous medium, heat generation, effect of magnetic field and its angle.

Mathematical description of the problem

The problem geometry is schematically explained in Fig. 1, it is two dimensional porous cavity of similar length and height equal to unity filled by CNT-nanofluid. CNT are non-Newtonian fluids, whose high viscosity obstructs convection and leads to acceptable heat transfer coefficient under mixed convection, despite their high thermal conductivity. The upper and lower boundaries are insulated where the straight right and wavy left walls are in cold and hot temperatures in two different cases. The right wall is wavy with a number of peaks (N) and amplitude (A), this wavy wall is moved to upward with the velocity of U = 1. A magnetic field which strength of B0 and angle of γ is applied to the cavity. Uniform heat generation (qʺ) was applied entire the cavity. The assumptions of this model are incompressible, steady state, laminar flow, homogenous isotropic porous medium, single phase nanofluid. The model of porous media is a Darcy Brinkman model. The parameters neglected are radiation effect and viscous dissipation. Under the above assumptions, the conservation of mass, and in the case of mixed convection, and also the conservation of momentum energy equations can be written as2:

$$ \nabla u = 0 $$
$$ \frac{{\rho_{nf} }}{{\varepsilon^{2} }}u.\nabla u = - \nabla p - \frac{{\mu_{nf} }}{K}u + \frac{{\mu_{nf} }}{\varepsilon }\nabla^{2} u + \rho_{nf} \beta_{nf} \left( {T - T_{0} } \right)g + J \times B^{*} $$
$$ u.\nabla T = \alpha_{eff,nf} \nabla^{2} T + \frac{{Q_{0} }}{{\left( {\rho C_{p} } \right)_{nf} }} $$
$$ \nabla^{2} \Omega = B^{*} .\nabla \times u $$
$$ J = \sigma_{nf} \left( { - \nabla \Omega + u \times B^{*} } \right) $$
Figure 1
figure 1

Mesh generation and different boundary conditions in two cases.

where (\(\nabla u\)) shows the velocity vector and K denotes the permeability of porous media, J is electrical current and B* refers to external magnetic field. Ω is the electric potential, and σnf is the electrical conductivity. More information on the parameters can be found in2. Chamkha et al.2 showed that the expressed equations are:

$$ \frac{\partial u}{{\partial x}} + \frac{\partial v}{{\partial y}} = 0 $$
$$ \frac{1}{{\varepsilon^{2} }}\left( {u\frac{\partial u}{{\partial x}} + v\frac{\partial u}{{\partial y}}} \right) = - \frac{1}{{\rho_{nf} }}\frac{\partial p}{{\partial x}} + \frac{{\upsilon_{nf} }}{\varepsilon }\left( {\frac{{\partial^{2} u}}{{\partial x^{2} }} + \frac{{\partial^{2} u}}{{\partial y^{2} }}} \right) - \frac{{\upsilon_{nf} }}{K}u + \frac{{\sigma_{nf} B_{0}^{2} }}{{\rho_{nf} }}\left( {v\sin \gamma \cos \gamma - u\sin^{2} \gamma } \right) $$
$$ \frac{1}{{\varepsilon^{2} }}\left( {u\frac{\partial v}{{\partial x}} + v\frac{\partial v}{{\partial y}}} \right) = - \frac{1}{{\rho_{nf} }}\frac{\partial p}{{\partial y}} + \frac{{\upsilon_{nf} }}{\varepsilon }\left( {\frac{{\partial^{2} v}}{{\partial x^{2} }} + \frac{{\partial^{2} v}}{{\partial y^{2} }}} \right) - \frac{{\upsilon_{nf} }}{K}v + \left( {\frac{{\left( {\rho \beta } \right)_{nf} }}{{\left( \rho \right)_{nf} }}} \right)g(T - T_{0} ) + \frac{{\sigma_{nf} B_{0}^{2} }}{{\rho_{nf} }}\left( {v\sin \gamma \cos \gamma - u\cos^{2} \gamma } \right) $$
$$ u\frac{\partial T}{{\partial x}} + v\frac{\partial T}{{\partial y}} = \alpha_{eff,nf} \left( {\frac{{\partial^{2} T}}{{\partial x^{2} }} + \frac{{\partial^{2} T}}{{\partial y^{2} }}} \right) + \frac{{Q_{0} }}{{\left( {\rho c_{p} } \right)_{nf} }}(T - T_{0} ) $$

Also, they showed that by considering the following non-dimentional parameters:

$$X, Y=\frac{x, y}{L}; U, V=\frac{(u, v)}{{V}_{o}}; \theta =\frac{(T-{T}_{o})}{\Delta T}; {T}_{o}=\frac{{T}_{h}-{T}_{c}}{2};Ri=\frac{Gr}{{Re}^{2}};Q=\frac{{Q}_{o}{L}^{2}}{{\left(\rho {c}_{p}\right)}_{f}};P=\frac{p}{{\rho }_{nf}{V}_{o}^{2}}; {S}_{l}={S}_{r}=\frac{S{\mu }_{f}}{L}$$

The non-dimentional form of governing equation will be in the form of:

$$ \frac{\partial U}{{\partial X}} + \frac{\partial V}{{\partial Y}} = 0 $$
$$ \frac{1}{{\varepsilon^{2} }}\left( {U\frac{\partial U}{{\partial X}} + V\frac{\partial U}{{\partial Y}}} \right) = - \frac{\partial P}{{\partial X}} + \frac{1}{{\varepsilon {\text{Re}} }}\frac{{\rho_{f} \mu_{nf} }}{{\rho_{nf} \mu_{f} }}\left( {\frac{{\partial^{2} U}}{{\partial X^{2} }} + \frac{{\partial^{2} U}}{{\partial Y^{2} }} - \frac{\varepsilon U}{{Da}}} \right) + \frac{{Ha^{2} }}{{\text{Re}}}\left( {\frac{{\rho_{f} }}{{\rho_{nf} }}} \right)\left( {\frac{{\sigma_{nf} }}{{\sigma_{f} }}} \right)\left( {V\sin \gamma \cos \gamma - U\sin^{2} \gamma } \right) $$
$$ \frac{1}{{\varepsilon^{2} }}\left( {U\frac{\partial V}{{\partial X}} + V\frac{\partial V}{{\partial Y}}} \right) = - \frac{\partial P}{{\partial Y}} + \frac{1}{{{\text{Re}} \varepsilon }}\frac{{\rho_{f} \mu_{nf} }}{{\rho_{nf} \mu_{f} }}\left( {\frac{{\partial^{2} V}}{{\partial X^{2} }} + \frac{{\partial^{2} V}}{{\partial Y^{2} }} - \frac{\varepsilon V}{{Da}}} \right) + \left( {\frac{{\left( {\rho \beta } \right)_{nf} }}{{\left( {\rho \beta } \right)_{f} }}} \right)Ri\theta + \frac{{Ha^{2} }}{{\text{Re}}}\left( {\frac{{\rho_{f} }}{{\rho_{nf} }}} \right)\left( {\frac{{\sigma_{nf} }}{{\sigma_{f} }}} \right)\left( {U\sin \gamma \cos \gamma - V\cos^{2} \gamma } \right) $$
$$ U\frac{\partial \theta }{{\partial X}} + V\frac{\partial \theta }{{\partial Y}} = \frac{1}{{\Pr {\text{Re}} }}\frac{{\alpha_{nf} }}{{\alpha_{f} }}\left( {\frac{{\partial^{2} \theta }}{{\partial X^{2} }} + \frac{{\partial^{2} \theta }}{{\partial Y^{2} }}} \right) + \frac{1}{{\Pr {\text{Re}} }}\frac{{\left( {\rho c_{p} } \right)_{f} }}{{\left( {\rho c_{p} } \right)_{nf} }}Q\theta $$


$$Pr=\frac{{\nu }_{f}}{{\alpha }_{eff.f}};\, Re=\frac{{V}_{o}L}{{\nu }_{f}};\, Gr=\frac{g{\beta }_{f}{L}^{3}\Delta T}{{\nu }_{f}^{2}};\, Ha={B}_{o}L\sqrt{\frac{\sigma_{f}}{\mu _{f}}};\, Da=\frac{K}{{L}^{2}};\, {\alpha }_{}=\frac{{k}_{}}{{\left(\rho {c}_{p}\right)}_{nf}};\, {\alpha }_{eff.f}=\frac{{k}_{eff.f}}{{\left(\rho {c}_{p}\right)}_{f}}$$

The local Nusselt number will be

$$ Nu_{s} = - \frac{{k_{eff,nf} }}{{k_{eff,f} }}\left( {\frac{\partial \theta }{{\partial Y}}} \right) $$

and the non-dimensional entropy generation, (S), can be written as2

$$ \begin{aligned} S & = s \cdot \frac{{H^{2} \cdot T_{0}^{2} }}{{k_{f} \left( {\Delta T} \right)^{2} }} = \left( {\frac{{k_{eff,nf} }}{{k_{eff,f} }}} \right)\left[ {\left( {\frac{\partial \theta }{{\partial X}}} \right)^{2} + \left( {\frac{\partial \theta }{{\partial Y}}} \right)^{2} } \right] \\& \quad + \Theta \cdot \left( {\frac{{\mu_{nf} }}{{\mu_{f} }}} \right) \cdot {\text{Re}}^{2} \cdot \Pr^{2} \left\{ {\frac{1}{Da}(U^{2} + V^{2} ) + 2\left[ {\left( {\frac{\partial U}{{\partial X}}} \right)^{2} + \left( {\frac{\partial V}{{\partial Y}}} \right)^{2} } \right] + \left( {\frac{\partial V}{{\partial X}} + \frac{\partial U}{{\partial Y}}} \right)^{2} } \right\} \\ & \quad + \Theta \cdot \left( {\frac{{\sigma_{nf} }}{{\sigma_{f} }}} \right) \cdot {\text{Ha}}^{2} \cdot {\text{Re}}^{2} \cdot \Pr^{2} \cdot (U\sin \Phi - V\cos \Phi )^{2} = S_{h} + S_{v} + S_{j} , \\ \end{aligned} $$

where Sh, Sv, and Sj are the dimensionless local entropy generation rate due to heat transfer, the fluid fraction, and the Joule heating, respectively. Θ is the irreversibility factor which represents the ratio of the viscous entropy generation to thermal entropy generation

$$ \Theta = \frac{{\mu_{f} T_{0} }}{{k_{f} }}\left( {\frac{{\alpha_{eff,f} }}{\Delta T.H}} \right)^{2} $$

The Bejan number, Be, defined as the ratio between the entropy generation due to heat transfer by the total entropy generation:

$$ Be = \frac{Sh}{S} $$

More details of defined parameters such as average Nusselt number, boundary conditions, and nanofluid properties in the governing equations can be found in2.

The density, heat capacity, thermal expansion, thermal diffusivity, thermal conductivity, viscosity and the electrical conductivity are explained by the following equations:

$${\rho }_{nf}=\left(1-\varphi \right){\rho }_{f}+\varphi {\rho }_{sp}$$
$${\left(\rho {c}_{p}\right)}_{nf}=\left(1-\varphi \right){\left(\rho {c}_{p}\right)}_{f}+\varphi {\left({\rho c}_{p}\right)}_{sp}$$
$${\left(\rho \beta \right)}_{nf}=\left(1-\varphi \right){\left(\rho \beta \right)}_{f}+\varphi {\left(\rho \beta \right)}_{sp}$$
$${\alpha }_{nf}=\frac{{k}_{nf}}{{\left(\rho {c}_{p}\right)}_{nf}}$$
$$\frac{{k}_{nf}}{{k}_{f}}=\frac{\left({k}_{sp}+2{k}_{f}\right)-2\varphi \left({k}_{f}-{k}_{sp}\right)}{\left({k}_{sp}+2{k}_{f}\right)+\varphi \left({k}_{f}-{k}_{sp}\right)}$$
$${k}_{eff, nf}=\varepsilon {k}_{nf}+\left(1-\varepsilon \right){k}_{sp}$$
$${k}_{eff, f}=\varepsilon {k}_{f}+\left(1-\varepsilon \right){k}_{sp}$$
$${\alpha }_{eff, nf}=\frac{{k}_{eff,nf}}{{\left(\rho {c}_{p}\right)}_{nf}}$$
$${\mu }_{nf}=\frac{{\mu }_{f}}{{\left(1-\varphi \right)}^{2.5}}$$
$$\frac{{\sigma }_{nf}}{{\sigma }_{f}}=1+\frac{3\left(\delta -1\right)\varphi }{\left(\delta +2\right)-\left(\delta -1\right)\varphi }$$

where \(\delta =\frac{{\sigma }_{nf}}{{\sigma }_{f}}\).

Numerical method

In this study, Galerkin weighted residual FEM (GFEM) is used for the explanation of the governing equations and the boundary conditions by the software package COMSOL Multiphysics 5.6 []. At the beginning, thus named Galerkin weighted residual is progressed by conquest appropriate grid number of elements ad a gradation of lattices is intended from the rough grid at G1. The next grid of next mesh is repeated for smooth grid G2 by rising number of elements as can noticed in Table 2. So, the full domain is divided into non-mapping elements \({\Omega }_{R}\), \(R\in N\) at every mesh grid. So as to realize the shape function on every element \({\Omega }_{R}\), a domestic sign coordinate system (ξ, η) is inserted. Here, the nanofluid considered single-phase and incompressible, by laminar flow (spf) module and the heat transfer in the media (ht) are used for the modeling of Eqs. (11)–(14) with nanofluid properties of Table 1. To model the magnetic field, the source terms of the governing equations have changed in the software in this demonstrating. Additionally, to state the stability of the solution, Galerkin least-squares method and P2-P1 Lagrange elements were used. In the present numerical solution, the convergence criteria are defined by the error estimation setting to \(\left| {M^{m + 1} - M^{m} } \right| \le 10^{ - 5}\), where m shows the iteration number during the solution and M refers to \((u,v,T,V)\) parameters as the general dependent variables.

Table 1 CNTs thermal properties1.

Results and discussion

As discussed above, in this manuscript the effect of mixed convection of CNT-water nanofluid in a wavy porous cavity is investigated under the magnetic field. As shown in Fig. 1, the wavy wall is moved by a unit velocity and two cases are considered for the temperature boundary layers. In case 1 the straight left hand side wall is at high temperature (Th) while the wavy right hand side is a low temperature (Tc). For Case 2, the Th and Tc temperatures are replaced as shown in Fig. 1. Table 1 shows the CNTs thermal properties obtained from1. To reach a grid independence study, Table 2 is studied for different grid numbers. Five different grid numbers are tested and results of an average Nusselt number, time of the solution and ψmin were presented. As seen, G5 and G6 elements have excellent results which are more close to each other, but G5 due to lower time of solution can be chosen as the suitable grind number for this study. To have a validation study, the results of the present numerical method are compared with those of Chamkha et al.2 in a square cavity as shown in Fig. 2a,b. As seen, the current results have excellent agreement with those of Chamkha et al.2 for Isotherms, Streamlines, Entropy generations and Bejan numbers contours. In the next steps, effects of different parameters which are presented by their values in Table 3, are investigated on the results. Richardson (Ri), Darcy (Da), Hartmann angle (γ), Amplitude (A), Number of peaks (N), Volume fraction (φ), Heat generation factor (λ), Hartmann number (Ha) and Reynolds number (Re) are the considered parameters in this study. Following the results of the two cases are presented.

Table 2 Grid independent test average Nusselt number on hot surface at (Re = 200, Ri = 10, Da = 1e−3 λ = 5, φ = 0.04, Ha = 20, γ = 45, A = 0.15, N = 3).
Figure 2
figure 2

(a) Comparison of the present study with Re = 100, Pr = 6.2, Ri = 1, φ = 0.05, Ha = 10, γ = 45, Da = 1e−3, Q = 1.B = 0.8, D = 0.5. (b) Comparison of the present study with Re = 100, Pr = 6.2, Ri = 1, φ = 0.05, Ha = 10, γ = 45, Da = 1e−3, Q = 1.B = 0.2, D = 0.5.

Table 3 Parameters under study.

Case 1

Figure 3 demonstrates the effect of Da and Ri on the streamlines and isotherms at (Re = 100, λ = 5, φ = 0.02, Ha = 25, γ = 45, A = 0.1, N = 3). As seen, lower Darcy numbers have more uniform temperature and streamlines. Also, for greater Richardson numbers, the flow patterns are more complicated due to natural convection effects in greater numbers, but isotherm lines of the larger Ri numbers are uniform since the forced convection in this condition has minor effect. Figure 4 shows the effect of geometry parameters of wavy wall (A and N) on the streamlines and temperature values when Da = 1e−3, Re = 100, λ = 5, φ = 0.03, Ha = 25, γ = 45, Ri = 10 and Fig. 5 demonstrates the same contour for a greater Re number equal to 200. As seen, Nuave for the case of square cavity is 12.668 while for all wavy wall its value is increased. It is evident that by increasing the both A and N, the surface of heat transfer is increased and consequently Nu improved in these situations. Table 4 compares these values for better perception on these figures. Tables 5 and 6 compares the results of an average Nusselt number by increasing the Ri and Da numbers at different geometries of wavy wall through changing the A and N parameters. As seen, by increasing the Ri, Nu number is increased significantly due to the natural convection effect, also increasing the Darcy number, improves the Nu number due to more porosity effect on the heat transfer. Figure 6 shows the local Nusselt number of heated wall at different parameters. As seen the maximum local Nusselt numbers occurs for the cases with Ri = 100 and D = 0.1, 0.01 which confirms the discussed issues. Entropy analysis of these cases is presented through Fig. 7 and Table 7 by presenting the different terms of entropy generations and Bejan numbers. To find the effect of nanoparticle volume fraction, Fig. 8 is depicted to see the difference between the two cases. As seen for a greater nanoparticle volume fraction two vortexes are presented in the streamlines which affects the heat transfer as seen in Table 8 and Fig. 9. As seen, increasing the φ has not a significant effect on Nu numbers, but at greater Ri numbers, it reduced the Nu values. Also, Fig. 9 shows the effect of Re, inclined angle and generation parameter in the local Nusselt number. It is observable the Re, γ improves the Nu by their increment, but greater Nu numbers occurs for λ = − 5 compared to λ = 0, 5. Figure 10 investigates the effect of Reynolds number on the streamlines, isotherms and entropy generation parameters.

Figure 3
figure 3

Streamlines and isotherms at (Re = 100, λ = 5, φ = 0.02, Ha = 25, γ = 45, A = 0.1, N = 3) for Case 1.

Figure 4
figure 4

Streamlines and isotherms at (Da = 1e−3, Re = 100, λ = 5, φ = 0.03, Ha = 25, γ = 45, Ri = 10) for Case 1.

Figure 5
figure 5

Streamlines and isotherms at (Da = 1e−3, Re = 200, λ = 5, φ = 0.03, Ha = 25, γ = 45, Ri = 10) for Case 1.

Table 4 Effect of N and A on the average Nusselt number for Case 1.
Table 5 Effect of Ri, Da and N on the average Nusselt number for Case 1.
Table 6 Effect of Ri, Da and A on the average Nusselt number for Case 1.
Figure 6
figure 6

Local Nu number at different Da, Ri and A parameters for Case 1.

Figure 7
figure 7

Bejan number and Sgen at different Da and Ri numbers when Re = 100, λ = 5, φ = 0.02, Ha = 20, γ = 45, A = 0.1, N = 3 for case 1.

Table 7 Effect of Ri, Da and A on the entropy parameters for Case 1.
Figure 8
figure 8

Streamlines an isotherms (Red line at φ = 0.06, green line at φ = 0) when Re = 100, Da = 1e−2, λ = 5, A = 0.15, Ha = 25, γ = 45) for Case 1.

Table 8 Effect of Ri, ϕ and λ on the average Nusselt number for Case 1.
Figure 9
figure 9

Local Nusselt number for different parameters as variable for Case 1.

Figure 10
figure 10

Isotherm, streamlines, Bejan number and Sgen at different Re numbers when Da = 1e−2, A = 0.15, Ha = 20, γ = 45, Ri = 100, γ = 45, φ = 0.03, λ = 5, N = 3 for Case 1.

Case 2

By changing the Th and Tc positions, case 2 results are obtained and presented here. Table 9 shows the effect of geometry parameters on the average Nusselt number. As seen in this case, all wavy walls have smaller Nu than the square cavity with Nu = 5.7461, and increasing the A and N reduces the Nu number, significantly. Table 10 confirms that in the second case the treatment of Ri and Da increment is the same of Case 1 and improve the Nu number. Figure 11 shows the isotherms and streamlines of second case which is depicted at different Da and Ri numbers. Greater Richardson number causes more uniform isothemlines due to natural convection, while smaller values have more turbulent lines due to more forced convection in heat transfer. Figures 12 and 13 is presented to find the effect of amplitude and number of peaks of wavy wall on the temperatures and streamlines. Table 11 is presented to show the entropy analysis of second case and Table 12 shows the effect of the different nanoparticle volume fraction on the Nu number which have the same treatment of Case 1. Figure 14 is depicted based on the entropy analysis and Bejan number and Sgen numbers are presented at different Ri and Da numbers. Finally, the effect of Ri and Da numbers on the local Nu numbers over the wavy wall is depicted in Fig. 15 for case 2. As seen the greatest values of Nu is related to cases with Da = 0.1 or Ri = 100. To have a comparison between the two tested cases, Tables 13, 14, 15 and 16 are presented. Table 13 compared them at different Ri and λ numbers which confirm the same treatments, but greater values are observed for the Case 1. Table 14 says that increasing the Hartmann number has a negative effect on heat transfer and reduce the Nu values. For the effect of the inclined angle of the magnetic field, Table 15 approves that at low Ri numbers (< 1) increasing the inclined angle, decreases the Nu numbers, but at larger Ri numbers (> 1) it improves the Nu numbers. About the Reynolds number, Table 16 demonstrates that Re number increment can improve the heat transfer of both cases, significantly.

Table 9 Effect of N and A on the average Nusselt number for Case 2.
Table 10 Effect of Ri, Da and A on the average Nusselt number for Case 2.
Figure 11
figure 11

Streamlines and isotherms at (Re = 200, Q = 3, φ = 0.02, Ha = 20, γ = 45, A = 0.1) for Case 2.

Figure 12
figure 12

Streamlines and isotherms at (Da = 1e−3, Re = 200, Q = 0, φ = 0.03, Ha = 25, γ = 45, Ri = 10) for Case 2.

Figure 13
figure 13

Streamlines and isotherms at (Da = 1e−3, Re = 200, λ = 5, φ = 0.03, Ha = 25, γ = 45, Ri = 10) for Case 2.

Table 11 Effect of Ri, Da on the entropy parameters for Case 2.
Table 12 Effect of Ri and ϕ on the average Nu for Case 2.
Figure 14
figure 14

Bejan and Sgen numbers when Re = 200, Q = 3, φ = 0.02, Ha = 20, γ = 45, A = 0.1 for Case 2.

Figure 15
figure 15

Local Nu numbers along sinusoidal wall at different Ri and Da numbers for Case 2.

Table 13 Comparsion of average Nu for Case 1 and Case 2 at different Ri and λ.
Table 14 Comparison of average Nu for Case 1 and Case 2 at different Ri and Ha.
Table 15 Comparison of average Nu for Case 1 and Case 2 at different Ri and γ.
Table 16 Comparison of average Nu for Case 1 and Case 2 at different Ri and Re.


In this paper, GFEM was used for modeling the CNT-water nanofluids in a wavy porous cavity with movable and different boundary conditions under the magnetic field. Richardson (Ri), Darcy (Da), Hartmann angle (γ), Amplitude (A), Number of peaks (N), Volume fraction (φ), Heat generation factor (λ), Hartmann number (Ha) and Reynolds number (Re) effects were studied on the results of entropy generation and Nu numbers. Results indicated that by increasing the Ri, Nu number is increased significantly due to the natural convection effect, also increasing the Darcy number, improves the Nu number due to more porosity effect on the heat transfer. The presence of the wavy wall increases the Nusselt number, thus it reinforces heat transfer, this reinforcement, increasing with the increase of both number of undulation and its amplitude. Also, greatest values of Nu are occurring for the case with Da = 0.1 or Ri = 100.