1 Introduction

Recently, there has been a vast development in the field of Nanotechnology. The invention of carbon nanotubes(CNT) has opened a new domain for researchers, due to their excellent mechanical, thermal and electrical properties. Their unique behavior made the researchers of different domains investigate more about their properties and applications. Many experimental investigations proved that our classical continuum theories fail to explain the properties of a material beyond a particular scale. This led to the need for length-scale parameters in the constitutive description. To overcome this drawback, many continuum theories were proposed in the literature. The recently developed higher-order nonlocal strain gradient theory is widely used to study static bending, buckling, and wave propagation of nanobeams. In this study, this particular model is reformulated to understand the behavior of nanobeams under buckling loads in a thermal environment.

Nanostructures refer to those structures with dimensions in the range of 1–100 nm. In simple words, a nanotube resembles a tube in the dimension of nanoscales. Iijima’s [1] pioneering research led to the discovery and accelerated research in the field of carbon nanotubes. There are mainly two types of nanotubes named organic and inorganic. Organic nanotubes, also known as carbon nanotubes, are long cylindrical carbon structures with hexagonal graphite molecules attached. Similar to graphene, carbon nanotubes are chemically bonded with an extreme form of molecular interaction known as \(sp^2\) bonds. Carbon nanotubes have the ability to produce ultra-high strength, low-weight materials (100 times stronger and 6 times lighter than steel), and highly conductive electrical (CNT can be used both as a conductor and insulator by changing its chirality) and thermal properties (thermal conductivity is larger than graphite or diamond at room temperature). This is attributed to the presence of \(sp^2\) bonds and the carbon nanotube’s natural inclination to rope together through Van der Waals force [2]. Due to the efficient properties of the CNTs, there is an extensive research work that is being carried out in the recent times for engineering(see [3,4,5,6]) and environmental fields ([7, 8]).

To avoid the sudden variation in the properties of composite materials, functionally graded materials were introduced in the 1980s, in which there is a spatial variation of the material properties [9]. The non-uniform variation in the micro-structure of the functionally graded material is because of the continuous variations of compositions and the volume portions of the constituents in a functionally graded material. This results in a smooth variation of material properties, unlike the case of conventional composites having an abrupt change in material properties. Functionally graded carbon nanotubes combine the properties of the carbon nanotubes and functionally graded materials. They have found applications in automotive industries, civil and ocean engineering, and smart structures [10]. Also, from the literature, we can state that functionally graded materials can be used in applications where we need higher fracture toughness, enhanced thermal and corrosive resistance, inferior stress intensity factor, and improved stress spreading [11]. Recent studies stated that functionally graded carbon nanotubes could be used in NEMS (Nano-Electro-Mechanical Systems) and MEMS (Micro-Electro-Mechanical Systems) which are of nano-size. Hence there is a need to study the mechanical behavior of functionally graded (FG) nanobeams under different loading conditions (for example, see [12]). Free vibration analysis of functionally graded cylindrical nano-shells is presented by Lu et al. [13]. Karami et al. [14] developed bi-Helmholtz nonlocal strain gradient theory for the resonance analysis of FG plates that vary the material properties in length, width and thickness directions (3D-FGM). Arefi et al. [15] used nonlocal strain gradient theory (NLSGT) to develop Navier’s solution for bending analysis of a sandwich nano-plates that are integrated with piezo-magnetic face sheets.

