1 Introduction

Non-Newtonian fluids (NNFs) are substances in which interactions between particles in the liquid phase can result in effects like shear thinning. Since NNFs are typically very non-linear PDEs, an accurate solution is typically not possible. Although non-Newtonian liquids exhibit a variety of rheological properties in nature, there is no one constitutive relationship between strain rate and stress that can be used to classify all of these qualities. Various constitutive formulations for NNFs have been developed in the literature. NNFs are of utmost importance today because of their potential application in cutting-edge technology and industry. NNFs according to the definition, do not follow Newton’s laws of motion. Examples include paste, paints, food items, waste liquids, lubricants, and a wide range of other things. A significant and basic subclass of rate-type NNFs is the Maxwell model. Also, Williamson fluid is a type of NNF that exhibits shear thinning. Williamson [1] was the one who originally put forth this model. Later, this model employed by several authors ([2,3,4]).

A nanofluid is created when nanoparticles smaller than 100 nm are suspended in a regular base fluid ([5,6,7,8]). The word ”nanofluid” was originally used by Choi [9] about three decades ago. However, nanoparticles have only lately become accessible and affordable enough to justify consideration for use in practical applications. Following the groundbreaking work of Choi, some researchers ([10,11,12]) have also taken into account diverse physical configurations and summarized the significance of nanofluid flow and heat transfer in numerous engineering applications.

Because of their frequent appearance in many applications in fluid mechanics, biology, physics, and engineering, PDEs have been the subject of many investigations. As a result, the solutions of ODEs of physical relevance have received a lot of attention [13]. The spectral collocation method (SCM) is a numerical approach utilized for solving ODEs. This method involves an approximation of the solution by summing up basis functions and determining their coefficients by enforcing the differential equation at a limited number of collocation points ([14, 15]). Among the variety of base functions available for use in SCM, the Vieta-Lucas polynomials (VLPs) are a set of orthogonal polynomials that can serve as effective basis functions [16]. Utilizing SCM with VLPs comes with the benefit of their remarkable convergence properties. The accuracy of the solution improves rapidly with an increase in the number of collocation points. Moreover, VLPs exhibit good stability properties, making them suitable for solving differential equations that are stiff or have rapidly varying solutions. Vieta-Lucas polynomials have the added advantage of having a closed-form expression, which simplifies their computation and manipulation. This feature can result in substantial computational savings, especially when compared to other techniques that necessitate solving extensive systems of ODEs [17].

Nonetheless, this research aims to investigate the approximate solution for the proposed problem by using SCM based on VLPs. The study’s novelty and purpose stem from the fact that it is the first of its type to use the given numerical procedure to numerically solve the proposed problem.

2 Mathematical Formulations

We take into account a nanofluid’s two-dimensional non-Newtonian Williamson flow in the direction of an exponentially stretching sheet that is maintained at a constant temperature \(T_{w}\) and concentration \(C_{w}\). Also, \(T_{\infty }\) and \(C_{\infty }\) represent the respective ambient temperature and concentration values. In this research, we take into account the slip velocity with the assumption that the sheet is rough. Figure 1 shows the problem formulation, Cartesian coordinates x and y, corresponding velocity components u and v, and the fluid flow configuration. The Williamson nanofluid is supposed to move with a velocity of \(U_{0}e^{\frac{x}{L}}\), where \(U_{0}\) is a constant, as a result of the surface being stretched through the xy-plane. Additionally, the assumption that the sheet is permeable results in a suction velocity of \(v_{w}\). These prerequisites lead to the following definitions of the primary boundary layer (BL) equations for continuity, momentum, energy, and concentration [18]:

Fig. 1
figure 1

Physical configuration of the problem

$$\begin{aligned}{} & {} \frac{\partial u}{\partial x}+\frac{\partial v}{\partial y}=0, \end{aligned}$$
(1)
$$\begin{aligned}{} & {} u \frac{\partial u}{\partial x}+v\frac{\partial u}{\partial y}=\frac{1}{\rho _{\infty }}\frac{\partial }{\partial y} \left( \mu \frac{\partial u}{\partial y}+ \mu \frac{\Gamma }{\sqrt{2}}\left( \frac{\partial u}{\partial y}\right) ^{2}\right) -\hbox {sin}^{2}\beta \,\frac{\sigma B_{0}^{2}}{\rho _{\infty }} u -\frac{\mu }{\rho _{\infty }k}u, \end{aligned}$$
(2)
$$\begin{aligned}{} & {} u\frac{\partial T}{\partial x}+v\frac{\partial T}{\partial y}=\frac{\kappa }{\rho _{\infty } c_{p}}\frac{\partial ^{2}T}{\partial y^{2}}+\tau \left( D_{B}(C)\left( \frac{\partial C}{\partial y}\frac{\partial T}{\partial y}\right) +\left( \frac{D_{T}}{T_{\infty }}\right) \left( \frac{\partial T}{\partial y}\right) ^{2}\right) \nonumber \\{} & {} \quad +\frac{\mu }{\rho _{\infty } c_{p}} \left( \left( \frac{\partial u}{\partial y}\right) ^{2}+\frac{\Gamma }{\sqrt{2}}\left( \frac{\partial u}{\partial y}\right) ^{3}\right) +\frac{Q_{0}}{\rho _{\infty } c_{p}} \left( T-T_{\infty }\right) , \end{aligned}$$
(3)
$$\begin{aligned}{} & {} u\frac{\partial C}{\partial x}+v\frac{\partial C}{\partial y}=D_{B}\frac{\partial ^{2}C}{\partial y^{2}}+\frac{D_{T}}{T_{\infty }} \frac{\partial ^{2} T}{\partial y^{2}}, \end{aligned}$$
(4)

