1 Introduction

The heat transfer by convection is one of the most important mechanisms for heat transfer using moving fluid in contact with solid surfaces. This mechanism mainly depends on the heat transfer coefficient of the moving fluid. The heat exchangers use water, oils, and mixture as working fluids such as steam cycles, chillers, and internal combustion engines. The thermal conductivity of such fluids should be enhanced to improve the heat transfer. Nanotechnology aims at the structure of the base fluid by adding nanoparticles of high thermal conductivity to enhance the thermal characteristics. The nanoparticles are very small in size to flow in microchannels and behave such as fluid particles without any significant pressure drop.

The nanofluid heat transfer rate increases with an increase in the nanoparticles volume fraction [1]. The existence of a magnetic field increases skin friction and reduces heat transfer [2]. The effect of variable thickness and the Brownian motion on the nanoparticle’s concentration increases in the presence of a magnetic field [3].

The flow and heat transfer through porous media exists in engineering applications such as chemical reactors, thermal insulation, and groundwater hydrology. A lot of numerical studies cover the flow through porous medium [4]. The magnetic field decelerated the fluid flow within the porous medium [5]. The flatness of the stretching surface for flow in a porous medium increases skin friction [6], 7. Hall and ion slip increases the thickness of the boundary layer flow through porous medium [8] and through saturated porous medium [8], and past an infinite vertical plate [9].

The combination of nanofluids and porous medium has a great potential for heat transfer in various thermal systems [10]. The numerical studies for the laminar flow of nanofluid through porous medium take place [11] such as the study for mixed convection over an inclined plate [12]. The yield stress reduces skin friction [13]. The nanofluid flow through a vertical porous medium in the existence of chemical reaction shows that the concentration increases with the rise of chemical reaction [14]. A numerical study of MHD Williamson nanofluid flow through porous medium highlights that the heat flux enhanced for augmented Brownian diffusion [15]. Another numerical model investigated the effect of adding nanoparticles CU, Ag, and Fe3O4 on thermophoresis and viscous dissipation [16].

The swimming up of suspended microorganisms such as seaweed and bacteria helps in heat transfer by convection. This pattern of heat transfer is called bioconvection, such microorganisms include gyrotaxis or gravitaxis [17]. The existence of motile microorganisms in the fluid enhances the heat transfer, mass transfer, microscale mixing, and anticipated improved stability of the nanofluid [18], 19. A numerical analysis examined the nanofluid biothermal convection [20]. Free convection boundary layer flow past a horizontal flat plate embedded in a porous medium filled with nanofluid containing gyrotactic microorganisms is studied [21]. Another numerical study [22] investigated the effect of heat generation on the boundary layer flow of a nanofluid containing gyrotactic microorganisms over an inclined stretching cylinder. Bioconvection of nanofluid past stretching surface in a porous medium in the presence of gyrotactic microorganisms with Newtonian heating is studied numerically [23]. Thermosolutal Marangoni's impact on bioconvection in the suspension of gyrotactic microorganisms over an inclined stretching sheet is studied [24]. The thermal and mechanical analyses of compliant thermoelectric coils for flexible and biointegrated devices are considered [25]. Finally, bioconvection in convectional nanofluid flow containing gyrotactic microorganisms over a vertical cone is numerically solved [26].

In the present study, the boundary layer flow is examined for nanofluid flow over a vertical stretching surface embedded in a porous medium. The present work takes place in many applications such as the piping industry, optical fibers, metallic sheets cooling, polymer industry, and cooling of electrical and electronic components.

2 Mathematical modeling

The boundary layer flow of nanofluid in porous media over stretching vertical surface is considered in the paper. The fluid is incompressible, and the flow is laminar. The heat is mixed convection. The water is considered as base fluid. The flow is full of microorganisms. For modeling the problem, the Cartesian coordinates are used as shown in Fig. 1.

Fig. 1
figure 1

Problem modeling