At nanoscale, i.e., at the electron, proton, and neutron levels, experimentally it is observed that materials exhibit scale effects [2, 16,17,18,19]. However, The classical continuum theories fail to predict the behavior of particles below a particular scale and lack a length scale parameter in their constitutive description. Hence, analyzing these structures with theories that consider length scales in their formulations is necessary. Many theories were proposed that considered the length scales in their constitutive description. One of the notable models among them is the nonlocal elastic stress field approach presented by Eringen [20]. It was stated in this pioneering work that in a continuous domain, stress at a point is dependent not only on strain at that point but also dependent on all other points in that domain. Though this model was successfully applied to study the scale effects, it could not explain the stiffness enhancement observed from the experimental analysis [21]. A group of researchers has proposed another theory known as Strain gradient theory [22] that extends the classical continuum mechanics based on the assumption that materials have to be modeled as atoms with higher-order deformation mechanisms at Nanoscales instead of modeling them as a collection of points. Based on the existing plasticity models, Aifantis [23, 24] proposed gradient elasticity theories for finite and infinitesimal deformations [25, 26]. A special case of the gradient elasticity theory, consisting of only one additional constant, is proposed by Aifantis. This model removes the strain singularities from dislocation lines and crack tips [27]. Stiffness enhancement observed in experimental results, with an increase in gradient parameters, was also observed using this theory. Recently, Lim et al. [21] proposed a higher-order nonlocal strain gradient model that captures both the stiffness enhancement and softening effects. The model incorporates higher-order stress gradients and nonlocality of strain gradients in the formulation. This model is successfully used to study the behavior of carbon nanotubes. An analytical solution to study the bending and buckling of the Euler–Bernoulli beam is provided by Xu et al. [28]. Li et al. studied the nonlinear beam’s buckling analysis based on the nonlocal strain gradient theory [29]. Li et al. have developed a numerical model for studying the size-dependent mechanical behaviors of axially functionally graded beams [30]. Chien he Thai et al. have used the higher-order shear deformation theory and nonlocal strain gradient theory (NLSGT) to study the free vibration and bending behavior of FG plate [31]. Li et al. have studied nonlinear bending, and free vibration analysis of functionally graded materials using the nonlinear Euler–Bernoulli and Timoshenko beam models [32]. Lu et al. proposed a unified nonlocal strain gradient model for nanobeams and stated that nanobeams exhibit either stiffness enhancement or stiffness softening based on the nonlocal and length scale parameter involved [33]. Based on the higher-order nonlocal strain gradient plate theory for the buckling of orthotropic nanomaterials, Farajpour et al [34]. have stated that the critical buckling load varies depending on the nonlocal and strain gradient parameters. Li et al. [35] have studied the surface effects on single-walled carbon nanotubes based on the strain gradient theory. Tang et al. [36] studied wave propagation properties in a visco-elastic single-walled carbon nanotube for a Timoshenko beam model. Here, the authors discussed the influence of wave number, nonlocal, and strain gradient parameters on the blocking load and threshold diameter. Inspired by these two works, Kalyan et al. [37] have studied the wave propagation in visco-elastic Timoshenko nanobeam under the surface and magnetic effects based on the nonlocal strain gradient theory. She et al. [38] performed the wave propagation analysis on the functionally graded porous nanobeam using the nonlocal strain gradient theory. Influence of nonlocal and strain gradient parameters, power law index, and porosity volume are investigated. Simsek [39] developed the closed-form solutions for the free, forced vibration and buckling of a functionally graded nanobeam using the nonlocal strain gradient theory. Dynamic response of Timoshenko nanobeams subjected to thermal loading is shown in [40]. Timon et al. [41] have proposed an new nonlocal operator method for solving partial differential equations, which is in consistent with the variational principle and the weighted residual approach. This method replaces the traditional local operators with the nonlocal operators. Recently, the use of Deep Neural Networks to solve the partial differential equations has been extended to every domain. Samaniego et al. [42] using deep neural networks, solved problems related to computational mechanics. Two approaches, namely Collocation and Deep energy method, are proposed in this paper. For solving the problems of bending, buckling, and vibration problems of Kirchhoff’s plates, Xiaoying [43] et al. have introduced a deep auto-encoder-based energy method (DAEM) that is suitable for unsupervised feature extraction. Fitted Monte Carlo integration is adopted for calculating the potential energy. They have proposed a tailored activation function which is more stable and requires less computational time. For improving the accuracy, they have integrated the DAEM with transfer learning technique. Guo et al. [44] have proposed a Deep Collocation Method for solving the Kirchhoff’s plate bending problem which is based on a feed forward deep neural network that takes the advantage of back propagation in deep learning. The proposed method overcomes the difficulties of \(C^{1}\) continuity requirements involved in plate bending. Though this method is easy to implement, it has issues related to choosing the type of neural network, activation and loss function, optimizers related to the accuracy and efficiency of the deep collocation method.

There are works reported in the literature on wave propagation, free vibration and forced vibration analysis based on nonlocal strain gradient theory (NLSGT). The main contribution of this paper relies on the proposed model itself, involving the investigation of the buckling behavior of FG nano beams under thermal environment. The recently developed higher-order nonlocal strain gradient theory is invoked and reformulated for the thermal buckling analysis. The paper is organized as follows. Section 1 provides the introduction to NLSGT and the formulation of the proposed model. The critical buckling temperature of a functionally graded nanobeam is developed for three different boundary conditions. Section 2 presents the analytical solution to governing equation. Section 3 presents the parametric study to validate the proposed model with the existing literature and illustrates the effect of gradient and nonlocal parameters on the buckling behavior. Conclusions are drawn in Sect. 4.

2 Mathematical formulation

2.1 Displacement field

According to the Euler–Bernoulli beam model, the displacement field is given by

$$\begin{aligned} {\bar{u}}(x,z)&= u(x) -z \dfrac{\text {d}w(x)}{\text {d}x} \end{aligned}$$
(1a)
$$\begin{aligned} {\bar{w}}(x,z)&= w(x) \end{aligned}$$
(1b)

where \({\bar{u}}(x,z)\) and \({\bar{w}}(x,z)\) are displacements of a point in \(x-\) and \(z-\)directions, respectively, u and w are the displacements of the mid surface of the beam, and z is the distance from the middle surface (Fig. 1).

Fig. 1
figure 1

Deformed and Undeformed configurations of Euler–Bernoulli beam

The nonlinear strain displacement relation for the beam in the axial direction is given by:

$$\begin{aligned} \varepsilon _{x x}=\dfrac{\text {d} u}{\text {d} x}+\dfrac{1}{2}\left( \dfrac{\text {d} w}{\text {d} x}\right) ^2-z \dfrac{\text {d}^2 w}{\text {d} x^2} \end{aligned}$$
(2)

