1 Introduction

Nowadays, nanostructures such as nanorods, nanobeams and nanoplates are receiving a great attention in nanoscience and nanotechnology, due to their extraordinary mechanical, thermal, electrical, magnetic, and other properties [1,2,3,4,5]. Examples of applications and devices related to such nanostructures are oscillators [6], clocks [7], sensors [8,9,10], atomic force microscopy [11, 12], nano/micro electro-mechanical systems (NEMS/MEMS) [13, 14] and nano actuators [15, 16]. In nanostructures, the size effect is no longer negligible and becomes rather important. It is then necessary to take it account into the design of applications, such as those mentioned above. There have been many theoretical and experimental investigations for better understanding and designing the mechanical and physical behavior of such small-scaled structures [17, 18]. It is known that classical continuum mechanics is a local theory that is size-independent. So, it is not really appropriate for small-scaled structures as it does not allow to capturing the size effect in such small structures. To overcome this limitation, non-classical continuum theories are developed. Whether being of integral or gradient types, these theories utilize one or several material internal length scale parameters. Examples of such nonlocal theories are the pioneer elasticity theory of [19, 20], the strain gradient theory [21,22,23], the modified couple stress theory [24], and the nonlocal strain gradient theory [25]. The nonlocal elasticity theory has widely been employed to analyze the bending, vibration, buckling and wave propagation of nanostructures. Among recent works, there are [26,27,28,29,30], and the critical review on the topic of nanobeam and nanoplate modeling [31].

The above-mentioned studies all point out the significant influence that non-local factors can have on the static and dynamic responses of nanobeams. In particular, nonlocal elastic theory can only be used to describe material softening effect, the hardening effect reported in many experimental studies cannot be handled by such theories [32,33,34]. The strain gradient theory proposed by Mindlin [22] is a microstructure-dependent continuum theory developed to capture the hardening effect by enriching the classical continuum with additional material characteristic length scales. In this theory, the total stress is a function of additional strain gradient terms to consider microstructural deformation contributions at small scale, hence, including higher-order strain gradients [35]. Based on such nonlocal strain gradient elasticity theoretical framework, several works have been devoted to study the mechanical behavior of small scaled structures. In [24, 36,37,38], the linear and non-linear static, free vibration, and buckling responses of homogeneous or inhomogeneous small scaled structure are studied based on various shear deformation theories. In Li et al. [39], the flexural wave frequency response of small-scaled functionally graded Euler–Bernoulli beams is studied using a nonlocal strain gradient theory. Li et al. [40] studied the vibrational behavior of functionally graded nano/micro-scaled using a nonlocal strain gradient extension of a Timoshenko beam theory. Xu et al. [41] studied the nonlinear bending and buckling of nanobeam by a nonlocal strain gradient extension of Euler–Bernoulli beam model. Li et al. [42] examined bending, buckling and vibration of axially functionally graded beams by a nonlocal strain gradient extension of Euler–Bernoulli beam theory. Sahmani et al. [43] presented analytical solutions for nonlinear bending behavior of functionally graded porous micro/nanobeams reinforced with graphene platelets.

Allam et al. [44] analyzed the bending, buckling and vibration behaviors of viscoelastic FG curved nanobeam embedded in an elastic medium based on nonlocal strain gradient theory. Radwan et al. [45] studied the dynamic deformation of orthotropic viscoelastic graphene sheets under time harmonic thermal load. All of the previous mentioned studies were based on classical beam theory (CBT), first-order shear deformation beam theory (FSDT) and higher-order shear deformation beam theory (HSDT). The CBT is only applicable for thin beam, ignores shear deformation effects and provides reasonable results for slender beams only. However, it underestimates deflection and overestimates buckling load and frequency of moderately short or short beams [46]. The FSDT accounts for the transverse shear deformation effect and gives acceptable results for moderately short and slender beam [47], but needs a shear correction to compensate for the difference between the actual stress state and the constant stress state due to a constant shear strain assumption through the thickness [48]. In order to include shear deformation effects, several polynomial [49,50,51] and non polynomial [52,53,54,55,56,57,58] higher-order shear deformation theories (HSDTs), which are based on a non-linear variation through the thickness of the in-plane displacements, are developed. These theories provide a better prediction of response of short beam and do not require any shear correction factor and satisfy zero shear stress conditions at top and bottom surfaces of beams.

The aim of this paper is to extend the two variables trigonometric shear deformation theory of Thai [59] within a nonlocal context in order to study the bending, vibration and buckling of nanobeams. The nonlocal extension is based on the use of strain gradient constitutive relations. The most interesting features of this theory is that it accounts for a trigonometric variation of the transverse shear strains across the thickness and satisfies the zero traction boundary conditions on the top and bottom surfaces of the beam without using any shear correction factor. It should be noted that the trigonometric function was used in the first time by Levy [60] and assessed by Stein [60], and later widely used by [52] and [61]. These theories are capable of representing the section warping in the deformed configuration and the results obtained from these theories show that this theory is capable to calculate the stresses and natural frequencies more accurately than other theories. The governing equations derived are used to develop a finite element model using a 3-node beam element. Analytical solutions for bending, vibration and buckling loadings are also presented for simply supported beams. These analytical solutions are used to validate the finite element implementation of the nonlocal problem. Comparisons with existing solutions from the literature are used to assess the relevance and the accuracy of the proposed nonlocal theory in describing the mechanical behavior of nanobeam.

2 Nonlocal strain gradient theory

When dealing with nanostructures, the effect of size is important and can’t be ignored in the analysis and dimensioning of the structure. In the nonlocal strain gradient elasticity, the total stress tensor is expressed as a function of the standard nonlocal stress tensor and the strain gradient stress one:

$$\begin{aligned} \sigma _{ij} = \sigma _{ij}^{( 0 )} - \dfrac{{\partial \sigma _{ij}^{( 1 )}}}{{\partial x}}, \end{aligned}$$
(1)

where the stresses \(\sigma _{ij}^{(0)}\) and \(\sigma _{ij}^{(1)}\) are related to strain \(\varepsilon _{ij}\) and strain gradient \(\varepsilon _{ij,x}\) , respectively, and are defined as follows:

