Introduction

In recent years, the rapid development of microtechnology and nanotechnology [1, 2] has made nanoscience one of the most promising scientific fields, with increasing attention to the mechanisms that influence nanofluid flow and heat transfer performance. The forced convection of fluids within finite micro and nanochannels serves as an effective method for enhancing the heat dissipation of micro and nanodevices. It has widespread applications in areas such as efficient heat transfer, semiconductor chips, aerospace technology, and more. Therefore, for more effective comprehension and design of nanoscale channels, it is essential to gain a comprehensive understanding of the heat transfer characteristics of fluids within nanochannels. When fluid flow reaches the micro [3,4,5] and nanoscale, microscale effects emerge, and it becomes challenging to elucidate their mechanisms due to the influence of experimental conditions and measurement precision. As a result, numerical simulations remain the primary research method in this context. At the microscale, liquids can be treated as either continuous media or collections of atoms, making Molecular Dynamics Simulation (MDS) [6,7,8,9,10] an essential method for studying and predicting the dynamic properties of atomic structures.

Qin and Azimian et al. [11, 12] investigated the influence of wall surface roughness shape and dimensions on nanofluid flow through non-equilibrium molecular dynamics. They found that changing the roughness shape affects the velocity and temperature distribution of the fluid. At the same height, triangular surface roughness in nanochannels resulted in a 17% increase in fluid velocity compared to cylindrical surfaces. The impact of triangular rough surfaces on flow behavior was greater than that of cylindrical surfaces, and an increase in roughness size led to an augmented fluid flow velocity within nanochannels. Raj et al. [13] simulated the Ar–Pt system using MD and found that the hydrodynamic slip length can be adjusted by varying the roughness cycle parameter and the channel width. Li and Liu [14] used MDS to study the flow of fluids in nanochannels and found that the thermal properties of the fluids are affected by wall interactions and temperature. Sofos et al. [15, 16] investigated the effect of rough wall surfaces on the fluid inside the nanochannel based on molecular dynamics and showed that roughness decreases the velocity of the fluid and leads to a decrease in the slip velocity at the wall. Zhang et al. [17] investigated the effect of wall roughness height on flow rate and found that when solid-liquid interaction is strong, even if the roughness height bump is small, it significantly affects the flow rate of fluid through the channel.

Yan et al. [18] investigated the effect of external forces on Poisson lobe flow by molecular dynamics and found that increasing the external force increases the average velocity of the fluid. Semiromi and Alipour [19, 20] et al. investigated the velocity-temperature distribution of the fluid for different driving forces and found that an increase in driving force leads to an increase in the temperature and velocity of the fluid. Toghraie et al. [21] studied the motion characteristics of water and copper nanofluid under Couette and Poiseuille flows. They found that an increase in the height of the nanochannel reduces the density fluctuations of the fluid near the walls.

Yao et al. [22,23,24] investigated the influence of roughness on nanofluid by altering the periodicity of the wall surface structure. They discovered that the combination of surface roughness morphology and the interaction with a weak wall flow has a favorable impact on enhancing heat transfer and reducing resistance. In the case of weak wall flow interaction, the fluid’s drag coefficient decreased by 27.1%, and the Nusselt number decreased by 1.78%. Song et al. [25] investigated the effect of wall roughness of sinusoidal structures with different periods on the convective heat transfer of fluids in nanochannels, discussed the intrinsic mechanism of the effect of nanostructures on convective heat transfer, and found that the wall of sinusoidal structures has better heat transfer with increasing amplitude and decreasing period. Marable et al. [26] concentrated on the effect of solid-liquid interaction, channel height, water velocity, and wall temperature on convective heat transfer. Motlagh [27, 28] studied convective heat transfer in copper-argon nanofluid under nanochannels by increasing and altering the shape of nanoparticles. The research revealed that increasing the number of nanoparticles enhances the heat transfer performance of nanofluids. Additionally, cylindrical-shaped nanoparticles showed a 6% higher Nusselt number compared to spherical-shaped particles.