A flat surface is stretched vertically with velocity of \(U_{w} = ax^{n}\) where a and n are arbitrary constants. The flow momentum, energy, concentration, and the density of the motile of microorganisms are modeled [22, 23] by the following equations as follows

$$ \frac{\partial u}{{\partial x}} + \frac{\partial v}{{\partial y}} = 0 $$
(1)
$$ \begin{aligned} \rho_{f\infty } &\left( {u\frac{\partial u}{{\partial x}} + v\frac{\partial u}{{\partial y}}} \right) - \mu \frac{{\partial^{2} u}}{{\partial y^{2} }} - \left( {1 - C_{\infty } } \right)\rho_{f\infty } \beta_{T} \left( {T - T_{\infty } } \right) \hfill \\ &\quad + \left( {\rho_{p} - \rho_{f\infty } } \right)g\left( {C - C_{\infty } } \right) + \left( {\rho_{n\infty } - \rho_{f\infty } } \right)g{\upgamma }\left( {N - N_{\infty } } \right) + \frac{\mu }{{\text{\rm K}}}u = 0 \hfill \\ \end{aligned} $$
(2)
$$ u\frac{\partial T}{{\partial x}} + v\frac{\partial T}{{\partial y}} = \frac{\nu }{\mu }\frac{{\partial^{2} T}}{{\partial y^{2} }} + \tau \left[ {D_{B} \frac{\partial T}{{\partial y}}\frac{\partial C}{{\partial y}} + \frac{{D_{T} }}{{T_{\infty } }}\left( {\frac{\partial T}{{\partial y}}} \right)^{2} } \right] $$
(3)
$$ u\frac{\partial C}{{\partial x}} + v\frac{\partial C}{{\partial r}} = D_{B} \frac{{\partial^{2} C}}{{\partial y^{2} }} + \frac{{D_{T} }}{{T_{\infty } }}\frac{{\partial^{2} T}}{{\partial y^{2} }} $$
(4)
$$ u\frac{\partial N}{{\partial x}} + v\frac{\partial N}{{\partial y}} = D_{n} \frac{{\partial^{2} N}}{{\partial y^{2} }} - \frac{{b_{c} W_{c} }}{{(C_{w} - C_{\infty } )}}\frac{\partial }{\partial y}\left( {N\frac{\partial C}{{\partial y}}} \right) $$
(5)

with boundary conditions

$$ \begin{aligned} at\, x = 0: u = U_{w} = ax^{n} , v = 0, T = T_{w} , C = C_{w} , N = N_{w} \hfill \\ as\, x \to \infty : u \to 0, v \to 0, T \to T_{\infty } , C \to C_{\infty } , N \to N_{\infty } \hfill \\ \end{aligned} $$
(6)

Equations (1)–(5) present the continuity equation, the momentum equation, the energy equation, the equation for the nanoparticle’s concentration, and the conservation of the density of the motile microorganisms, respectively. \(u\) and \(v\) are x- and y-components of the velocity. \(\rho_{n\infty }\), \(\rho_{f\infty } , \rho_{P}\) are the density of the microorganisms, the fluid, and nanoparticles, respectively. C is the nanoparticle’s concentration, \(\beta_{T}\) is the volume expansion coefficient of the fluid, \(g\) is the acceleration gravity vector, \({\upgamma }\) is the average volume of the microorganisms, \({\text{\rm K}}\) is the permeability of porous medium,\(N\) is the density of the motile microorganism, T is the fluid temperature, \(\mu \) is the kinematic viscosity of the fluid, \(\tau \) is the effective heat capacitance, \(D_{B}\) is the Brownian diffusion coefficient,\( D_{T}\) is the thermophoresis coefficient, \(D_{n}\) is the diffusivity of the microorganism, \(b_{c}\) is the chemotaxis constant, \(W_{c}\) is the constant maximum cell swimming speed, and \(n\) is the index power.

The similarity dimensionless variable is as follows:

$$ \eta = \sqrt {\frac{n + 1}{2}\frac{{U_{w} }}{vx}} y $$
(7)