where \(\varepsilon _{xx}\) is the axial strain. Using the nonlocal strain gradient theory (see [21]), we can write the stress component as

$$\begin{aligned} {\left( 1-ea^{2} \nabla ^{2}\right) }\sigma _{x x}=E\left( z\right) {\left( 1-l^{2} \nabla ^{2}\right) }{\left( \varepsilon _{x x}- \alpha \left( z\right) \Delta T\right) } \end{aligned}$$
(3)

where \(E=E(z)\) is the Young’s modulus, \(\alpha =\alpha (z)\) is the coefficient of thermal expansion, \(\ell \) is the strain gradient parameter, ea is the nonlocal parameter and \(\Delta T\) is the change in the temperature. In this work, we have followed the Voigt rule for the distribution of mechanical and thermal properties of the material and power law index for distributing the volume compositions of the ceramic and metal [45]. As per the Hamilton’s Principle, we can write

$$\begin{aligned} \int _{t_{1}}^{t_{2}}\left( \delta U + \delta V -\delta K \right) \text {d}t = 0 \end{aligned}$$
(4)

where \(\delta U \) is known as virtual strain energy and is given by

$$\begin{aligned} \delta U = \int _{V}\left( \sigma _{x x} \delta \epsilon _{x x} \right) \text {d}V \end{aligned}$$
(5)

\(\delta V\) is the variation in the external work done by thermal expansion

$$\begin{aligned} \delta V = \int \left( E\alpha \Delta T\frac{\partial w}{\partial x}\frac{\partial \delta w}{\partial x}\right) \text {d}V \end{aligned}$$
(6)

and \(\delta K \) is the virtual kinematic energy which is zero as we are considering a static load.

We can write the stress resultants as

$$\begin{aligned} N= & {} \int _{A} \sigma _{x x} \text {d} A \nonumber \\ M= & {} \int _{A} z \sigma _{x x} \text {d}A \nonumber \\ N_{x}^T= & {} \int _{-\frac{h}{2}}^{\frac{h}{2}}E\left( z\right) \alpha \Delta T b \text {d}z \end{aligned}$$
(7)

substituting the stress resultants in the Hamilton’s Principle (4) we get

$$\begin{aligned}{} & {} \int _{t_{1}}^{t_{2}} \int \left( N \delta \left( \frac{\partial u}{\partial x} + \frac{1}{2}\left( \frac{\partial w}{\partial x}\right) ^2 \right) \text {d}x -\int M \delta \frac{\partial ^2 w}{\partial x^2} +\int \left( N_{x}^{T}\frac{\partial w}{\partial x}\frac{\partial \delta w}{\partial x}\right) \text {d}x\right) \text {d}t = 0 \end{aligned}$$
(8)
$$\begin{aligned}{} & {} \int _{t_{1}}^{t_{2}}\left( \int \left( N\left( \frac{\partial \delta u}{\partial x}+\left( \frac{\partial w}{\partial x}\frac{\partial \delta w}{\partial x}\right) \right) -M\frac{\partial ^{2} \delta w}{\partial x^{2}}- \int \left( N_{x}^{T}\frac{\partial w}{\partial x}\frac{\partial \delta w}{\partial x}\right) \right) \text {d}x\right) \text {d}t= 0 \end{aligned}$$
(9)

Applying integration by parts, we can modify the above expression as

$$\begin{aligned} \begin{aligned}&\int _{t_{1}}^{t_{2}}\left( N\delta u-\int \frac{\partial N}{\partial x} \delta u + N \frac{\partial w}{\partial x} \delta w - \int \frac{\partial N}{\partial x}\frac{\partial w}{\partial x}\delta w - \int N \frac{\partial ^{2}w}{\partial x^{2}}\delta w\right) \text {d}t\\&\quad + \int _{t_{1}}^{t_{2}}\left( -M\frac{\partial \delta w}{\partial x} +\frac{\partial M}{\partial x} \delta w -\int \frac{\partial ^{2}M}{\partial x^{2}}\delta w-\int N_{x}^{T}\frac{\partial ^{2}w}{\partial x^{2}}\delta w \right) \text {d}t =0 \end{aligned} \end{aligned}$$
(10)

Now equating the the coefficients of \(\delta u\), \(\delta w\) to zero, we get the following equations

$$\begin{aligned}{} & {} \frac{\partial N}{\partial x}=0 \end{aligned}$$
(11)
$$\begin{aligned}{} & {} -\frac{\partial ^{2} M}{\partial x^{2}} -N\frac{\partial ^2w}{\partial x^2}-N_{x}^{T}\frac{\partial ^{2}w}{\partial x^2}=0 \end{aligned}$$
(12)

Differentiate Eq. (11) w.r.t. x, we get

$$\begin{aligned} \frac{\partial ^{2} N}{\partial x^{2}}=0 \end{aligned}$$
(13)

Applying the integration on both sides of Eq. (3), we get