Convection heat transfer in nanochannels is influenced by numerous factors, including external forces, channel height, roughness, nanoparticle shape and size, wall wettability, wall material, and temperature. The quantity and shape of roughness are two crucial factors in studying the heat exchange between the wall surface and the fluid. However, in previous studies of convective heat transfer in nanochannels, roughness shapes were typically modeled as a single rectangle. There has been no investigation into whether different shapes of roughness have an effect on fluid flow and convective heat transfer. Moreover, calculating velocity and temperature profiles in a single flow direction does not capture the influence of roughness on the localized fluid within nanochannels. Therefore, we employed triangular, rectangular, and hemispherical roughness with the same height and width to investigate the impact of different shapes of roughness on convective heat transfer of the fluid within the channels. The roughness quantities were chosen as 2, 6, and 10. We used the molecular dynamics software LAMMPS to perform the simulation, calculated the temperature velocity and density of the fluid parameters such as a comprehensive understanding of the nano-channel fluid flow and convective heat transfer, and at the same time plotted the velocity and temperature contours to more comprehensive understanding of the channel within the channel rough areas and smooth areas of the channel fluid motion state changes.

Molecular dynamics simulation

Physical model and simulation detail

This study employed the open-source molecular dynamics software known as “LAMMPS” (Large-scale Atomic/Molecular Massively Parallel Simulator) [29] for conducting molecular dynamics simulations. LAMMPS possesses the capability to simulate interactions and motion among atoms, molecules, and other particles. Developed by Sandia National Laboratories, this software is compatible with both single processors and large-scale parallel computing systems. To visualize the conducted simulations of convective heat transfer, the study utilized “OVITO” (Open Visualization Tool) [30]. OVITO is an open-source scientific visualization and analysis software designed specifically for processing, analyzing, and visualizing large-scale atomic, molecular, and particle simulation data. This tool facilitates researchers in achieving a more comprehensive understanding and presentation of simulation data, thereby offering deeper scientific insights. By integrating simulations using LAMMPS and visualization using OVITO, this study was able to rigorously investigate and present convective heat transfer phenomena in a scientific manner, providing insights at the molecular level.

In this study, we conducted molecular dynamics simulations of convective heat transfer, utilizing a smooth nanochannel model as depicted in Fig. 1. The overall dimensions of the simulation box measured 345.4 × 56 × 270 Å3. The upper and lower walls of the nanochannel were composed of copper atoms arranged in a face-centered cubic (FCC) lattice with a lattice constant of 3.615 Å. The fluid within the nanochannel consisted of argon atoms, likewise arranged in a face-centered cubic (FCC) lattice with a lattice constant of 5.62 Å. The upper and lower walls of the smooth nanochannel have a thickness of 30 Å, and the height (H) of the channel is 204 Å. Periodic boundary conditions were applied in the X and Y directions. In the Z direction, the fluid was subjected to fixed boundary conditions as it was confined within the upper and lower wall surfaces. The interior of the nanochannel was partitioned into three distinct regions: the force region (0 Å < x < 10 Å), the thermostat region (10 Å < x < 20 Å), and the sample collection region (20 Å < x < 314 Å). The force region was utilized for the application of an external force to the fluid, with a force magnitude of 0.0006 eV/Å. The thermostat region employed a Langevin thermostat to control the temperature of the fluid passing through that region at 300 K. The sample collection region was designated for the collection of fluid data. Both the fluid and the wall surfaces were maintained at a temperature of 200 K using Langevin thermostats, ensuring that the fluid within the nanochannel remained in a supercritical state, thereby preventing phase transitions. The simulation employed a timestep of 0.1 fs. The configuration of this model allowed us to conduct an in-depth investigation into the behavior of the fluid within the nanochannel and the phenomenon of convective heat transfer.

Fig. 1
figure 1

Smooth nanochannel model

As shown in Fig. 2, we employed a roughness nanochannel model in which rectangular, half-spherical, and triangular-shaped roughness structures were introduced within the interior of its upper and lower wall surfaces to facilitate investigations under varying roughness conditions. We systematically examined the quantities of roughness, specifically 2, 6, and 10, with the shapes of these roughness structures being triangular, half-spherical, and rectangular, The triangular and rectangular roughness structures had a width of 31.4 Å and a height of 28 Å, while the half-spherical roughness had a height of 28 Å as well. All three shapes of roughness shared the same height. In the force region, an external force along the x-direction was applied with a magnitude of 0.0006 eV/Å. After achieving temperature equilibrium within the fluid system and the wall surfaces, an analysis was conducted on the velocity, temperature, and density of the fluid inside both the smooth nanochannel and the rough nanochannel. The aim of this study was to gain a deeper understanding of the variations in fluid behavior under different roughness conditions.