is used to simplify the given mathematical model. The momentum and energy equations are simplified while the continuity equation is satisfied through assuming the stream, \(\psi ( x; y ),\) and the dimensionless temperature, \(\theta \left( \eta \right), \phi \left( {\eta } \right)\) the dimensionless concentration, and \(\chi \left( {\eta } \right)\) the dimensionless microorganism as follows:

$$ \psi = a\sqrt {\frac{2}{n + 1}vU_{w} x} f\left( \eta \right), \theta \left( \eta \right) = \frac{{T - T_{\infty } }}{{T_{w} - T_{\infty } }}, \phi \left( \eta \right) = \frac{{C - C_{\infty } }}{{C_{w} - C_{\infty } }}, \chi = \frac{{ n - n_{\infty } }}{{n_{w} - n_{\infty } }} $$
(8)

where \(f\left( \eta \right)\) is dimensionless function. The equations from (2) to (5) in combination with the boundary condition (6) were converted using the similarity transformation technique into ordinary differential equations (ODE). A stream function has been chosen to satisfy Eq. (1) of continuity. Substituting Eqs. (7) and (8) in Eqs. (2) to (5);

$$ f^{\prime \prime \prime } + ff^{\prime \prime } - \left( {\frac{2n}{{n + 1}}} \right)f^{^{\prime}2} - \lambda f^{\prime } + \frac{2}{n + 1}Ri \left[ {\theta - N_{r} \phi - R_{b} \chi } \right] = 0 $$
(9)
$$ \theta^{\prime \prime } + Prf \theta^{\prime } + Pr\left[ {N_{B} \phi^{\prime } + N_{T} \theta^{\prime } } \right]\theta^{\prime } = 0 $$
(10)
$$ \phi^{\prime \prime } + Le f\phi^{\prime } + \frac{{N_{T} }}{{N_{B} }}\theta^{\prime \prime } = 0 $$
(11)
$$ \chi^{\prime \prime } + LbPrf\chi^{\prime } - Pe\left[ {\sigma \phi^{\prime } + \phi^{\prime } \chi + \phi^{\prime } \chi^{\prime } } \right] = 0 $$
(12)

with B.C

$$ f\left( 0 \right) = 0, f^{\prime } \left( 0 \right) = 1, \theta \left( 0 \right) = 1, \phi \left( 0 \right) = 1,\chi \left( 0 \right) = 1,\eta \to \infty :f^{\prime } \to 0, \theta \to 0, \phi \to 0,\chi \to 0 $$
(13)

where \(\lambda = v/\left( {K a x^{n - 1} } \right)\) is the porosity parameter, \(Ri = Gr_{x} /Re_{x}^{2} = g\beta_{T} l^{2} \Delta T/\left( {U_{o}^{2} x} \right)\) is the Richardson number, \(N_{r} = \frac{{\left( {\rho_{p} - \rho_{\infty } } \right)\Delta C}}{{\left( {1 - C_{\infty } } \right)\rho_{\infty } \beta \Delta T}}\) is the buoyancy ratio parameter, \(R_{b} = \frac{{\left( {\rho_{m\infty } - \rho_{\infty } } \right)\gamma_{1} \Delta n}}{{\left( {1 - C_{\infty } } \right)\rho_{\infty } \beta \Delta T}}\) is the bioconvection Rayleigh number, \(N_{B} = \tau D_{B} \Delta C/\left( {vT_{\infty } } \right)\) is the Brownian motion parameter, \(N_{T} = \tau D_{T} \Delta T/\left( {vT_{\infty } } \right)\) is the thermophoresis parameter, \(Le = v/\left( {D_{B} \Delta C} \right)\) is the Lewis number,, \(Pr = v/\alpha\) is the Prandtl number, \(Lb = D_{B} /D_{n}\) is the bioconvection Lewis number, \(Pe\) is the Peclet number, and \(\sigma = N_{\infty } /\left( {N_{w} - N_{\infty } } \right)\) is the motile parameter.

