Validation cases
We consider full MD simulations of the membranes as the reference case. The mass flow rate is the main comparison property, but additional measurements and comparisons of pressure, temperature, density and velocity profiles are available in this paper’s supplementary material. The validation simulations consist of three membranes with thicknesses L of 50, 100, and 150 nm. These lengths are chosen so that full MD simulations can still be performed in a reasonable time. Figure 3a shows how accurately the mass flow rate can be predicted by the SeN-IMM when compared with full MD. The assumption of an initial linear pressure variation along the CNT seems to be very efficient for these systems, as the predicted mass flow rate after the first iteration differs by <5 % from the full MD prediction. Long production runs of at least 2 ns ensure that the mass flow rate and all the other properties have been measured over more than \(10^6\) samples, leading to small SEMs (standard errors of the means). The stability of the method can also be observed, and although the measured mass flow rate can deviate at one iteration it converges to a more accurate value at the next iteration.
The development of the axial profile of pressure, from the high-pressure reservoir to the middle of the CNT to the low-pressure reservoir, is shown in Fig. 3b. The hybrid result is in excellent agreement with full MD. In this validation case the pressure profile shows a linear drop along the CNT, so no compressibility effects are expected. While this figure supports our initial assumption of a linear pressure drop along the CNT, the significant entrance losses should be noted as they would not be explicitly accounted for in any simple linear assumption for the pressure drop along the whole system (i.e. from reservoir to CNT to reservoir).
Figure 4 shows the convergence of SeN-IMM for the three validation cases, which is calculated according to Eq. (7). The convergence limit chosen was \(\zeta ^{\mathrm{tol}} = 0.05,\) but the simulations were allowed to proceed beyond this threshold to demonstrate that our method is stable once convergence is reached. The relaxation factor \(\psi\), which can vary for each micro-element as well as from iteration to iteration, seems to be responsible for the non-monotonic convergence. This relaxation factor is calculated according to Eq. (4) and can switch between under- and over-relaxation. The accuracy of the method is not affected, as seen in Fig. 3a, although the convergence measure does oscillate.
Computational efficiency and performance
We briefly describe the computational efficiency of the hybrid method and the advantages it offers over conventional full MD simulations. All the comparisons made here are with the GPU version of the mdFoam solver. This version of the code performs all the intermolecular force calculations on GPUs, while the measurement, control, and time-stepping parts of the MD algorithm are performed on CPUs. The SeN-IMM hybrid utilises the same version of the MD solver, and simulations were performed on identical computational nodes of the high-performance computer ARCHIE-WeSt at Strathclyde University. Each node consists of two Intel Xeon X5650 CPUs (12 cores in total), 48 GB of RAM, and an Nvidia M2075 GPU card. Therefore the computational savings reported here are attributed solely to the hybrid implementation, and not to any possible hardware or software differences. For full MD simulations, the GPU version of mdFoam offers 4.5 times speed-up when compared with the CPU parallel implementation (72 cores) when simulating the 150 nm case.
Our performance comparison is based on the simulation time needed to reach the final solution using each method (i.e. full MD and the hybrid), without incorporating initialisation and equilibration times but including all the necessary iterations in the hybrid approach. The length L is used as the size variable. Larger systems not only contain more molecules but also need additional time to reach steady state. In the case of full MD simulations, the time to solution increases linearly with the membrane thickness, as Fig. 5 shows. For the three validation cases, the simulation time to solution is higher for the hybrid than the full MD. However, for the larger systems of \(L=1\) and L \(=\) 2 μm, the hybrid technique is more efficient, despite the fact that six iterations are needed in order to achieve the desired convergence and accuracy.
For the 2-μm case, the total simulation time using the hybrid method is just 50 % of that for the equivalent full MD simulation, as Fig. 5b shows. For longer cases still, the computational savings will be even greater, as in the hybrid simulations only the number of iterations and/or time to reach steady state can increase. From these figures, it is estimated that a CNT membrane with a thickness of 100 μm would require around 8000 days of simulation time using the current state-of-the-art full MD solver on a GPU. However, the same result can be achieved using SeN-IMM in ~100 days (see Fig. 5a).
An additional advantage of the fixed MD simulation sizes in SeN-IMM, which are independent of the problem’s actual size, is in the computer memory required. The GPU solver utilises only the GPU memory and not the RAM memory of a node; otherwise, the communication overhead hinders any computational savings. The current GPU cards in ARCHIE-WeSt have 6 GB of memory, which is enough to simulate around 400,000 atoms. This is highlighted in Fig. 6 by the horizontal red line. So full MD simulations are limited to membranes with CNTs shorter than 1 μm. A possible solution would be to use GPUs with larger memory, but the best current GPU cards offer a maximum of only 12 GB memory. Another option would be the parallelisation of the GPU solver to enable it to run on multiple GPUs, although its performance would then be reduced due to the inter-GPU communication overhead.
From this short performance analysis, we conclude that the only viable option to significantly reduce computational time and therefore enable access to multiscale problem sizes of engineering interest is a hybrid approach, like the SeN-IMM.
Enhancement predictions and macroscopic equations
We now present results from our hybrid simulations that would be totally impractical, or at least extremely computationally demanding, to perform using full MD. The main performance measurement of a nanotube membrane is the flow enhancement (\(\varepsilon = {\dot{m}}_{\mathrm{act}}/{\dot{m}}_{\mathrm{HP}}\)), which provides a comparison of the actual flow rate (e.g. predicted by MD, SeN-IMM or experiment) to that predicted by the no-slip Hagen–Poiseuille (HP) continuum fluid equation.
Simulations of CNT membranes with thicknesses of 1 and 2 μm are performed. The flow enhancement values in these cases, together with the results from the validation simulations, are compared with other computational and experimental studies. A slip and entrance-/exit-loss-modified Hagen–Poiseuille equation, like the one proposed by Walther et al. (2013), is also used in an attempt to calculate the flow enhancement (and the flow rate) in a CNT membrane of any thickness without the need to perform further hybrid or full MD simulations.
The flow enhancement in CNT membranes of different thicknesses for a given external membrane pressure difference \(\Delta P\) is shown in Fig. 7. The reported values include results from our full MD simulations (for \(L\,<\,50\) nm) and SeN-IMM simulations (for \(L\,\ge\,50\) nm). The enhancement initially increases as the CNT length increases, but then plateaus significantly for \(L >150\) nm. This should be expected, unless the flow inside the CNT is completely frictionless.
Figure 7 also includes flow enhancement data from other computational and experimental investigations. The diameter of the CNT (2.034 nm) is common to all the selected studies. It should be noted that in the experiments this diameter is the dominant one in membranes that contains CNTs of various diameters. This can significantly affect the reported flow values, as viscosity and slip length vary with the diameter of the CNT (Thomas and McGaughey 2008). At the same time, a small variation in the diameter used during the HP flow rate calculation can lead to a great difference in the reported enhancement values. This diameter issue, along with other possible errors during the experimental procedures, may explain the wide differences between reported experimental values in Fig. 7.
Despite the fact that different MD software, water models, interaction potentials, and external applied pressure differences have been used, the previous computational results presented in Fig. 7 are in line with the values we calculate using SeN-IMM. The error bars of our results are smaller than the symbols in Fig. 7, while in previous studies the error bars can be quite significant. In addition, an experimental result for a biological nanochannel (an aquaporin) is also included in this figure.
In the study of Walther et al. (2013), the asymptotic behaviour of the flow enhancement was predicted using results from a CNT membrane and periodic CNT simulations. Here the same behaviour is seen in membrane simulations using SeN-IMM. These results strengthen the hypothesis that the enhancement levels-off after a linear growth with the CNT length. For the CNT diameter we have studied here, the enhancement limit is \(\varepsilon _{\mathrm{max}} \approx 350\), independent of the CNT length.
In the work of Walther et al. (2013), a modified Hagen–Poiseuille equation was developed in order to predict the flow enhancement in CNT membranes of various thicknesses. The no-slip Hagen–Poiseuille equation is simply
$$\Delta P = \frac{8\mu L \dot{Q}_{\mathrm{HP}}}{\pi R^4},$$
(9)
while the modified Hagen–Poiseuille (MHP) equation, incorporating slip and entrance/exit losses, takes the form (Walther et al. 2013):
$$\Delta P = \frac{\mu C \dot{Q}_{\mathrm{MHP}}}{R^3} + \frac{8\mu L \dot{Q}_{\mathrm{MHP}}}{\pi \left( R^4 + 4R^3 L_s \right) },$$
(10)
where the coefficient C represents the sum of both fluid entrance and exit losses, \(L_{\mathrm{s}}\) is the flow slip length, and \(\dot{Q}_{\mathrm{MHP}}\) is the modified volumetric flow rate. From Eqs. (9) and (10) the modified flow enhancement factor is therefore:
$$\varepsilon _{\mathrm{MHP}} = \frac{8 L \left( R + 4 L_{\mathrm{s}} \right) }{8 L R + C \pi R^2 + C \pi R 4 L_{\mathrm{s}}}.$$
(11)
This depends on the length L and radius R of the CNT; it also depends on two parameters: the slip length \(L_{\mathrm{s}}\) and the entrance/exit losses coefficient C. If both these parameters are zero, then the no-slip Hagen–Poiseuille prediction is reproduced.
Using Helmholtz’s minimum-energy theorem, Weissberg showed that \(C < 3.47\) for \(L/R \rightarrow \infty\) (Weissberg 1962). Substituting into Eq. (11) the values of flow enhancement calculated from our MD and SeN-IMM simulations produces the continuous red line in Fig. 7, with optimum fitting parameters \(C = 2.49\) and \(L_{\mathrm{s}} = 108.5\) nm. The black dashed line in this figure indicates the flow through a membrane if the nanotubes are frictionless, while the horizontal blue dashed line indicates the flow through a membrane without entrance or exit losses. For membranes with a thickness <150 nm, the enhancement value is almost independent of the frictional properties of the nanotube (i.e. the slip length).
This analysis indicates that the flow enhancement, and therefore the flow rate of water through CNT membranes of any thickness, can be estimated using Eq. (11) provided the parameters C and \(L_{\mathrm{s}}\) are known. The value of C can be calculated by performing MD simulations of thin membrane cases, while \(L_{\mathrm{s}}\) can be obtained from simulations of simple periodic CNT cases. In addition to the predictive capabilities that Eq. (11) provides, it also highlights the critical membrane thickness above which frictional losses dominate the flow.
Direct comparison with experimental results can be troublesome, as Fig. 7 shows, due to the CNT diameter issues outlined above and other possible experimental errors. Recent experimental work by Qin et al. (2011) managed to reduce a source of errors in CNT membrane experiments by performing flow rate measurements of water passing through a single CNT. One of these experimental cases is replicated here in an attempt to evaluate the performance of the SeN-IMM in terms of accuracy and computational efficiency. The diameter of the chosen CNT in Qin et al. (2011) is \(D = 1.1\) nm, while its length is \(L = 1\) mm. For a CNT of this length an MD simulation would be intractable. Our SeN-IMM simulation is for a CNT membrane with a tube diameter of \(D=1.16\) nm, very close to the experimental value. Characteristic snapshots of the membrane are shown in Fig. 8,
and the unique ordered ring formation of water molecules within the CNT is seen. A continuum fluid description of water flow through such a narrow CNT would not be suitable in these circumstances. Basic water properties (e.g. viscosity, density, hydrogen bonding) are highly altered by the confinement.
The same methodology was used as for the previous hybrid simulations, with the only differences being the reduced CNT diameter and the external pressure difference, which is reduced to \(\Delta P = 100\) MPa. The flow enhancement values reported by Qin et al. (2011) are also calculated under some assumptions. The first is that two van der Waals diameters of carbon (or, equivalently, twice the thickness of the CNT wall) is subtracted from the overall CNT diameter, i.e. \(D_r = 1.16 - 0.33 = 0.83\,\hbox {nm}\). The second assumption is that the viscosity of bulk water (1 mPa s) is used in all calculations, although it is known that the water viscosity inside such a narrow CNT differs significantly (Thomas and McGaughey 2008; Ritos et al. 2014). The bulk water density (\(\rho = 997.5\,{\hbox{kg/m}}^3\)) is also used in any transformations from volumetric to mass flow rate, and vice versa.
Figure 9 shows the flow enhancement measurements that the SeN-IMM simulations predict at successive iterations. The dashed line is the experimental flow enhancement value reported in Qin et al. (2011). The SeN-IMM solution oscillates in the first three iterations, but levels-off after around 4–7 iterations, although some oscillations still remain. The convergence behaviour can also be seen in Fig. 10a where the convergence parameter \(\zeta\) is below 1 when the number of iterations is >4, while Fig. 10b shows a less noisy, quicker convergence of the pressure difference along the CNT. The reason for this prolonged time to converge and its noisy character is that this simulation contains a higher level of statistical noise, compared with the thinner membranes described earlier in this paper. A thicker membrane has a much smaller pressure gradient (for a constant overall pressure drop), and so the thermal molecular velocities would be much higher than the mean flow velocity (or mass flow rate) that we are trying to measure. This is a limitation of molecular dynamics, and as such it is inherited by our hybrid method. In these simulations we have smoothed the statistical fluctuations by running the MD subdomain simulations for much longer averaging times.
Despite the issue of a fluctuating convergence, the results produced by our SeN-IMM oscillate around a flow enhancement of \(\varepsilon = 787\) at the seventh iteration (which is below the convergence threshold of 5 %), while the experimental value from Qin et al. (2011) is \(580\,\pm \,10\), as shown in Fig. 9. This is in good agreement with experimental results despite the assumptions made during both the calculations and the experiment. Further simulations of similar systems are, however, necessary before a solid opinion can be formed regarding the accuracy and capability of the SeN-IMM for solving this type of large problem.
Finally, it should be noted that the SeN-IMM simulation took around two weeks per iteration (on one ARCHIE-WeSt node using a GPU): a total of 116 days was needed to perform all seven iterations shown in Fig. 9 and provide the final result. Using the same hardware, we estimate that a full MD simulation of the same case would require around 247 years!