Fig. 2
figure 2

Nanochannel models with varying roughness

Governing equations

In this study, MDS was conducted based on Newton’s second law, employing the Verlet method to determine fundamental dynamical parameters such as the positions, velocities, and interatomic forces of atoms. Newton’s second law [31] can be expressed by the following equation:

$${F}_{\textrm{i}}={\textrm{m}}_ia={m}_i\frac{d{v}_i}{dt}={m}_i\frac{d^2{r}_i}{d{t}^2}$$
(1)

where Fi represents the external force acting on argon atoms, mi represents the mass of argon atoms, vi represents the velocity of argon atoms, and ri represents the position of argon atoms. Due to the complex interactions within the molecular system, the Velocity-Verlet algorithm was employed to handle the equations of motion. The formula for the Velocity-Verlet algorithm [29, 32] is expressed as follows:

$${\displaystyle \begin{array}{c}{r}_i\left({t}_0+\varDelta t\right)={r}_i\left({t}_0\right)+\varDelta t{v}_i\left({t}_0\right)+{\left(\varDelta t\right)}^2{f}_i\left({t}_0\right)/2{m}_i\\ {}{v}_i\left({t}_0+\varDelta t\right)={v}_i\left({t}_0\right)+\varDelta t\left({F}_i\left({t}_0\right)+{F}_i\left({t}_0+\varDelta t\right)\right)/2{m}_i\end{array}}$$
(2)

where ri(t0) and vi(t0) represent the initial position and initial force, while ri(t0 + Δt), vi(t0 + Δt), and Fi(t0 + Δt) denote the final velocity, final position, and final force, respectively.

The LJ potential/ij [6] is given by

$$\phi (r)=4\varepsilon \left({\left(\frac{\sigma }{r}\right)}^{12}-{\left(\frac{\sigma }{r}\right)}^6\right)$$
(3)

r is the distance between two molecules. σ is a molecular length scale, and ε is an interaction strength parameter. The cutoff radius interaction is set to 1.0 nm. In addition, the EAM potential [33, 34] was used between metal atoms. All the LJ potential parameters are listed in Table 1. The total energy Ei of an atom i is given by

$${E}_i={F}_{\alpha}\left(\sum\nolimits_{j\ne i}{\rho}_{\beta}\left({r}_{ij}\right)\right)+\frac{1}{2}\sum\nolimits_{j\ne i}{\varnothing}_{\alpha \beta}\left({r}_{ij}\right)$$
(4)

where rij is the distance between atom i and atom j, ρβ indicates the contribution of the b-type atom j at the position of atom i to the electron charge density. Fα is an embedding function that represents the energy required to place atom i in the electron cloud. Øαβ refers to the potential energy of the interaction between atom i and atom j.

Table 1 LJ potential parameters between different atoms

The Lorentz-Berthelot mixing law [35] is employed for interactions between metal and non-metal atoms, as shown below:

$${\sigma}_{Cu-O}=\frac{\sigma_{Cu}+{\sigma}_O}{2}$$
(5)
$${\varepsilon}_{Cu-O}=\sqrt{\varepsilon_{Cu}{\varepsilon}_O}$$
(6)

The local average fluid temperature Tm(x) at different positions along the nanochannel is

$${T}_m(x)=\frac{\int_0^H c\rho {u}_x\left(x,z\right)T\left(x,z\right) dz}{\int_0^H c\rho {u}_x\left(x,z\right) dz}$$
(7)

C represents the specific heat capacity at constant pressure for the fluid, p denotes fluid density, ux(x, z) stands for the fluid’s velocity in the x-direction, and Tm(x) represents the temperature distribution of the fluid in the x-direction. The local heat transfer coefficient h(x) can be determined using Eq. (8), and the local Nusselt number [36] can be computed using Eq. (9). Due to solid-liquid interactions, the wall surface significantly influences the near-wall fluid temperature. In order to mitigate the impact of the wall surface on the fluid temperature, the local Nusselt number can be calculated using Eq. (10):