The skin friction coefficient \(C_{f}\), the local Nusselt number \(Nu_{x}\), the local Sherwood number \(Sh_{x}\), and the density number of the motile microorganisms \(Nn_{x}\) are given by.

$$ C_{f} = \frac{{2\tau_{w} }}{{\rho U_{w}^{2} }}, Nu_{x} = \frac{{xq_{w} }}{k \Delta T}, Sh_{x} = \frac{{xq_{m} }}{{D_{B} \Delta C}}, Nn_{x} = \frac{{xq_{n} }}{{D_{n} \Delta n}} $$
(14)

where \(\tau_{w} = - \mu (\partial u/\partial y)_{y = a}\) is the surface shear stress, \(q_{w} = - k(\partial T/\partial y)_{y = a}\) is the surface heat flux, \(q_{m} = - D_{B} (\partial C/\partial y)_{y = a}\) is the surface mass flux, and \(q_{n} = - D_{n} (\partial N/\partial y)_{y = a}\) is flux of the surface motile microorganisms. After similarity transformation applied Eq. (14) is transformed to the following form.

$$ \frac{1}{2}C_{f} \sqrt {Re_{x} } = - f^{\prime \prime } \left( 0 \right), \frac{{Nu_{x} }}{{\sqrt {Re_{x} } }} = - \theta^{\prime } \left( 0 \right), \frac{{Sh_{x} }}{{\sqrt {Re_{x} } }} = - \varphi^{\prime } \left( 0 \right), \frac{{Nn_{x} }}{{\sqrt {Re_{x} } }} = - \chi^{\prime } \left( 0 \right) $$
(15)

where \(Re_{x} = U_{o} x^{2} /vl\) is the local Reynold’s number.

3 Numerical method

Equations (9) to (13) take the form of the following simultaneous system of first ODE using linearity technique such as \(y_{1} = f\), \(y_{2} = f^{\prime}\), \(y_{3} = f^{\prime\prime}\), \(y_{4} = \theta\), \(y_{5} = \theta^{\prime}\), \(y_{6} = \varphi\), \(y_{7} = \varphi^{\prime}\), \(y_{8} = \chi\), and \(y_{9} = \chi^{\prime}\).

$$ {\begin{aligned} &y_{1}^{^{\prime}} = y_{2} \hfill \\ &y_{2}^{^{\prime}} = y_{3} \hfill \\ & y_{3}^{^{\prime}} = - y_{1} y_{3} + \left( {\frac{2n}{{n + 1}}} \right)y_{2}^{2} + \lambda y_{2} + \left( {\frac{2}{n + 1}} \right)Ri\left( { - y_{4} + N_{r} y_{6} + R_{b} y_{8} } \right) \hfill \\ &y_{4}^{^{\prime}} = y_{5} \hfill \\ &y_{5}^{^{\prime}} = - Pr\left( {y_{1} y_{5} + N_{B} y_{5} y_{7} + N_{t} y_{5} y_{5} } \right) \hfill \\ &y_{6}^{^{\prime}} = y_{7} \hfill \\ &y_{7}^{^{\prime}} = - Ley_{1} y_{7} - \frac{{N_{t} }}{{N_{B} }}y_{5}^{^{\prime}} \hfill \\ &y_{8}^{^{\prime}} = y_{9} \hfill \\ &y_{9}^{^{\prime}} = - - Le Pry_{1} y_{9} + Pe \left[ { \sigma y_{7}^{^{\prime}} + y_{7} y_{9} + y_{7}^{^{\prime}} y_{8} } \right] \hfill \\ \end{aligned}} $$
(16)

where the initial conditions.

$$ y_{1} \left( 0 \right) = 0, y_{2} \left( 0 \right) = 1, y_{3} \left( 0 \right) = s_{1} , y_{4} \left( 0 \right) = 1, y_{5} \left( 0 \right) = s_{2} , y_{6} \left( 0 \right) = 1, y_{7} \left( 0 \right) = s_{3} , y_{8} \left( 0 \right) = 1, y_{9} \left( 0 \right) = s_{4} $$
(17)

