1 Introduction

The magnetohydrodynamics is a subdivision of fluid dynamics in which properties of electrically conducting fluids are analyzed. Naturally, this branch of fluid dynamics is very rich i.e. many fluids like plasma, salt water and electrolysis are the examples of magnetohydrodynamics. Also, this concept is incorporated in many industrial and daily life-used devices such as magnetohydrodynamic (MHD) pumps, MHD power generator and electromagnetic propulsion. The astrophysics is another branch of science which acquired benefits from this feature of fluid e.g. MHD applied in interplanetary medium and interstellar medium to control thermal equilibrium. In aerospace engineering, angular velocities in inertial navigation systems are measured with magnetohydrodynamic sensors very precisely. Thus, due to extensive use of MHD in many fields, a lot of work in literature has been done which addresses the examination of fluid under transverse magnetic field. Mathematically, this phenomenon is expressed in the composition of well-known Navier-Stokes equations in conjunction with Maxwell equations. Alfven [1] did the initiative work; he examined the physical aspects of magnetohydrodynamics. Rossow [2] studied the boundary layer flow of electrically conducting flow over a flat plate. They found that the wall friction factor and wall heat flux are decreased when relative motion between plate and magnetic field is not considered while reverse effects are recorded when relative motion is assumed. Abel and Mahesha [3] designed the problem on MHD viscoelastic fluid under the effects of thermal conductivity, non-uniform source and radiation. They studied the behavior of a transverse magnetic field on temperature profile in both prescribed surface temperature (PST) and prescribed heat flux (PHF) cases. Shahzad and Ali [4] found an analytic solution of the problem addressing the power law fluid flow over a vertical stretched sheet under the impact of a magnetic field. Shahzad and Ali [5] extended their previous work by taking convective boundary condition effects into account. Ellahi [6] described the flow characteristics of MHD fluid flow along with temperature-dependent viscosity effects. Khan et al. [7] discussed the MHD Falkner-Skan flow with convective boundary conditions. The convective flow of MHD Jeffrey fluid over a stretched surface was investigated by Jawad et al. [8]. Gul et al. [9] captured the thin film flow of second-grade fluid in the presence of a transverse magnetic field. The computations of dimensionless velocity and temperature were obtained with the Adomian decomposition method and optimal homotopy analysis method. The influence of the applied magnetic field on pseudoplastic type fluid i.e. Eyring-Powell fluid over a stretching sheet, was analyzed by Akbar et al. [10]. In this investigation, they computed the solution via an implicit finite difference scheme and explored that magnetic field strength as well as fluid parameter provide an opponent to flow. The oblique stagnation point flow of rheological fluid over a stretching sheet under combined influences of partial slip and MHD was deliberated numerically by Nadeem et al. [11]. They concluded that both normal and tangential components of fluid velocity diminish by varying magnetic field while the impact is reverse for both skin friction coefficients against the magnetic field. Malik et al. [12] examined the influence of transverse magnetic field on Powell-Eyring nanofluid over a stretching sheet. The governing system was solved by a shooting method, and the influence of the Hartmann number was elaborated via graphs. They evaluated that the Hartmann number reduces fluid velocity. Nadeem et al. [13] formulated the problem on oblique stagnation point flow of an MHD Walter-B type fluid. For solution purposes, they employed the spectral quasi-linearization method as well as the spectral local linearization method. They suggested that magnetic field strength has converse effects on normal and tangential wall shear stresses. Nawaz et al. [14] investigated the Joule and Newtonian heating effects on MHD viscous fluids over a stretching surface and established the comparison between numerical and analytic solutions. The influence of MHD on tangent hyperbolic fluid over a stretching cylinder was elaborated very concisely by Malik et al. [15]. A numerical solution was established via second-order implicit finite difference scheme. In this investigation, they explored the fact that consequences of transverse magnetic field are an opponent on local shear stress and fluid motion. Ellahi et al. [16] studied the peristaltic motion of MHD Prandtl fluid through tapered stenosis arteries and an analytic solution of the governing problem is computed with the help of perturbation technique. The similarity solutions of rotating micropolar fluid flow between parallel plates with the impact of the magnetic field was found and examined by Mehmood et al. [17]. The expressions for non-dimensional velocity, micro-rotation and temperature were computed by the improved homotopy analysis method i.e. OHAM. The flow of MHD Sisko fluid over a stretching cylinder and heat transfer was investigated by Malik et al. [18]. They prevailed that fluid parameter and magnetic parameter have opposite impacts on fluid momentum. Makinde and Animasaun [19, 20] discussed the biconvection flow of MHD nanofluid over an upper surface of paraboloid of revolution under the different thermo-physical effects and computed the numerical solution via shooting technique. Zeeshan et al. [21] found the numerical solution of the problem addressing viscous fero-fluid over a stretching surface under the impact of magnetic dipole and thermal radiation. Salahuddin et al. [22] designed the problem on Williamson fluid flow under the effect of normal applied magnetic field. In this study, they considered the Cattanneo-Christov heat flux model along with variable stretching. For determination of solution, implicit finite difference scheme Keller-Box has been employed. They concluded that the influence of the applied magnetic field is reverse in the case of velocity and temperature. The influence of the fero-magnetic field on viscoelastic fluid over a porous stretching sheet was numerically investigated by Majeed et al. [23]. They explored that the fero-magnetic field enhances the wall friction factor while an opponent behavior is noticed in wall heat flux. Majeed et al. [24] expand their previous investigation by considering unsteady viscoelastic fero-fluid flow past a stretching surface. Maqbool et al. [25] discussed the Hall current effects on MHD Falkner-Skan flow of finitely extensible non-linear elastic Peterlin (FENE-P) fluid over a stretching surface. The governing similarity equations were solved by ADM and results were compared with numerical solution. Ellahi et al. [26] also studied the impact of Hall current on MHD Jeffrey fluid flow through a non-uniform duct. Ellahi et al. [27] and Rehman et al. [28] studied the MHD Powell-Eyring fluid flow over stretching surfaces with different physical properties and found numerical solutions of governing boundary value problems. The effects of variable viscosity on MHD pseudoplastic fluids through different geometries were reported by Khan et al. [29] and Malik et al. [30]. Ali et al. [31] and Jawad et al. [32, 33] formulated the problem on axisymmetric flows of Newtonian and non-Newtonian fluids under the impact of magnetic field, partial slip and convective boundary conditions. The numerical and analytical solution were calculated and presented graphically against variations in pertinent parameters. Recently, Awais et al. [34] discussed the stagnation point flow of MHD Sisko fluid flow over a stretching cylinder. For solution purposes, a well-known shooting technique was employed and they suggested that the Hartmann number imposed an opposing force on fluid velocity. Hussain et al. [35] briefly explained the computational features of MHD Sisko fluid over a stretching cylinder along with variable thermal conductivity and viscous dissipation effects. The fifth-order Runge-Kutta integration scheme was employed to solve boundary value problems; they perceived that the magnetic field parameter has opposite effects on fluid momentum and energy. Bilal et al. [36] found a numerical solution of 3D MHD Williamson fluid flow over a non-linear bidirectional stretching sheet. They prevailed that effects of the magnetic field are similar on both axial and tangential velocity components.