$$\begin{aligned} \left( 1-ea^{2} \nabla ^{2}\right) N = E_{1}{\left( 1-l^{2} \nabla ^{2}\right) }{\left( \frac{\partial u}{\partial x}+\frac{1}{2}\left( \frac{\partial w}{\partial x}\right) ^2- \alpha \Delta TE\right) }-E_{2}\left( 1-l^{2} \nabla ^{2}\right) \frac{\partial ^2 w}{\partial x^2} \end{aligned}$$
(14)

where

$$\begin{aligned} \begin{aligned} E_1&= \int _{\frac{-h}{2}}^{\frac{h}{2}} E(z) \text {d} z\\ E_2&= \int _{\frac{-h}{2}}^{\frac{h}{2}} z E(z) \text {d} z \\ E_3&= \int _{\frac{-h}{2}}^{\frac{h}{2}} z^2 E(z) \text {d} z \end{aligned} \end{aligned}$$
(15)

Multiply Eq. (3) with z and integrate it, we get

$$\begin{aligned} \left( 1-ea^{2} \nabla ^{2}\right) M = E_{2}{\left( 1-l^{2} \nabla ^{2}\right) }{\left( \frac{\partial u}{\partial x}+\frac{1}{2}\left( \frac{\partial w}{\partial x}\right) ^2- \alpha \Delta TE\right) }-E_{3}\left( 1-l^{2} \nabla ^{2}\right) \frac{\partial ^2 w}{\partial x^2} \end{aligned}$$
(16)

Now substitute Eq. (13) in Eq. (14), we get

$$\begin{aligned} N = E_{1}{\left( 1-l^{2} \nabla ^{2}\right) }{\left( \frac{\partial u}{\partial x}+\frac{1}{2}\left( \frac{\partial w}{\partial x}\right) ^2- \alpha \Delta TE\right) }-E_{2}\left( 1-l^{2} \nabla ^{2}\right) \frac{\partial ^2 w}{\partial x^2} \end{aligned}$$
(17)

Substitute Eq. (12) in Eq.(16), we get

$$\begin{aligned} \begin{aligned} M&=\left( ea\right) ^{2}\left( -N\frac{\partial ^2w}{\partial x^2}-N_{x}^{T}\frac{\partial ^{2}w}{\partial x^2}\right) + E_{2}{\left( 1-l^{2} \nabla ^{2}\right) }{\left( \frac{\partial u}{\partial x}+\frac{1}{2}\left( \frac{\partial w}{\partial x}\right) ^2- \alpha \Delta TE\right) }\\&\quad -E_{3}\left( 1-l^{2} \nabla ^{2}\right) \frac{\partial ^2 w}{\partial x^2} \end{aligned} \end{aligned}$$
(18)

Differentiating the above equation twice we get

$$\begin{aligned} \begin{aligned} \frac{\partial ^{2} M}{\partial x^{2}}&=\left( ea\right) ^{2}\left( -N_{x}^{T}\frac{\partial ^{4}w}{\partial x^4}\right) + E_{2}\left( 1-l^{2} \nabla ^{2}\right) {\left( \frac{\partial u^{3}}{\partial x^{3}}-l^{2}\frac{\partial u^{5}}{\partial x^{5}}\right) }\\&\quad -E_{3}\left( \frac{\partial ^4 w}{\partial x^4}-l^{2} \frac{\partial ^6 w}{\partial x^6}\right) \end{aligned} \end{aligned}$$
(19)

By neglecting the contribution of nonlinear terms, and substituting Eq.(19) in Eq. (12), we get

$$\begin{aligned} \begin{aligned} -N_{x}^{T}\frac{\partial ^{2}w}{\partial x^2}&=\left( ea\right) ^{2}\left( -N_{x}^{T}\frac{\partial ^{4}w}{\partial x^4}\right) + E_{2}{\left( \frac{\partial u^{3}}{\partial x^{3}}-l^{2}\frac{\partial u^{5}}{\partial x^{5}}\right) }\\&\quad -E_{3}\left( \frac{\partial ^4 w}{\partial x^4}-l^{2} \frac{\partial ^6 w}{\partial x^6}\right) \end{aligned} \end{aligned}$$
(20)

Differentiating Eq. (17) and equating it to zero we get

$$\begin{aligned} \left( 1-l^{2} \nabla ^{2}\right) \frac{\partial ^{2} u}{\partial x^{2}}=\frac{E_{2}}{E_{1}}\left( 1-l^{2} \nabla ^{2}\right) \frac{\partial ^{3} w}{\partial x^{3}} \end{aligned}$$
(21)

Now differentiate the above differential equation and substitute in Eq. (20), we get

$$\begin{aligned} \frac{\partial ^6w}{\partial x^6}\left[ \beta l^{2}\right] -\frac{\partial ^4w}{\partial x^4}\left[ \gamma \right] +{N_x^{T}}\frac{\partial ^2w}{\partial x^2}=0 \end{aligned}$$
(22)

Modifying the above equation, we arrive at the following.