where \(s_{1}\), \(s_{2}\), \(s_{3}\), \(s_{4}\) are arbitrary parameters that will be determined. Equations (16) and initial conditions (17) are solved using the fourth/fifth-order Runge–Kutta method in combination using the Mathematica program. The shooting method guesses the missing boundary conditions. The program checks the error to satisfy the following final conditions.

$$ y_{2} \left( \infty \right) = 0, y_{4} \left( \infty \right) = 0, y_{6} \left( \infty \right) = 0, y_{8} \left( \infty \right) = 0 $$
(18)

4 Numerical results

The reduced Eqs. (9)–(12) are nonlinear and coupled, and its analytical solution is not possible. So, the linearized Eq. (16) is used to apply numerical solution using Runge–Kutta fourth/fifth-order method at different values for the effected parameters.

Remembering that \(f^{\prime}\left( \eta \right)\) is the fluid velocity, \(\theta \left( \eta \right)\) is the temperature, \(\phi \left( \eta \right)\) is the nanofluid concentration, and \(\chi \left( \eta \right)\) is the density of the motile microorganisms. To ensure the accuracy of our calculations, comparisons with Khan and Pop [27] and Mehtyan et al. [28] at different setting Table 1 for \(- \theta^{\prime}\left( 0 \right)\) and \(- \varphi^{\prime}\left( 0 \right)\) ensure the correctness of the numerical method.

Table 1 Comparison table \(n = Nr = Rb = Pe = Lb = \lambda = 0, Le = Pr = 10, n = 1 \,{\text{and different values for Nt and }}N_{B}\)

4.1 Bioconvection Lewis number, Lb

This number presents the ratio of the rate of temperature spread to the microorganism’s diffusivity. Figure 2 shows a rapid decline in the profile because of the bioconvection. Lewis number opposes the motion of the fluid. Physically, increasing \(Lb \) number opposes the diffusion of the microorganisms’ diffusivity.

Fig. 2
figure 2

\(Lb\), Bioconvection Lewis number effect on the density of the motile microorganisms

4.2 Lewis’s number \( Le\)

\(\user2{ }Le\) number is dimensionless measures the rate of temperature spread against the mass diffusivity. Figure 3a and 3b shows that rising values of Lewis number Le result in decreasing temperature and concentration profiles. Rising values of Le indicate strong molecular motions, which ultimately enhance the fluid temperature.

Fig. 3
figure 3

\(Le\), Lewis number effect on \(\theta \left( \eta \right)\) and \(\phi \left( \eta \right)\)

Fluid with a larger Lewis number possesses a weaker Brownian diffusion coefficient, which causes particles to diffuse deeply into the fluid. Because of this, a shorter penetration depth of temperature exists in the case of higher values of the Lewis number.

4.3 Power index \( {\varvec{n}}\)

Power index \(n\) is a constant effects the degree of the stretching velocity. Increasing the power index decreases the friction effect as shown in Fig. 4a, b, c and d showing an increase in the other profiles.

Fig. 4
figure 4

\(n\), Power index effect on \(f^{\prime}\left( \eta \right)\), \(\theta \left( \eta \right)\), \(\phi \left( \eta \right)\), and \(\chi \left( \eta \right)\)

4.4 Brownian motion parameter \({\varvec{N}}_{{\varvec{B}}}\)

The random collision between the small particles creates the Brownian motion. The parameter \(N_{B}\) measures the level of the random motion of the suspended nanoparticle within the nanofluid. Figure 5a and d show that the \(N_{B}\) has a very slight effect on the \(f^{\prime}\left( \eta \right)\) and the \(\chi \left( \eta \right)\). Enhancing the convection presents an increase in heat transfer as shown in Fig. 5b. The \(\phi \left( \eta \right)\) decreases far from the surface as shown in Fig. 5c. Physically, increasing the temperature increases the energy of the particles and then increases its random movement and fast collision increasing the Brownian motion. While increasing, the concentration decreases the spaces for particles movement and then decreases the probability of collision.