Fluids which are usually encountered in daily practice do not behave like Newton prediction about fluids i.e. their deformation rate does not vary linearly versus shear stress. The common examples of this type of fluids are blood, toothpaste, ketchup, paints, suspensions, lubricants, silly putty etc. They are called non-Newtonian fluids. Shear properties of Newtonian fluids are deliberated with deformation rate, but this concept is inadequate in the case of non-Newtonian fluids. Additionally, it is a well-known fact that collection of non-Newtonian fluids contains different varieties such as shear thinning, shear thickening, linear viscoelasticity, non-linear viscoelasticity, rheopexy and thixotropy. Also, experimentally it is found that every subclass of non-Newtonian fluids is remarkable dissimilar physical and mechanical properties. Thus, estimation of important fluid properties of non-Newtonian fluids with single constitutive equations is useless. In general, non-Newtonian fluids are split into two principle castes, viscoelastic and viscoinelastic. The present investigation focuses on the examination of viscoinelastic fluids. Mostly viscoinelastic fluids have similar attributes at zero shear stress; on the other hand, characteristics are exceptionally unfamiliar against applied stress. Thus, to scrutinize physical aspects of viscoinelastic fluids more accurately, researchers proposed numerous models: few among them are power law model, Prandtl fluid model and Prandtl-Eyring fluid model. The power law model predicts that the deformation rate and shear stress have a non-linear relation. The Prandtl model suggests that the shear stress is proportional to the sine inverse function of deformation rate while the Prandtl-Eyring model proposed that the shear stress is related to sine hyperbolic function of deformation rate. The present analysis focuses on the Prandtl-Eyring fluid model. Darji et al. [37] assumed the boundary layer flow of viscoinelastic fluids and designed the similarity solutions. Finally, they computed a numerical solution of the Prandtl-Eyring fluid model equations and visualized that fluid parameter effects are inverse on fluid velocity and its slope. Akbar et al. [38] perused the biomechanical features of Prandtl-Eyring fluid flow; in this inspection, they surveyed the blood flow through tapered arteries. The solution was approximated with regular perturbation method for small Prandtl-Eyring fluid parameter, and they perceived that both fluid parameters speed up the fluid movement. Akbar [39] studied the peristaltic transport of Prandtl-Eyring fluid in the small intestine with magnetohydrodynamics and convective boundary conditions. A perturbation solution was determined for small values of the fluid parameter and She detected that the behavior of velocity is opposite near the walls for the Hartmann number and fluid parameter while both parameters slow the fluid motion.