$$\begin{aligned} \frac{\partial ^6w}{\partial x^6}+\frac{\partial ^4w}{\partial x^4}\left[ b\right] +{c}\frac{\partial ^2w}{\partial x^2}=0 \end{aligned}$$
(23)

where

$$\begin{aligned} b= & {} -\frac{\gamma }{\left[ \beta l^{2}\right] } \\ c= & {} -\frac{N_x^{T}}{\beta l^{2}} \end{aligned}$$

3 Solution to governing equations

This section presents the solution methodology of the derived governing equations.

Let the solution of the above differential equation be

$$\begin{aligned} w=C_{1}+C_{2}x + C_{3}\cos (Fx) +C_{4}\sin (Fx)+C_{5}\cos (Gx)+C_{6}\sin (Gx) \end{aligned}$$
(24)

where

$$\begin{aligned} F=\sqrt{\frac{-b+\sqrt{b^2-4c}}{2}} \end{aligned}$$

and

$$\begin{aligned} G=\sqrt{\frac{-b-\sqrt{b^2-4c}}{2}} \end{aligned}$$

3.1 Simply supported beam

The boundary conditions for the simply supported beam can be written as (by writing the weak form of Eq. (23)),

$$\begin{aligned}{} & {} w_{x=0,L}=0 \\{} & {} \left( \dfrac{\partial ^2w}{\partial x^2}\right) _{x=0,L}=0 \\{} & {} \left( \frac{\partial ^4w}{\partial x^4}+f^2\frac{\partial ^2w}{\partial x^2}\right) _{x=0,L}=0 \end{aligned}$$

On substituting the boundary condition in the solution and expressing them in the form of a matrix, we get,

$$\begin{aligned} \left[ \begin{array}{cccccc} 1 &{} 0 &{} 1 &{} 0 &{} 1 &{} 0 \\ 0 &{} 0 &{} F^2 &{} 0 &{} G^2 &{} 0 \\ 0 &{} 0 &{} F^2(F^2-b^2) &{} 0 &{} G^2(G^2-b^2) &{} 0 \\ 1 &{} L &{} cos(FL) &{} sin(FL) &{} cos(GL) &{} sin(GL) \\ 0 &{} 0 &{} -F^2cos(FL) &{} -F^2sin(FL) &{} -G^2cos(GL) &{} -G^2sin(GL) \\ 0 &{} 0 &{} F^2cos(FL)(F^2-b^2) &{} F^2sin(FL)(F^2-b^2) &{} G^2cos(GL)(G^2-b^2) &{} G^2sin(GL)(G^2-b^2) \end{array}\right] \nonumber \\ \end{aligned}$$
(25)

For the non-trivial solution, the determinant of the coefficient matrix must be zero.

$$\begin{aligned} 0= & {} -L\left( F^4G^8sin(FL)sin(GL)-2F^6G^6sin(FL)sin(GL)+F^8G^4sin(FL)sin(GL)\right) \\ 0= & {} sin(FL)sin(GL)[F^4G^8-2F^6G^6+F^8G^4] \end{aligned}$$

To satisfy the above equation, let \(FL=\pi \) or \(GL=\pi , \) we get

$$\begin{aligned} -b+\sqrt{b^{2}-4c} = \frac{2\pi ^{2}}{L^{2}} \end{aligned}$$

Squaring on both sides

$$\begin{aligned} {b^{2}-4c} =\left( b+ \frac{2\pi ^{2}}{L^{2}}\right) ^{2} \end{aligned}$$

Substituting the values of b and c in the above equation and further simplifying it, we get the expression for thermal force resultant as

$$\begin{aligned} N_x^{T} = \left( \frac{E_{3}E_{1} -E_2^{2}}{E_{1}}\right) \frac{\pi ^{2}}{L^2}\left( \frac{L^{2}-\pi ^{2}l^{2}}{\left( \pi ea\right) ^2-L^{2}}\right) \end{aligned}$$
(26)

It can be noted that equal values of ea and l in Eq. (26) will result in the critical temperature according to the classical theory [45]. Following the similar process, we can get the similar relations for different boundary conditions.

3.2 Cantilever beam

The boundary conditions for a cantilever beam are given by

$$\begin{aligned}&@x=0: \qquad w = 0, \quad \dfrac{\partial w}{\text {d}x} = 0, \quad \dfrac{\partial ^3w}{\partial x^3} = 0 \\&\quad x=L: \qquad \dfrac{\partial ^5w}{\partial x^5}+b\dfrac{\partial ^3w}{\partial x^3}+c\dfrac{\partial w}{\partial x}=0, \, \dfrac{\partial ^4w}{\partial x^4}+b\dfrac{\partial ^2w}{\partial x^2}=0, \, \dfrac{\partial ^2w}{\partial x^2} = 0 \end{aligned}$$

To satisfy the above equation, let \(FL=\frac{\pi }{2} \) or \(GL=\frac{\pi }{2} \), we get

$$\begin{aligned} -b+\sqrt{b^{2}-4c} = \frac{\pi ^{2}}{2L^{2}} \end{aligned}$$

Squaring on both sides