Fig. 5
figure 5

\(N_{B}\), Brownian motion parameter effect on \(f^{\prime}\left( \eta \right)\), \(\theta \left( \eta \right)\), \(\phi \left( \eta \right)\), and \(\chi \left( \eta \right)\)

4.5 Buoyancy ratio parameter \(N_{r}\)

Figure 6a shows that the \(f^{\prime}\left( \eta \right)\) decreases with increases buoyancy ratio parameter \(N_{r}\), while the \(\theta \left( \eta \right)\), \(\phi \left( \eta \right)\), and the motile microorganism’s density increase with increasing buoyancy ratio parameter \(N_{r}\), as shown in Fig. 6b–d.

Fig. 6
figure 6

\(N_{r}\), Buoyancy ratio parameter effect on \(f^{\prime}\left( \eta \right)\), \(\theta \left( \eta \right)\), \(\phi \left( \eta \right)\), and \(\chi \left( \eta \right)\)

4.6 Thermophoresis parameter \(N_{t}\)

The phenomenon of particle diffusion under the effect of a temperature gradient is called thermophoresis. The force that deposits nanoparticle into the ambient fluid due to the temperature gradient is called thermophoretic force. Figure 7a shows that the \(\theta \left( \eta \right)\) gradient increases with increasing the thermophoresis parameter \(N_{t}\), while Fig. 7b shows an increase in the \(\phi \left( \eta \right)\) with increasing the thermophoresis parameter \(N_{t}\),. Physically, increasing the \(\theta \left( \eta \right)\) increases the thermal gradient and then increases the intermediate force, this increasing appears in increasing the thermophoresis parameter.

Fig. 7
figure 7

\(N_{t}\), Thermophoresis parameter effect on \(\theta \left( \eta \right)\) and \(\phi \left( \eta \right)\)

4.7 Peclet number \(Pe\)

From Fig. 8, we can see that with escalating values of Pe, the motile microorganism profile declines. Pe is the ratio between the thermal energy convected to the fluid and the thermal energy conducted within the fluid.

Fig. 8
figure 8

\(Pe\) Number effect on the density of the motile microorganisms

4.8 Prandtl number \({\varvec{P}}{\varvec{r}}\)

Figure 9 shows the effect of \(Pr\). Figure 9a shows a decrease in the \(\theta \left( \eta \right)\). Physically, the decrease in the rate of temperature spread causes an increase in \(Pr\) number means, and then the fluid has a larger heat capacity. Figure 9b shows that the \(\phi \left( \eta \right)\) increases far from the surface while Fig. 9c shows a decrease in the \(\chi \left( \eta \right)\).

Fig. 9
figure 9

\(Pr\) Number effect on \(\theta (\eta )\), \(\phi \left( \eta \right)\), and the \(\chi \left( \eta \right)\)

4.9 Richardson number \({\varvec{R}}{\varvec{i}}\)

Richardson number \(R_{i}\) is a dimensionless that presents the ratio of the buoyancy term to the flow shear term. Figure 10a–d shows that \(f^{\prime}\left( \eta \right)\) increases with the increase in Richardson number, \(R_{i}\). The \(\theta \left( \eta \right)\), \(\phi \left( \eta \right)\), and motile microorganisms’ profiles decrease against increasing the Richardson number, \(R_{i}\).

Fig. 10
figure 10

\(R_{i}\),Richardson number effect on \(f^{\prime}\left( \eta \right)\), \(\theta \left( \eta \right)\), \(\phi \left( \eta \right)\), and the \(\chi \left( \eta \right)\)

4.10 Bioconvection Rayleigh number \({\varvec{R}}_{{\varvec{b}}}\)

