Unwanted heat is produce during the electrical and mechanical processes, whereas, its control and minimization is necessary for the durability of all such devices. Heat transport is important in many devices of practical uses; therefore, heat transfer in multiple engineering disciplines is of great interest. The practical applications of heat flow in solar collectors, heaters devices it is the first priority of engineers and physicists to develop accurate models of heat transfer with proper physically and mathematically tenable conditions. Therefore, this field is thoroughly investigated in many research papers [1,2,3,4]. Converging and diverging channels have many applications in industry especially to increase the efficiency of devices in order to increase/decrease heat transfer. The design of such channels is extensively used in the physical problems and it is known fact that the heat transfer increase with the increase of surface area per volume. The boundary layers are merged with each other and specially mixing zones are formed in the flow region to enhance and sensitize the heat transfer coefficient. Researchers produce a lot of new research work on the basis of physical models of practical interest and establish valid results for simulated problems. Mendes and Sparrow [5] analyzed the diffusion of heat in flow inside a converging and diverging tubes they specified the entrance and developing regions. Note that, the heat transfer coefficient, the pressure rise (drop) and friction factor are grown effectively in multiple taper angles. Garg and Maji [6] found the proper numerical configuration for the flow inside the converging and diverging channel, however, it is a most suitable method for calculating the heat transfer in such cases. Amon and Mikic [7] explored numerical solutions for heat transfer in interrupted channels and they demonstrated the behavior of non-steady state self-sustained oscillating flow. Fluid flow and heat transport inside a channel of wavy walls is examined in Wang and Vanka [8] and they concluded that heat flow is changed significantly with the small changes in pressure drop. The experimented investigation of turbulent flow in a rectangular channel containing the built-in wing type vortex generators are found in [14], and they claimed that heat transfer caused vortices in this flow. Dejond and Jacobi [9] evaluated mass transfer at interrupted plate arrays with the help of experiment and they conclude that the mass transfer is much higher than the expected values. The converging and diverging channel are widely manipulated as finned surfaces in Caliskan and Baskaya [10] and Kotcioglu et al. [11]. Heat transfer in converging and diverging channels is first investigated theoretically and experimentally in Yilmaz [12]. They proved that flow (which is perpendicular to steam direction), increases heat transfer in a channel of parallel plates. They provided experimental data, which shows that heat transfer enhances with improving of Reynolds number. The literature is rich enough about the utilization of periodic boundary condition in fluid flow and heat transfer analysis [12,13,14]. The models of converging (diverging) channels are also provide a background for automobile radiators, PV collectors, gas–gas heat exchangers, liquid–liquid plate heat exchangers, etc. The numerical study of communicating converging (diverging) channel is given in Yilmaz and Erdinç [12].

Two-dimensional radial flow in an infinite converging (diverging) channel produced by linear source (sink) is studied in [15, 16]. More accurate results of such flow are provided see Rosenhead [17], Millsaps and Pohlhausen [18]. Researchers found more properties of these flow models while analyzing the Jeffery-Hammel model and they provided asymptotic solution in the form of series. Moreover, approximate analytical solutions for the flow inside the symmetrical channels are evaluated in Fraenkel [19] and he assumed that the channel is composed of slightly curved walls. Later on, Drazin [20] investigated the instability of flows maintained inside the converging (diverging) channel. He found that the mass flux is increased steadily along the channel. The temporal instability of Jeffery-Hammel flow is also analyzed in Hamadchi et al. [21]. Details of both experimental and theoretical studies of such model can be found in Dennis et al. [22]. They assumed flow between solid boundaries in polar coordinates (\(r,\theta )\) and the fluid motion is maintained via a source or sink at origin where the walls of a channel are situated at \(\theta = \pm a\). The past models are strictly presented in polar coordinates and concerned with purely radial flows. The idea of radial flows given in [23] is commonly propagated in literature, whereas, they formulate and present well-known converging/diverging flow problems. The investigation of flow in converging/diverging channel/tube is further elaborated, however, consequences of other physical effects are studied on flow characteristic in Rehman et al. [24]. Ramesh and Devakar [25] used different methods to explore flow behavior in such channels. A common approach is used in all these research papers, however, it is strictly based on utilization of similarity transformation, which converts the equation of motion into ODE’s. Viscous flow in a converging/diverging channel is studied in Turkyilmazoglu [26], moreover, he analyzed Jeffery-Hammel flows for stretching (shrinking) walls of the channel. Heat transfer inside converging/diverging channel of stretching (shrinking) walls is examined in the presence of viscous dissipation effects. The problem of fluid flow and heat transfer in converging channel is studied by Turkyilmazoglu [27]. He gives exact (closed form) multiple solutions to the momentum and energy equation associated with momentum and thermal slip boundary conditions. The exact multiple solutions and numerical results of the modeled problem are exactly matched for a small value of the parameters. The flow problem is strictly depend upon the appropriate coordinate system and geometry of the problem, so the right choice for choosing the proper coordinate system decides on the bases of flow problem see [28]. Many research articles are available on a purely radial flow in a converging/diverging channel for both Newtonian and non- Newtonian fluids. Makinde [30] presented a compact model of channel flow and he found the numerical and perturbation solutions of simulated problem, however, he investigated an incompressible viscous nanofluid in four different types of channels (divergent, convergent, locally constricted and wavy). Note he solved a system of ODE’s with the perturbation series method, furthermore, he found accurate results for heat and mass transfer with special cases in the channels. Makinde [31] also examined the steady flow of incompressible viscous fluid inside a diverging symmetrical channel, furthermore, he presented the Taylor series solution to the modeled problem and all the field variables are evaluated and computed accurately using this method.