$${\left.h(x)=\frac{\lambda }{\left({T}_m(x)-{T}_w\right)}\frac{\partial T}{\partial z}\right|}_{z=w}$$
(8)
$$N{u}_x=\frac{h(x){D}_h}{\lambda }$$
(9)
$${\left.N{u}_x=\frac{D_h}{\left({T}_m(x)-{T}_w\right)}\frac{\partial T}{\partial z}\right|}_{z=w}$$
(10)

In the equation, λ represents the thermal conductivity of the fluid, ∂T/∂Z |z=w signifies the temperature gradient at the fluid-wall interface, and Dh = 2h.

System balance

In the simulations of convective heat transfer, the fluid temperature was initially controlled at 200 K under the NVT ensemble. Subsequently, the force region and the sample collection region were subjected to the NVE ensemble, while the thermal bath region was regulated using a Langevin thermostat to maintain a stable temperature of 300 K. The wall surfaces were also temperature-controlled at 200 K using the Langevin thermostat. So the first step is to make sure that the temperature of each part of our convective heat transfer system is in equilibrium.

Figure 3 illustrates the temperature distribution of the fluid and the wall surfaces, both for the smooth wall and when there are ten roughness structures on the wall, over a certain number of timesteps. As shown in Fig. 3, when both the wall and fluid temperatures reached 200 K, the application of external forces to the fluid resulted in an increase in fluid temperature. After approximately 200,000 time steps, the fluid temperature reached a stable state. Specifically, the temperature of the smooth plane was 230 K, while the fluid temperatures inside the channels with triangular and hemispherical roughness structures were approximately 235 K, and within the channel with rectangular roughness, the fluid temperature was around 225 K. The temperature of both the roughness wall and the smooth wall remained consistently around 200 K. In the subsequent steps, we will further report information regarding the temperature, velocity, and density of the fluid inside the nanochannel to gain a deeper insight into the nature of the heat transfer process. These results will aid in our comprehensive understanding of the behavior and properties of the fluid under different roughness conditions.

Fig. 3
figure 3

Nanochannel wall temperature and fluid temperature at different timestep

The temperature distribution of the fluid in the nanochannel

In our study, we computed the temperature distribution of the fluid in nanochannel models with varying cross-sectional shapes and numbers of roughness structures. The temperature distribution is a critical parameter for assessing the influence of different wall shapes and quantities of roughness on temperature under the same external forces. To calculate the temperature distribution of the entire nanofluid, we divided the nanochannel model into 45 segments along the z-directions, with each segment having a length of 6 Å. At each timestep, the average temperature of each atom in different segments was computed. In the force region, an external force of 0.0006 eV/Å was applied to the fluid, and after 4,000,000 timesteps, the temperature distribution along the z-direction was analyzed. As shown in Fig. 4, temperature profiles of the fluid under different roughness shapes and quantities indicate that, whether on a smooth wall or with various roughness conditions, the temperature of the fluid at the center of the channel is consistently the highest. Clearly, this suggests that as the fluid moves away from the wall surface, its temperature increases. This is because there is a solid-liquid interaction force between the wall surface and the fluid. As the fluid moves farther away from the wall surface, the interaction force between the solid and liquid weakens. Consequently, the fluid velocity increases, and there is greater viscous friction between fluid atoms, leading to higher temperatures. These observational findings provide crucial insights into the influence of wall shapes and roughness on the temperature distribution of the fluid.

Fig. 4
figure 4

The temperature distribution of the fluid along the z-direction in the nanochannel with different amount and shape of roughness

In investigating the influence of different quantities of roughness on fluid temperature in convection heat transfer, we ensured that each roughness shape was identical. As shown in (a), (b), and (c) in Fig. 4, this is attributed to the increase in the number of roughness features, which results in an enlarged heat exchange surface area between the wall and the fluid, consequently leading to a further reduction in the temperature of the fluid within the nanochannel. Therefore, we can conclude that the effect of varying quantities of roughness on the temperature of the fluid in convective heat transfer is substantial.