After surveying the above literature, it can be found that no attempt has been presented to explore the effects of transverse magnetic field on Prandtl-Eyring fluid over a stretching surface. Thus, this analysis is proposed to overcome this deficiency. Hence, the present analysis elaborates the physical characteristics of MHD Prandtl-Eyring fluid over a stretching sheet. The governing flow equations are solved with implicit finite difference technique Keller-Box method. The parametric study of all physical parameters on interesting quantities is accomplished and displayed graphically.

1.1 Mathematical formulation

Consider the steady, incompressible, and two-dimensional flow of non-Newtonian Prandtl-Eyring fluid over a stretching sheet. The sheet is stretched linearly along the x direction, and the fluid occupied the upper half-plane i.e. y > 0. A magnetic field of strength B is exerted perpendicular to the flow; the conservation laws of mass and momentum in usual notion are

$$ \nabla .\mathbf{V}=\mathbf{0}, $$
(1)
$$ \rho \frac{\mathbf{dV}}{\mathbf{dt}}=\operatorname{div}\mathbf{T}+\mathbf{J}\times \mathbf{B}, $$
(2)

where V is the velocity field, ρ is the fluid density, T is the Cauchy stress tensor and J is the electric current density. The stress tensor is defined below:

$$ \mathbf{T}=- p\mathbf{I}+\mu \mathbf{S}, $$
(3)

where p is the fluid pressure, I is the identity tensor, μ is the dynamic viscosity and S is called the extra stress tensor of non-Newtonian Eyring-Prandtl fluid, which is defined below:

$$ \mathbf{S}=\frac{ASi{\mathrm{nh}}^{-1}\left(\frac{1}{C}\sqrt{\frac{1}{2} tr\left({\mathbf{A}}_1^2\right)}\right)}{\sqrt{\frac{1}{2} tr\left({\mathbf{A}}_1^2\right)}}{\mathbf{A}}_1, $$
(4)

In the above equation, A and C are fluid parameters. After inserting the above expressions and then employing boundary layer approximations, the governing equations deduced to

$$ \frac{\partial u}{\partial x}+\frac{\partial v}{\partial y}=0, $$
(5)
$$ u\frac{\partial u}{\partial x}+ v\frac{\partial u}{\partial y}=\frac{A}{\rho C}\frac{\partial^2 u}{\partial {y}^2}-\frac{A}{2\rho {C}^3}{\left(\frac{\partial u}{\partial y}\right)}^2\frac{\partial^2 u}{\partial {y}^2}-\frac{\sigma {B}^2}{\rho} u, $$
(6)

along with the boundary conditions

$$ u= U(x)= ax, v=0\ \mathrm{at}\ y=0\ \mathrm{and}\ u\to 0\ \mathrm{at}\ y\to \infty . $$
(7)

In the above system, velocity components are represented by u and v; σ shows electrical conductivity while U(x) denotes the stretching velocity. The stream function is chosen for the following form:

$$ u=\frac{\partial \Psi}{\partial y}, v=-\frac{\partial \Psi}{\partial x}. $$
(8)

The governing flow equations are partial differential equations; this system is inverted into ordinary differential equations by following appropriate similarity transformations

$$ \eta =\sqrt{\frac{a}{\nu}} y,\Psi =\sqrt{ a\nu} xf\left(\eta \right), $$
(9)