$$\begin{aligned} {b^{2}-4c} =\left( b+ \frac{\pi ^{2}}{2L^{2}}\right) ^{2} \end{aligned}$$

Substituting the values of b and c in the above equation and further simplifying it we get the expression for Thermal force resultant as

$$\begin{aligned} N_x^{T} = \left( \frac{E_{3}E_{1} -E_2^{2}}{E_{1}}\right) \frac{\pi ^{2}}{L^2}\left( \frac{16L^{2}-4\pi ^{2}l^{2}}{16\pi ^{2}\left( ea\right) ^2-64L^{2}}\right) \end{aligned}$$
(27)

3.3 Beam clamped at both ends

The boundary conditions are given by:

$$\begin{aligned}&@x=0,L \qquad w=0, \, \dfrac{\partial w}{\partial x} = 0, \, \dfrac{\partial ^3w}{\partial x^3}=0 \,\, \end{aligned}$$

we get the relation between

$$\begin{aligned} N_x^{T} = \left( \frac{E_{3}E_{1} -E_2^{2}}{E_{1}}\right) \frac{16\pi ^{2}}{L^2}\left( \frac{L^{2}-8\pi ^{2}l^{2}}{16\pi ^{2}\left( ea\right) ^2-4L^{2}}\right) \end{aligned}$$
(28)

Therefore, in a generalized way, we can write the Thermal force resultant as

$$\begin{aligned} N_x^{T} = \left( \frac{E_{3}E_{1} -E_2^{2}}{E_{1}}\right) \frac{C}{L^{2}} \end{aligned}$$
(29)

For a uniform temperature rise, substituting \(T = T_{0}+\Delta T\) in Eq. (7), we get

$$\begin{aligned} N_x^T=\Delta T h\left( E_m \alpha _m+\dfrac{E_{c m} \alpha _m+E_m \alpha _{c m}}{k+1}+\dfrac{E_{c m} \alpha _{c m}}{2 k+1}\right) \end{aligned}$$
(30)

Equating Eqs. (29) and (30), we get the critical buckling temperature for a uniform temperature rise as

$$\begin{aligned} \Delta T_{c r}^{U n i}=\dfrac{C}{\alpha _m}\left( \dfrac{h}{L}\right) ^2 \dfrac{F(k, \xi )}{G(k, \xi , \zeta )} \end{aligned}$$

where

$$\begin{aligned} \xi =\dfrac{E_{c m}}{E_m}, \zeta =\dfrac{\alpha _{c m}}{\alpha _m} \end{aligned}$$

The functions \(F(k, \xi )\), \(G(k, \xi , \zeta )\) are defined as

$$\begin{aligned} F(k, \xi )= & {} \dfrac{1}{12}+\dfrac{\xi \left( k^2+k+2\right) }{4(k+1)(k+2)(k+3)} -\dfrac{\xi ^2 k^2}{4(k+1)(k+2)^2(k+1+\xi )} \end{aligned}$$
(31)
$$\begin{aligned} G(k, \xi , \zeta )= & {} 1+\dfrac{\xi +\zeta }{k+1}+\dfrac{\xi \zeta }{2 k+1} \end{aligned}$$
(32)

when the thickness of the beam is very thin, a linear variation of temperature is observed in the thickness direction. i.e., temperature can be written as a function of z.

$$\begin{aligned} T=T_m+\left( T_c-T_m\right) \left( \dfrac{1}{2}+\dfrac{z}{h}\right) \end{aligned}$$
(33)

Substituting Eqs. (33) in (9) we get,

$$\begin{aligned} \begin{aligned} N_x^T&= h\left( T_m-T_0\right) \left( E_m \alpha _m+\dfrac{E_{c m} \alpha _m+E_m \alpha _{c m}}{k+1}+\dfrac{E_{c m} \alpha _{c m}}{2 k+1}\right) \\&\quad +h \Delta T\left( \dfrac{E_m \alpha _m}{2}+\dfrac{E_{c m} \alpha _m+E_m \alpha _{c m}}{k+2}+\dfrac{E_{c m} \alpha _{c m}}{2 k+2}\right) \end{aligned} \end{aligned}$$
(34)

Equating Eqs. (29) and (34), we get the critical buckling temperature for linear temperature rise as

$$\begin{aligned} \Delta T_{c r}^{\text{ Linear } }=\dfrac{C}{\alpha _m}\left( \dfrac{h}{L}\right) ^2 \dfrac{F(k, \xi )}{H(k, \xi , \zeta )}-\left( T_m-T_0\right) \dfrac{G(k, \zeta , \zeta )}{H(k, \xi , \zeta )} \end{aligned}$$
(35)

where \(H(k, \xi , \zeta )\) is given by

$$\begin{aligned} H(k, \xi , \zeta )=\dfrac{1}{2}+\dfrac{\xi +\zeta }{k+2}+\dfrac{\xi \zeta }{2 k+2} \end{aligned}$$
(36)

when the temperature variation is nonlinearly varying, the temperature distribution and the critical buckling temperature are given by [45]