where u and v represent the fluid velocity vector’s x and y axis coefficients, \(\Gamma \) is the Williamson parameter, \(\mu \) is the nanofluid dynamic viscosity, \(\beta \) is the inclination angle, \(\kappa \) is the fluid’s thermal conductivity, \(D_{B}\) is the Brownian motion’s variable diffusivity, \(\sigma \) is electrical conductivity, \(c_{p}\) is the specific heat at constant pressure, \(\rho _{\infty }\) is the density of the nanofluid at the ambient, \(B_{0}\) is the magnetic field strength, k is the permeability of the porous medium, \(D_{T}\) is the coefficient of thermophoretic diffusion and \(Q_{0}\) is the initial value of the heat generation coefficient. The previously mentioned governing equations have boundary conditions that take the following forms:

$$\begin{aligned}{} & {} u=U_{w}+ \frac{\lambda _{1}}{\mu _{\infty }}\left( \mu \frac{\partial u}{\partial y}+\mu \frac{\Gamma }{\sqrt{2}} \left( \frac{\partial u}{\partial y}\right) ^{2}\right) ,\quad v=-v_{w},\quad T=T_{w}, \quad C=C_{w}, \quad at \quad y=0, \end{aligned}$$
(5)
$$\begin{aligned}{} & {} u \rightarrow 0,\quad \quad T \rightarrow T_{\infty },\quad \quad C \rightarrow C_{\infty }, \quad \quad as \quad y \rightarrow \infty , \end{aligned}$$
(6)

where \(\lambda _{1}\) is the slip velocity factor and \(\mu _{\infty }\) is the ambient nanofluid viscosity. According to analysis, Megahed’s previously described nonlinear temperature-dependent nanofluid viscosity is as follows [19]:

$$\begin{aligned} \mu (T)=\mu _{\infty }e^{-\alpha \theta (\eta )}, \end{aligned}$$
(7)

where \(\alpha \) is the viscosity parameter.

Non-linear PDEs make up the governing Eqs. (1) through (4). These nonlinear PDEs are translated into nonlinear ODEs using the dimensionless transformation described below:

$$\begin{aligned} \eta= & {} y \sqrt{\frac{U_{0} \rho _{\infty }}{2L\mu _{\infty }}}e^{\frac{x}{2L}},\quad \quad u=U_{0} e^{\frac{x}{L}} f^{\prime }(\eta ),\quad \quad v=-\sqrt{\frac{U_{0} \mu _{\infty }}{2L\rho _{\infty }}} e^{\frac{x}{2L}}\left( f(\eta )+\eta f^{\prime } \right) , \end{aligned}$$
(8)
$$\begin{aligned} T= & {} T_{\infty }+(T_{w}-T_{\infty })\theta (\eta ),\quad \quad C=C_{\infty }+(C_{w}-C_{\infty })\phi (\eta ). \end{aligned}$$
(9)

Given the previously indicated suitable dimensionless relationships, it is shown that the controlling model for the problem is an innovative system of high nonlinear, multi-degree ODEs as regards:

$$\begin{aligned}{} & {} \left( \left( 1+W_{e} f^{\prime \prime } \right) f^{\prime \prime \prime }-\alpha \theta ^{\prime } f^{\prime \prime } \left( 1+ 0.5\,W_{e}\,f^{\prime \prime }\right) \right) e^{-\alpha \theta }+f f^{\prime \prime }-2f^{\prime 2}-(M\hbox {sin}^{2}\beta \,) f^{\prime }-K e^{-\alpha \theta }f^{\prime }=0, \end{aligned}$$
(10)
$$\begin{aligned}{} & {} \frac{1}{Pr}\theta ''+f \theta ^{\prime }-f^{\prime } \theta +N t\left( \theta ^{\prime }\right) ^{2}+N b \theta ^{\prime } \phi ^{\prime }+Ec\,f''^{2}\,\left( 1+0.5\,W_{e}\,f''\right) e^{-\alpha \theta }+Q \theta =0, \end{aligned}$$
(11)
$$\begin{aligned}{} & {} \phi ^{\prime \prime }+S c f \phi ^{\prime }+\frac{N t}{N b} \theta ^{\prime \prime }=0, \end{aligned}$$
(12)

under the corresponding boundary constraints:

$$\begin{aligned}{} & {} f^{\prime }(0)=1+\lambda \,f''\,\left( 1+0.5\,W_{e}\,f''\right) e^{-\alpha \theta (0)},\quad \,\,\, f(0)=\gamma ,\quad \,\,\, \theta (0)=1,\quad \phi (0)=1, \end{aligned}$$
(13)
$$\begin{aligned}{} & {} f^{\prime }(\infty ) \rightarrow 0,\quad \quad \theta (\infty ) \rightarrow 0,\quad \quad \phi (\infty ) \rightarrow 0. \end{aligned}$$
(14)

The Williamson parameter, magnetic number, porous parameter, Prandtl number, thermophoresis parameter, Brownian motion parameters, and Eckert number, respectively, as well as the heat source parameter are represented by the dimensionless parameters that are found in the controlling equations above. These terms are defined as follows, respectively:

$$\begin{aligned} W_{e}= & {} \left( \frac{U_{0}}{2}\right) ^{\frac{2}{3}}\frac{\Gamma }{\sqrt{L}}e^{\frac{x}{2L}},\quad \quad M=\frac{\sigma B_{0}}{\rho _{\infty } U_{0}}e^{\frac{-x}{L}},\quad \quad K=\frac{\nu _{\infty } L}{k U_{0}}e^{\frac{-x}{L}},\quad \quad Pr=\frac{\mu _{\infty }c_{p}}{\kappa },\\ Nt= & {} \frac{\tau D_{T}\left( T_{w}-T_{\infty }\right) }{ \nu _{\infty }T_{\infty }},\quad N b=\frac{\tau D_{B}\left( C_{w}-C_{\infty }\right) }{\nu _{\infty }},\quad Ec=\frac{U_{0}^{2}}{(T_{w}-T_{\infty }) c_{p}},\quad Q=\frac{Q_{0} L}{ U_{0}\rho _{\infty } c_{p}}e^{\frac{-x}{L}}. \end{aligned}$$

Skin-friction coefficient (SFC), local Nusselt number (LNN), and local Sherwood number (LSN) are terms used to characterize the friction drags, heat transfer rate, and mass transfer rate, respectively, which can be introduced as follows [20]:

$$\begin{aligned} \begin{aligned}&\sqrt{2}Cf_{x}{\text {Re}}_{x}^{1 / 2}=-f''(0)\left( 1+0.5\,W_{e}\,f''(0)\right) e^{-\alpha \theta (0)}, \\&\frac{1}{\sqrt{2}}{\text {Re}}_{x}^{-1 / 2}e^{\frac{-x}{2L}} N u_{x}=-\theta '(0),\\&\frac{1}{\sqrt{2}}{\text {Re}}_{x}^{-1 / 2} e^{\frac{-x}{2L}} S h_{x}=-\phi ^{\prime }(0), \end{aligned} \end{aligned}$$

where the local Reynolds number is \({\text {Re}}_{x}=\frac{U_{w}L}{\nu _{\infty }}\).

3 Procedure of Solution

4 Approximate the Derivatives

In this subsection, we will try to generate a new family of the Vieta-Lucas polynomials as orthogonal polynomials on the interval \([0,\hbar ]\), and so-called the shifted Vieta-Lucas polynomials and denoted by \({\textrm{VL}}_{k}^{s}(\eta )\). This will be obtained by using the transformation \(z=(4/\hbar )\eta -2\) as follows:

$$\begin{aligned} {\textrm{VL}}_{k}^{s}(\eta )={\textrm{VL}}_{k}((4/\hbar )\eta -2). \end{aligned}$$

Also, by the following recurrence relation, we can generate the shifted VLPs \({\textrm{VL}}_{k}^{s}(\eta )\):

$$\begin{aligned} {\textrm{VL}}_{k+1}^{s}(\eta )=((4/\hbar )\eta -2) {\textrm{VL}}_{k}^{s}(\eta )-{\textrm{VL}}_{k-1}^{s}(\eta ), \quad \quad k=1,2, \ldots , \end{aligned}$$

where,  \({\textrm{VL}}_{0}^{s}(\eta )=2, \,\, {\textrm{VL}}_{1}^{s}(\eta )=(4/\hbar )\eta -2.\) It is easy to find that \({\textrm{VL}}_{k}^{s}(\hbar )=(-1)^{k}{\textrm{VL}}_{k}^{s}(0)=2,\,\,k=0,1,2\ldots \,.\)

The function \(\psi (\eta )\in L_{2}[0,\hbar ]\) can be approximated as a finite series sum (the first \((m+1)\)-terms) as follows:

$$\begin{aligned} \psi _{m}(\eta )=\sum _{\ell =0}^{m}\,c_{\ell }\,{\textrm{VL}}_{\ell }^{s}\,(\eta ). \end{aligned}$$
(15)

Here we use the following approximate formula of \(D^{(n)}\psi _{m}(\eta )\) of the approximated function \(\psi _{m}(\eta )\) defined in the form (15) [17]:

$$\begin{aligned} \psi ^{(n)}_{m}(\eta )=\sum _{j=n}^{m} \sum _{k=0}^{j-n} c_{j}\,\chi _{j, k,n}\, \eta ^{j-k-n},\quad \chi _{j, k,n}=\frac{(-1)^{k} \,4^{j-k} (2 j)\, \Gamma (2 j-k)\, \Gamma (j-k+1)}{\hbar ^{n}\Gamma (k+1)\, \Gamma (2 j-2 k+1)\, \Gamma (j-k+1-n)}. \end{aligned}$$
(16)

For more details about the shifted VLPs and their convergence analysis of (15) and (16), see [17].

5 Procedure Solution Using SCM

We are going to use the proposed method to solve numerically the system under (10)–(14). We approximate \(f(\eta ),\,\theta (\eta )\), and \(\phi (\eta )\) by \(f_{p}(\eta ),\,\theta _{p}(\eta )\), and \(\phi _{p}(\eta )\), respectively in the following form:

$$\begin{aligned} f_{p}(\eta )=\sum _{o=0}^{p}a_{o}\,{\textrm{VL}}_{o}^{s}(\eta ),\quad \quad \quad \theta _{p}(\eta )=\sum _{o=0}^{p}b_{o}\,{\textrm{VL}}_{o}^{s}(\eta ),\quad \quad \quad \phi _{p}(\eta )=\sum _{o=0}^{p}c_{o}\,{\textrm{VL}}_{o}^{s}(\eta ). \end{aligned}$$
(17)

By substituting (17) and the formula (16), the non-linear system Eqs. (10)–(12) will be reduced to the following form:

$$\begin{aligned} \begin{aligned}&\left( 1+W_{e}\left( \sum _{o=2}^{p}\,\sum _{k=0}^{o-2}\,a_{o}\,\chi _{o,\,k,\,2}\,\eta ^{o-k-2}\right) \right) \left( \sum _{o=3}^{p}\,\sum _{k=0}^{o-3}\,a_{o}\,\chi _{o,\,k,\,3}\,\eta ^{o-k-3}\right) -\alpha \,\left( \sum _{o=1}^{p}\,\sum _{k=0}^{o-1}\,b_{o}\,\chi _{o,\,k,\,1}\,\eta ^{o-k-1}\right) {\textbf {.}}\\&\left( \sum _{o=2}^{p}\,\sum _{k=0}^{o-2}\,a_{o}\,\chi _{o,\,k,\,2}\,\eta ^{o-k-2}\right) \left( 1+0.5W_{e}\left( \sum _{o=2}^{p}\,\sum _{k=0}^{o-2}\,a_{o}\,\chi _{o,\,k,\,2}\,\eta ^{o-k-2}\right) \right) +\left( \left( \sum _{o=0}^{p}\,a_{o}\,{\textrm{VL}}_{o}^{s}(\eta )\right) {\textbf {.}}\right. \\&\left. \left( \sum _{o=2}^{p}\,\sum _{k=0}^{o-2}\,a_{o}\,\chi _{o,\,k,\,2}\,\eta ^{o-k-2}\right) \ -2\left( \sum _{o=1}^{p}\,\sum _{k=0}^{o-1}\,a_{o}\,\chi _{o,\,k,\,1}\,\eta ^{o-k-1}\right) ^{2}- M\hbox {sin}^{2}\beta \,\left( \sum _{o=1}^{p}\,\sum _{k=0}^{o-1}\,a_{o}\,\chi _{o,\,k,\,1}\,\eta ^{o-k-1}\right) \right) {\textbf {.}}\\&\hbox {Exp}\left( \alpha \left( \sum _{o=0}^{p}\,b_{o}\,{\textrm{VL}}_{o}^{s}(\eta )\right) \,\right) -K\,\left( \sum _{o=1}^{p}\,\sum _{k=0}^{o-1}\,a_{o}\,\chi _{o,\,k,\,1}\,\eta ^{o-k-1}\right) =0, \end{aligned} \end{aligned}$$
(18)
$$\begin{aligned} \begin{aligned}&\left( \frac{1}{Pr}\right) \left( \sum _{o=2}^{p}\,\sum _{k=0}^{o-2}\,b_{o}\,\chi _{o,\,k,\,2}\,\eta ^{o-k-2}\right) + \left( \sum _{o=0}^{p}\,a_{o}\,{\textrm{VL}}_{o}^{s}(\eta )\right) \left( \sum _{o=1}^{p}\,\sum _{k=0}^{o-1}\,b_{o}\,\chi _{o,\,k,\,1}\,\eta ^{o-k-1}\right) -\left( \sum _{o=0}^{p}\,b_{o}\,{\textrm{VL}}_{o}^{s}(\eta )\right) {\textbf {.}}\\&\left( \sum _{o=1}^{p}\,\sum _{k=0}^{o-1}\,a_{o}\,\chi _{o,\,k,\,1}\,\eta ^{o-k-1}\right) + Nt\left( \sum _{o=1}^{p}\,\sum _{k=0}^{o-1}\,b_{o}\,\chi _{o,\,k,\,1}\,\eta ^{o-k-1}\right) ^{2} +Nb\left( \sum _{o=1}^{p}\,\sum _{k=0}^{o-1}\,b_{o}\,\chi _{o,\,k,\,1}\,\eta ^{o-k-1}\right) {\textbf {.}}\\&\left( \sum _{o=1}^{p}\,\sum _{k=0}^{o-1}\,c_{o}\,\chi _{o,\,k,\,1}\,\eta ^{o-k-1}\right) +Ec\left( \left( \sum _{o=2}^{p}\,\sum _{k=0}^{o-2}\,a_{o}\,\chi _{o,\,k,\,2}\,\eta ^{o-k-2}\right) ^{2}+\frac{W_{e}}{2} \left( \sum _{o=2}^{p}\,\sum _{k=0}^{o-2}\,a_{o}\,\chi _{o,\,k,\,2}\,\eta ^{o-k-2}\right) ^{3}\right) {\textbf {.}}\\&\hbox {Exp}\left( -\alpha \left( \sum _{o=0}^{p}\,b_{o}\,{\textrm{VL}}_{o}^{s}(\eta )\right) \,\right) + Q\left( \sum _{o=0}^{p}\,b_{o}\,{\textrm{VL}}_{o}^{s}(\eta )\right) =0. \end{aligned} \end{aligned}$$
(19)
$$\begin{aligned} \begin{aligned}&\sum _{o=2}^{p}\,\sum _{k=0}^{o-2}\,c_{o}\,\chi _{o,\,k,\,2}\,\eta ^{o-k-2} +Sc\,\left( \sum _{o=0}^{p}\,a_{o}\,{\textrm{VL}}_{o}^{s}(\eta )\right) \left( \sum _{o=1}^{p}\,\sum _{k=0}^{o-1}\,c_{o}\,\chi _{o,\,k,\,1}\,\eta ^{o-k-1}\right) \\&\quad +\frac{N t}{N b}\left( \sum _{o=2}^{p}\,\sum _{k=0}^{o-2}\,b_{o}\,\chi _{o,\,k,\,2}\,\eta ^{o-k-2}\right) =0. \end{aligned} \end{aligned}$$
(20)

By collocating the previous Eqs. (18)–(20) at \(p+1-n\) of nodes \(\eta _{j},\,j=0,1,\ldots ,p-n\), it will reduce to the form:

$$\begin{aligned} \begin{aligned}&\left( 1+W_{e}\left( \sum _{o=2}^{p}\,\sum _{k=0}^{o-2}\,a_{o}\,\chi _{o,\,k,\,2}\,\eta _{q}^{o-k-2}\right) \right) \left( \sum _{o=3}^{p}\,\sum _{k=0}^{o-3}\,a_{o}\,\chi _{o,\,k,\,3}\,\eta _{q}^{o-k-3}\right) -\alpha \,\left( \sum _{o=1}^{p}\,\sum _{k=0}^{o-1}\,b_{o}\,\chi _{o,\,k,\,1}\,\eta _{q}^{o-k-1}\right) {\textbf {.}}\\&\left( \sum _{o=2}^{p}\,\sum _{k=0}^{o-2}\,a_{o}\,\chi _{o,\,k,\,2}\,\eta _{q}^{o-k-2}\right) \left( 1+0.5W_{e}\left( \sum _{o=2}^{p}\,\sum _{k=0}^{o-2}\,a_{o}\,\chi _{o,\,k,\,2}\,\eta _{q}^{o-k-2}\right) \right) +\left( \left( \sum _{o=0}^{p}\,a_{o}\,{\textrm{VL}}_{o}^{s}(\eta _{q})\right) {\textbf {.}}\right. \\&\left. \left( \sum _{o=2}^{p}\,\sum _{k=0}^{o-2}\,a_{o}\,\chi _{o,\,k,\,2}\,\eta _{q}^{o-k-2}\right) \ -2\left( \sum _{o=1}^{p}\,\sum _{k=0}^{o-1}\,a_{o}\,\chi _{o,\,k,\,1}\,\eta _{q}^{o-k-1}\right) ^{2}- M\hbox {sin}^{2}\beta \,\left( \sum _{o=1}^{p}\,\sum _{k=0}^{o-1}\,a_{o}\,\chi _{o,\,k,\,1}\,\eta _{q}^{o-k-1}\right) \right) {\textbf {.}}\\&\hbox {Exp}\left( \alpha \left( \sum _{o=0}^{p}\,b_{o}\,{\textrm{VL}}_{o}^{s}(\eta _{q})\right) \,\right) -K\,\left( \sum _{o=1}^{p}\,\sum _{k=0}^{o-1}\,a_{o}\,\chi _{o,\,k,\,1}\,\eta _{q}^{o-k-1}\right) =0, \end{aligned} \end{aligned}$$
(21)
$$\begin{aligned} \begin{aligned}&\left( \frac{1}{Pr}\right) \left( \sum _{o=2}^{p}\,\sum _{k=0}^{o-2}\,b_{o}\,\chi _{o,\,k,\,2}\,\eta _{q}^{o-k-2}\right) + \left( \sum _{o=0}^{p}\,a_{o}\,{\textrm{VL}}_{o}^{s}(\eta _{q})\right) \left( \sum _{o=1}^{p}\,\sum _{k=0}^{o-1}\,b_{o}\,\chi _{o,\,k,\,1}\,\eta _{q}^{o-k-1}\right) -\left( \sum _{o=0}^{p}\,b_{o}\,{\textrm{VL}}_{o}^{s}(\eta _{q})\right) {\textbf {.}}\\&\left( \sum _{o=1}^{p}\,\sum _{k=0}^{o-1}\,a_{o}\,\chi _{o,\,k,\,1}\,\eta _{q}^{o-k-1}\right) + Nt\left( \sum _{o=1}^{p}\,\sum _{k=0}^{o-1}\,b_{o}\,\chi _{o,\,k,\,1}\,\eta _{q}^{o-k-1}\right) ^{2} +Nb\left( \sum _{o=1}^{p}\,\sum _{k=0}^{o-1}\,b_{o}\,\chi _{o,\,k,\,1}\,\eta _{q}^{o-k-1}\right) {\textbf {.}}\\&\left( \sum _{o=1}^{p}\,\sum _{k=0}^{o-1}\,c_{o}\,\chi _{o,\,k,\,1}\,\eta _{q}^{o-k-1}\right) +Ec\left( \left( \sum _{o=2}^{p}\,\sum _{k=0}^{o-2}\,a_{o}\,\chi _{o,\,k,\,2}\,\eta _{q}^{o-k-2}\right) ^{2}+\frac{W_{e}}{2} \left( \sum _{o=2}^{p}\,\sum _{k=0}^{o-2}\,a_{o}\,\chi _{o,\,k,\,2}\,\eta _{q}^{o-k-2}\right) ^{3}\right) {\textbf {.}}\\&\hbox {Exp}\left( -\alpha \left( \sum _{o=0}^{p}\,b_{o}\,{\textrm{VL}}_{o}^{s}(\eta _{q})\right) \,\right) + Q\left( \sum _{o=0}^{p}\,b_{o}\,{\textrm{VL}}_{o}^{s}(\eta _{q})\right) =0. \end{aligned} \end{aligned}$$
(22)
$$\begin{aligned} \begin{aligned}&\sum _{o=2}^{p}\,\sum _{k=0}^{o-2}\,c_{o}\,\chi _{o,\,k,\,2}\,\eta _{q}^{o-k-2}+Sc\, \left( \sum _{o=0}^{p}\,a_{o}\,{\textrm{VL}}_{o}^{s}(\eta _{q})\right) \left( \sum _{o=1}^{p}\,\sum _{k=0}^{o-1}\,c_{o}\,\chi _{o,\,k,\,1}\,\eta _{q}^{o-k-1}\right) \\&\quad +\frac{N t}{N b}\left( \sum _{o=2}^{p}\,\sum _{k=0}^{o-2}\,b_{o}\,\chi _{o,\,k,\,2}\,\eta _{q}^{o-k-2}\right) =0. \end{aligned} \end{aligned}$$
(23)

Also, by substituting from Eq. (17) through the boundary conditions (13)–(14), it will be expressed in the following equations:

$$\begin{aligned}{} & {} \sum _{o=0}^{p}\,2(-1)^{o}\,a_{o}=\gamma ,\quad \quad \quad \sum _{o=0}^{p}\,2(-1)^{o}\,b_{o}=1,\quad \quad \quad \sum _{o=0}^{p}\,2(-1)^{o}\,c_{o}=1, \end{aligned}$$
(24)
$$\begin{aligned}{} & {} \sum _{o=0}^{p}\,a_{o}\,{\textrm{VL}}_{o}^{s'}(0)-\lambda \left( \sum _{o=0}^{p}\,a_{o}\,{\textrm{VL}}_{o}^{s''}(0)+0.5\,W_{e}\left( \sum _{o=0}^{p}\,a_{o}\, {\textrm{VL}}_{o}^{s''}(0)\right) ^2{}\right) \hbox {Exp}\left( -\alpha \,\sum _{o=0}^{p}\,2(-1)^{o}b_{o}\right) =1, \end{aligned}$$
(25)
$$\begin{aligned}{} & {} \sum _{o=0}^{p}\,a_{o}\,{\textrm{VL}}_{o}^{s'}(\hbar )=0,\quad \quad \quad \sum _{o=0}^{p}\,2b_{o}=0,\quad \quad \quad \sum _{o=0}^{p}\,2c_{o}=0. \end{aligned}$$
(26)

With the help of the following cost functions (CFs), the previous system defined in (21)–(26) can be expressed as a constrained optimization problem as follows:

$$\begin{aligned} \begin{aligned} CF1&=\sum _{q=0}^{p}\Big |\left( 1+W_{e}\left( \sum _{o=2}^{p}\,\sum _{k=0}^{o-2}\,a_{o}\,\chi _{o,\,k,\,2}\,\eta _{q}^{o-k-2}\right) \right) \left( \sum _{o=3}^{p}\,\sum _{k=0}^{o-3}\,a_{o}\,\chi _{o,\,k,\,3}\,\eta _{q}^{o-k-3}\right) \\&\quad -\alpha \,\left( \sum _{o=1}^{p}\,\sum _{k=0}^{o-1}\,b_{o}\,\chi _{o,\,k,\,1}\,\eta _{q}^{o-k-1}\right) {\textbf {.}} \left( \sum _{o=2}^{p}\,\sum _{k=0}^{o-2}\,a_{o}\,\chi _{o,\,k,\,2}\,\eta _{q}^{o-k-2}\right) \left( 1+0.5W_{e}\left( \sum _{o=2}^{p}\,\sum _{k=0}^{o-2}\,a_{o}\,\chi _{o,\,k,\,2}\,\eta _{q}^{o-k-2}\right) \right) \\&\quad +\left( \left( \sum _{o=0}^{p}\,a_{o}\,{\textrm{VL}}_{o}^{s}(\eta _{q})\right) {\textbf {.}} \left( \sum _{o=2}^{p}\,\sum _{k=0}^{o-2}\,a_{o}\,\chi _{o,\,k,\,2}\,\eta _{q}^{o-k-2}\right) \ -2\left( \sum _{o=1}^{p}\,\sum _{k=0}^{o-1}\,a_{o}\,\chi _{o,\,k,\,1}\,\eta _{q}^{o-k-1}\right) ^{2}- M\hbox {sin}^{2}\beta {\textbf {.}}\right. \\&\left. \left( \sum _{o=1}^{p}\,\sum _{k=0}^{o-1}\,a_{o}\,\chi _{o,\,k,\,1}\,\eta _{q}^{o-k-1}\right) \right) {\textbf {.}} \hbox {Exp}\left( \alpha \left( \sum _{o=0}^{p}\,b_{o}\,{\textrm{VL}}_{o}^{s}(\eta _{q})\right) \,\right) -K\,\left( \sum _{o=1}^{p}\,\sum _{k=0}^{o-1}\,a_{o}\,\chi _{o,\,k,\,1}\,\eta _{q}^{o-k-1}\right) \Big |, \end{aligned} \end{aligned}$$
(27)
$$\begin{aligned} \begin{aligned} CF2=&\sum _{q=0}^{p}\Big |\left( \frac{1}{Pr}\right) \left( \sum _{o=2}^{p}\,\sum _{k=0}^{o-2}\,b_{o}\,\chi _{o,\,k,\,2}\,\eta _{q}^{o-k-2}\right) + \left( \sum _{o=0}^{p}\,a_{o}\,{\textrm{VL}}_{o}^{s}(\eta _{q})\right) \left( \sum _{o=1}^{p}\,\sum _{k=0}^{o-1}\,b_{o}\,\chi _{o,\,k,\,1}\,\eta _{q}^{o-k-1}\right) \\&-\left( \sum _{o=0}^{p}\,b_{o}\,{\textrm{VL}}_{o}^{s}(\eta _{q})\right) {\textbf {.}} \left( \sum _{o=1}^{p}\,\sum _{k=0}^{o-1}\,a_{o}\,\chi _{o,\,k,\,1}\,\eta _{q}^{o-k-1}\right) + Nt\left( \sum _{o=1}^{p}\,\sum _{k=0}^{o-1}\,b_{o}\,\chi _{o,\,k,\,1}\,\eta _{q}^{o-k-1}\right) ^{2}\\&+Nb\left( \sum _{o=1}^{p}\,\sum _{k=0}^{o-1}\,b_{o}\,\chi _{o,\,k,\,1}\,\eta _{q}^{o-k-1}\right) {\textbf {.}} \left( \sum _{o=1}^{p}\,\sum _{k=0}^{o-1}\,c_{o}\,\chi _{o,\,k,\,1}\,\eta _{q}^{o-k-1}\right) +Ec\left( \left( \sum _{o=2}^{p}\,\sum _{k=0}^{o-2}\,a_{o}\,\chi _{o,\,k,\,2}\,\eta _{q}^{o-k-2}\right) ^{2}\right. \\&\left. +\frac{W_{e}}{2}\left( \sum _{o=2}^{p}\,\sum _{k=0}^{o-2}\,a_{o}\,\chi _{o,\,k,\,2}\,\eta _{q}^{o-k-2}\right) ^{3}\right) \, \hbox {Exp}\left( -\alpha \left( \sum _{o=0}^{p}\,b_{o}\,{\textrm{VL}}_{o}^{s}(\eta _{q})\right) \,\right) + Q\left( \sum _{o=0}^{p}\,b_{o}\,{\textrm{VL}}_{o}^{s}(\eta _{q})\right) \Big |, \end{aligned} \end{aligned}$$
(28)
$$\begin{aligned} \begin{aligned} CF3&=\sum _{q=0}^{p}\Big |\sum _{o=2}^{p}\,\sum _{k=0}^{o-2}\,c_{o}\,\chi _{o,\,k,\,2}\,\eta _{q}^{o-k-2}+Sc\, \left( \sum _{o=0}^{p}\,a_{o}\,{\textrm{VL}}_{o}^{s}(\eta _{q})\right) \left( \sum _{o=1}^{p}\,\sum _{k=0}^{o-1} \,c_{o}\,\chi _{o,\,k,\,1}\,\eta _{q}^{o-k-1}\right) \\&\quad +\frac{N t}{N b}\left( \sum _{o=2}^{p}\,\sum _{k=0}^{o-2}\,b_{o}\,\chi _{o,\,k,\,2}\,\eta _{q}^{o-k-2}\right) \Big |, \end{aligned} \end{aligned}$$
(29)

with the constraints (Cons):

$$\begin{aligned} \begin{aligned}&\hbox {Cons}=\Big |\sum _{o=0}^{p}\,2(-1)^{o}\,a_{o}-\gamma \Big |+\sum _{o=0}^{p}\,2(-1)^{o}\,b_{o}-1\Big | +\Big |\sum _{o=0}^{p}\,2(-1)^{o}\,c_{o}-1\Big |\\&\quad +\Big |\sum _{o=0}^{p}\,a_{o}\,{\textrm{VL}}_{o}^{s'}(0)-\lambda \left( \sum _{o=0}^{p}\,a_{o}\,{\textrm{VL}}_{o}^{s''}(0)+ 0.5\,W_{e}\left( \sum _{o=0}^{p}\,a_{o}\,{\textrm{VL}}_{o}^{s''}(0)\right) ^2{}\right) \hbox {Exp}\left( -\alpha \,\sum _{o=0}^{p}\,2(-1)^{o}b_{o}\right) -1\Big |\\&\quad +\Big |\sum _{o=0}^{p}\,a_{o}\,{\textrm{VL}}_{o}^{s'}(\hbar )\Big |+\Big |\sum _{o=0}^{p}\,2b_{o}\Big |+ \Big |\sum _{o=0}^{p}\,2c_{o}\Big |. \end{aligned} \end{aligned}$$
(30)

The constrained optimization problem (27)–(30) can be solved by using the Penalty Leap Frog procedure [21] for the coefficients \(a_{o},\,b_{o},\,c_{o},,\, o=0,1,\ldots ,p\). This in turn leads us to formulate the approximate solution by substitution in the form (17).

6 Results and Discussion

We have determined the approximate values by using the Vieta-Lucas collocation method for the SFC, and compared them with those values of Nadeem and Hussain [22] in Table 1 to confirm the accuracy of our numerical solutions with the order of approximation \(p=6\). These numerical solutions estimate the skin friction coefficient was calculated using the identical parametric data from both investigations, pointing to the same circumstance in both. We see that the comparison demonstrates good agreement. In light of this, we are certain that the data shown here are quite accurate.

Table 1 Comparison of \(\sqrt{2}Cf_{x}{\text {Re}}_{x}^{1 / 2}\) for different values of \(W_{e}\) and \(\gamma \) with the results [22] when \(\alpha =K=M=\lambda =0\)

Figure 2 shows the effect of K on graphs of \(f'(\eta )\) and \(\theta (\eta )\). The temperature distribution is seen to be improved by an increase in K, whereas the velocity field shows the opposite tendency. The existence of porous media is a flow resistance mechanism, hence the observed behavior in the velocity field is expected. Here and all figures, we take the order of approximation \(p=7\), and the interval (0,6).

Fig. 2
figure 2

a Velocity \(f'(\eta )\) for different K   b Temperature \(\theta (\eta )\) for different K

Figure 3 illustrates the graphical output of \(f'(\eta )\) and \(\theta (\eta )\) profiles for different values of the parameter \(\beta \). The Williamson nanofluid flow speed \(f'(\eta )\) is confirmed to be at its highest when the inclination angle \(\beta \) is minimal by the discovery that the velocity decreases with increasing \(\beta \). Likewise, it has been shown that when the inclination angle \(\beta \) is at its highest, a minor increase in temperature behavior \(\theta (\eta )\) occurs more quickly. Additionally, it is obvious that with greater values of \(\beta \), the temperature boundary layer thickens.

Fig. 3
figure 3

a Velocity \(f'(\eta )\) for different \(\beta \)   b Temperature \(\theta (\eta )\) for different \(\beta \)

To see how the porous K and the aligned magnetic field angle \(\beta \) parameters affect the concentration \(\phi (\eta )\) of the Williamson nanofluid, look at Fig. 4. The graph makes it clear that the magnetic field’s inclination angle and the porosity parameter’s strength can be used to gently alter the concentration of nanoparticles.

Fig. 4
figure 4

a Concentration \(\phi (\eta )\) for different K   b Concentration \(\phi (\eta )\) for different \(\beta \)

The distributions of \(f'(\eta )\) and \(\theta (\eta )\) are examined concerning the similarity variable \(\eta \) for different values of \(\lambda \) in Fig. 5. For lower values of \(\lambda \), enhancement behavior is seen in both the \(f'(\eta )\) and \(\theta (\eta )\) fields. The thinned boundary layer that results from the action of the slip velocity phenomena is advantageous to the stability of the nanofluid flow, it is inferred. Additionally, this decrease in temperature distribution caused by the slip velocity phenomenon may be advantageous for cooling procedures, which are crucial in several engineering applications.

Fig. 5
figure 5

a Velocity \(f'(\eta )\) for different \(\lambda \)   b Temperature \(\theta (\eta )\) for different \(\lambda \)

The distributions of \(f'(\eta )\) and \(\theta (\eta )\) are given in Fig. 6 for various quantities of M. It is revealed that shear stress increases for larger magnetic parameter quantities, which causes a decrease in the nanofluid velocity field. It is true physically because when the intensity of the Lorentz force grows with an increase in M, the nanofluid flow is physically resisted more and as a result, velocity diminished. This declining tendency in the velocity profile also suggests that as M is elevated, the thickness of the BL shrinks. Further, the \(\theta (\eta )\)-field shows a different pattern as the magnetic parameter is raised, indicating that the resistive force can assist raise both the thermal thickness and the temperature of the nanofluid.

Fig. 6
figure 6

a Velocity \(f'(\eta )\) for different M   b Temperature \(\theta (\eta )\) for different M

The behavior of the magnetic M and the slip velocity \(\lambda \) parameters concerning the concentration of nanoparticles is explained in Fig. 7. This graph confirms that both M and \(\lambda \) have a minimal impact on the profiles of nanoparticle concentration and that this consequence also contributes to a small improvement in boundary layer thickness.

Fig. 7
figure 7

a Concentration \(\phi (\eta )\) for different M   b Concentration \(\phi (\eta )\) for different \(\lambda \)

For distinct quantities of \(\alpha \), Fig. 8 is carefully examined to communicate deviations in \(f'(\eta )\) and \(\theta (\eta )\) profiles. In the BL region, both velocity and temperature profiles exhibit an evidently declining tendency. This is completely true since higher viscosity parameter values lead to greater shear stress, which restricts the motion of the nanofluid.

Fig. 8
figure 8

a Velocity \(f'(\eta )\) for different \(\alpha \)   b Temperature \(\theta (\eta )\) for different \(\alpha \)

Figure 9 displays \(f'(\eta )\) and \(\theta (\eta )\) profiles for a few Williamson parameter \(W_{e}\) values that describe the flow behavior and the heat transfer distribution through the BL. Here, increasing \(W_{e}\) causes the velocity profile to degrade dramatically, although the \(\theta (\eta )\)-field shows the opposite tendency. As a result of the large shear stress caused by the great \(W_{e}\), which creates a flow resistance mechanism for the nonfluid motion, it is to be expected.

Fig. 9
figure 9

a Velocity \(f'(\eta )\) for different \(W_{e}\)   b Temperature \(\theta (\eta )\) for different \(W_{e}\)

The behavior of the Williamson and viscosity parameters on the nanofluid concentration field is illustrated in Fig. 10. This graphic shows how increasing either the Williamson parameter or the viscosity parameter will result in a modest enhancement in the concentration of nanofluid.

Fig. 10
figure 10

a Concentration \(\phi (\eta )\) for different \(\alpha \)   b Concentration \(\phi (\eta )\) for different \(W_{e}\)

The effect of Q on the Williamson nanofluid flow’s \(\theta (\eta )\)-distribution is depicted in Fig. 11a. This graph demonstrates how the temperature profile rises when Q is raised. Because boosting the values of the heat source parameter results in an improvement in the internal heat capacity of the nanofluid, which raises the \(\theta (\eta )\)-distribution. Following that, Fig. 11b illustrates Pr varying on the \(\theta (\eta )\)-field. This graph demonstrates that a decrease in \(\theta (\eta )\)-distribution results from an increase in the Prandtl number. Temperature decreases as a result of reduced thermal diffusivity caused by an increase in Pr.

Fig. 11
figure 11

a Temperature \(\theta (\eta )\) for different Q   b Temperature \(\theta (\eta )\) for different Pr

Figure 12a plots the variation of \(\theta (\eta )\) with Ec. It has been noted that the temperature profile exhibits rising behavior for high Eckert numbers. The reason for this is that a higher Ec improves the kinetic energy that is converted to thermal energy, which raises both \(\theta \)-distribution and the thickness of the thermal BL. Further, Fig. 12b examines how the parameter Nb impacts the \(\theta (\eta )\)-profile. It has been discovered that raising Nb improves the \(\theta (\eta )\)-profile. The additional random movement for nanoparticles caused by an increase in the parameter Nb aids in transmitting heat through the boundary layer, which raises the temperature distribution.

Fig. 12
figure 12

a Temperature \(\theta (\eta )\) for different Ec   b Temperature \(\theta (\eta )\) for different Nb

To validate the accuracy of the approximation method, we evaluated through Table 2 the residual error function (REF) [23] of the current method with the values of parameters \(W_{e}=0.4,\,\alpha =K=Ec=Q=\lambda =0.2,\,M=Nb=0.5,\,\beta =\frac{\pi }{4},\,Pr=1.5,\,Nt=0.1,\,Sc=2.0\) and \(p=8\). These values show the thoroughness of the proposed method in this article and confirm that the current method gives better accuracy.

Table 2 Values for the REF in the current method

Finally, in Table 3 (with \(p=7\)), we present an adjustment of SFC, LNN and, LSN against various embedded factors. It is important to keep in mind that the local SFC decreases as slip velocity, Williamson, heat source, and Eckert number values increase, but that this effect is reversed for high values of the porous parameter, Prandtl number, aligned magnetic field angle, magnetic number, and viscosity parameter. The table also makes clear that the local Sherwood number values decline when the porous parameter, aligned magnetic field angle, \(\lambda ,\,\alpha \), and M values rise, whereas the opposite direction is seen for the Eckert number and heat source parameter. Finally, a further examination of this table reveals that the local Nusselt number is strongly subject to a lowering tendency when \(K,\,\lambda ,\,M\), and \(\alpha \) are included, whereas the Prandtl number exhibits the opposite trend.

Table 3 Values of \(\sqrt{2}Cf_{x}{\text {Re}}_{x}^{1 / 2}\), \(\frac{1}{\sqrt{2}}{\text {Re}}_{x}^{-1 / 2}e^{\frac{-x}{2\,L}} N u_{x}\) and \(\frac{1}{\sqrt{2}}{\text {Re}}_{x}^{-1 / 2} e^{\frac{-x}{2\,L}} S h_{x}\) for distinct quantities of \(K, \beta ,\,\lambda ,\,W_{e}\), M, \(\alpha \), Nb, Q and Ec with \(Nt=0.1\)

7 Conclusions

We have developed the approximate solutions for the proposed model by using the given method. The impacts of thermophoresis, viscous dissipation, Brownian motion, and slip velocity are all joined into the nanofluid system. Creating a justification for the heat transfer improvement seen in non-Newtonian Williamson nanofluids was the aim of this research. The relationship between physical variables and alterations in \(f',\,\theta ,\,\phi \), the skin-friction coefficient, the Sherwood number, and the Nusselt number is examined using tables and diagrams. The following list includes significant findings from the current analysis.

  1. 1.

    When the heat source, slip velocity, and Williamson parameters are enhanced, the skin friction falls.

  2. 2.

    The two most significant processes for nanoparticle/base-fluid slip have been identified as Brownian diffusion and thermophoresis.

  3. 3.

    It is possible to control a process temperature using \(\lambda \) and \(\alpha \) parameters.

  4. 4.

    When \(K,\,\gamma ,\,\alpha ,\,M\), and \(\lambda \) are increased, the velocity and momentum boundary layer also decline.

  5. 5.

    The Sherwood number has increased as Ec and Q improve, whereas it drops as the slip velocity, viscosity, and porous parameter boosts.

  6. 6.

    The value of heat transmission drops as K and \(\alpha \) values improve, and it grows as the Prandtl number rises.

  7. 7.

    Slip velocity and greater levels of the viscosity parameter are two factors that regulate the temperature of nanofluids.