Here, η and f denote independent and dependent dimensionless variables respectively and ν is kinematic viscosity. Employing Eq. (9) into Eqs. (5)–(7), the mass conservation equation is identically satisfied while the linear momentum law transfigured into the following form

$$ \alpha {f}^{{\prime\prime\prime} }-\alpha \beta {f}^{{\prime\prime} 2}{f}^{{\prime\prime\prime} }-{f}^{\prime^2}+ f{f}^{{\prime\prime} }- M{f}^{\prime }=0. $$
(10)

The two-point conditions are reshaped to

$$ f(0)=0,\kern0.5em {f}^{\prime }(0)=1,\kern0.5em {f}^{\hbox{'}}\left(\infty \right)=0. $$
(11)

In Eq. (10), material parameters are denoted by α and β while M exhibits the Hartmann number; these dimensionless parameters are defined below:

$$ \alpha =\frac{A}{\mu C},\kern0.62em \beta =\frac{a^3{x}^2}{2{C}^2\nu}, M=\frac{\sigma {B}^2}{ a\rho}. $$
(12)

The entity of practical interest i.e. skin friction coefficient, is defined as

$$ {C}_f=\frac{\tau_w}{\frac{1}{2}\rho {U}^2}. $$
(13)

Here, Cf is called the skin friction coefficient, and τw shows the shear stress at the wall of the surface. The quantity τw is defined as

$$ {\tau}_w=\frac{A}{C}{\left(\frac{\partial u}{\partial r}\right)}_{y=0}-\frac{A}{6{C}^3}{\left(\frac{\partial u}{\partial r}\right)}_{y=0}^3. $$
(14)

After incorporating the dimensionless variables in Eqs. (13)–(14), the skin friction coefficient adapted the following form:

$$ \frac{1}{2}{C}_f\mathrm{R}{\mathrm{e}}_x^{\frac{1}{2}}=\alpha {f}^{{\prime\prime} }(0)-\frac{\alpha \beta}{3}{\left[{f}^{{\prime\prime} }(0)\right]}^3. $$
(15)

In the above equation, Rex is known as the Reynolds number.

1.2 Numerical solution

In the present study, the numerical solution of the governing flow equation i.e. Eq. (10) along with boundary conditions (Eq. (11)) is computed with an implicit finite difference scheme called the Keller-Box method. This scheme is of second order and unconditionally stable. Cebeci and Bradshaw [40] utilized this procedure to solve the heat transfer problem. In this method, first higher-order equations are redesigned into first-order equations. For this aim, new dependent variables u, v, and w are introduced in such a way:

$$ u={f}^{\prime }, $$
(16)
$$ v={u}^{\prime }, $$
(17)
$$ w={v}^{\prime } $$
(18)

After inserting the new variables into Eq. (10), it takes the form defined below:

$$ \alpha \left(1-\beta {v}^2\right){v}^{\prime }+ fv-{u}^2-{M}^2 u=0. $$
(19)

In the second step, derivatives are approximated via second-order central difference scheme. Initially, the net rectangle in the x − η plane is divided into mesh points, described in Fig. 1.

Fig. 1
figure 1

Net rectangle for difference approximation

$$ \begin{array}{c}{x}^0=0,{x}^i={x}^{i-1}+{k}_i,\kern2.25em i=1,2,3\dots I,\\ {}{\eta}_0=0,{x}^i={\eta}_{j-1}+{h}_j,\kern2.25em j=1,2,3\dots J,\end{array} $$
(20)

where ki is the difference between two consecutive x-points while hj is the spacing between η values.

Equations (16)–(17) are converted into difference equations by using central difference derivatives at midpoint (xi, ηj − 1/2):

$$ \frac{f_j^i-{f}_{j-1}^i}{h_j}=\frac{u_j^i+{u}_{j-1}^i}{2}, $$
(21)
$$ \frac{u_j^i-{u}_{j-1}^i}{h_j}=\frac{v_j^i+{v}_{j-1}^i}{2}. $$
(22)

But Eq. (19) is changed into difference equation by approximating derivatives at midpoint (xi − 1/2, ηj − 1/2)

$$ \alpha \left({v}_j^i-{v}_{j-1}^i\right)-\frac{h_j}{2}\alpha \beta {\left({wv}^2\right)}_{j-1/2}^i+\frac{h_j}{2}{f}_{j-1/2}^i{v}_{j-1/2}^i-\frac{h_j}{2}{\left({u}_{j-1/2}^i\right)}^2-\frac{h_j}{2}{M}^2{u}_{j-1/2}^i={L}_{j-1/2}, $$
(23)

where

$$ {L}_{j-1/2}=-\alpha \left({v}_j^{i-1}-{v}_{j-1}^{i-1}\right)+\frac{h_j}{2}\alpha \beta {\left({wv}^2\right)}_{j-1/2}^{i-1}-\frac{h_j}{2}{f}_{j-1/2}^{i-1}{v}_{j-1/2}^{i-1}+\frac{h_j}{2}{\left({u}_{j-1/2}^{i-1}\right)}^2+\frac{h_j}{2}{M}^2{u}_{j-1/2}^{i-1}. $$
(24)

The right hand side of the equation i.e. Lj − 1/2 consists known quantities.

After differencing, the boundary conditions take the following form:

$$ {f}_0^i=0,{u}_0^i=1,{u}_J^i=0. $$
(25)

The above system of difference equations i.e. Eqs. (21)–(23) has nonlinearity of higher order. To solve this non-linear simultaneous system, the well-known technique named Newton’s method is applied. So, we have

$$ \begin{array}{c}{f}_j^{\left( k+1\right)}={f}_j^{(k)}+\delta {f}_j^{(k)},\\ {}{u}_j^{\left( k+1\right)}={u}_j^{(k)}+\delta {u}_j^{(k)},\\ {}{v}_j^{\left( k+1\right)}={v}_j^{(k)}+\delta {v}_j^{(k)}.\end{array} $$
(26)

Incorporating the above expressions into Eqs. (21)–(23) and retaining only linear terms in δ, the above non-linear system is reordered to

$$ \delta {f}_j-\delta {f}_{j-1}-\frac{h_j}{2}\left(\delta {u}_j+\delta {u}_{j-1}\right)={\left({r}_1\right)}_j, $$
(27)
$$ \delta {u}_j-\delta {u}_{j-1}-\frac{h_j}{2}\left(\delta {v}_j+\delta {v}_{j-1}\right)={\left({r}_2\right)}_j, $$
(28)
$$ \begin{array}{l}{\left({a}_1\right)}_{j-1/2}\delta {v}_j+{\left({a}_2\right)}_{j-1/2}\delta {v}_{j-1}+{\left({a}_3\right)}_{j-1/2}\delta {f}_j+{\left({a}_4\right)}_{j-1/2}\delta {f}_{j-1}\hfill \\ {}+{\left({a}_5\right)}_{j-1/2}\delta {u}_j+{\left({a}_6\right)}_{j-1/2}\delta {u}_{j-1}={\left({r}_3\right)}_j,\hfill \end{array} $$
(29)

where

$$ \begin{array}{l}{\left({a}_1\right)}_{j-1/2}=\alpha \left(1-\frac{1}{2}\beta {v}_{j-1/2}^2\right)-\frac{h_j}{2}\alpha \beta {(vw)}_{j-1/2}+\frac{h_j{f}_{j-1/2}}{4},\hfill \\ {}{\left({a}_2\right)}_{j-1/2}=-\alpha \left(1-\frac{1}{2}\beta {v}_{j-1/2}^2\right)-\frac{h_j}{2}\alpha \beta {(vw)}_{j-1/2}+\frac{h_j{f}_{j-1/2}}{4},\hfill \\ {}{\left({a}_3\right)}_{j-1/2}=\frac{{h v}_{j-1/2}}{4},\kern1em {\left({a}_4\right)}_{j-1/2}={\left({a}_3\right)}_{j-1/2},\hfill \\ {}{\left({a}_5\right)}_{j-1/2}=-\frac{h}{2}{u}_{j-1/2}-\frac{h M}{4},\kern1.25em {\left({a}_6\right)}_{j-1/2}={\left({a}_5\right)}_{j-1/2},\hfill \end{array} $$
(30)
$$ {\left({r}_1\right)}_j=-\left({f}_j-{f}_{j-1}\right)+\frac{h_j}{2}\left({u}_j+{u}_{j-1}\right), $$
(31)
$$ {\left({r}_2\right)}_j=-\left({u}_j-{u}_{j-1}\right)+\frac{h_j}{2}\left({v}_j+{v}_{j-1}\right), $$
(32)
$$ {\left({r}_3\right)}_j=-\alpha {h}_j{w}_{j-1/2}+\frac{h_j}{2}\left[\alpha \beta {w}_{j-1/2}{\left({v}_{j-1/2}\right)}^2-{f}_{j-1/2}{v}_{j-1/2}+{\left({u}_{j-1/2}\right)}^2+{Mu}_{j-1/2}\right]+{L}_{j-1/2}, $$
(33)

while prescribed boundary conditions are altered to

$$ \delta {f}_0=0,\delta {\mathrm{u}}_0=0,\delta {u}_j=0. $$
(34)

The system of equations i.e. Eqs. (27)–(29) is a linear system. So for computation of solution, firstly this system is converted into a matrix form. After conversion, its structure is a block-tridiagonal matrix, which is defined below:

$$ \left(\begin{array}{l}\begin{array}{cccc}\hfill \left[{A}_1\right]\left[{C}_1\right]\hfill & \hfill \hfill & \hfill \hfill & \hfill \hfill \end{array}\\ {}\begin{array}{cccc}\hfill \left[{B}_2\right]\left[{A}_2\right]\left[{C}_2\right]\hfill & \hfill \hfill & \hfill \hfill & \hfill \hfill \end{array}\\ {}\begin{array}{cccc}\hfill \hfill & \hfill -\hfill & \hfill -\hfill & \hfill -\hfill \end{array}\\ {}\begin{array}{cccc}\hfill \hfill & \hfill \hfill & \hfill -\hfill & \hfill \begin{array}{cc}\hfill -\hfill & \hfill -\hfill \end{array}\hfill \end{array}\\ {}\begin{array}{cccc}\hfill \hfill & \hfill \hfill & \hfill \hfill & \hfill \begin{array}{ccc}\hfill -\hfill & \hfill -\hfill & \hfill -\hfill \end{array}\hfill \end{array}\\ {}\begin{array}{cccc}\hfill \hfill & \hfill \hfill & \hfill \hfill & \hfill \begin{array}{cccc}\hfill \hfill & \hfill \left[{B}_{j-1}\right]\hfill & \hfill \left[{A}_{j\_1}\right]\hfill & \hfill \left[{C}_{j-1}\right]\hfill \end{array}\hfill \end{array}\\ {}\begin{array}{cccc}\hfill \hfill & \hfill \hfill & \hfill \hfill & \hfill \begin{array}{cccc}\hfill \hfill & \hfill \hfill & \hfill \hfill & \hfill \begin{array}{cccc}\hfill \hfill & \hfill \left[{B}_j\right]\hfill & \hfill \left[{A}_j\right]\hfill & \hfill \hfill \end{array}\hfill \end{array}\hfill \end{array}\end{array}\right)\kern0.5em \left(\begin{array}{c}\hfill \left[{\delta}_1\right]\hfill \\ {}\hfill \left[{\delta}_2\right]\hfill \\ {}\hfill -\hfill \\ {}\hfill \begin{array}{c}\hfill -\hfill \\ {}\hfill -\hfill \\ {}\hfill \begin{array}{c}\hfill \left[{\delta}_{j-1}\right]\hfill \\ {}\hfill \left[{\delta}_j\right]\hfill \end{array}\hfill \end{array}\hfill \end{array}\right)=\left(\begin{array}{c}\hfill \left[{r}_1\right]\hfill \\ {}\hfill \left[{r}_2\right]\hfill \\ {}\hfill \begin{array}{l}-\\ {}-\\ {}-\\ {}\left[{r}_{j-1}\right]\end{array}\hfill \\ {}\hfill \left[{r}_j\right]\hfill \end{array}\right) $$
$$ \left[ A\right]\left[\delta \right]=\left[ r\right]. $$
(35)

The components of the above tridiagonal system are defined as

\( \begin{array}{cc}\hfill \left[{A}_1\right]=\hfill & \hfill \left(\begin{array}{l}\begin{array}{ccc}\hfill 0\hfill & \hfill \kern0.5em 1\kern0.5em \hfill & \hfill 0\hfill \end{array}\\ {}\begin{array}{ccc}\hfill d\hfill & \hfill \kern0.5em 0\kern0.5em \hfill & \hfill d\hfill \end{array}\\ {}{a}_2\kern0.75em {a}_3\kern1.5em {a}_1\end{array}\right)\hfill \end{array}, \) \( \begin{array}{l}\begin{array}{cc}\hfill \left[{A}_j\right]=\hfill & \hfill \left(\begin{array}{l}\begin{array}{ccc}\hfill d\hfill & \hfill \kern1.3em 1\kern1.3em \hfill & \hfill 0\hfill \end{array}\\ {}\begin{array}{ccc}\hfill \hbox{-} 1\hfill & \hfill \kern0.5em 0\kern1.3em \hfill & \hfill d\hfill \end{array}\\ {}{\left({a}_6\right)}_j\kern0.75em {\left({a}_3\right)}_j\kern.8em {\left({a}_1\right)}_j\end{array}\right)\hfill \end{array},\\ {}\kern6.75em \mathrm{where}\ \mathrm{j}=2,3,4,\dots, \mathrm{J}.\end{array} \) \( \begin{array}{l}\begin{array}{cc}\hfill \left[{B}_j\right]=\hfill & \hfill \left(\begin{array}{l}\begin{array}{ccc}\hfill 0\hfill & \hfill -1\kern0.5em \hfill & \hfill 0\hfill \end{array}\\ {}\begin{array}{ccc}\hfill 0\hfill & \hfill \kern0.5em 0\kern0.5em \hfill & \hfill d\hfill \end{array}\\ {}0\kern0.75em {\left({a}_4\right)}_j{\left({a}_2\right)}_j\end{array}\right)\hfill \end{array},\\ {}\kern6.75em \mathrm{where}\ j=2,3,\dots, J.\end{array} \) \( \begin{array}{l}\begin{array}{cc}\hfill \left[{C}_j\right]=\hfill & \hfill \left(\begin{array}{l}\begin{array}{ccc}\hfill d\hfill & \hfill\ 0\hfill & \hfill \kern0.5em 0\hfill \end{array}\\ {}\begin{array}{ccc}\hfill 1\hfill & \hfill \kern0.5em 0\kern0.5em \hfill & \hfill d\hfill \end{array}\\ {}{\left({a}_5\right)}_j0\kern1.25em 0\end{array}\right)\hfill \end{array},\\ {}\kern6.75em \mathrm{where}\ j=1,2,\dots, J-1.\end{array} \)

$$ \begin{array}{l}\left[{\delta}_1\right]\begin{array}{cc}\hfill =\left(\begin{array}{c}\hfill \delta {v}_0\hfill \\ {}\hfill \delta {f}_1\hfill \\ {}\hfill \delta {v}_1\hfill \end{array}\right),\hfill & \hfill \left[{\delta}_j\right]\hfill \end{array}=\left(\begin{array}{c}\hfill \delta {u}_{j-1}\hfill \\ {}\hfill \delta {f}_j\hfill \\ {}\hfill \delta {v}_j\hfill \end{array}\right)\\ {}\kern9.75em \mathrm{where}\ j=2,3,\dots, J.\\ {}\kern1em \mathrm{and}\ \left[{r}_j\right]=\left(\begin{array}{c}\hfill {\left({r}_1\right)}_{j-1/2}\hfill \\ {}\hfill {\left({r}_2\right)}_{j-1/2}\hfill \\ {}\hfill {\left({r}_3\right)}_{j-1/2}\hfill \end{array}\right)\ \mathrm{where}\ j=1,2,3,\dots, J.\end{array} $$

For solution of this block-tridiagonal matrix, the Thomas algorithm is employed. The convergence criterion of the computed solution is that |δv0| is less than error tolerance. If the computed solution does not hold the convergence criteria, then values of dependent variables are revised by Newton’s method and the procedure is repeated unless the solution satisfied the criteria.

2 Results and discussion

In the present analysis, the flow of Prandtl-Eyring fluid over a stretching sheet is investigated. The transverse magnetic field is employed to control the momentum boundary layer. The solution is found by employing the implicit finite difference scheme Keller-Box method. To certify the precision of the used method, a contrast is presented with previously reported data i.e. Akbar et al. [10] and Malik et al. [15] via Table 1. It could be seen that results are in good agreement.

Table 1 Comparison of wall shear stress by varying Hartmann number M while neglecting the influence of fluid parameters, i.e., putting α = β = 0.

In order to obtain a clear insight of the physical problem, the results are debated with the aid of graphical illustrations. The significance of pertinent flow parameters on fluid momentum and wall friction are depicted via Figs. 2, 3, 4, 5, and 6. Additionally, variations in wall friction factor are discussed numerically though Table 2. The illustration of these results is elaborated briefly and concisely below.

Fig. 2
figure 2

Contrast of fluid velocity curves for variation in Hartmann number M = 0.1, 0.5, 1, 1.5 and keeping α = 5 and β = 0.4

Fig. 3
figure 3

Effects of Prandtl-Eyring parameter α on momentum transport retaining β and M fixed

Fig. 4
figure 4

Curves of velocity profile by altering Prandtl-Eyring parameter β and retaining α and M fixed

Fig. 5
figure 5

Wall friction for altered values of Hartmann number M and Prandtl-Eyring fluid parameter α

Fig. 6
figure 6

Deviations in skin friction coefficient by varying Prandtl-Eyring fluid parameter β and Hartmann number M

Table 2 Numerical values of skin friction coefficient for different values of Prandtl-Eyring parameters α, β and Hartmann number M.

Figure 2 demonstrates the velocity profile variations corresponding to values of the Hartmann number M = 0.1, 0.5, 1, 1.5 while retaining α = 5 and β = 0.4. This graph explained that the velocity curves show declination versus independent variable η, additionally strengthening the transverse magnetic field influence velocity of the flow reduces. This result provides the strength to the well-known fact that the magnetic field generates Lorentz force, which dwindles the velocity profile f(η).

Fluctuations in fluid velocity f(η) against altering the values of the Prandtl-Eyring fluid parameter α is elaborated in Fig. 3 while fixed values are allotted to Hartmann number M and fluid parameter β. This graph reveals that motion is accelerated rapidly when the fluid parameter enlarges. The result holds practically, because enhancement in fluid parameter causes decrease in viscosity i.e. less resistance is offered to flow and alternatively momentum transportation accelerates.

Figure 4 manifests the significance of fluid parameter β on axial velocity f(η); on the other hand, both parameters have assigned fixed values i.e. α = 5 , M = 3. It can be seen that curves of velocity are overlapping on each other i.e. the velocity profile has changed slightly due to variation of fluid parameter β. Additionally, this figure described a decreasing behavior of fluid velocity against higher values of fluid parameter β. This is due to the fact that fluid parameter β varies inversely with momentum diffusivity. Finally, one can see that a strong magnetic field (M = 3) decelerates fluid momentum substantially.

Figure 5 expresses the attributes of both Hartmann number M and Prandtl-Eyring fluid parameter α on wall shear stress. This figure displays that in the curve corresponding to α = 2 values of the skin friction coefficient vary slightly against increasing values on M. On the other hand, absolute values of the skin friction coefficient enhance rapidly versus M when α has allotted values 5, 7, and 10. Also, this figure exhibits that both parameters have significant dependence on each other. Additionally, this graph shows that numerical values of wall friction enlarge for higher values of both parameters.

Figure 6 depicts deviations in practically interested quantity i.e. skin friction coefficient corresponds to altering values of Hartmann number M and fluid parameter β; additionally, the value of α is fixed. The values of wall friction changes very slightly versus increasing effect of fluid parameter β while curves change rapidly against Hartmann number M. Finally, it is concluded from the figure that fluid parameter β declines the friction of wall slowly.

The impact of existing parameters α, β, and M on the local shear stress is exhibited via Table 2. The behavior of the skin friction coefficient increases against α and M while its characteristics are opposite when fluid parameter β enhances.

3 Conclusions

A theoretical investigation is designed to observe the impact of normally applied magnetic field on Prandtl-Eyring fluid flow over a linearly stretching surface. The governing equations of the flow field are solved numerically with the efficient technique Keller-Box method. Observations are carried out and reported by varying important flow parameters α, β, and M against axial velocity and wall friction coefficient. The specific findings derived from the present analysis are listed below:

  • An appreciable growth has been noticed in the transportation of momentum against increment in fluid parameter α while fluid parameter β decays the velocity at all points of the flow domain.

  • The strength of the magnetic field is counterproductive for enhancement in fluid velocity.

  • The effect of the magnetic field on local shear stress is more prominent than both fluid parameters α and β. Also, absolute values of the skin friction coefficient enhance by increasing fluid parameter α and Hartmann number M while numerical values of wall shear stress decline versus fluid parameter β.