$$\begin{aligned} T =T_m+\dfrac{\left( T_c-T_m\right) }{D} \times \left[ \sum _{i=0}^5 \dfrac{(-1)^i}{i k+1}\left( \dfrac{K_{c m}}{K_m}\right) ^i\left( \dfrac{1}{2}+\dfrac{z}{h}\right) ^{i k+1}\right] \end{aligned}$$
(37)

where

$$\begin{aligned} D=\sum _{i=0}^5 \dfrac{(-1)^i}{i k+1}\left( \dfrac{K_{c m}}{K_m}\right) ^i \end{aligned}$$

Following the similar procedure, we can obtain the critical buckling temperature for nonlinear temperature variation as

$$\begin{aligned} \Delta T_{c r}^{N o n-L i n} =\dfrac{C}{\alpha _m}\left( \dfrac{h}{L}\right) ^2 \dfrac{F(k, \xi )}{I(k, \xi , \zeta , \gamma )} -\left( T_m-T_0\right) \dfrac{G(k, \xi , \zeta )}{I(k, \zeta , \zeta , \gamma )} \end{aligned}$$
(38)

here \(\gamma =\dfrac{K_{c m}}{K_m}\) and the function \(I(k, \zeta , \zeta , \gamma )\) is given by

$$\begin{aligned} \begin{aligned} I(k, \xi , \zeta , \gamma )&=\dfrac{1}{D}\left[ \dfrac{1}{2}+\dfrac{1}{k+2}\left( \xi +\zeta -\dfrac{\gamma }{k+1}\right) \right. +\dfrac{1}{2 k+2}\left( \zeta \zeta -\dfrac{\gamma \xi +\gamma \zeta }{k+1}+\dfrac{\gamma ^2}{2 k+1}\right) \\&\quad +\dfrac{1}{3 k+2}\left( \dfrac{\gamma ^2 \xi +\gamma ^2 \zeta }{2 k+1}-\dfrac{\gamma ^3}{3 k+1}-\dfrac{\gamma \xi \zeta }{k+1}\right) \\&\quad +\dfrac{1}{4 k+2}\left( \dfrac{\gamma ^4}{4 k+1}-\dfrac{\gamma ^3 \xi +\gamma ^3 \zeta }{3 k+1}+\dfrac{\gamma ^2 \xi \zeta }{2 k+1}\right) \\&\quad +\dfrac{1}{5 k+2}\left( \dfrac{\gamma ^4 \xi +\gamma ^4 \zeta }{4 k+1}-\dfrac{\gamma ^5}{5 k+1}-\dfrac{\gamma ^3 \zeta \zeta }{3 k+1}\right) \\&\quad +\dfrac{1}{6 k+2}\left( \dfrac{\gamma ^4 \xi \zeta }{4 k+1}-\dfrac{\gamma ^5 \xi +\gamma ^5 \zeta }{5 k+1}\right) \left. -\dfrac{\gamma ^5 \xi \zeta }{(5 k+1)(7 k+2)}\right] \end{aligned} \end{aligned}$$
(39)

4 Results and discussions

A functionally graded (ceramic-metal) beam is considered for the analysis. Elastic modulus, thermal conductivity, coefficient of thermal expansion of the constituent materials considered are as follows: \(E_{c}=380\) GPA, \(E_{m} =70\) GPA, \(K_{c},K_{m}\) are \(10.4 \mathrm{W/m}^{\circ }\)K and \(204 \mathrm{W/m}^{\circ }\)K, \(\alpha _{c},\alpha _{m}\) are \(7.4 \times 10^{-6} /{}^{\circ }\)C, \(23\times 10^{-6} /{}^{\circ }\)C respectively (see, [45]), where the subscript ‘c’ and ‘m’, refer to ceramic and metallic phase, respectively. For all the numerical studies, the value of h is taken as 1 nm, unless otherwise mentioned.

Fig. 2
figure 2

Variation of critical buckling temperature \((^{\circ }\)C) under uniform temperature rise for three different boundary conditions

Fig. 3
figure 3

Variation of critical buckling temperature \((^{\circ }\)C) under linear temperature rise for three different boundary conditions

Fig. 4
figure 4

Variation of critical buckling temperature \((^{\circ }\)C) under nonlinear temperature rise for three different boundary conditions

Fig. 5
figure 5

Variation of critical buckling temperature \((^{\circ }\)C) with \(\dfrac{L}{h}\) for an isotropic beam with three different boundary conditions

Fig. 6
figure 6

Variation of critical buckling temperature \((^{\circ }\)C) with power law index for different boundary conditions

Figures 2, 3, 4 show the variation of critical buckling temperature as a function of \(\frac{h}{L}\) for three different boundary conditions and three different thermal loading conditions (under uniform temperature rise, linear temperature rise and non-uniform temperature rise), respectively. In this case, the value of the power law index is taken as 1, i.e., \(k=\) 1. The temperature difference between the metal and ceramic surfaces is calculated as \(5^{/\circ }\)C (see, [46]). The profiles of the plots agree well with the literature [45] in which no effects of nonlocality and strain gradient are considered. It can be observed that the effect of nonlocal and strain gradient parameters are more prominent for relatively higher values of h/L. As expected, fixed beam has higher critical buckling temperature followed by simpy supported and cantilever beam. It can also be observed that the critical temperature values are higher for nonlinear temperature rise followed by linear and uniform temperature rise.