The previous problems of converging and diverging flow are simulated in polar coordinates system, whereas, we demonstrate the fluid flow and heat transfer problems in converging (diverging) channels of rectangular plan walls. The investigations of this paper have not been discussed in the open literature and a new problem of rectangular channels is simulated, whereas, we solved the momentum and energy equations for a converging (diverging) channel of rectangular walls. A set of appropriate transformation is formed for the stream function and temperature variables which reduces the Navier–Stokes and energy equations into ODE’s and the final system of equations is solved with the regular perturbation method. A numerical method is also employed for confirmation and validation of the approximate analytical solutions. The numerical technique used here is the finite difference method, which is based on polynomial collocation with four Lobatto points. It is observed that the velocity and temperature profiles are charged significantly with the slope *m* of the upper wall and characteristic number Re. The skin friction coefficient and heat transfer from the upper wall are graphed against different parameters. Further, the classical work of Millsaps and Pohlhausen [18] is also recovered from the result of the current model, whereas, the two solutions are exactly matched with each other.

### Formulation of the problem

Consider a rectangular converging/diverging channel of heated inclined plane walls with variable gap \(h(x)\) between them. The upper (lower) wall has slope *m* (− *m*). The gap between walls is 2* h*(*x*) and the constant gap is *a*_{0} when *x* = 0. A line is drawn at the center of the channel which is equidistance from the upper and lower walls and representing the *x*-axis whereas the *y*-axis is normal to it. Note that the walls of a channel are equally heated and have a variable temperature. A steady flow of an incompressible viscous fluid is maintained in a two dimensional channel of inclined plane walls. The velocity vector has decomposed into two orthogonal components i.e. the axial velocity (*u*) in *x*-direction and the normal velocity (*v*) in the *y*-direction. Here, we considered a problem of converging (diverging) flow in a rectangular channel whose upper (lower) wall is situated at *y* = *mx* + *a*_{0} (*y* = *− mx − a*_{0}) where *m* is the slope of upper (lower) wall and 2*a*_{0} is entrance (for diverging flow)/exist (for converging flow) channel’s height. The upper wall of the channel has variable temperature \({T}_{w}\left(x\right)={T}_{0}+{T}_{1}{({a}_{0}+mx)}^{{c}_{1}}\) and the fluid at the center has uniform temperature *T*_{0}. The parameter* m* = 0 is representing the flow and heat transfer between parallel walls and for that choice of *m*, the model problem is exactly reduced to the well-known Poiseuille model of one dimensional flow and heat transfer between parallel plates. Here we assumed similar flows and the velocity vector has normal and axial components whereas the classical Jeffery-Hammel model is equipped with only a radial component of velocity.
The fluid attached to the plates has the velocity of solid sheet and would behave like walls. The axial velocity *u*(*x; y*) is maximum i.e. *U*(*x*) at the mid of channel or at *y* = 0. The normal velocity component and vorticity function will be zero at mid (*y* = 0) of channel due to symmetry conditions. Moreover, the center line as a reference stream line. The following equations are used for governing the incompressible viscous flow and heat transfer in the converging/diverging channel (Fig. 1).

Continuity equation:

$$\frac{\partial u}{{\partial x}} + \frac{\partial v}{{\partial y}} = 0$$

(1)

The component of Navier–Stokes equations:

$$u\frac{\partial u}{{\partial x}} + \upsilon \frac{\partial u}{{\partial y}} = - \frac{1}{\rho }\frac{\partial p}{{\partial x}} + \nu \left( {\frac{{\partial^{2} u}}{{\partial x^{2} }} + \frac{{\partial^{2} u}}{{\partial y^{2} }}} \right)$$