When investigating the influence of different shapes of roughness on fluid temperature in convective heat transfer, we ensured that the height and quantity of each type of roughness were consistent. As shown in Fig. 4d, e, f, when the roughness quantity is 2, the temperature distribution of the fluid does not exhibit significant differences. The central fluid temperatures in the smooth plane, triangle, hemisphere, and rectangle nanochannels are 350 K, 343 K, 341 K, and 342 K, respectively. However, when the roughness quantity increases to 6 and 10, the situation begins to differ significantly. In these cases, the central fluid temperatures in the smooth plane, triangle, hemisphere, and rectangle nanochannels are 350 K, 333 K, 327 K, and 322 K, and 350 K, 325 K, 311 K, and 304 K, respectively. Observably, the central fluid temperature in the triangular roughness nanochannel is higher than that in the hemispherical and rectangular roughness channels, and with an increase in the quantity of roughness, the temperature difference becomes increasingly pronounced. This is because there is a solid-liquid interaction force between the wall surface and the fluid. As the fluid moves farther away from the wall surface, the interaction force between the solid and liquid weakens. Consequently, the fluid velocity increases, and there is greater viscous friction between fluid atoms, leading to higher temperatures. Clearly, this suggests that as the fluid moves away from the wall surface, its temperature increases. These observational findings provide crucial insights into the influence of wall shapes and roughness on the temperature distribution of the fluid. Therefore, it can be concluded that the influence of different shapes of roughness on the fluid temperature in convective heat transfer is significant, and this effect becomes more pronounced with an increase in the quantity of roughness.

Temperature contours can offer a more intuitive way to help us comprehend the influence of various wall roughness shapes and quantities on temperature transfer. To calculate the temperature contour of the entire fluid, we divided the nanochannel model into 5762 intervals in the z and x directions, each interval having a length of 4 Å. As shown in Fig. 5, this is the temperature distribution of the fluid in the nanochannel with different shapes and quantities of wall surface roughness. When external force is applied to the fluid, it flows along the channel direction. The fluid temperature initially undergoes a thermal development phase before eventually reaching a stable thermal equilibrium state. In the thermal equilibrium state, the fluid temperature initially rises, then decreases, and ultimately stabilizes. When roughness with the same shape on the wall is present, an increase in the number of roughness elements leads to an increased contact area between the wall and the fluid, resulting in a faster decrease in temperature throughout the nanochannel. When the wall roughness number is the same, the temperature distribution of each part of the fluid in the nanochannel with rectangular roughness is significantly lower than that with hemispherical roughness and triangular roughness. The temperature distribution of the parts of the fluid in the nano-channel with hemispherical roughness is smaller than that with triangular roughness. From this, we can conclude that the shape and quantity of roughness are significant factors affecting heat transfer in nanochannels. Compared to smooth surfaces, increasing roughness reduces the temperature of the fluid within nanochannels. Furthermore, the shape of the roughness also significantly influences fluid temperature, which is a factor that cannot be overlooked.

Fig. 5
figure 5

The temperature contours of the fluid within the nanochannel for different amount and shape of roughness

The variation of local Nusselt numbers

This section calculates the local Nusselt numbers for both the smooth plane and roughness with a value of 10, as shown in Fig. 6. The local Nusselt coefficient is higher at the inlet and gradually decreases along the flow direction. The Nusselt coefficient of the fluid within the roughness wall is greater than the Nusselt coefficient on the smooth wall. This is because the roughness increases the contact area between the wall and the fluid, and the gaps in the roughness hinder the flow of atoms, thereby enhancing heat transfer. In addition, the reason that the Nusselt number of rectangular roughness is larger than that of hemispherical and triangular is because the gap of rectangular roughness makes it less likely for atoms to spill out of the gap as compared to triangular and hemispherical, so the number of adsorbed fluid atoms is higher and the heat transfer performance is better.

Fig. 6
figure 6

The Nusselt number of the fluid in the nanochannel

The velocity distribution of the fluid in the nanochannel

The velocity distribution of the fluid in the nanochannel is an important parameter for assessing flow characteristics. In this part of our study, to evaluate the behavior of argon atoms in nanochannels with roughness, we computed the velocity distribution of the fluid in both smooth-walled nanochannels and nanochannels with varying roughness shapes and quantities. In the force region, an external force of 0.0006 eV/Å was applied to the fluid, and the velocity distribution of the fluid along the z-direction was analyzed after 4,000,000 timesteps.