Bioconvection Rayleigh number \(R_{b}\) introduces the natural convection due to the existence of the motile microorganisms. Figure 11a shows a decrease in the \(f^{\prime}\left( \eta \right)\) profile against \(R_{b}\) number. Also, Fig. 11b–d presenst rise in the \(\theta \left( \eta \right)\), \(\phi \left( \eta \right)\), and motile microorganisms’ profile against \(R_{b}\) increasing.

Fig. 11
figure 11

\(R_{b}\), Bioconvection Rayleigh number effect on \(f^{\prime}\left( \eta \right)\), \(\theta \left( \eta \right)\), \(\phi \left( \eta \right)\), and the \(\chi \left( \eta \right)\)

4.11 Porous parameter \(\user2{ \lambda }\)

The porosity parameter \(\lambda\) is the dimensionless number which defines the level of porosity within a fluid. Figure 12 illustrates the momentum, heat, mass, and density of the motile microorganism profile for different values of porosity parameter \(\lambda\). With increasing permeability parameter, the resistance to the fluid motion increases and hence velocity decreases. For increased values of the porosity parameter \(\lambda\), temperature, concentration, and the motile microorganism profiles increase, and the opposite behavior is seen in the velocity profile. Porosity parameter \(\lambda\) grows a resistance force (due to the increase in the pores in the fluid) that works conversely to the flow field and enhances the thermal, solutal, and motile microorganism boundary layer thickness.

Fig. 12
figure 12

\(\lambda\), Porous parameter effect on \(f^{\prime}\left( \eta \right)\), \(\theta \left( \eta \right)\), \(\phi \left( \eta \right)\), and the \(\chi \left( \eta \right)\)

Fig. 13
figure 13

σ, Bioconvection parameter effect on the density of the motile microorganisms

4.12 Bioconvection parameter: motile parameter \({\varvec{\sigma}}\)

In Fig. 13, we can see that for escalating values of the σ motile, the microorganism profile declines. Tables 2 and 3 present the interested physical quantities which are \(C_{f}\) as \(- f^{\prime\prime}\left( 0 \right)\),, \(Nu_{x}\) as \(- \theta^{\prime}\left( 0 \right)\),\( Sh_{x}\) as \(- \varphi^{\prime}\left( 0 \right)\), and \(Nn_{x}\) as \(- \chi^{\prime}\left( 0 \right)\). Table 2 shows that increasing the \(Lb\) increases the microorganism’s diffusivity and then the \(Nn_{x}\) number decreases. This number has no effect on \(C_{f}\),\(Nu_{x}\), and \(Sh_{x}\). Increasing \(Le\) increases the mass diffusivity against the rate of temperature spread and then the \(Nu_{x}\) and the \(Nn_{x}\) decrease. This number has no effects on \(C_{f}\) and \(Nn_{x}\).The power index \(n\) controls the nonlinearity of the stretching velocity which increases the effect of the \(C_{f}\) and increases the scattering of the nanoparticles and the microorganisms so \(Sh_{x}\) number and \(Nn_{x}\) number decrease.

Table 2 \({{Pe}} = 0.1\), \({{Pr}} = 5\), \({{Ri}} = 0.1\), \({{Rb}} = 0.1\), \({{\lambda}} = 0.5\), \({{\sigma}} = 0.2\) for different values of Lb, Le, n,\( {{N}}_{{{B}}} ,{{N}}_{{{r}}}\) and \({{N}}_{{{t}}}\)
Table 3 \({{Lb}} = 0.5\), \({{Le}} = 3\), \({{n}} = 1\), \({{N}}_{{{B}}} = 0.5\), \({{N}}_{{{r}}} = 0.3\), \({{N}}_{{{t}}} = 0.2\) for different values of Pe, Pr, Re, Ri, Rb, \( {{\lambda}}, {\text{and}}\, {{\sigma}}\)