$$\begin{aligned} \sigma _{ij}^{(0)}= & {} \int _0^L{{C_{ijkl}}\,{\alpha _0}\left( {x,x',{e_0}a} \right) {} {{\varepsilon '}_{kl}}} \left( {x'} \right) \mathrm{d}x, \end{aligned}$$
(2)
$$\begin{aligned} \sigma _{ij}^{\left( 1 \right) }= & {} {l^2}\int _0^L{{C_{ijkl}}\,{\alpha _1}\left( {x,x',{e_1}a} \right) {} {{\varepsilon '}_{kl,x}}} \left( {x'} \right) \mathrm{d}x', \end{aligned}$$
(3)

in which \(C_{ijkl}\) are the elastic constants, \({e_0}a\) and \({e_1}a\) are nonlocal parameters to consider the significance of the nonlocal stress field, l is a material length scale parameter that introduces the influence of higher-order strain gradient stress field. When the nonlocal functions \(\alpha _0(x,x',e_0a)\) and \(\alpha _1(x,x',e_1a)\) satisfy the developed conditions by Eringen [62,63,64], the constitutive relation can be stated as:

$$\begin{aligned}&\left( 1 - (e_1a)^2\nabla ^2\right) \left( 1 - (e_0a)^2\nabla ^2 \right) \sigma _{ij}\nonumber \\&\quad = C_{ijkl}\left( \left( 1 - (e_1a)^2\nabla ^2\right) \varepsilon _{kl} - l^2\right. \nonumber \\&\quad \left. \left( 1 -(e_0a)^2\nabla ^2\right) \nabla ^2\varepsilon _{kl}\right) , \end{aligned}$$
(4)

in which \(\nabla ^2\) denotes the Laplacian operator. By assuming \(e = e_0 = e_1\), the general constitutive equation for the size-dependent continuum can be simplified as follows:

$$\begin{aligned} \left( 1 - (ea)^2\nabla ^2\right) \sigma _{ij} = C_{ijkl}\left( 1 - l^2\nabla ^2\right) \varepsilon _{kl}. \end{aligned}$$
(5)

Thus, the nonlocal constitutive relations for a shear deformable nanobeam can be stated as follows:

$$\begin{aligned} \sigma _{xx} - \mu \sigma _{xx}{}'' &= C_{11}\left( \varepsilon _{xx} - \lambda \varepsilon _{xx}{}'' \right) \nonumber\\ \sigma _{xz} - \mu \sigma _{xz}{}'' &= C_{66}\left( \gamma _{xz} - \lambda \gamma _{xz}{}'' \right) , \\ \end{aligned}$$
(6)

where \(\mu =(ea)^2\) and \(\lambda =l^2\).

It is of interest that (6) can be simplified to some interested cases.

2.1 Nonlocal elasticity theory

The constitutive equation of the nonlocal elasticity theory can be easily obtained by setting \(\lambda = 0\) in the nonlocal strain gradient constitutive (6) as follows:

$$\begin{aligned} \sigma _{xx} - \mu \sigma _{xx}{}'' &= C_{11}\varepsilon _{xx} \nonumber \\ \sigma _{xz} - \mu \sigma _{xz}{}'' &= C_{66}\gamma _{xz}, \\ \end{aligned}$$
(7)

which are identical to Eringen [62,63,64].

2.2 Strain gradient theory

The constitutive equation of the strain gradient theory can be easily obtained by setting \(\mu = 0\) in (6), that is:

$$\begin{aligned} \sigma _{xx} &= C_{11}\left( \varepsilon _{xx} - \lambda \varepsilon _{xx}{}'' \right) \nonumber\\ \sigma _{xz} &= C_{66}\left( \gamma _{xz} - \lambda \gamma _{xz}{}'' \right) , \\ \end{aligned}$$
(8)

which are identical to Aifantis [65, 66].

It is shown that the general constitutive (6) can reasonably explain size-dependent phenomena and there is a good agreement between the molecular dynamics simulations and the nonlocal strain gradient theory [67, 68].

3 Governing equation for size-dependent nanobeams

To write the governing equations, we consider a straight nanobeam of length L, and a rectangular cross section \(b\times h\). The variable x is taken as the cartesian coordinate along the length of the beam with \(x \in [0.L]\), whereas z is assumed the coordinate along the thickness direction of the beam, and \(z\in [-h/2,h/2]\). In this work, the y coordinate associated with the width direction is not considered in the formulation. Here, a wide range of slenderness ratios L/h can be studied by varying the length L and the thickness h of the beam.

3.1 Kinematics

A trigonometric shear deformation beam theory considering shear deformations is adopted in this study. The displacement field of the proposed theory is chosen based on the following assumptions: (1) the transverse displacement is partitioned into bending and shear components; (2) the axial displacement consists of extension, bending and shear components; (3) the bending component of axial displacement is similar to that given by the Euler–Bernoulli beam theory; and (4) the shear component of axial displacement gives rise to the trigonometric variation of shear strain and hence to shear stress through the thickness of the beam in such a way that shear stress vanishes on the top and bottom surfaces.

Based on the assumptions made above, the displacement field of the present theory can be obtained as:

$$\begin{aligned} \begin{array}{l} u(x,z,t) = u_0(x) - z \; w_b{}'(x)- f(z)\; w_s{}'(x)\\ w(x,z,t) = w_b(x) + w_s(x), \end{array} \end{aligned}$$
(9)

where \(u_0\) is the axial displacement along the midplane of the nanoscale beam; \(w_b\) and \(w_s\) are the bending, shear components of the transverse displacement along the midplane of the beam. t is the time, derivations are denoted \((\; )' = \frac{\partial }{\partial x}\) and \(\dot{( \; )} = \frac{\partial }{\partial t}\) for the time. f(z) is a shape function representing the variation of the transverse shear strains and shear stresses through the thickness of the beam and is given as [69] follows:

$$\begin{aligned} \begin{array}{l} f(z)=z- z \dfrac{\left( \pi +2\cos \left( \dfrac{\pi z}{h}\right) \right) }{(\pi + 2)}. \end{array} \end{aligned}$$
(10)

The nonzero strains associated with the displacements field in (9) are as follows:

$$\begin{aligned} \begin{array}{l} \varepsilon _x = \varepsilon _x^0 + z \;k_x^b + f(z) \;k_x^s\\ \gamma _{xz} = g(z) \;\gamma _{xz}^0, \end{array} \end{aligned}$$
(11)

where

$$\begin{aligned} \begin{array}{llll} \varepsilon _x^0 = u_0{}', ~~ &{} k_x^b = - w_b{}'', ~~ &{} k_x^s = - w_s{}'', ~~ \gamma _{xz}^0 = w_s{}'\\ \end{array} \end{aligned}$$
(12)

and

$$\begin{aligned} g(z) = 1 - f{}'(z). \end{aligned}$$
(13)

3.2 Variational statements

The governing equations of motion in terms of displacements are derived using Hamilton’s Principle.

The variation of strain energy \(\delta U\) is expressed according to the nonlocal strain gradient theory [67]:

$$\begin{aligned} \delta U= & {} \displaystyle \int _0^L\displaystyle \int _{-h/2}^{h/2} \left( \sigma _{xx}^{(0)}\delta \varepsilon _{xx} + \sigma _{xz}^{(0)}\delta \gamma _{xz} + \sigma _{xx}^{(1)}\nabla \delta \varepsilon _{xx} + \sigma _{xz}^{(1)}\nabla \delta \gamma _{xz} \right) \mathrm{d}z \mathrm{d}x \nonumber \\= & {} \displaystyle \int _0^L\displaystyle \int _{-h/2}^{h/2} \left( \left( \sigma _{xx}^{(0)}-\nabla \sigma _{xx}^{(1)}\right) \delta \varepsilon _{xx} + \left( \sigma _{xz}^{(0)}-\nabla \sigma _{xz}^{(1)}\right) \delta \gamma _{xz}\right) \mathrm{d}z \mathrm{d}x\nonumber \\&+ \left[ \displaystyle \int _0^L\displaystyle \int _{-h/2}^{h/2}\left( \sigma _{xx}^{(1)}\delta \varepsilon _{xx} + \sigma _{xz}^{(1)}\delta \gamma _{xz}\right) \mathrm{d}z \mathrm{d}x \right] _0^L\nonumber \\= & {} \displaystyle \int _0^L\displaystyle \int _{-h/2}^{h/2}\left( \sigma _{xx}\delta \gamma _{xx}+ \sigma _{xz}\delta \gamma _{xz}\right) \mathrm{d}z \mathrm{d}x \nonumber \\&+ \left[ \displaystyle \int _0^L\displaystyle \int _{-h/2}^{h/2}\left( \sigma _{xx}^{(1)}\delta \varepsilon _{xx}+ \sigma _{xz}^{(1)}\delta \gamma _{xz}\right) \mathrm{d}z \mathrm{d}x \right] _0^L. \end{aligned}$$
(14)

We define the force and the moment resultants as follow:

$$\begin{aligned} \left[ N ,M ,{\tilde{M}} \right]= & {} \displaystyle \int _{-h/2}^{h/2} \left[ 1,z,f(z)\right] \; \sigma _{xx} \; \mathrm{d}z, \; Q = \displaystyle \int _{-h/2}^{h/2} \sigma _{xz} \; g(z) \; \mathrm{d}z\nonumber \\ \left[ N^{(1)} ,M^{(1)} ,{\tilde{M}}^{(1)} \right]= & {} \displaystyle \int _{-h/2}^{h/2} \left[ 1,z,f(z)\right] \; \sigma _{xx}^{(1)} \; \mathrm{d}z, \; Q^{(1)} = \displaystyle \int _{-h/2}^{h/2} \sigma _{xz}^{(1)} \; g(z) \; \mathrm{d}z. \end{aligned}$$
(15)

Thus, the virtual strain energy can be rewritten as follows:

$$\begin{aligned} \delta U= & {} \displaystyle \int _0^L \left( N \; \delta u_0{}' - M \;\delta w_b{}''- {\tilde{M}} \;\delta w_s{}''+Q \;\delta w_s{}'\right) \; \mathrm{d}x\nonumber \\&+ \left[ N^{(1)} \; \delta u_0{}' - M^{(1)} \;\delta w_b{}''- {\tilde{M}}^{(1)} \;\delta w_s{}''+Q^{(1)} \;\delta w_s{}'\right] _0^L. \end{aligned}$$
(16)

The variation of the kinetic energy is obtained as follows:

$$\begin{aligned} \delta K= & {} \displaystyle \int _0^L \rho \left( \dot{u} \delta \dot{u} + \dot{w} \delta \dot{w}\right) \; \mathrm{d}x =\displaystyle \int _0^L \Bigg ( \left( -I_0 \; \ddot{u}_0 + I_1 \; \ddot{w}_b{}' +I_3 \; \ddot{w}_s{}' \right) \delta u_0 \nonumber \\&+ \left( I_1 \; \ddot{u}_0 - I_2 \; \ddot{w}_b{}' - I_4 \; \ddot{w}_s{}'\right) \delta w_b +\left( I_3 \; \ddot{u}_0 - I_4 \; \ddot{w}_b{}' - I_5 \; \ddot{w}_s{}' \right) \delta w_s \nonumber \\&+ \left( -I_0 \; \ddot{w}_b - I_0 \; \ddot{w}_s \right) \delta w_b + \left( -I_0 \; \ddot{w}_b - I_0 \; \ddot{w}_s \right) \delta w_s \Bigg ) \; \mathrm{d}x, \end{aligned}$$
(17)
$$\begin{aligned} \begin{array}{l} \left[ I_0,I_1,I_2,I_3,I_4,I_5\right] = \; \displaystyle \int _{-h/2}^{h/2} \rho \left[ 1,z,z^2,f(z),zf(z),f(z)^2\right] \; \mathrm{d}z.\\ \end{array} \end{aligned}$$
(18)

The variation potential energy \(\delta W\) of external loads can be written as:

$$\begin{aligned} \begin{array}{l}\; \delta W = - \displaystyle \int _0^L \left( q \;\delta w + N_0 \;\left( w{}'\; \delta w {}'\right) \right) \;\mathrm{d}x, \end{array} \end{aligned}$$
(19)

where q is the distributed transverse load applied on the upper surface, and \(N_0\) is the axial load acting through the mid plane.

According to Hamilton’s principle, we have:

$$\begin{aligned} 0 = \displaystyle \int _0^T ( \delta U + \delta W - \delta K) \; \mathrm{d}t. \end{aligned}$$
(20)

The following governing equations are derived from the variational principle (20) by introducing (16), (17), (19), and proceeding to some integrations by parts:

$$\begin{aligned} \begin{array}{ll} &\delta u_0: {} -N{}' = \left( -I_0 \; \ddot{u}_0 + I_1 \; \ddot{w}_b{}' +I_3 \; \ddot{w}_s{}' \right) \\ &{} \\ & \delta w_b: {} -M{}''-q + N_0 \left( w_b{}''+w_s{}''\right) =\left( I_1 \; \ddot{u}_0 - I_2 \; \ddot{w}_b{}' - I_4 \; \ddot{w}_s{}' -I_0 \; \ddot{w}_b - I_0 \; \ddot{w}_s \right) \\ &{} \\ & \delta w_s: {} -{\tilde{M}}{}''- Q{}'- q + N_0 \left( w_b{}''+w_s{}''\right) = \left( I_3 \; \ddot{u}_0 - I_4 \; \ddot{w}_b{}' - I_5 \; \ddot{w}_s{}' - I_0 \; \ddot{w}_b - I_0 \; \ddot{w}_s \right) \\ \end{array} \end{aligned}$$
(21)

3.3 Nonlocal strain gradient equilibrium equations

Substituting (6) into (15), one obtains

$$\begin{aligned}&\left[ (N - \mu \; N{}'' ),(M - \mu \; M{}'' ),({\tilde{M}} - \mu \; {\tilde{M}}{}'') ,(Q - \mu \; Q{}'' )\right] \nonumber \\&\quad =\left[ N^{SG}, \;M^{SG}, \; {\tilde{M}}^{SG},\;Q^{SG} \right] , \end{aligned}$$
(22)

with the force/moment resultants in strain gradient theory defined as follows:

$$\begin{aligned} \left[ N^{SG}, \;M^{SG}, \; {\tilde{M}}^{SG} \right] &= \displaystyle \int _{-h/2}^{h/2} \left[ 1,z,f(z)\right] \; C_{11}\left( \varepsilon _{xx} - \lambda \varepsilon _{xx}{}'' \right) \mathrm{d}z \nonumber \\ \left[ Q^{SG} \right] & = \displaystyle \int _{-h/2}^{h/2} \left[ g(z)\right] \; C_{66} \left( \gamma _{xz} - \lambda \gamma _{xx}{}'' \right) \; \mathrm{d}z. \end{aligned}$$
(23)

Substituting the expressions of stress and moment resultants \(\left[ N, \;M, \; {\tilde{M}}, \; Q \right]\) from (22) into (21) and then simplifying the resulting equations, we obtain the following nonlocal strain gradient equations of motion as:

$$\begin{aligned} \delta u_0: -N^{SG}{}' &= {} \left( 1 - \mu \dfrac{\mathrm{d}^2}{\mathrm{d}x{}^2} \right) \left( -I_0 \; \ddot{u}_0 + I_1 \; \ddot{w}_b{}' +I_3 \; \ddot{w}_s{}' \right) \nonumber \\ \delta w_b: -M^{SG}{}'' &= {} \left( 1 - \mu \dfrac{\mathrm{d}^2}{\mathrm{d}x{}^2} \right) \left( q - N_0 \left( w_b{}''+w_s{}''\right) \right. \nonumber \\&\quad+ \left. I_1 \; \ddot{u}_0 - I_2 \; \ddot{w}_b{}' - I_4 \; \ddot{w}_s{}' -I_0 \; \ddot{w}_b - I_0 \; \ddot{w}_s \right) \nonumber \\ \delta w_s: -{\tilde{M}}^{SG}{}''- Q{}' &= {} \left( 1 - \mu \dfrac{\mathrm{d}^2}{\mathrm{d}x{}^2} \right) \left( q - N_0 \left( w_b{}''+w_s{}''\right) \right. \nonumber \\&\quad+ \left. I_3 \; \ddot{u}_0 - I_4 \; \ddot{w}_b{}' - I_5 \; \ddot{w}_s{}' - I_0 \; \ddot{w}_b - I_0 \; \ddot{w}_s \right) . \end{aligned}$$
(24)

4 Matrix formulation of the nonlocal strain gradient variational problem

From (16), (17) and (19) and introducing nonlocal strain gradient equilibrium equations (24), a finite element formulation is applied considering static, free vibration and buckling problems. After simplification, the equation is expressed in matrix form as follows:

$$\begin{aligned} & \displaystyle \int _{0}^{L}\displaystyle \int _{-h/2}^{h/2}\left( \displaystyle \left\{ \delta \varepsilon \right\} ^T[D]\displaystyle \left\{ \varepsilon \right\} -\lambda \frac{d^2}{\mathrm{d}x^2}\displaystyle \left\{ \delta \varepsilon \right\} ^T[D]\displaystyle \left\{ \varepsilon \right\} \right) \nonumber \\ & =\displaystyle \int _{0}^{L}\left( 1-\mu \frac{d^2}{\mathrm{d}x^2}\right) q\delta w \mathrm{d}x+\displaystyle \int _{0}^{L}\int _{-h/2}^{h/2}\left[ \left( 1-\mu \frac{d^2}{\mathrm{d}x^2}\right) \displaystyle \left\{ \delta u \right\} ^T\right] \varrho \displaystyle \left\{ \ddot{u} \right\} \mathrm{d}z\mathrm{d}x\nonumber\\ &\quad +\displaystyle \int _{0}^{L}\left[ \left( 1-\mu \frac{d^2}{\mathrm{d}x^2}\right) \displaystyle \left\{ \delta \varepsilon _u \right\} ^T\right] [k_{gg}]\displaystyle \left\{ \delta \varepsilon _u \right\} \mathrm{d}x,\\ \end{aligned}$$
(25)

[D] denotes the elastic moduli matrix. The displacement u of (9) and the strain \(\varepsilon\) functions of (11) can be redefined as follows:

$$\begin{aligned} \begin{aligned} \displaystyle \left\{ u \right\} ^T&= [{\mathbb {N}}_u(z)]\displaystyle \left\{ {{\mathcal {E}}}_u \right\} ~~~~\mathrm{with}\\ \displaystyle \left\{ {{\mathcal {E}}}_u \right\} ^T&=\left[ u_0 ~~ w_b ~~ w_s~~ w_b{}'~~ w_s{}' \right] ,\\ \end{aligned} \end{aligned}$$
(26)
$$\begin{aligned} \begin{aligned} \displaystyle \left\{ \varepsilon \right\} ^T&= [{\mathbb {N}}_\varepsilon (z)]\displaystyle \left\{ {{\mathcal {E}}}_\varepsilon \right\} ~~~~with\\ \displaystyle \left\{ {{\mathcal {E}}}_\varepsilon \right\} ^T&=\left[ u_0{}'~~ w_b{}' ~~ w_s{}' ~~w_b{}''~~ w_s{}'', \right] ,\\ \end{aligned} \end{aligned}$$
(27)

where \(\displaystyle \left[ {\mathbb {N}}_u(z) \right]\) and \(\displaystyle \left[ {\mathbb {N}}_{\epsilon }(z) \right]\) depend only on the normal coordinate z, and are defined as follows:

$$\begin{aligned}{}[{\mathbb {N}}_u(z)]=\left[ \begin{array}{cccccc} 1~&{}~0~&{}~0~&{}~-z ~&{}~f(z)\\ 0~&{}~1~&{}~1~&{}~0 ~&{}~0,\\ \end{array}\right] \end{aligned}$$
(28)
$$\begin{aligned}{}[{\mathbb {N}}_\varepsilon (z)]=\left[ \begin{array}{ccccccccccc} 1~&{}~0~&{}~0~&{}~-z ~&{}~f(z)\\ 0~&{}~0~&{}~1+f(z)'~&{}~0 ~&{}~0.\\ \end{array}\right] \end{aligned}$$
(29)

Equation (25) can be expanded as follows:

$$\begin{aligned} &\displaystyle \int _{0}^{L}\left( \displaystyle \left\{ \delta {{\mathcal {E}}}_\varepsilon \right\} ^T [k_{\varepsilon \varepsilon }] \displaystyle \left\{ {{\mathcal {E}}}_\varepsilon \right\} -\lambda \frac{d^2}{\mathrm{d}x^2}\displaystyle \left\{ \delta {{\mathcal {E}}}_\varepsilon \right\} ^T [k_{\varepsilon \varepsilon }] \displaystyle \left\{ {{\mathcal {E}}}_\varepsilon \right\} \right) ~\mathrm{d}x \nonumber\\ &\quad =\displaystyle \int _{0}^{L}\left( 1-\mu \frac{d^2}{\mathrm{d}x^2}\right) q\delta w~\mathrm{d}x \nonumber\\ &\qquad +\displaystyle \int _0^L\left( 1-\mu \frac{d^2}{\mathrm{d}x^2}\right) \displaystyle \left\{ \delta {{\mathcal {E}}}_u \right\} ^T[m_{uu}]\displaystyle \left\{ \ddot{{\mathcal {E}}}_u \right\} ~\mathrm{d}x \nonumber\\ &\qquad +\displaystyle \int _0^L\left( 1-\mu \frac{d^2}{\mathrm{d}x^2}\right) \displaystyle \left\{ \delta {{\mathcal {E}}}_u \right\} ^T[k_{gg}]\displaystyle \left\{ {{\mathcal {E}}}_u \right\} ~\mathrm{d}x, \end{aligned}$$
(30)

where

$$\begin{aligned} \begin{aligned}{}[k_{\varepsilon \varepsilon }]&=\displaystyle \int _{-h/2}^{h/2}[{\mathbb {N}}_\varepsilon (z)]^T[D][{\mathbb {F}}_\varepsilon (z)]\mathrm{d}z,\\ \end{aligned} \end{aligned}$$
(31)
$$\begin{aligned} \begin{aligned}{}[m_{uu}]=&\displaystyle \int _{-h/2}^{h/2}\rho [{\mathbb {N}}_u(z)]^T [{\mathbb {N}}_u(z)]\mathrm{d}z. \end{aligned} \end{aligned}$$
(32)

\([k_{\varepsilon \varepsilon }]\) is the stiffness matrix, \([m_{uu}]\) is the masse matrix. \([k_{gg}]\) is the geometric stiffness matrix of \(5\times 5\) dimensions, is symmetric and the non zero terms are as follows:

$$\begin{aligned} \begin{aligned} k_{gg}(4,4)=1,~~k_{gg} (4,5)=1,~~k_{gg} (5,4)=1,~~k_{gg}(5,5)=1. \end{aligned} \end{aligned}$$
(33)

The weak forme is then applied considering static problems, and the equation is simplified after integration by parts on RHS:

$$\begin{aligned} &\displaystyle \int _{0}^{L}\left( \displaystyle \left\{ \delta {{\mathcal {E}}}_\varepsilon \right\} ^T [k_{\varepsilon \varepsilon }] \displaystyle \left\{ {{\mathcal {E}}}_\varepsilon \right\} -\lambda \displaystyle \left\{ \delta {{\mathcal {E}}}_\varepsilon {}'' \right\} ^T [k_{\varepsilon \varepsilon }] \displaystyle \left\{ {{\mathcal {E}}}_\varepsilon {}'' \right\} \right) ~\mathrm{d}x \nonumber\\ &\quad=\displaystyle \int _{0}^{L}\left( \delta w-\mu w{}''\right) q\delta ~\mathrm{d}x.\\ \end{aligned}$$
(34)

For free vibration analysis, after performing integration by parts, a weak form is derived for the following dynamic equation:

$$\begin{aligned} &\displaystyle \int _{0}^{L}\left( \displaystyle \left\{ \delta {{\mathcal {E}}}_\varepsilon \right\} ^T [k_{\varepsilon \varepsilon }] \displaystyle \left\{ {{\mathcal {E}}}_\varepsilon \right\} -\lambda \displaystyle \left\{ \delta {{\mathcal {E}}}_\varepsilon {}'' \right\} ^T [k_{\varepsilon \varepsilon }] \displaystyle \left\{ {{\mathcal {E}}}_\varepsilon {}'' \right\} \right) ~\mathrm{d}x \nonumber\\ &\quad = \displaystyle \int _0^L\left( \displaystyle \left\{ \delta {{\mathcal {E}}}_u \right\} ^T[m_{uu}]\displaystyle \left\{ \ddot{{\mathcal {E}}}_u \right\} +\mu \displaystyle \left\{ \delta {{\mathcal {E}}}_u{}'' \right\} ^T[m_{uu}]\displaystyle \left\{ \ddot{{\mathcal {E}}}_u{}'' \right\} \right) . \end{aligned}$$
(35)

Considering buckling problem subjected to axial force \(N_0\) applied in the mid plane, the weak form is given after integration by parts on RHS as follows:

$$\begin{aligned} \begin{array}{lcl} \displaystyle \int _{0}^{L}\left( \displaystyle \left\{ \delta {{\mathcal {E}}}_\varepsilon \right\} ^T [k_{\varepsilon \varepsilon }] \displaystyle \left\{ {{\mathcal {E}}}_\varepsilon \right\} -\lambda \displaystyle \left\{ \delta {{\mathcal {E}}}_\varepsilon {}'' \right\} ^T [k_{\varepsilon \varepsilon }] \displaystyle \left\{ {{\mathcal {E}}}_\varepsilon {}'' \right\} \right) ~\mathrm{d}x\\ \quad = \displaystyle \int _0^L\left( \displaystyle \left\{ \delta {{\mathcal {E}}}_u \right\} ^T[k_{gg}]\displaystyle \left\{ \ddot{{\mathcal {E}}}_u \right\} +\mu \displaystyle \left\{ \delta {{\mathcal {E}}}_u{}'' \right\} ^T[k_{gg}]\displaystyle \left\{ \ddot{{\mathcal {E}}}_u{}'' \right\} \right) . \end{array} \end{aligned}$$
(36)

The above equations are used for FE modelenig, and this will be described in the next section.

5 Finite element approximations

To develop the finite element model, the beam is discretized into a set of elements of length \(l_e\). The beam element given in Fig. 1 is defined by three nodes along the element local x-axis. The nodal coordinates x is approximated based on the reference length with respect to the reduced coordinate \(\xi\) by the following:

$$\begin{aligned} x(\xi )=\dfrac{1+\xi }{2} \; l_e. \end{aligned}$$
(37)
Fig. 1
figure 1

Beam element with the degrees of freedom per node

The generalized displacements and strain are given in (9) and (11) and have to be approximated by finite element method. In the present work, the Hermite interpolation is employed to satisfy \(C^1\) and \(C^2\) continuity requirement for the axial and transversal displacements, respectively. The displacements \(u_0(\xi )\) and \(w_i(\xi )\) are defined as follows:

$$\begin{aligned} \displaystyle \left\{ u_0 \right\}&= \displaystyle \left[ N_u \right] \displaystyle \left\{ q_{u_0} \right\} \nonumber \\ \displaystyle \left\{ w_i \right\}&= \displaystyle \left[ N_w \right] \;\displaystyle \left\{ q_{w_i} \right\} |_{i=b,s}, \end{aligned}$$
(38)

where

$$\begin{aligned} \displaystyle \left\{ q_{u_0} \right\} ^T&= [u_0^{(1)}\;u_0{}'^{(1)} \;u_0^{(3)}\; u_0'^{(3)}\;u_0^{(2)}\; u_0'^{(2)}]\nonumber \\ \displaystyle \left\{ q_{w_i} \right\} ^T&= [w_i^{(1)}\;w_{i}{}'^{(1)}\;w_{i}{}''^{(1)} \;w_i^{(2)}\; w_{i}{}'^{(2)}\;w_{i}{}''^{(2)}]|_{i=b,s}, \end{aligned}$$
(39)

with \([N_u]\) and \([N_w]\) being the Hermite interpolation functions, \(q_{u_0}\) and \({q_w}\) are the nodal degrees of freedom (dof) vectors of each elementary element (Fig. 1) while subscripts 1–2–3 are the node numbers \((\xi =-1,0,+1)\) (Fig. 1).

Let us consider the following vector \({q_e}\) of total nodal dof for a generic elementary domain \(\Omega _e\):

$$\begin{aligned} \displaystyle \left\{ q_e \right\} ^T=\left[ u_0^{(1)}\; u_0'^{(1)}\;w_b^{(1)} \; w_b{}'^{(1)} \; w_b{}''^{(1)} \;w_s^{(1)} \; w_s{}'^{(1)} \; w_s{}''^{(1)} \; u_0^{(3)}\; u_0'^{(3)}\;u_0^{(2)}\; u_0'^{(2)}\;w_b^{(2)} \; w_b{}'^{(2)} \; w_b{}''^{(2)} \;w_s^{(2)} \; w_s{}'^{(2)} \; w_s{}''^{(2)}\right] . \end{aligned}$$
(40)

From (26) and (27), the vectors \(\displaystyle \left\{ \varepsilon _u \right\}\) and \(\displaystyle \left\{ \varepsilon _\varepsilon \right\}\) are expressed from the dof vector \(\displaystyle \left\{ q_e \right\}\) using (38) and (39):

$$\begin{aligned} \begin{aligned} \displaystyle \left\{ \varepsilon _u \right\}&=[B_u]\displaystyle \left\{ q_e \right\} \\ \displaystyle \left\{ \varepsilon _\varepsilon \right\} &= [B_\varepsilon ]\displaystyle \left\{ q_e \right\} \\ \displaystyle \left\{ w_{i}{}'' \right\}&=[N_{w}{}'']^T \displaystyle \left\{ q_{w_i} \right\} ,~~~~i=b,s\\ \displaystyle \left\{ \varepsilon _{u}{}' \right\}&=[B_{u}{}'] \displaystyle \left\{ q_e \right\} \\ \displaystyle \left\{ \varepsilon _\varepsilon {}' \right\}&=[B_\varepsilon {}']\displaystyle \left\{ q_e \right\} ,\\ \end{aligned} \end{aligned}$$
(41)

where \(\displaystyle \left[ B_u \right]\) and \(\displaystyle \left[ B_\varepsilon \right]\) are \(5\times 18\) and \(2\times 18\) matrices, respectively, containing the shape function \(N_u\), \(N_w\) and their derivative terms.

The final expressions of the system could be written as follows:

  • Static analysis: a transversal load q is applied on the top surface of the beam, and we have the following system to solve:

    $$\begin{aligned}{}[K]\displaystyle \left\{ q \right\} =\displaystyle \left\{ F \right\} . \end{aligned}$$
    (42)
  • Free vibration analysis:

    $$\begin{aligned} \left( [K]-\omega ^2[M]\right) \displaystyle \left\{ q \right\} =\displaystyle \left\{ 0 \right\} . \end{aligned}$$
    (43)
  • Buckling analysis: a constant axial force is acting through the mid-line and the deduce system is given by

    $$\begin{aligned} \left( [K]-N_0[K_g]\right) \displaystyle \left\{ q \right\} =\displaystyle \left\{ 0 \right\} , \end{aligned}$$
    (44)

where \(\displaystyle \left\{ q \right\}\) is the global dof vector of the beam.

\(\displaystyle \left[ K \right]\) , \(\displaystyle \left[ M \right]\) and \(\displaystyle \left[ K_g \right]\), are the stiffness, mass and geometric stiffness matrices, respectively, and \(\displaystyle \left\{ F \right\}\) is the load vector. They are obtained by assembling the individual element contributions using the elementary matrices given as follows:

Where \(\displaystyle \left\{ q \right\}\) is the global dof vector of the beam. \(\displaystyle \left[ K \right]\) is global the stiffness matrix, \(\displaystyle \left[ M \right]\) is the mass matrix, \(\displaystyle \left[ K_g \right]\) is the geometric stiffness matrix and \(\displaystyle \left\{ F \right\}\) is the load vector. They are obtained by assembling the individual element contributions using the elementary matrices given as follows:

$$\begin{aligned} \begin{aligned}{}[K_e]&=\displaystyle \int _{0}^{l}\left( [B_\varepsilon ]^T[k_{\varepsilon \varepsilon }][B_\varepsilon ]+\lambda [B_\varepsilon {}']^T[k_{\varepsilon \varepsilon }][B_\varepsilon {}']\right) ~\mathrm{d}x\\ [M_e]&=\displaystyle \int _{0}^{l}\left( [B_u]^T[m_{uu}][B_u]+\mu [B_{u}{}']^T[m_{uu}][B_{u}{}']\right) ~\mathrm{d}x\\ [K_{ge}]&=\displaystyle \int _{0}^{l}\left( [B_u]^T[k_{gg}][B_u]+\mu [B_{u}{}']^T[k_{gg}][B_{u}{}']\right) ~\mathrm{d}x\\ \displaystyle \left\{ F_e \right\}&=q\displaystyle \int _{0}^{l}\left( \displaystyle \left\{ N_w \right\} ^T-\mu \displaystyle \left\{ N_w'' \right\} ^T\right) ~\mathrm{d}x.\\ \end{aligned} \end{aligned}$$
(45)

6 Results and discussion

The first results are presented to test the robustness of the developed finite element model by considering problems for which analytical solutions are available. The study is carried out by varying parameters such as slenderness ratio \(S= L/h\), nonlocal and strain gradient parameters (\(\mu =ea^2, \lambda =l^2\)). The results are presented to show the size dependency in the nonlocal response of the nanobeams.

The considered problem is presented as a straight nanobeams with fixed thickness \(h=10\) nm, and the length L (nm) is considered to be a variable. Different values of the slenderness ratio are considered allowing to study thick to thin beams \(S=\{5, 10, 20, 50\}\). The values for nonlocal parameter \(\mu \,(\mathrm{nm}^2) = (ea)^2\) for the detailedd analysis are assumed to belong to \(\{0, 1, 2, 3, 4\}\). The strain gradient parameter \(\lambda \,(\mathrm{nm}^2) = l^2\) is considered to belong to \(\{0, 1, 2, 3, 4\}\). Different Boundary conditions are considered, simply supported beam, clamped-simply supported, clamped–clamped, cantilever beam. The considered material is an isotropic with Young modulus E and Poisson’s ratio \(\nu\). In the present paper, the following dimensionless quantities are introduced:

\({\bar{w}} = w \dfrac{100 E}{q h S^4}\)

\({\bar{\omega }}=\omega L^2\sqrt{\dfrac{m}{EI}},~m=\rho h,~I = \dfrac{h^3}{12}\)

\({\bar{N}} = N_0 \dfrac{L^2}{E I}\)

6.1 Assessment of the present formulation

To verify the reliability of the present formulation, an assessment of the present formulation is carried out on a simply supported nanobeams subjected to uniform load. Before proceeding to the analysis, a convergence study is considered by varying the number of elements for both local and nonlocal nanobeams. The results are presented in Tables 1, 2 and 3 along with those of analytical solutions obtained using Navier approach. The tables present the dimensionless maximum deflection, dimensionless buckling loads and dimensionless fundamental frequency, respectively, for different values of slenderness ratio (L/h), nonlocal parameter (ea) and strain gradient parameter (l). It is seen from these tables that four elements’ idealization is sufficient in obtaining converged results.

Table 1 Comparison of dimensionless maximum deflections of simply supported nanobeam
Table 2 Comparison of dimensionless buckling loads of simply supported nanobeam
Table 3 Comparison of dimensionless fundamental frequency of simply supported nanobeam

It can be seen that the nonlocal parameter and the strain gradient parameter have significant effects on the response of the nanobeam. With increasing in nonlocal parameter value, the dimensionless deflection value increases and the dimensionless critical buckling load and the frequency value decrease. Nonlocal parameter \(\mu\) and strain gradient parameter l have the opposite effect. The results are compared to the analytical ones obtained using Navier approach and with those available in the literature [17, 18]. It is seen that from tables, the results obtained using the present formulation are found to be in good agreement with the analytical ones and with those in the literature.

Fig. 2
figure 2

Simply supported nanobeam: effect of slenderness ratio (L/h) on the deflections, a for different values of nonlocal parameter with \(l^2=2\), b for different values of strain gradient parameter with \(ea^2=2\)

Fig. 3
figure 3

Simply supported nanobeam: effect of slenderness ratio (L/h) on the buckling, a for different values of nonlocal parameter with \(l^2=2\), b for different values of strain gradient parameter with \(ea^2=2\)

Fig. 4
figure 4

Simply supported nanobeam: effect of slenderness ratio (L/h) on the free vibration, a for different values of nonlocal parameter with \(l^2=2\), b for different values of strain gradient parameter with \(ea^2=2\)

Figures 2, 3 and 4 illustrate the influence of slenderness ratio of the simply supported nanobeam for different values of nonlocal and strain gradient parameters. It is clearly seen that when the nonlocal effect dominates \(ea>l\), the dimensionless deflection is larger than those obtained by classical continuum theory \(l=ea\), and the nanobeam is softened and becomes easy to deform. Also, the dimensionless buckling loads and the dimensionless fundamental frequency are lower than those of classical theory. However, when the strain gradient effect dominates \(l>ea\), the deflection is lower than those of classical continuum theory \(l=ea\), and the nanobeam is hardened and becomes difficult to deform. This is opposite to the case of buckling and vibration response. In addition, with the increasing slenderness ratio, the dimensionless deflection decreases when \(ea>l\) and increases when \(l>ea\), which is also counter to the situation of buckling and vibration response. Also, it can be seen that the differences between results predicted by classical theory and nonlocal strain gradient are significant for lower values of slenderness ratio but they are diminishing as the increase of slenderness ratio. Similar conclusions have also been observed about dynamic response based on the nonlocal strain gradient theory [17, 18, 40, 70].

6.2 Bending, vibration and buckling analysis of nanobeams

The second result is a nanobeam with one end fixed and the other simply supported. Tables 4, 5 and 6 depict the dimensionless maximum deflection, dimensionless buckling loads and dimensionless fundamental frequency for different values of nonlocal parameter (ea), strain gradient parameter (l) and slenderness ratio (L/h). From the tables, the deflection decreases with increase in nonlocal parameter value, the dimensionless critical buckling load and the dimensionless frequency decreases. The strain gradient parameter l has a tendency to decrease the dimensionless deflection and also to increase the buckling load and the frequency.

Table 4 Clamped-simply nanobeam: dimensionless maximum deflections
Table 5 Clamped-simply nanobeam: dimensionless buckling loads
Table 6 Clamped-simply nanobeam: dimensionless fundamental frequencies

The influence of slenderness ratio, the nonlocal parameter and strain gradient parameter is brought in Figs. 5, 6 and 7. According to the figures, it can be observed that the effects of the nonlocal and strain gradient parameters are qualitatively similar to that of simply supported nanobeam. However, with the increasing of slenderness ratio, the dimensionless deflection increases when \(l>ea\) or when \(l<ea\). Also, contrary to the simply supported case, the differences between the dimensionless deflection predicted by classical theory and nonlocal strain gradient are weak for lower values of slenderness ratio, and they are diminishing as the increase of slenderness ratio.

Fig. 5
figure 5

Clamped-simply supported nanobeam: effect of slenderness ratio (L/h) on the deflections, a for different values of nonlocal parameter with \(l^2=2\), b for different values of strain gradient parameter with \(ea^2=2\)

Fig. 6
figure 6

Clamped-simply supported nanobeam: effect of slenderness ratio (L/h) on the buckling, a for different values of nonlocal parameter with \(l^2=2\), b for different values of strain gradient parameter with \(ea^2=2\)

Fig. 7
figure 7

Clamped-simply supported nanobeam: effect of slenderness ratio (L/h) on the free vibration, a for different values of nonlocal parameter with \(l^2=2\), b for different values of strain gradient parameter with \(ea^2=2\)

The third analysis is performed assuming clamped–clamped straight nanobeams under a uniform load for the bending analysis. The dimensionless maximum deflection, dimensionless buckling loads and dimensionless fundamental frequency are highlighted in Tables 7, 8 and 9 assuming different nonlocal parameter and strain gradient parameter. It can be noted that the dimensionless maximum deflection are not affected by the nonlocal parameter, and the dimensionless maximum deflection decreases with the increase of strain gradient parameter \(\lambda\). The results are qualitatively similar to that of clamped-simply supported beam with no effect of nonlocal parameter. The influence of slenderness ratio, the nonlocal parameter and strain gradient parameter are brought in Figs. 8, 9 and 10.

Table 7 Clamped–clamped nanobeam: dimensionless maximum deflections
Table 8 Clamped–clamped nanobeam: dimensionless buckling loads
Fig. 8
figure 8

Clamped–clamped nanobeam: effect of slenderness ratio (L/h) on the deflections, a for different values of nonlocal parameter with \(l^2=2\), b for different values of strain gradient parameter with \(ea^2=2\)

Fig. 9
figure 9

Clamped–clamped nanobeam: effect of slenderness ratio (L/h) on the buckling, a for different values of nonlocal parameter with \(l^2=2\), b for different values of strain gradient parameter with \(ea^2=2\)

Fig. 10
figure 10

Clamped–clamped nanobeam: effect of slenderness ratio (L/h) on the free vibration, a for different values of nonlocal parameter with \(l^2=2\), b for different values of strain gradient parameter with \(ea^2=2\)

Fig. 11
figure 11

Cantilever nanobeam: effect of slenderness ratio (L/h) on the deflections, a for different values of nonlocal parameter with \(l^2=2\), b for different values of strain gradient parameter with \(ea^2=2\)

Fig. 12
figure 12

Cantilever nanobeam: effect of slenderness ratio (L/h) on the buckling, a for different values of nonlocal parameter with \(l^2=2\), b for different values of strain gradient parameter with \(ea^2=2\)

Table 9 Clamped–clamped nanobeam: dimensionless fundamental frequencies
Table 10 Cantilever nanobeam: dimensionless maximum deflections
Table 11 Cantilever nanobeam: dimensionless buckling loads
Table 12 Cantilever nanobeam: dimensionless fundamental frequencies
Fig. 13
figure 13

Cantilever nanobeam: effect of slenderness ratio (L/h) on the free vibration, a for different values of nonlocal parameter with \(l^2=2\), b for different values of strain gradient parameter with \(ea^2=2\)

The last analysis is about cantilevered nano-beams under uniform load and the results are presented in Tables 10, 11 and 12. From these tables, unlike in the case of simply supported or clamped-simply supported beam, the deflection decreases with the increase of the nonlocal parameter ea or strain gradient lvalues. However, the decrease in deflection is high compared to those of clamped case. The effect of slenderness ratio on the response of cantilever nanobeams is plotted in Figs. 11, 12 and 13 for different values of nonlocal parameter and strain gradient parameter. The results are qualitatively similar to that of clamped–clamped supported beam.

From the results presented in Tables 4 and 12, we can find an interesting phenomenon is that for clamped–clamped, clamped-simply supported and cantilever boundary conditions, when the nonlocal parameter is equal to the material length scale parameter, the buckling loads and natural frequencies predicted by nonlocal strain gradient theory are higher than those obtained by classical continuum theory (\(ea=l=0\)), contrary for the case of maximum deflection. This indicates that the combined effects of nonlocal and strain gradient depend not only on the relative magnitude of the two scale parameters but also on the boundary conditions.

7 Conclusion

The size-dependent bending, vibration and buckling analysis of nanobeams is investigated using finite element approach and based on nonlocal strain gradient theory using a novel two variable trigonometric shear deformation beams theory. The size effects are evaluated by introducing a nonlocal parameter and strain gradient parameter. The robustness and the reliability of the developed finite element model are tested using analytical solutions. Navier’s method is employed to get the analytical solutions for bending, vibration and buckling responses of a simply supported nanobeam. A parametric study is conducted to bring out the influence of various parameters such as nonlocal parameter, strain gradient parameter and slenderness ratio considering different boundary conditions. The following main points can be drawn from the present study:

  1. 1.

    The present formulation is in good agreement with those of analytical results and with those of the literature.

  2. 2.

    The response of the nanobeam depends largely on the nonlocal parameter, strain gradient parameter and slenderness ratio and it can be even qualitatively different.

  3. 3.

    With increasing the nonlocal parameter value, the dimensionless deflection value increases, the dimensionless critical buckling load and the frequency value decrease.

  4. 4.

    The nanobeam could exhibit either stiffness-softening effect or stiffness-hardening effect, which depends on the relative magnitude of the nonlocal parameter and the material length scale parameter.

The present novel two-variable theory is not only accurate but also simple in predicting the size-dependent bending, vibration and buckling analysis of nanobeams.