Figure 7 illustrates the velocity distribution of the fluid along the flow direction in both smooth and rough wall surfaces. As shown in Fig. 7a, b, c, when the roughness shapes are the same, increasing the roughness quantity leads to a decrease in the fluid velocity compared to the smooth wall surface. This is because the increase in roughness leads to an increase in the contact area between the wall and the fluid, resulting in more solid-liquid interactions near the wall surface. Additionally, the gaps in the roughness accommodate fluid atoms, impeding fluid flow. Due to the presence of fluid viscosity, the decrease in fluid velocity near the wall results in a reduction in fluid velocity at the center of the channel.

Fig. 7
figure 7

The velocity distribution of the fluid along the z-direction in the nanochannel with different amount and shape of roughness

As shown in Fig. 7d, e, f, different shapes of wall roughness also lead to differences in the velocity of the fluid, and these differences become more and more pronounced as the amount of roughness increases. The velocity of the fluid inside triangular roughness channels is greater than that in the spherical and rectangular roughness channels. This is because the contact area between the triangular roughness and the fluid is smaller than that of rectangular and hemispherical roughness. The solid-liquid interaction force on the fluid is reduced, and the triangular roughness has a larger opening at the top of the gap compared to the rectangular gap, making it easier for atoms to flow out of the gap. Therefore, it can be concluded that the shape and quantity of roughness significantly influence the fluid flow velocity within nanochannels, which is a factor that cannot be overlooked.

Velocity contours provide a more intuitive representation of the influence of different wall shapes and quantities on the flow velocity. Figure 8 illustrates the velocity distribution of the fluid in both smooth and roughened nanochannels. In a smooth channel, the velocity distribution of the fluid is in a state of full development and the velocity remains constant along the flow direction. However, unlike the smooth wall, in the presence of roughness under constant external force, the existence of roughness reduces the cross-sectional area in the middle of the nanochannel, increasing pressure, resulting in higher fluid velocity in the central portion of the nanochannel compared to other regions. Compared to smooth walls, the presence of roughness in nanochannels in varying shapes and quantities leads to changes in fluid velocity at different positions within the channel. From Fig. 8, it can be observed that as the quantity of roughness increases, the fluid velocity within the channel decreases. Under the same quantity of roughness, triangular and hemispherical roughness result in higher fluid velocities compared to rectangular roughness. Furthermore, as the quantity of roughness increases, this trend becomes more pronounced. This is because at the same height, rectangular roughness has a larger contact area with the fluid compared to triangular and hemispherical shapes.

Fig. 8
figure 8

The velocity contours of the fluid within the nanochannel for different amount and shape of roughness

For a more intuitive understanding of the impact of roughness on the fluid’s velocity in the x-direction, as shown in Fig. 9, we computed the fluid velocity along the x-direction. When the fluid passes through the roughness region, the velocity increases. To gain a more intuitive understanding of the influence of roughness on the fluid’s velocity in the x-direction, as depicted in Fig. 9, we conducted calculations of the fluid’s velocity along the x-direction. When the fluid passes through the roughness region, the velocity increases.

Fig. 9
figure 9

The velocity distribution of the fluid along the x-direction in the nanochannel with different amount and shape of roughness

In summary, the shape and quantity of roughness are significant factors influencing heat transfer in nanochannels. Compared to smooth surfaces, roughness can reduce the velocity of the fluid within nanochannels. The velocity distribution of the fluid within nanochannels with rectangular roughness is lower than that of triangular and hemispherical roughness. Furthermore, the quantity of roughness significantly influences the fluid velocity, with an increase in roughness quantity leading to a reduction in fluid velocity. Under the same external force conditions, the presence of roughness also increases the local fluid velocity.

The density distribution of the fluid in the nanochannel