Increasing the \(N_{B}\) parameter creates Brownian motion which increases the kinetic energy of the nanoparticles, and the microorganisms cause increase in the \(Nu_{x}\) number. This movement increases the \(\phi \left( \eta \right)\) and the motile microorganism density. Increasing \(N_{r}\) causes a decrease in the \( Sh_{x}\) number and the de \(Nn_{x}\) number while increasing \(N_{t}\) causes an increase in the \(Nu_{x}\) number and decrease in the \( Sh_{x}\) number.

Table 3 shows that increasing \(Pe\) number decreases the mass diffusion and then increases the \(Nn_{x}\) number. \(Pr\) number defines the response of the fluid for the heat transfer, increasing this number improves the effect of rate of temperature spread and so the heat transfer by convection takes place; this action is shown in Table 3 as \(Pr\) number increases, the \(Nu_{x}\) number increases.

This number has no effect on the skin friction but increases the \(Sh_{x}\) number and the \(Nn_{x}\) number. \(Pr = 0.7\) is for air, and then the air can be considered as heat transfer fluid. \(Pr = 2\) is for carbon disulfide with viscosity of 0.5 j/kg k and thermal conductivity of 0.149 m-1 k-1. \(Pr = 5\) for chloromethane and 7 for water. It is seen as \(Pr\) number increases the effect of viscosity increases and then the temperature increases while the \(\phi \left( \eta \right)\) decreases.

Richardson number \(R_{i}\) is a dimensionless that presents the ratio of the buoyancy term to the flow shear term which causes a decrease in the skin friction and increase in the \(Sh_{x}\) number and the \(Nn_{x}\) number. While increasing the bioconvection, Rayleigh number increases the effect of natural convection. Increasing the bioconvection parameter increases the \(Nn_{x}\) number.

The porosity parameter \(\lambda \) introduces the level of porosity within a fluid. Increasing this number increases the effect of free stream velocity against the stretching velocity, and then the effect of skin friction increases.

Figure 14 shows an increase in the skin friction with increasing the porosity parameter at different n values. The increase in n value decreases the level of \(\lambda \) parameter effect.

Fig. 14
figure 14

Skin friction vs \(\lambda \) parameter at different n values

Figure 15 shows an increase in the Sherwood number with increasing Lb parameter at different NB. It is noticed that there is no effect to increasing NB more than 0.5.

Fig. 15
figure 15

Sherwood number vs Lb parameter at different NB

Figure 16 presents the change in the local Nusselt number with Pr number at different n values. The peak of Nusselt number is at Pr = 0.71 and then decreases with increasing Pr number. Also increasing n value enhances the effect of Pr number on the Nusselt number.

Fig. 16
figure 16

Nusselt number vs Pr number at different n value

5 Conclusions

The numerical solution of the governing equations of nanofluid in porous media with the existence of motile microorganisms using fourth/fifth-order Runge–Kutta method presents the following notes.

  • Decreasing the skin friction reduces the power needed to stretch the surface vertically, to achieve this objective by reducing the power index \(n\), buoyancy ratio parameter \(Nr\), bioconvection Rayleigh parameter \(Rb\), and by increasing Brownian motion parameter \(NB\), and Richardson number Ri.

  • Decreasing the porosity of the medium decreases the skin friction.

  • Increasing the \(Nu_{x}\) number and so increasing the heat transfer by convection is done by reducing Lewis number \(Le\), the power index \(n\), Brownian motion parameter \(N_{B}\), and thermophoresis parameter \(N_{t}\) and by increasing \(Pr\) number and Richardson number Ri.

  • To enhance the heat transfer, the \(Sh_{x}\) number should be increased by increasing Lewis number \(Le\), Brownian motion parameter \(N_{B}\), and thermophoresis parameter \(N_{t}\) and decreasing the power index \(n\), bioconvection Rayleigh parameter \(Rb\), and the porous parameter \(\lambda\).

  • The existence of the motile microorganisms also enhances the heat transfer. The enhancement is done by increasing the \(Nn_{x}\) number.