Figure 5 shows the variation of critical buckling temperature with \(\dfrac{L}{h}\) for an homogeneous beam under uniform temperature rise for three different boundary conditions, viz., simply supported, cantilever and fixed beam. The values of the nonlocal and strain gradient parameters considered are set as \(ea = 1.25\) nm and \(\ell = 0.5\)nm. As it is shown in Fig. 5, the critical buckling temperature decreases as the L/h ratio increases. It is observed that the critical buckling temperature for the beam fixed at both ends is more than that of the the simply supported and cantilever beams. It is also observed that after reaching a certain value of L/h, the rate of decrease in critical buckling temperature w.r.t increase in L/h value is negligible.

Figure 6 shows the variation of the critical buckling temperature with power law index for three different boundary conditions. The values of the nonlocal and strain gradient parameters considered are as follows: \(ea = 1.25\) nm and \(\ell =0.5\) nm and the value of \(\dfrac{L}{h}\) is taken as 20. As the value of the power law index increases, the critical buckling temperature decreases until \(k=\) 2 and then slightly increases till \(k=\) 10 and then decreases for \(k > 10\).

Tables 1, 2 show the variation of critical buckling temperature for a Simply Supported functionally graded beam for linear temperature distribution. For a given power law index, the critical temperature reduces with increasing L/h ratio. Also, with the increase in power law index, the critical buckling temperatures decreases till \(k=\) 2 and increases for \(k =\) 5 and \(k =\) 10.

Tables 3, 4 show the variation of critical buckling temperature for a clamped-hinged functionally graded beam for nonlinear temperature distribution. For a given power law index, the critical temperature reduces with the increase in the L/h ratio. For a given L/h ratio, with the increase in the power law index, the value of critical temperature gets reduced. Figures 7, 8, 9, 10 shows the variation of critical buckling temperature with \(\dfrac{L}{h}\) for simply supported and cantilever beams with different values of ea and l. Four curves with different values of ea \(\left( 0.5, 1, 2\right) \)nm and having the same \(\ell \) value as 0 nm are plotted in Figs. 7 and 10. It was observed that if the value of ea gets reduced, the value of critical buckling temperature decreases. Four curves with different values of \(\ell \) \(\left( 0.5, 1, 2\right) \)nm and having the same ea value as 0 nm are plotted in Figs. 8 and 9. It was observed that if the value of \(\ell \) gets reduced, the value of critical buckling temperature increases. It is also observed that if the value of ea is greater than \(\ell \), then the critical buckling temperature increases and vice versa.

Table 1 Critical buckling temperature \((^{\circ }\)C) for a clamped restrained beam for a linear temperature distribution
Table 2 Critical buckling temperature \((^{\circ }\)C) for a clamped restrained beam for a linear temperature distribution
Table 3 Critical buckling temperature \((^{\circ }\)C) for a clamped restrained beam for a nonlinear temperature distribution
Table 4 Critical buckling temperature \((^{\circ }\)C) for a clamped restrained beam for a nonlinear temperature distribution
Fig. 7
figure 7

Variation of critical buckling temperature \((^{\circ }\)C) for a simply supported isotropic beam with different values of ea

Fig. 8
figure 8

Variation of critical buckling temperature \((^{\circ }\)C) for a simply supported isotropic beam with different values of \(\ell \)

Fig. 9
figure 9

Variation of critical buckling temperature \((^{\circ }\)C) for a cantilever isotropic beam with different values of \(\ell \)

Fig. 10
figure 10

Variation of critical buckling temperature \((^{\circ }\)C) for a cantilever isotropic beam with different values of ea

5 Conclusions

Thermal buckling analysis of a functionally graded nanobeam based on nonlocal strain gradient theory is presented in this work. The governing equations and the associated boundary conditions are reformulated using the Hamilton’s principle. The nonclassical boundary conditions are derived and closed-form solutions are obtained for the reformulated governing equations. Three different boundary conditions (simply supported, cantilever and clamped-clamped) and three different thermal loading conditions (Uniform, Linear, and Nonlinear temperature distribution) are considered in this study. The variation of critical buckling temperature w.r.t to L/h ratio and power law index is investigated incorporating both the nonlocal and strain gradient effects. It is concluded that the critical buckling temperature of the functionally graded beam are greatly influenced by the nonlocal and strain gradient parameters. It is observed that with the introduction of nonlocal and strain gradient effects, values of the critical buckling temperatures get increased as compared to results predicted by the classical continuum solutions under all types of thermal loading and boundary conditions. The critical buckling temperature is higher for the beam clamped at both ends followed by the simply supported and the cantilever beam. The critical buckling temperature predicted by the proposed model would regenerate to the classical continuum solutions when the nonlocal and gradient parameters become equal.