In the final step of this study, we analyzed the density distribution of the fluid within the nanochannel. The fluid density distribution is a crucial parameter that aids in assessing the impact of different surface roughness on the fluid flow and heat transfer within nanochannels. Figure 10 illustrates the density distribution of fluid along the flow direction within nanochannels with varying shapes and quantities of surface roughness. Due to the interaction forces between solid and fluid, and the relatively weaker interaction forces among argon atoms compared to the interaction forces between argon atoms and the wall surface, the fluid density is higher at smooth and rough wall surfaces, resulting in lower fluid velocity. In the case where the roughness shapes are the same but differ in quantity, as observed from Fig. 10, due to the uneven contact area between roughness and the fluid, the fluid density at the smooth wall position is higher than at the bottom of the roughness. As shown in Fig. 10a, b, c, with an increase in the quantity of roughness, the surface area at the top of the roughness increases, leading to an increase in fluid density at the top of the roughness. Furthermore, in the simulation, the increase in roughness also results in an increase in fluid density in the middle of the channel. From the e, d, and f sections of Fig. 10, it can be observed that due to the larger top surface area of rectangular roughness compared to triangular and hemispherical roughness, the fluid density at the top of rectangular roughness is greater than that of triangular and hemispherical roughness. In the simulations, due to the larger volume and smaller gaps of rectangular and hemispherical roughness, it results in higher fluid density within the channel compared to triangular roughness and smooth walls.

Fig. 10
figure 10

The density distribution of the fluid along the x-direction in the nanochannel with different amount and shape of roughness

Density contour provide a more intuitive representation of the influence of different wall shapes and quantities on fluid density distribution (Fig. 11). When the scale reaches the micro-nanoscale, fluids can be considered to be composed of atoms. Since the distribution of atoms in a fluid is disordered, it is susceptible to external forces and solid-liquid interaction forces, resulting in an inhomogeneous density distribution. The atoms at different positions in the nanochannel experience varying degrees of external forces due to their different distances from the force region. As a result, the density distribution of the fluid exhibits a parabolic layered structure, with higher fluid density near the walls. In the presence of roughness on the wall, due to the resistance posed by the rough surface to fluid flow, fluid atoms tend to accumulate at the bottom of the roughness and within the gaps, making it difficult for them to overflow. The forces exerted by rectangular and hemispherical roughness on the fluid are greater than those exerted by triangular roughness and a smooth surface. With increasing wall roughness, the fluid density near the wall increases, while the velocity of the fluid at the wall decreases.

Fig. 11
figure 11

The density contours of the fluid inside the nanochannels for different amount and shape of roughness

Conclusion

In our study, the flow and convective heat transfer characteristics of fluids in nanochannels with different roughness were investigated using the molecular dynamics software LAMMPS. Compared to studying only a single roughness and statistically analyzing velocity-temperature curves along a single flow direction, which cannot reflect the localized impact of different roughness within nanochannels, we generated velocity and temperature contours to gain a more comprehensive understanding of the changes in fluid motion within the rough and smooth areas of channels. By analyzing these contours and curve plots, the following conclusions were drawn:

  1. 1.

    In the study of fluid flow and convective heat transfer, the temperature and velocity of the fluid in the triangular channel were reduced by 5% and 36%, hemispherical by 10% and 54%, and rectangular by 10% and 62%, respectively, in the case of a wall roughness number of 10 as compared to the case of roughness 2. Therefore, the effect of the shape of the roughness within the nanochannel on the fluid motion should be fully considered.

  2. 2.

    For roughness quantities of 10, 6, and 2, triangular roughness in nanochannels exhibited higher fluid temperatures and velocities compared to hemispherical roughness by 4%, 8%, and 1.4%, 2%, and 0.2%, 3%, and compared to rectangular roughness by 6%, 25%, and 8%, 12%, and 0.5%, 5%. In channels with triangular roughness, the fluid velocity and temperature are the highest, while in channels with rectangular roughness, they are the lowest. Therefore, it is crucial to thoroughly consider the influence of different shapes of roughness within nanochannels on fluid flow and heat transfer.

  3. 3.

    When the external force applied to the fluid at the entrance of the nanochannel remains constant, roughness causes the area through which the fluid passes inside the channel to decrease, resulting in an increase in pressure. This increase in pressure leads to an increase in fluid velocity as it passes through the rough region.

  4. 4.

    In the case of a roughness quantity of 10, the Nusselt numbers for rough nanochannels are superior to those for smooth nanochannels. Among them, the Nusselt number for the rectangular shape is the highest, demonstrating the most outstanding heat transfer performance.

  5. 5.

    Compared to smooth channels, surface roughness reduces the density of the fluid near the wall surface because there are fewer fluid particles near the roughness surface.