(2)

$$u\frac{\partial v}{{\partial x}} + \upsilon \frac{\partial v}{{\partial y}} = - \frac{1}{\rho }\frac{\partial p}{{\partial x}} + \nu \left( {\frac{{\partial^{2} v}}{{\partial x^{2} }} + \frac{{\partial^{2} v}}{{\partial y^{2} }}} \right)$$

(3)

The energy equation:

$$\rho c_{\rho } \left( {u\frac{\partial T}{{\partial x}} + \upsilon \frac{\partial T}{{\partial y}}} \right) = \kappa \left( {\frac{{\partial^{2} T}}{{\partial x^{2} }} + \frac{{\partial^{2} T}}{{\partial y^{2} }}} \right)$$

(4)

The boundary conditions for the flow problem are:

$$u\left( {x,y} \right) = U\left( x \right), \quad \left( {x,y} \right) = 0,\quad \psi \left( {x,y} \right) = 0,\quad T\left( {x,y} \right) = T_{0} ;\quad y = 0$$

(5)

$$u \left( {x,y} \right) = 0\quad {\text{and}}\quad T\left( {x,y} \right) = T_{w} \left( x \right);\quad y = h\left( x \right)$$

(6)

$$\xi = \frac{\partial v}{{\partial x}} - \frac{\partial u}{{\partial y}}$$

(7)

where in Eq. (7) the vorticity (*ξ*) is defined and *ν*, *ρ*, *p* are kinematic viscosity, density and pressure, respectively. In view of the stream function formulation the velocity components are

$$u = \frac{\partial \psi }{{\partial y}},\quad v = \frac{\partial \psi }{{\partial x}}$$

(8)

Now defining the stream function (*ψ*) in term of such that

$$\begin{aligned} \psi & = h(x)U(x)f\left( \eta \right),\quad \, T = \, \Delta T\theta \left( \eta \right) + T_{0} \, \quad {\text{where}}\quad \, \eta = \frac{y}{h(x)}, \\ \Delta T & = T_{w} - T_{0} = T_{1} (mx + a_{1} )^{{c_{1} }} ,\quad h(x) = a_{0} + mx,\quad U(x) = \frac{{U_{0} a_{0} }}{{a_{0} + mx}} \\ \end{aligned}$$

(9)

The vorticity equations is formed by eliminating pressure term between Eqs. (2) and (3).

$$u\frac{\partial \xi }{{\partial x}} + \upsilon \frac{\partial \xi }{{\partial y}} = \nu \left( {\frac{{\partial^{2} \xi }}{{\partial x^{2} }} + \frac{{\partial^{2} \xi }}{{\partial y^{2} }}} \right)$$

(10)

where the vorticity function *ξ* is defined as:

$$\xi = \frac{\partial v}{{\partial x}} - \frac{\partial u}{{\partial y}}$$

(11)

The transformations in Eqs. (7) and (9) are used and converted the energy Eq. (4) and vorticity Eq. (10) into the following ODE’s:

$$\begin{aligned} & \left( {1 + m^{2} \eta^{2} } \right)^{2} f^{iv} + 12m^{2} \eta \left( {1 + m^{2} \eta^{2} } \right)f^{\prime \prime \prime } \\ & \quad + 12m^{2} \left( {1 + 3m^{2} \eta^{2} } \right)f^{\prime \prime } + 2m{\text{Re}} \left( {1 + m^{2} \eta^{2} } \right)f^{\prime } f^{\prime \prime } \\ & \quad + 4m^{3} {\text{Re}} \eta \left( {f^{\prime } } \right)^{2} + 24m^{4} \eta f^{\prime } = 0 \\ \end{aligned}$$

(12)

$$c_{1} m^{2} \left( {1 - c_{1} } \right)\theta + c_{1} m {\text{Pr\,Re}} f^{\prime } \theta - 2m^{2} \eta \left( {1 - c_{1} } \right)\theta^{\prime } - \left( {1 + m^{2} \eta^{2} } \right)^{2} \theta^{\prime \prime } = 0$$

(13)

$$f\left( 0 \right) = 0, \quad f^{\prime \prime } \left( 0 \right) = 0, \quad f^{\prime } \left( 0 \right) = 1,\quad f^{\prime } \left( 1 \right) = 0,\quad \theta \left( 0 \right) = 0,\quad \theta \left( 1 \right) = 1$$

(14)

where \({\text{Re}} = \frac{{a_{0} U_{0} }}{\upsilon }\), \({\text{Pr}} = \frac{\upsilon }{\alpha }\) are used for Prandtl number and Reynolds number, respectively.