1 Introduction

Several classes of nanoparticles (NPs) have been developed for diverse biomedical applications and some have shown potential in the treatment and imaging of diseases [1,2,3,4]. The encapsulation of drug molecules and contrast agents into NPs can provide significant improvements in pharmacokinetics, toxicity and biodistribution compared to freely administered drug molecules [3, 5, 6], which generally exhibit accumulation in tumors at levels \(\le 0.1\)% injected dose per gram tissue (%ID/g). For instance, the peak drug accumulation in tumors is increased by one to two orders of magnitude by liposomal encapsulation of chemotherapeutic agents [7]. Nevertheless, the level of NP stable deposition is still undesirably low and prone to improvement. Vascular targeting has been proposed as a general strategy to enhance accumulation within the diseased tissue. In this case, systemically injected NPs decorated with ligand molecules would recognize and firmly adhere to over-expressing specific receptor molecules on the abnormal vessels walls [8,9,10,11].

For intravenously administered NPs, their journey to tumor sites follows four key steps [12, 13]: (1) transport and circulation in complex vascular network with red blood cells (RBCs), white blood cells (WBCs) and many others; (2) margination from center stream of blood flow to vessel wall region and firm adhesion to the endothelium near the tumor site; (3) diffusion into tumor tissues through the leaky vasculatures; (4) recognition and internalization by tumor cells. During this journey, the encapsulated drug molecules can be more efficiently delivered to the diseased tissue through the margination behaviors of NPs (moving from central bloodstream to vessel wall region), which increase NP’s interaction with the vascular wall. This allows the NPs to better ‘sense’ the biophysical and biological abnormalities, such as the presence of fenestrations or the expression of specific receptors, on the surface of endothelial cells. Afterwards, the NP can firmly adhere to the vessel wall under flow, if the hydrodynamic forces are balanced out by the interfacial adhesive interactions between the NP and vessel wall. Margination and the subsequent adhesion of NPs to the endothelium allow the NPs to transmigrate across the endothelial wall and enter a diseased area of tissue, eventually delivering the drug molecules.

The margination propensity of NPs depends on their size, shape, surface property and stiffness (‘4S’ parameters) [13,14,15,16,17]. Recent research efforts confirm that the size of NP plays an important role in designing NP-based delivery platforms [18,19,20,21]. Charoenphol et al. [20] performed a series of studies on size effect using spheres with diameter ranging from 0.5 to \(10\,\upmu {\mathrm{m}}\) in blood flow. The margination probability is observed to increase with the diameter increasing. More importantly, Lee et al. [22] find that spherical NPs with diameter smaller than 200 nm can be easily trapped between RBCs; while lager NPs with diameter \(\ge 500\) nm demonstrate pronounced margination. Shape of NPs has also been identified as the key parameter like size in blood circulation and adhesion [23,24,25]. Nonspherical NPs demonstrate more efficient resistance to macrophage sequestration in blood circulation [17, 26, 27]. In addition, nonspherical NPs with higher aspect ratio can marginate more readily than spherical NPs [25, 28,29,30]. Beyond size and shape, surface property of NPs can be turned to affect the adhesion of NPs to vessel wall [31,32,33,34,35]. Multivalent binding between the NP and substrate (endothelium) is identified to play the key role for adhesion to vessel wall [34, 35]. Therefore, the surface properties, such as tether length, density and ligand–receptor binding strength, can be turned for the selective adhesion of NPs to inflamed endothelium [36,37,38]. Comparing to size, shape and surface property, the stiffness of NPs receives relative less attention. Recent studies reveal that the stiffness of NP also plays a significant role [39,40,41,42,43,44,45,46]. Anselmo et al. [46] demonstrate that softer NPs (10 kPa) outperformed harder NPs (3000 kPa) in blood circulation time and targeting specific sites both in vivo and in vitro, which confirm that tuning NP stiffness can extend circulation time, reduce macrophage uptake and improve targeting [43].

The drug delivery system mentioned above relies on the intrinsic physical properties of NPs and the biological environment of tumor site to control and release drug molecules. Such a passive targeting strategy owns certain limitations. The local physiological conditions of diseased sites might be different from patient to patient. Therefore, the efficacy of drug delivery vehicles is difficult to predict a priori. Besides, after intravenous injection, the transport of NP-based drug carriers within vascular network cannot be easily controlled. Therefore, actively triggered systems play important roles in enhancing the therapeutic efficacy of the drug delivery system. Among many active targeting systems, such as light-[47], ultrasound-[48], electrically-[49] and chemically-triggered [50] systems, magnetic NPs have demonstrated great potential, due to the enhanced deposition at a specific anatomic site guided by external magnetic fields [51,52,53]. In particular, because of the excellent tissue penetration, magnetic fields have already been used in the whole-body magnetic resonance imaging (MRI).

Recently, extensive works have been performed to explore the performance of magnetic particles within flow under the influence of external magnetic field, including theoretical [54,55,56], experimental [57,58,59,60,61] and computational [62,63,64,65,66] studies. For instance, Furlani and Ng [55] proposed an analytical model to predict the transport and capture of therapeutic magnetic NPs in the human microvasculature. A scaling law has been developed to predict the minimum radius required for particle capture. Song et al. experimentally explored the cellular uptake of curcumins with and without loading magnetic silk fibroin core–shell NPs in the human breast adenocarcinoma cell line. Results confirm that loading magnetic NPs can significantly enhance the cellular uptake. To understand the influence of magnetic field, numerical studies have been performed. Gontijo and Cunha [62] simulated the movement of spherical magnetic particles settling in a quiescent viscous fluid. The long-range hydrodynamic and magnetic interactions are taken into account by creating imaginary lattice-cells and a sophisticated technique of lattice sums, respectively. Although the numerical method is accurate, it is difficult to be applied to study large system due to the complexity. Finite element method (FEM), which is well-know for accuracy and efficiency for solid and fluid dynamics, is also adopted to investigate the targeting of magnetic NPs to stent surface under high gradient magnetic field [63]. The magnetic particle was treated as a single point but with finite size, which means that they only considered the translational motion and the rotational motion was ignored. Gao et al. [64] proposed a numerical scheme which considers the magnetic dipole moments and adopts the extend forms of the Oseen–Burgers tensor to account for both the magnetic and hydrodynamic interactions between the particles. The boundary element method (BEM) was applied to study the motion of magnetic particles in fluid flow under external nonuniform magnetic field [65]. The Lagrange-based particle tracking method was adopted, but only one-way coupling with fluid flow was considered.

For all above studies, the fluid is considered as Newtonian fluid. In fact, the local fluid environment of the magnetic particles as drug carriers is blood flow, which is usually non-Newtonian [67, 68]. The hematocrit in normal human vessels can reach \(45\%\), which means that the vessel is mainly occupied by the red blood cells (RBCs). Thus, the effect of large numbers of RBCs should be considered in studying the transport of magnetic particles in blood flow, due to the frequent collision between RBCs and magnetic particles [41, 42]. A large number of previous works explore the RBC effect in modeling transport of drug carriers within blood flow [18, 28, 69,70,71,72,73,74]. Müller et al. [18] employed the dissipative particle dynamics (DPD) and smoothed DPD methods for 2D and 3D simulations on margination behaviors of micro- and nano-particles in blood flow for drug delivery, respectively. While this method can capture the viscosity and thermal fluctuations of membrane in mesoscopic, the coupling between fluid flow and RBCs/drug carriers is very complex, which requires additional attention to accurately impose the non-slip boundary [75, 76]. Besides, the flow is modeled by using DPD method, which needs a large number of fluid particles during the simulation. Thus, it limits the computational scale of the whole system (usually the length scale of vessel is less than 50 \(\upmu \mathrm{m}\)). On the continuum level, finite element method is used to model RBCs [28, 69,70,71,72]. Macmeccan et al. [72] coupled lattice Boltzmann method (LBM) for fluid phase with a linear finite element analysis (FEA) for capturing particle deformation. Although this method can handle a large number of three dimensional and deformable particles at high volume fraction, the limitation is the increased computational time when considering the nonlinear property of RBC, owing to the small LBM time step. Then Vahidkhah et al. [73, 74] used nonlinear FEA coupled with front tracking/immersed boundary method to investigate the dynamics of microparticles, like platelet and ellipsoidal particles, in RBC suspension. They treated microparticles as nearly-rigid particles, which requires a larger number of discretized vertexes to resolve them. This also enlarges the computational cost because they should simultaneously capture dynamics of RBCs, which are about ten times larger than microparticles. To numerically model transport of magnetic drug carriers in blood vasculature, one of the challenges is simultaneously tackling dynamics of RBCs and magnetic particles. This might be one of the reasons why some of previous works just ignored the existence of RBCs in the blood flow simulation. In addition, the size of magnetic particles typically are below micrometer (about few nanometers to hundreds of nanometers), while the diameter of RBC is about \(8\,\upmu \mathrm{m}\). If the uniform meshing technique is adopted, the resolution required to capture the motion of magnetic particles will make the mesh discretization of RBCs and fluid domain in the blood vessel extremely large.

Fig. 1
figure 1

Computational framework for modeling magnetic particles in blood flow with red blood cells

In present work, we explicitly consider the effect of RBCs on the transport of magnetic particles in blood flow. The magnetic particles are treated as point dipoles under external magnetic field. Note that we only consider the translational motion of magnetic particles because the rotational motion can be negligible, due to the extremely small size of magnetic particles. All the simulation is performed within the framework of Large-scale Atomic/Molecular Massively Parallel Simulator (LAMMPS), which is a highly parallelized solver for molecular dynamics simulations [77] (see Fig. 1). The lattice Boltzmann method (LBM) is used to solve the Navier–Stokes equations [78], which has been extensively adopted to deal with the fluid dynamics of blood flow [70, 72, 79,80,81,82]. The LBM solver is directly embedded into LAMMPS as a fix_lb_fluid [83] (cf. Fig. 2), where fix is a kind of class offered by LAMMPS to apply external control on the simulation system. We use coarse-grained models to represent the highly deformable RBCs. The membrane of RBC is discretized into 2-D triangular meshes, and the physical properties, such as stretching, bending, total area and volume conversations are ensured by adding corresponding potential functions into LAMMPS [84]. The movement of magnetic particles is captured by solving the Newton’s second law equation, under the influence of both magnetic force and hydrodynamic force. Such a method is implemented by modifying the existing integrator fix_update_sphere, which is used to update the position and velocity of finite size spherical particles embedded in LAMMPS [85]. There are two types of interface in present numeric scheme: interface between deformable RBCs and fluid flow and interface between moving magnetic particles and fluid flow. Here we use immersed boundary method (IBM) [86] to enable the two-way coupling at the fluid–structure interface. IBM can enable us to simulate the fluid flows involving arbitrarily complex boundaries without regenerating computational mesh over simulation time [79, 80, 87, 88]. Such an advantage has also been inherited by other immersed techniques, such as immersed finite element method [89,90,91]. Specifically, at the interface between RBCs and fluid flow, velocity coupling is applied (fix_lb_pc in LAMMPS), while at the interface between magnetic particles and fluid flow, we adopt the dissipative force coupling [92]. These modeling components are seamlessly integrated in LAMMPS framework with high fidelity (cf. Fig. 2). Therefore, the proposed method can be used to perform large scale simulations on transport of magnetic particles in blood flow.

This work aims to develop a robust and versatile computational methodology to investigate vascular dynamics of magnetic particles as drug carriers. All the mathematical details and computational models are given in Sect. 2. In Sect. 3, a series of benchmark tests have been performed to validate the proposed computational model, including (1) stretching of a single RBC; (2) tank-treading and tumbling behaviors of a single RBCs within shear flow; (3) movement of a single magnetic particle under non-uniform magnetic field; (4) breakup of a magnetic chain in rotating magnetic field. The first two examples are used to validate the coupling between RBCs and fluid flow; while the last two tests are selected to verify the coupling of magnetic particles with flow field. In the end, the margination behaviors of magnetic particles and nanoworms are investigated by the proposed method, as shown in Sect. 4. The scaling performance and speed up test of present method are also presented. Concluding remarks are given in Sect. 5.

Fig. 2
figure 2

Scheme of computational algorithm implemented in LAMMPS

2 Computational model and methodology

To capture the motion of magnetic particles moving with RBCs in the blood flow, the interactions between RBCs and fluid flow, as well as magnetic particles and fluid flow, are explicitly considered. Figure 1 describes the computational framework for modeling RBCs and magnetic particles, and their interactions with fluid flow. The corresponding scheme of computational algorithm implemented in LAMMPS is given in Fig. 2. Here we refer Lagrangian membrane to the RBC, and Lagrangian particle to magnetic particle, since both of them are modeled by Lagrangian solids. In the following part, we will introduce individual computational models for RBCs, magnetic particles and their interactions with surrounding fluid flow.

2.1 Lattice Boltzmann method for fluid flow

The blood flow is considered as RBCs immersed within a blood plasma (Newtonian fluid). The dynamics of the fluid flow is governed by the Navier–Stokes equation and the continuity equation in an Eulerian coordinate system, such as:

$$\begin{aligned} \frac{\partial \mathbf u }{\partial t}+\mathbf u \cdot \nabla \mathbf u= & {} -\frac{1}{\rho }\nabla p+\frac{\mu }{\rho }\nabla ^2\mathbf u +\mathbf F ,\end{aligned}$$
(1)
$$\begin{aligned} \nabla \cdot \mathbf u= & {} 0, \end{aligned}$$
(2)

where \(\rho \), \(\mathbf u \), p are the fluid density, velocity, and pressure, respectively. \(\mu \) is the dynamic viscosity of the fluid (water), and \(\mathbf F \) is the body force. Lattice Boltzmann (LB) method, which is an efficient and accurate method for Newtonian flow [78], is adopted to deal with Navier–Stokes equations. The fluid solver used here is the modified version of fix_lb_fluid originally implemented in LAMMPS [77, 83]. The linearized Boltzmann equation has the form of:

$$\begin{aligned} (\partial _t+e_{i\alpha }\partial _\alpha )f_i = - \frac{1}{\tau }( f_i - f_i^{eq}) + F_i, \end{aligned}$$
(3)

where \(f_i(\mathbf x ,t)\) is the distribution function for fluid particles with velocity \(\mathbf e _i\) at position x and time t, \(f_i^{eq}(\mathbf x ,t)\) is the equilibrium distribution function and \(\tau \) is the non-dimensional relaxation time, \(F_i\) is an external forcing term. In this simulation scheme, D3Q19 model is used [83], and the fluid particles have possible discrete velocities stated as follows:

$$\begin{aligned} \begin{aligned}&[\mathbf e _0,\mathbf e _1,\mathbf e _2,\mathbf e _3,\mathbf e _4,\mathbf e _5,\mathbf e _6,\mathbf e _7, \mathbf e _8,\mathbf e _9,\mathbf e _{10},\mathbf e _{11},\mathbf e _{12},\mathbf e _{13},\mathbf e _{14},\mathbf e _{15}, \mathbf e _{16},\mathbf e _{17},\mathbf e _{18}]= \\&\left[ \begin{array}{ccccccccccccccccccc} 0&{}\quad 1&{}\quad -\,1&{}\quad 0&{}\quad 0&{}\quad 0&{}\quad 0&{}\quad 1&{}\quad 1&{}\quad -\,1&{}\quad -\,1&{}\quad 1&{}\quad -\,1&{}\quad 1&{}\quad -\,1&{}\quad 0&{}\quad 0&{}\quad 0&{}\quad 0 \\ 0&{}\quad 0&{}\quad 0&{}\quad 1&{}\quad -\,1&{}\quad 0&{}\quad 0&{}\quad 1&{}\quad -\,1&{}\quad 1&{}\quad -\,1&{}\quad 0&{}\quad 0&{}\quad 0&{}\quad 0&{}\quad 1&{}\quad 1&{}\quad -\,1&{}\quad -\,1 \\ 0&{}\quad 0&{}\quad 0&{}\quad 0&{}\quad 0&{}\quad 1&{}\quad -\,1&{}\quad 0&{}\quad 0&{}\quad 0&{}\quad 0&{}\quad 1&{}\quad 1&{}\quad -\,1&{}\quad -\,1&{}\quad 1&{}\quad -\,1&{}\quad 1&{}\quad -\,1 \\ \end{array} \right] .\\ \end{aligned} \end{aligned}$$
(4)

The equilibrium distribution function \(f_i^{eq}(\mathbf x ,t)\) can be calculated as:

$$\begin{aligned} f_i^{eq} ({ \mathbf{x}},t) = \omega _i \rho \left[ {1 + \frac{{ \mathbf{e}}_i \cdot { \mathbf{u}}}{c_s^2 } + \frac{( {{ \mathbf{e}}_i \cdot { \mathbf{u}}} )^2}{2c_s^4 } - \frac{({ \mathbf{u}})^2}{2c_s^2 }} \right] , \end{aligned}$$
(5)

where the weighting coefficients \(\omega _i=1/3\ (i=0),\omega _i=1/18\ (i=1-6),\omega _i=1/36\ (i=7-18)\). The term \(c_s\) represents the sound speed which equals \(\Delta x/(\sqrt{3}\Delta t)\). The relaxation time is related to the kinematic viscosity in Navier–Stokes equation in the form of

$$\begin{aligned} \nu =\left( \tau -\frac{1}{2}\right) c_s^2\Delta t. \end{aligned}$$
(6)

The external forcing term can be discretized by using this form [93]:

$$\begin{aligned} F_i=\left( 1-\frac{1}{2\tau }\right) \omega _i\left[ \frac{\mathbf{e }_i-\mathbf{u }}{c_s^2}+\frac{(\mathbf e _i\cdot \mathbf u )}{c_s^4}\mathbf{e }_i\right] \cdot \mathbf F . \end{aligned}$$
(7)

Equation (3) is solved by the algorithm proposed by Ollila et al. [94]. Integrating Eq. (3), we can have

$$\begin{aligned}&f_i(\mathbf x +\mathbf e _i\Delta t,t+\Delta t) = e^{-\Delta t/\tau }\left( f_i(\mathbf x ,t)\right. \nonumber \\&\quad \left. +\int _t^{t+\Delta t}\frac{1}{\tau }e^{(s-t)/\tau }g_i^{eq}(\mathbf x +\mathbf e _is,t+s)ds\right) . \end{aligned}$$
(8)

Here, \(g_i^{eq} = f_i^{eq}+\tau F_i\). It is discretized by the following numerical scheme,

$$\begin{aligned}&f_i(\mathbf x +\mathbf e _i\Delta t,t+\Delta t) \nonumber \\&\quad = e^{-\Delta t/\tau }f_i(\mathbf x ,t)+(1-e^{-\Delta t/\tau }g_i^{eq}(\mathbf x ,t)\nonumber \\&\qquad + \,(\Delta t-\tau (1-e^{-\Delta t/\tau }))D_ig_i^{eq}(\mathbf x ,t) \nonumber \\&\qquad + \,(\tau ^2(1-e^{-\Delta t/\tau })-\Delta t\tau +\Delta t^2/2)D_i^2g_i^{eq}(\mathbf x ,t)\nonumber \\&\qquad + \,O(\Delta t^4), \end{aligned}$$
(9)

with

$$\begin{aligned} D_ig_i^{eq}=\frac{g_i^{eq}(\mathbf x ,t)-g_i^{eq}(\mathbf x -\mathbf e _i\Delta t,t-\Delta t)}{\Delta t} \end{aligned}$$
(10)

and

$$\begin{aligned} D_i^2g_i^{eq}=\frac{g_i^{eq}(\mathbf x +{} \mathbf e _i\Delta t,t)-g_i^{eq}(\mathbf x ,t-\Delta t)-g_i^{eq}(\mathbf x ,t)+g_i^{eq}(\mathbf x +{} \mathbf e _i\Delta t,t-\Delta t)}{\Delta t^2}.\nonumber \\ \end{aligned}$$
(11)

This scheme has been proved to be more stable than the standard LB algorithm [95]. Once the particle density distribution is known, the fluid density and momentum are calculated as

$$\begin{aligned} \rho = \sum \limits _i {f_i },\ \rho \mathbf{u}=\sum \limits _i {f_i \mathbf{e}_i}+\frac{1}{2}{} \mathbf F \Delta t. \end{aligned}$$
(12)

2.2 Lagrangian membrane model for RBC

The resting shape of a RBC is measured as biconcave in experiment [96], which can be expressed as:

$$\begin{aligned} z= & {} \pm \, D_0\sqrt{1-\frac{4(x^2+y^2)}{D_0^2}}\nonumber \\&\times \left[ a_0+a_1\frac{x^2+y^2}{d_0^2}+a_2\frac{(x^2+y^2)^2}{d_0^4}\right] , \end{aligned}$$
(13)

where \(D_0 = 7.82~\upmu {\mathrm{m}}\) is the average diameter, and coefficients \(a_0 = 0.0518, a_1 = 2.0026\) and \(a_2 = -\,4.491\) [68, 84, 97]. Based on present parameters and the experimental results, the total surface and volume of a single RBC are \(135\,\upmu {\mathrm{m}}^2\) and \(94\,\ \upmu {\mathrm{m}}^3\), respectively. The RBC membrane is discretized into \(N_v = 3286\) points represented by \(\{\mathbf{x }_i \}\), which locate on the surface described by Eq. (13). The coarse-grained potential function used to describe the RBC is given as:

$$\begin{aligned} {\mathrm{U}} (\{\mathbf{x }_{\mathrm{i}}\}) = {\hbox {U}}_{\mathrm{stretching}} + {\hbox {U}}_{\mathrm{bending}} + {\hbox {U}}_{\mathrm{area}} + {\hbox {U}}_{\mathrm{volume}}, \end{aligned}$$
(14)

where \({\mathrm{U}}_{\mathrm{stretching}}\) represents the in-plane shear resistance of membrane to deformation. \({\mathrm{U}}_{\mathrm{bending}}\) denotes the out-of-plane bending resistance of the lipid bilayer. \({\mathrm{U}}_{\mathrm{area}} \) and \({\mathrm{U}}_{\mathrm{volume}}\) ensure the total area and volume conservation, which correspond to the area incompressibility of the lipid bilayer and incompressibility of the inner cytosol, respectively [84, 97]. The stretching potential \({\mathrm{U}}_{\mathrm{stretching}}\) is consisted by two parts: attractive nonlinear spring potential worm-like chain model (WLC) and repulsive power potential power function (POW). They are expressed by:

$$\begin{aligned} {\mathrm{U}}_{\mathrm{WLC}} = \frac{{\hbox {k}}_\mathrm{BT} l_m}{4 p}\frac{3x^2-2x^3}{1-x},\quad {\hbox {U}}_{\mathrm{POW}} = \frac{{\hbox {k}}_{\mathrm{p}}}{l}, \end{aligned}$$
(15)

where \({\mathrm{k}}_{\mathrm{B}}\) is the Boltzmann constant. \({\mathrm{x}} = l/ l_m \in {\mathrm{(0,1)}}\), l is the length of the spring and \(l_m\) is the maximum spring extension. p is the persistent length, and \({\mathrm{k}}_{\mathrm{p}}\) is the POW force coefficient. Note that not all the parameters are independent, \({\mathrm{k}}_{\mathrm{p}}\) can be calculated by equating the forces derived by WLC and POW potentials in order to define the initial spring length as equilibrium state. The nodal force exerted on the membrane is obtained as derivation of the potential from the following forms

$$\begin{aligned} {\mathbf{f }_{\mathrm{i}}} = -\frac{\partial \hbox {U}(\{\mathbf{x }_{\mathrm{i}}\})}{\partial \mathbf{x }_{\mathrm{i}}}. \end{aligned}$$
(16)

Then the stretching force can be expressed as combination of derivations of WLC and POW

$$\begin{aligned} {\mathbf{f }_{\mathrm{stretching}}} = \left\{ -\frac{{\hbox {k}}_{\mathrm{BT}}}{p}\left( \frac{1}{4(1-x)^2}-\frac{1}{4}+\hbox {x}\right) +\frac{{\hbox {k}}_{\mathrm{p}}}{l}\right\} \widehat{{\varvec{l}}}_{\mathrm{ij}}. \end{aligned}$$
(17)

To ensure the conservation of total area of the RBC, local and global area constraints are applied. They are expressed as:

$$\begin{aligned} {\mathrm{U}}_{\mathrm{area}} = \sum _{\mathrm{k}=1\ldots {\hbox {N}}_{\mathrm{t}}} \frac{\hbox {k}_{\mathrm{d}} ({\hbox {A}}_{\mathrm{k}}- {\hbox {A}}_{\mathrm{k}0})^2}{2{\hbox {A}}_{\mathrm{k}0}} + \frac{\hbox {k}_{\mathrm{a}} (\hbox {A}_{\mathrm{t}}-\hbox {A}_{\mathrm{t}0})^2}{2\hbox {A}_{\mathrm{t}}}, \end{aligned}$$
(18)

where the first term represents the local area constraint, and \({\mathrm{N}}_{\mathrm{t}}\) is the total number of triangular elements. \({\mathrm{A}}_{\mathrm{k}}\) and \({\mathrm{A}}_{\mathrm{k}0}\) denote the k-th element area and its initial area, respectively. \({\mathrm{k}}_{\mathrm{d}}\) is the corresponding spring constant. The second term is the global area constraint. \({\mathrm{A}}_{\mathrm{t}}\) and \({\mathrm{A}}_{{\mathrm{t0}}}\) are the total area and its initial value, respectively. \({\mathrm{k}}_{\mathrm{a}}\) is the spring constant. The expression of the force due to area constraints is derived in the “Appendix”, which also contains detailed mathematical derivations of volume constraint force and bending force.

The total volume constraint is also imposed by a harmonic potential

$$\begin{aligned} {\mathrm{U}}_{\mathrm{volume}} = \frac{{\hbox {k}}_{\mathrm{v}}(\mathrm{V}-{\mathrm{V}}_0)}{{\mathrm{2V}}_0}, \end{aligned}$$
(19)

where \({\mathrm{k}}_{\mathrm{v}}\) is the spring constant. \({\mathrm{V}}\) and \({\mathrm{V}}_0\) are the total volume and its initial value, respectively.

The bending potential has the form

$$\begin{aligned} {\mathrm{U}}_{{\mathrm{bending}}} = \sum _{\mathrm{k}\in 1\ldots {\mathrm{N}}_{\mathrm{s}}} {\mathrm{k}}_{\mathrm{b}}[1-\cos (\theta _{\mathrm{k}}-\theta _0)], \end{aligned}$$
(20)

where \({\mathrm{k}}_{\mathrm{b}}\) is the bending stiffness. \(\uptheta _{\mathrm{k}}\) and \({{\uptheta _0}}\) are the dihedral angle between two adjacent triangular element (see Fig. 13b in “Appendix”) and its initial value, respectively. \({\mathrm{N}}_{\mathrm{s}}\) denotes the total number of two adjacent triangular elements structure as shown in Fig. 13b.

Table 1 Coarse-grained potential parameters for red blood cells and nanoworms and their corresponding physical values

Before we choose the parameters for the coarse-grained model of RBC, we should know the corresponding macroscopic properties of RBCs through experiments as a prior. Then we can connect the coarse-grained model parameters with these macroscopic properties. By extending linear analysis of a two-dimensional sheet of a spring network built with equilateral triangles, the macroscopic properties can be expressed by the coarse-grained parameters as follows [84, 98, 99]

$$\begin{aligned} \mu _0= & {} \frac{\sqrt{3}k_BT}{4pl_mx_0}\left( \frac{x_0}{2(1-x_0)^3}-\frac{1}{4(1-x_0)^2}+\frac{1}{4}\right) + \frac{3\sqrt{3}k_p}{4l_0^3}, \nonumber \\ K= & {} 2\mu _0 + k_a + k_d, \nonumber \\ Y= & {} \frac{4K\mu _0}{K+\mu _0}, \end{aligned}$$
(21)

where \(\mu _0\) is the shear modulus. K represents the area compression modulus and Y denotes the Young’s modulus. Then the choice of potential parameters are based on the physical quantities of the RBC, and they are listed in Table 1.

2.3 Lagrangian particle model for magnetic particle

To calculate the magnetic force applied on magnetic spherical particles, a linear magnetization model is adopted. We assume that the particles are superparamagnetic, magnetic dipole moments \(\mathbf m \) are induced in the presence of external magnetic field \(\mathbf B \). If the field \(\mathbf B \) is relatively small, it is in the linear regime, then the alignment of the induced magnetic moment \(\mathbf m \) with the external magnetic field \(\mathbf B \) is instantaneous, which can be expressed as:

$$\begin{aligned} \mathbf m = \frac{V_c\chi }{\mu ^*}{} \mathbf B , \end{aligned}$$
(22)

where \(V_c = \frac{4\pi a^3f}{3}\) is the volume of the magnetic particle with radius a, and f being the fraction of the particle’s volume that is paramagnetic. \(\chi \) is the magnetic susceptibility difference between the particle and the surrounding fluid, and \(\mu ^*\) is the vacuum magnetic permittivity. In the following, f and \(\chi \) are fixed as 0.6 and 0.4, respectively.

For a single magnetic particle under influence of an external magnetic field, the magnetic force is calculated as:

$$\begin{aligned} \mathbf F ^B = (\mathbf m \cdot \bigtriangledown )\mathbf B . \end{aligned}$$
(23)

This force is relevant with the nonuniformity of the external magnetic field in space. When there are two or more magnetic particles that are very close to each other, another type of force \(F^B\) is induced due to the dipole–dipole interaction:

$$\begin{aligned} \mathbf F ^B_{ij}= & {} \frac{3\mu ^*}{4\pi r^4}((\mathbf m _i\cdot \mathbf e _{ij})\mathbf m _j+(\mathbf m _j\cdot \mathbf e _{ij})\mathbf m _i\nonumber \\&-\,(5(\mathbf m _i\cdot \mathbf e _{ij})(\mathbf m _j\cdot \mathbf e _{ij}) -(\mathbf m _i\cdot \mathbf m _j))\mathbf e _{ij}), \end{aligned}$$
(24)

where i and j denote the index of magnetic particles, r is the distance between particles i andj, \(\mathbf e _{ij} = \mathbf r _{ij}/r\) is the unit vector pointing from i to j. If the external magnetic field is uniform and the particles are identical, then we have \(\mathbf m _i = \mathbf m _j = \mathbf m \), the above equation can be simplified as:

$$\begin{aligned} \mathbf F ^B_{ij} = \frac{3\mu ^*}{4\pi r^4}\left( 2(\mathbf m \cdot \mathbf e _{ij})\mathbf m -(5(\mathbf m \cdot \mathbf e _{ij})^2-m^2)\mathbf e _{ij}\right) . \end{aligned}$$
(25)

To reflect the finite size effect of magnetic particles, excluded volume interactions between two magnetic particles are also considered. The force is approximated by the modified Lennard–Jones potential [100] which has corresponding force given by

$$\begin{aligned} {\mathrm{F}}_{\mathrm{LJ}}(r) = \frac{\epsilon }{{\mathrm{r}}-2{\mathrm{a}}} \left[ \left( \frac{\sigma }{{\mathrm{r}}-2{\mathrm{a}}}\right) ^{12}- \left( \frac{\sigma }{{\mathrm{r}}-2{\mathrm{a}}}\right) ^6\right] , \end{aligned}$$
(26)

where the strength of the force \(\epsilon \) is \(0.1~k_{\mathrm{B}}T\), \(\sigma = 0.1a\) and r is the distance between the centers of two magnetic particles.

For the nanoworm model, adjacent two magnetic particles is connected by a linear spring with constant \({\mathrm{k}}_{\mathrm{s}}^{\mathrm{p}}\), and a harmonic angle potential is applied between two consecutive linear springs, which is used to ensure the bending stiffness of nanoworms. Here the angle spring constant is denoted as \({{\upkappa }}\). The stretching and bending potentials can be expressed as

$$\begin{aligned} {\mathrm{U}}_{{\mathrm{stretching}}}^{\mathrm{p}} = {\mathrm{k}}_{\mathrm{s}}^{\mathrm{p}} (l-l_0)^2,\quad {\mathrm{U}}_{{\mathrm{bending}}}^{\mathrm{p}} = \kappa (\theta -\theta _0)^2. \end{aligned}$$
(27)

In our simulations, \({\mathrm{k}}_{\mathrm{s}}^{\mathrm{p}}\) is set to be a large value, which ensures the non-extensible property of the nanoworm. And \({{\upkappa }}\) is chosen by the corresponding persistent length \(l_p\). All these parameters are listed in Table 1.

Fig. 3
figure 3

Numerical scheme of the immersed boundary method (IBM). Solid squares represent the Eulerian fluid points (x), and solid circles denote the vertices of Lagrangian membrane or magnetic particle (\(\mathbf X \))

2.4 Fluid–structure interactions

To account for the existence of suspended structures (i.e. RBCs or magnetic particles) in the fluid flow, the mechanical information should be transferred between fluid and structures across their boundaries. Here, immersed boundary method (IBM) is used to couple the fluid and structure solvers. The fluid domain is represented by Eulerian coordinates \(\mathbf x \), while the boundary of the RBC or magnetic particle is represented by Lagrangian coordinates \(\mathbf s \). Any position on the RBC membrane or magnetic particle can be written as \(\mathbf X (\mathbf s ,t)\). \(\mathbf F (\mathbf s ,t)\) represents the membrane force density induced by RBC deformation or dissipation force caused by interaction between magnetic particle and fluid, and \(\mathbf f (\mathbf x ,t)\) denotes the fluid body force density. Figure 3 shows the schematic of interpolation from the immersed boundary method.

2.4.1 Membrane–fluid coupling

To satisfy the no-slip boundary condition between RBC and fluid flow, the flexible membrane vertices (denoted as red solid circle) should move at the same velocity as the fluid around it (green solid squares). That is

$$\begin{aligned} \frac{\partial \mathbf X (\mathbf s ,t)}{\partial t}=\mathbf u (\mathbf X (\mathbf s ,t)). \end{aligned}$$
(28)

This condition will cause the membrane to deform. The membrane force density \(\mathbf F (\mathbf s ,t)\) is obtained by the potential functions discussed in above section, and is distributed to the surrounding fluid mesh points by

$$\begin{aligned} \mathbf f ^{{\mathrm{FSI},s}}(\mathbf x ,t)=\int _{\varOmega ^s} \mathbf F ^{{\mathrm{FSI},s}}(\mathbf X ^s,t)\delta (\mathbf x -\mathbf x ^s(\mathbf X ^s,t))d\varOmega \end{aligned}$$
(29)

where \(\delta \) is a smoothed approximation of the Dirac-Delta function. We should emphasize that \(\mathbf F ^{{\mathrm{FSI},s}}\) is areal force density, while \(\mathbf f ^{{\mathrm{FSI},s}}\) is volumetric force density. Figure 3 shows a simple interpolation template. For simplicity, we use two-points template to illustrate the interpolation process. However, in the present 3D study, four-points interpolation template is adopted, and it is chosen to be:

$$\begin{aligned} \delta (\mathbf x -\mathbf x ^s(\mathbf X ^s,t))= & {} \delta (x-x(\mathbf X ^s,t))\nonumber \\&\delta (y-y(\mathbf X ^s,t))\delta (z-z(\mathbf X ^s,t)), \end{aligned}$$
(30)

where

$$\begin{aligned} \delta (r)=\left\{ \begin{array}{lll} &{}\frac{1}{4}\left( 1+\cos \left( \frac{\pi |r|}{2}\right) \right) , &{}\quad r\le 2\\ &{}0 , &{}\quad r>2\\ \end{array}\right. \end{aligned}$$
(31)

Then the interpolated fluid–structure interaction force is added back to the LB solver as a body force and discretized using the form Eq. (7). The accuracy of this numerical scheme depends on the construction of delta function. Here, Eq. (31) is only first order when sharp interfaces are simulated. The same approximation function is used to obtain the velocities of the Lagrangian nodes (RBCs) on the moving boundary. The mathematical form can be written as follows:

$$\begin{aligned} \mathbf u ^s(\mathbf X ^s,t)=\int _\varOmega \mathbf u (\mathbf x ,t)\delta (\mathbf x -\mathbf x ^s(\mathbf X ^s,t))d\varOmega . \end{aligned}$$
(32)

2.4.2 Particle–fluid coupling

As the magnetic particles will experience magnetic force in the fluid flow due to the external magnetic field or dipole–dipole interaction, the movement of these particles are driven by the force, not the velocity of the fluid flow. Dünweg and Ladd [101] proposed a dissipatively coupling scheme for particles dynamics within fluid flow. The particles will experience a drag force which is proportional to the difference of velocity between these particles and surrounding fluid. Such a dragging force is given as:

$$\begin{aligned} \mathbf F ^{{\mathrm{FSI},b}} = \varGamma (\mathbf u ^b-\mathbf u ^{b,f}), \end{aligned}$$
(33)

where \(\mathbf u ^b\) is the velocity of the magnetic particle, \(\mathbf u ^{b,f}\) is the fluid velocity at the same place of the magnetic particle, which can be interpolated by the velocities of surrounding fluid nodes:

$$\begin{aligned} \mathbf u ^{b,f}(\mathbf X ^b,t)=\int _\varOmega \mathbf u (\mathbf x ,t)\delta (\mathbf x -\mathbf x ^b(\mathbf X ^b,t))d\varOmega . \end{aligned}$$
(34)

\(\varGamma \) is the drag coefficient which is an empirical parameter without any physical significance [101]. Here, we use the Stokes’ approximation for a spherical particle in laminar flow [63], \(\varGamma = 6\pi \mu a\), where a is the radius of the magnetic particle. Then the governing equation for the motion of magnetic particle under influence of external magnetic field and fluid field can be expressed by:

$$\begin{aligned} \rho ^b\left( \frac{\partial ^2\mathbf u ^b}{\partial t^2}\right) = \mathbf F ^{{\mathrm{FSI},b}} + \mathbf F ^B, \end{aligned}$$
(35)

where \(\rho ^b\) is the density of the magnetic particle, \(\mathbf F ^B\) is the combination of magnetic force due to nonuniformity of external magnetic field and dipole–dipole interaction. And Eq. (35) is solved by the second order Verlet algorithm [77].

According to the Newton’s third law, the surrounding fluid also experiences the same drag force with opposite direction, and it can be obtained by the distribution of the drag force \(\mathbf F ^{FSI,b}\):

$$\begin{aligned} \mathbf f ^{FSI,b}(\mathbf x ,t)=\int _{\varOmega ^b} \mathbf F ^{FSI,b}(\mathbf X ^b,t)\delta (\mathbf x -\mathbf x ^b(\mathbf X ^b,t))d\varOmega .\nonumber \\ \end{aligned}$$
(36)

Then the governing equation of the fluid flow should be written as:

$$\begin{aligned} \frac{\partial \mathbf u }{\partial t}+{} \mathbf u \cdot \nabla \mathbf u= & {} -\frac{1}{\rho ^f}\nabla p+\frac{\mu }{\rho ^f}\nabla ^2\mathbf u +{} \mathbf f ^{{\mathrm{FSI},s}}+{} \mathbf f ^{{\mathrm{FSI},b}},\end{aligned}$$
(37)
$$\begin{aligned} \nabla \cdot \mathbf u= & {} 0. \end{aligned}$$
(38)

Here, \(\rho ^f\) denotes the density of the fluid.

2.5 Overview of the computational algorithm

After the simulation is initialized, the motions of membrane and magnetic particle are updated, and then using the IBM and LB solver, the new state of the fluid can be obtained. The following steps are implemented in LAMMPS for modeling magnetic particles in blood flow:

  1. 1.

    At the time step t, the Lagrangian node position \(\mathbf X ^s(t)\) (membrane) and \(\mathbf X ^b(t)\) (magnetic particle), magnetic particle velocity \(\mathbf u ^b(\mathbf X ^b,t)\), fluid node position \(\mathbf x (t)\), fluid velocity \(\mathbf u (\mathbf x ,t)\) and density \(\rho ^f(\mathbf x ,t)\) are given or known.

  2. 2.

    The membrane force \(\mathbf F ^{{\mathrm{FSI},s}}(t)\) can be calculated by the coarse-grained potentials for RBC. At the same time, the drag force \(\mathbf F ^{{\mathrm{FSI},b}}(t)\) is obtained by the dissipative form, cf. Eq. (33). And the magnetic force \(\mathbf F ^B\) is calculated under the given external magnetic field. Then the new position \(\mathbf X ^b(t+\triangle t)\) and velocity \(\mathbf u ^b(\mathbf X ^b,t+\triangle t)\) of the magnetic particle are updated by Eq. (35).

  3. 3.

    The membrane force \(\mathbf F ^{{\mathrm{FSI},s}}(t)\) and drag force \(\mathbf F ^{{\mathrm{FSI},b}}(t)\) are spread to the surrounding fluid nodes via IBM, then the new position \(\mathbf x (t+\triangle t)\) and new velocity \(\mathbf u (\mathbf x ,t+\triangle t)\) of the fluid flow at time step \(t+\triangle t\) are found by Eq. (38) through LB solver.

  4. 4.

    Velocity of membrane \(\mathbf u ^s(\mathbf X ^s,t+\triangle t)\), and velocity of fluid node in the place of magnetic particle \(\mathbf u ^{b,f}(\mathbf X ^b,t)\) at time step \(t+\triangle t\) are computed by IBM, cf. Eqs. (32) and (34).

  5. 5.

    Go to step 1 for the next time step.

The above computational model has been implemented into the open source software LAMMPS [77], which is a highly parallelized tool for MD simulations. There are several reasons for us to choose LAMMPS for above simulations. First, the framework of LAMMPS is robust and efficient which has been already validated by numerous benchmarks and publications. Second, LAMMPS enables various interfaces for users to implement different functions, such as fluid flow simulation based on LB method and coupling between the suspended structures and surround fluid. The elastic-spring network model for RBCs and coarse-grained models for NPs, as well as their molecular interactions can be easily implemented based on existing features, such as potential functions and integrator. More importantly, the high parallelized LAMMPS dramatically reduces the computational cost for modeling NP transport within blood flow, which will enable us to explore more complex behaviors at the micro fluid device scale. The implemented computational models will be validated through following benchmark tests.

Fig. 4
figure 4

Stretching test of a single RBC. a Configuration of stretched RBC with different applied forces. b Diameters of RBC along stretching direction and transverse direction, denoted by \({\mathrm{D_A}}\) and \({\mathrm{D_T}}\), respectively. The experimental results are reproduced with permission from Ref. [102]

3 Model validation and benchmark test

3.1 Validation of RBC model

3.1.1 Stretching of a single RBC

The stretching simulation of a single RBC is performed and the results are compared with the experimental data from RBC deformation by optical tweezers [102]. The stretching force is applied along one direction, where is x-direction. First, we choose the same number and enough vertices symmetrically distributed in the largest x-coordinates and smallest x-coordinates of the RBC membrane. The total stretching force is obtained by summing the identical forces exerted on each vertices at one side. Figure 4a shows the typical configurations of the stretched RBC with stretching force 0, 68 and 100 pN. Our simulation results show qualitative consistence with experimental results [102]. We also calculate the deformed shape of RBC, such as \(D_A\) and \(D_T\), which are the largest distances along the stretching and transverse directions, respectively. In Fig. 4b, the simulation results of \(D_A\) and \(D_T\) as functions of stretching force from 0 to 200 pN are plotted. These simulation results are compared with the experimental data [102] and previous numerical results [84]. We find excellent agreement between our simulation results with previous experimental and numerical results. It further confirms that our numerical model and method can accurately reproduce the mechanical behavior of a single RBC. We should emphasize that the simulation results depend on the choices of ratio \(x=l/l_m\), number of vertices subjected to stretching force and number of the total discretized triangles for the RBC membrane. These issues are discussed in detail by Fedosov et al. [84], while we only choose one set of parameters in present study. All the model parameters are listed in Table 1.

Fig. 5
figure 5

Tank-treading and tumbling of a single RBC in shear flow. a Schematic of a single RBC in shear flow driven by moving of upper and bottom plates with the same velocity but opposite direction. b Tank-treading and tumbling frequency of RBC under different shear rates. c Snapshots of tumbling and tank-treading behaviors of RBC. In b, \(\mu _i\) and \(\mu _m\) represent the inner flow viscosity and membrane viscosity, respectively

3.1.2 Tank-treading and tumbling a single RBC in simple shear flow

There exists a transition from tumbling to tank-treading of a RBC in simple shear flow according to experiments [103, 104] and simulations [84]. This transition is attributed to the minimum energy state of the RBC membrane shown in Fischer’s work [103]. Therefore, by increasing the shear rate, the transition can be observed in experiments. When the shear flow rate is increasing, the force applied on RBC by local fluid flow can overcome the energy barrier of the RBC membrane. Then the RBC can move with the surrounding fluid flow, otherwise it could only tumble like a solid body which only needs a small shear force. Some theoretical analysis has also been performed by simplifying the RBC as an ellipsoidal particle [105]. The dynamics of RBC in shear flow depends on shear rate, membrane viscosity, shear modulus of RBC membrane and viscosity contrast between inner and outer membrane fluid. Here, the membrane viscosity is not considered and the viscosity contrast is unity which reflects that the fluids inside and outside the membrane own the same properties. The shear modulus is fixed and the value is listed in Table 1. The tumbling and tank-treading frequency is measured as a function of shear rate.

Figure 5a shows a schematic of the RBC in shear flow driven by moving of the upper and bottom plates with same velocity but opposite directions. Figure 5b plots the simulation results of frequency for tumbling and tank-treading as a function of shear rate, in comparison with experimental data [103, 104] and previous numerical results [84]. We find that the frequency increases with the increment of shear rate in both tumbling and tank-treading regimes. In addition, an intermittent regime exists, which is highlighted by the coexist of tumbling and tank-treading motions. In this regime, the RBC initially tumbles like a solid body, and as simulation time progresses, its motion transits into tank-treading mode. We observe that this intermittent motion occurs within interval of shear rates denoted as shadow region in Fig. 5b. The frequency in the tumbling regime is consistent with the experimental and numerical results. However, it should be emphasized that there is an obvious discrepancy between present results and the experimental data. We believe that this difference is induced by the unity viscosity contrast. Specifically, we compare present results with the numerical results by Fedosov et al. [84] under the same situation. We find that they are in good agreement. Therefore, for simplicity, the viscosity contrast is set to be unity and it is confirmed to be accurate enough to capture the dynamics of RBCs in shear flow.

Fig. 6
figure 6

a Calibration of Morse potential between RBCs. b Compression method for high hematocrit generation

3.1.3 Calibration of Morse potential and generation of high hematocrit

In the blood flow, cell–cell interaction dominates a large number of physiological phenomena, such as aggregation of RBCs into rouleaux [106]. Morse potential is extensively used to approximate this kind of interaction [68, 69, 97]. The function of Morse potential is expressed as

$$\begin{aligned} {\mathrm{U_{morse}}} = D_0\left[ e^{-2\beta (r-r_0)}-2e^{-\beta (r-r_0)}\right] , \quad r < r_c, \end{aligned}$$
(39)

where \(D_0\) represents the energy well depth and \(\beta \) denotes the width of energy well. r is the distance between two surface vertices and \(r_0\) is the equilibrium distance. \(r_c\) is the cutoff distance, beyond which the interaction is ignored. In present simulations, the parameters are chosen as \(\beta = 3.84\ \upmu \mathrm{m}^{-1},\ r_0 = 0.5\ \upmu \mathrm{m}\), and \(r_c = 1.5\ \upmu \mathrm{m}\). When \(r>r_0\), it exerts attractive force between two RBCs. When \(r<r_0\), repulsive force exists between them. However, it should be noted that this kind of repulsive force is not strong enough to prevent overlapping between two RBCs. Here, in order to guarantee no overlapping between RBCs, a very short-range Lennard–Jones (LJ) potential is employed. Also, this potential is applied for interaction between RBC and particles, which can prevent the penetration of particles into RBC. The potential has the form

$$\begin{aligned} {\mathrm{U_{LJ}}}(r) = 4\epsilon \left[ \left( \frac{\sigma }{r}\right) ^{12}-\left( \frac{\sigma }{r}\right) ^6\right] ,\quad r<r_{{\mathrm{LJ}}}, \end{aligned}$$
(40)

where \(\epsilon \) is the depth of potential well, \(\sigma \) is the finite distance at which the LJ potential is zero. \(r_{{\mathrm{LJ}}}\) is the cut-off distance. Here \(r_{\mathrm{LJ}} = 2^{{1}/{6}}\sigma \) for a short range pure repulsion, which will not influence the attraction between RBCs from Morse potential. Then we set the parameters for LJ potential as \(\epsilon = 1\ k_{\mathrm{B}}T, \sigma = 0.5\ \upmu \mathrm{m}\) and \(r_{{\mathrm{LJ}}} = 0.56\ \upmu \mathrm{m}\). The value of well depth \(D_0\) in Morse potential is measured by the separation test. There are two RBCs with initial separation distance \(r_0\) (see Fig. 6a), 7 pN force is uniformly applied on 200 vertices in the upper RBC, and the bottom RBC is fixed on the substrate. We find that when \(D_0 = 0.03\ k_{\mathrm{B}}T\), they can separate from each other. While \(D_0\) increases to \(0.04\ k_{\mathrm{B}}T\), the RBCs are still adhering together and cannot be separated. Thus, in the following simulations, the energy well depth \(D_0\) is chosen as \(0.04\ k_{\mathrm{B}}T\).

In blood flow simulations, initial configurations with a large number of RBCs is not easy to generate. The regular arrangement of RBCs in the computational domain only results in low hematocrit, which is limited to 20%. To model the blood flow with high hematocrit, special method should be employed to handle a large number of RBCs randomly distributed in the fluid domain. Kruger et al. [70] demonstrated that the high hematocrit can be implemented by a growth method. In this case, the small size RBCs are generated and distributed in the computational domain. Then, the area and volume increase over the simulation time, with fixed area to volume ratio. Such a growth method can ensure the nature of biconcave resting shape of RBC. In our case, we use another method to generate the computational model with high hematocrit. The RBCs are generated with their realistic size, but distributed loosely in the space, which is about two times larger than the computational domain, as shown in Fig. 6b. Then, we apply two rigid plates to confine these RBCs. These two plates are moved in the opposite directions to reduce the space occupied by these RBCs, until reaching desired dimension. During this process, the other two direction are applied with periodical boundary conditions. The interaction between plates and RBCs is governed by LJ potential. Figure 6b shows the initial and final configurations of the compression process. When the space is compressed to the same size as computational (fluid) domain, the compression is stopped and RBCs are allowed to further relax, which ensures that initial states of RBCs are in their equilibrium configurations.

3.2 Validation of magnetic particle model

3.2.1 Moving of a single magnetic particle under non-uniform external magnetic field

When a magnetic particle is placed in the fluid flow, and a non-uniform external magnetic field \(\mathbf B = B_0(x,0,0)\) is applied, the particle would experience the magnetic force \(\mathbf F ^B\), which can be expanded to calculate the component of force along x, y and z directions:

$$\begin{aligned} F^B_i = m_x\frac{\partial B_i}{\partial x}+m_y\frac{\partial B_i}{\partial y}+m_z\frac{\partial B_i}{\partial z}, \end{aligned}$$
(41)

where i denotes x, y or z direction, and \(m_x\), \(m_y\) and \(m_z\) are the components of magnetic moment in x, y or z direction. According to the Stokes’ law, the velocity component of magnetic particle in fluid along i direction induced by magnetic force can be expressed as:

$$\begin{aligned} V_i = \frac{F^B_i}{6\pi \mu a}. \end{aligned}$$
(42)

The radius of particle is chosen as 10, 20, 40, 60 and 80 nm. The maximum strength of magnetic field is set to 0.1 T which is within the Food and Drug Administration (FDA) suggested range [107]. We define the analytical velocity calculated by Eq. (42) of particle with radius 80 nm as \(V_0\), and the other velocities are normalized by \(V_0\). The comparison of velocity between analytical expression using Eq. (42) and present simulation results are given in Fig. 7. We find that, when the radius is small, our simulation result is in good agreement with analytical result. When the radius is larger (\(\ge 40\,\mathrm{nm}\)), there is a small difference comparing with the analytical result. However, this difference is within \(5\%\) of the analytical result and can be ignored.

Fig. 7
figure 7

Comparison of velocity of a moving magnetic particle between present simulations and analytical results

Fig. 8
figure 8

a Critical frequency to break up magnetic chain in rotating magnetic field with different number of particles. b Three typical shapes of the magnetic chain with 11 particles and corresponding velocity field of fluid flow (red is faster and blue is slower)

3.2.2 Breakup of magnetic chain in rotating magnetic field

A magnetic chain is considered under the influence of a spatially homogeneous rotating magnetic field \(\mathbf B = B_0(\cos (\omega t), 0, \sin (\omega t))\). The magnetic chain consists of N magnetic particles without covalent bond. According to Sect. 2.3, dipoles are induced in these magnetic particles, and they will experience the magnetic force \(\mathbf F ^B\) due to dipole–dipole interaction rather than magnetic force induced by non-uniform magnetic field. We can simplify Eq. (25) as:

$$\begin{aligned} \mathbf F ^B_{ij} =\frac{F_0}{\overline{r}^4_{ij}}\left( 2(\overline{\mathbf{m }}\cdot \mathbf e _{ij})\overline{\mathbf{m }}-(5(\overline{\mathbf{m }}\cdot \mathbf e _{ij})^2-1)\mathbf e _{ij}\right) , \end{aligned}$$
(43)

where \(\overline{\mathbf{m }}=\mathbf m /m_0\) and \(m_0 = \frac{V_c\chi }{\mu ^*}B_0\), \(\overline{r}_{ij} = r_{ij}/a\) and the characteristic force \(F_0 = \frac{3\mu ^*m_0^2}{4\pi a^4}\). Equation 43 can be split into two parts:

$$\begin{aligned} F^B_{ij} = \frac{F_0}{\overline{r}^4_{ij}}\left[ 2(\overline{\mathbf{m }}\cdot \mathbf e _{ij})\overline{\mathbf{m }}\cdot (\mathbf I -\mathbf e _{ij}{} \mathbf e _{ij})+(1-3(\overline{\mathbf{m }}\cdot \mathbf e _{ij})^2)\mathbf e _{ij}\right] ,\nonumber \\ \end{aligned}$$
(44)

where \(\mathbf I \) is the identity tensor. In the bracket, the first term denotes the force normal to \(\mathbf e _{ij}\) and the second term is parallel to it. If we define \(\varphi \) as the instantaneous angle between \(\overline{\mathbf{m }}\) and \(\mathbf e _{ij}\), then the force along \(\mathbf e _{ij}\) can be expressed as:

$$\begin{aligned} \nonumber \mathbf F ^B_{ij}|_\mathbf{e _{ij}}= & {} \frac{F_0}{\overline{r}_{ij}^4}\left[ 1-3(\overline{\mathbf{m }}\cdot \mathbf e _{ij})^2\right] \mathbf e _{ij} \\= & {} \frac{F_0}{\overline{r}_{ij}^4}[1-3\cos ^2(\varphi )]\mathbf e _{ij}. \end{aligned}$$
(45)

This force can be attractive as well as repulsive which is determined by the value of \(\varphi \). In the rotating magnetic field, the chain would rotate around its center under the magnetic torque, therefore it should experience the viscous torque exerted by the surrounding fluid. When the strength of magnetic torque is able to compensate the viscous torque, the magnetic chain will keep intact. Otherwise, a big phase lag between magnetic chain and magnetic field can lead to a repulsive magnetic force, and then it will break the chain. It should be noted that, when the phase lag is close to the critical value which leads to repulsive force, the chain deforms to a S-shape in the center.

We examine the shape of the magnetic chain in the fluid field by increasing the frequency of the external rotating magnetic field. The chain would show straight, S-shape and breakup status with the increment of the frequency. The critical frequency \(\omega _c\) is defined as the value of frequency that leads to the broken up of magnetic chain. The critical frequency is estimated for chains consisted of different numbers of magnetic particles. And the simulation results are compared with the previous results [54, 64, 108, 109] which is shown in Fig. 8a. In Quesada et al. [54] work, a high order lubrication approach has been proposed, in which the lubrication interactions between adjacent beads are considered. They adopt the smoothed particle hydrodynamics (SPH) method to validate their simulation approach, and find a good agreement. Here, our simulation results are consistent with these previous works. In particular, they are consistent with the high order results given in Ref. [54].

Fig. 9
figure 9

Margination probability of a magnetic particles, b magnetic nanoworms under external magnetic field within blood flow

We show the snapshots of the magnetic chain consisted of 11 magnetic particles in flow field in Fig. 8b. When the frequency of the external field \(\omega \) is small (\(\approx 0.2\omega _c\)), the magnetic chain follows the magnetic field in a quasi-straight shape. When the rotation frequency \(\omega \) is close to the critical frequency \(\omega _c\) (\(\approx 0.98\omega _c\)), the particles at the ends of the chain show significant deflection and magnetic chain demonstrates a S-shape. For particles inside the chain, there are particles on each side. Then, the magnetic torque can be balanced by these side particles. However, for particles at the ends, only one particle exerts the magnetic torque on it, leading to a large deflection. We can conclude that the rotation of magnetic chain is induced by the magnetic torque applied on the two ends of the chain. Under this circumstance, the angle \(\varphi \) differs along the chain, and it exactly reaches the maximum value in the middle of the chain. When \(\omega \) further increases (\(\approx 1.7\omega _c\)), the chain cannot follow the external magnetic field, which means the angle \(\varphi \) in the middle of the chain becomes large enough to create a repulsive force between two magnetic particles. Under this condition, the chain will breakup in the middle due to its maximum value of \(\varphi \). Figure 8b also plots the fluid velocity field for three typical shapes of the magnetic chain. With the increment of rotation frequency \(\omega \), velocities at the ends of the chain increases. When the chain breaks up, the velocities at two ends become much smaller. Usually the magnetic chain will breakup into two or three parts, which depends on the symmetry of the fluid domain and perturbation of the flow field. Here, we show the chain breaks up into three parts which contain 5, 1, 5 magnetic particles respectively. In addition, two parts that contain 5 and 6 particles respectively should exist.

4 Margination of magnetic particles and magnetic nanoworms in external magnetic field

4.1 Results and discussion

To simulate blood flow with non-Newtonian effect, the RBCs are explicitly considered in our model. The in vitro blood vessel is represented by a rectangular channel with width \(W = 27\,\upmu {\mathrm{m}}\), length \(L = 36\,\upmu {\mathrm{m}}\) and height \( H = 24\,\upmu {\mathrm{m}}\). The bottom plate of the channel is fixed and the blood flow is driven by moving of upper plate with constant velocity. Simple linear shear flow of \(\mathbf u =\{0, \dot{\gamma }z, 0\}\) is considered and bounded by the two plates in z-direction. \(\dot{\gamma }\) is the shear rate and it keeps constant of \(200\,{\mathrm{s}}^{-1}\) in our simulations. The flow direction is along y-direction and x- and y-directions are applied with periodic boundary conditions. The hematocrit of blood flow is \({{\mathrm{Ht}}} = 30\%\) with 40 RBCs inside the channel.

We investigate the margination of magnetic particles and magnetic nanoworms under external magnetic field within blood flow. There are 80 magnetic particles placed in the channel. They are identical with radius \(125\,\mathrm{nm}\). For the other case, there are 40 nanoworms inside the channel with \(8\,\upmu \mathrm{m}\) in length. Each nanoworm consists of 32 consecutive magnetic particles, which are connected by harmonic bonds.

The margination of particles or nanoworms are examined by calculating their margination probability, which is defined as:

$$\begin{aligned} {\mathrm{\langle \varPi \rangle }}= \frac{\langle n_f(t)-n_f(0)\rangle }{N-n_f(0)}, \end{aligned}$$
(46)

where \({\mathrm{\langle \cdot \rangle }}\) denotes the time-averaged value over the time interval, \({\mathrm{n_f(t)}}\) represents the number of particles or nanoworms inside the cell-free layer (CFL) at time \({\mathrm{t}}\) and \({\mathrm{N}}\) is the total number of particles or nanoworms in the channel. Here, the thickness of CFL is calculated in absence of other objects, e.g. , particles or nanoworm chains, which is \(2.8\ \upmu \mathrm{m}\) for \({{\mathrm{Ht}}} = 30\%\). This is in good agreement with previous studies [18, 22].

The external magnetic field \(\mathbf B = B_0(0,0,\frac{z}{H})\) is applied along z direction. Then only the z-directional magnetic force \(F^B_z\) is left nonzero due to its gradient in space, \(F_z^B = m_z\frac{\partial B_z}{\partial z} = \frac{V_c\chi B_0^2}{\mu ^*H^2}z\). We set the channel in the space \(z\le 0\), which makes the magnetic particles experience minus magnetic force and marginate to the lower wall of the channel. The strength of the magnetic field \(B_0\) ranges from 0 to 1.5 T, which ensures that the maximum value of magnetic strength in the flow field settles in the FDA suggested range [107].

Figure 9 presents the averaged margination probability \({\mathrm{\langle \varPi \rangle }}\) of magnetic particles and magnetic nanoworms in steady-state regime as a function of magnetic field strength. The total simulation time of all cases is 1.4 s. We find that, for magnetic particle, when there is no external magnetic field, the margination is very small and negligible, which is consistent with previous studies [13, 18, 22]. With the increment of magnetic field strength, the margination probability dramatically increases. When the strength increases to 1.0 T, the margination probability reaches its maximum value 1. The same trend has been observed for magnetic nanoworms.

Fig. 10
figure 10

Snapshots for margination of magnetic particles in blood flow with different magnetic field strengths

Fig. 11
figure 11

Snapshots for margination of magnetic nanoworms in blood flow with different magnetic field strengths

We should emphasize that the value of the averaged margination probability is relevant to the simulation time. If the simulation time is long enough, \({\mathrm{\langle \varPi \rangle }}\) of all the cases with nonzero magnetic strength are expected to reach 1. This result, in turn, can be used to tune the margination rate of the magnetic particles or nanoworms by varying the strength of external magnetic field. As shown in Figs. 10 and 11, when there is no magnetic field applied, although few magnetic particles or nanoworms can marginate from center of blood flow stream to vessel wall region, the chance is extremely small and negligible. When a very weak magnetic field is applied (\(B_0 = 0.2\,\mathrm{T}\)), the initial uniformly distributed magnetic particles or nanoworms start marginating to the lower vessel wall as simulation time progresses, while there are some particles or nanoworms still left in the core region of the channel at the end of simulations. With the magnetic field strength further increases to \(1.0\,\mathrm{T}\), the particles and nanoworms can quickly marginate to the lower vessel wall and only few of them stay in the center of bloodstream.

Fig. 12
figure 12

Scaling performance of proposed numerical scheme. N represents the total number of CPUs used for the simulation. a Time denotes the estimation of computer time to run 2000 steps. b Speedup measures the computing performance by increasing the number of CPUs

All these simulation results confirm that the non-uniform magnetic field can be used to promote the margination of magnetic particles in blood flow, increase their interaction with abnormal tumor microvasculature and further enhance tumor accumulation of encapsulated drug molecules. In particular, the margination probability and rate can be enhanced by increasing the magnetic field strength. This characteristic is significant in the controlled drug delivery. It ensures that the drug molecules can be released in the specific time interval with specific dosage with reduced side effects.

4.2 Scaling performance of computational model

In present simulation, the Eulerian fluid grids is \(108 \times 144 \times ~96 = 1492992\). Solving the Navier–Stokes equations takes about \(68\%\) of the total computing time. The parallelization of LB solver is very important to reduce the computational cost. Here we use the solver fix_lb_fluid, which is embedded in LAMMPS and proved to be highly efficient [83]. The time consumption for the coupling of magnetic particles or nanoworms with fluid flow can be negligible, comparing to the coupling of RBCs with fluid flow. We have modified the coupling method in the original LAMMPS package (fix_lb_pc) from force coupling to velocity coupling, which guaranties the non-slip boundary conditions. The computational efficiency is examined by estimating the time consumption used to run 2000 steps within present program, which is given in Fig. 12a. We find that our program owns high efficiency when the total number of CPUs is within 512, and the speedup is almost linearly increasing with the logarithmic value of total number of CPUs, as shown in Fig. 12b. The high efficiency of proposed model and computational method will enable us to further explore the vascular dynamics of magnetic particles in large scale vascular network and high hematocrit.

5 Conclusion

Magnetic particles have been recognized as promising cargoes for actively triggered drug delivery system. To understand the transport and margination of magnetic particles in blood flow, we develop a novel multiscale and multiphysics computational model by explicitly considering the presence of RBCs in blood flow, influence of magnetic field and hydrodynamics. Such a computational method seamlessly integrates different components within LAMMPS framework, which is robust and highly efficient for large scale simulations. To account for the suspended structures, i.e. RBCs and magnetic particles, in blood flow, two different types of coupling schemes are adopted. Velocity coupling is used to deal with the interface between RBCs and fluid flow; while dissipative force coupling is applied to account for the interface between magnetic particles and fluid flow. The velocity coupling scheme is validated by investigation of stretching of a single RBC, as well as tank-treading and tumbling of a single RBC in simple shear flow. Furthermore, the dissipative force coupling is tested by studying the movement of a single magnetic particle under non-uniform magnetic field, and breakup of magnetic chains in rotating magnetic field. After validation of proposed computational method, we apply it to explore the margination behaviors of magnetic particles and magnetic nanoworms in the blood flow. We find that the margination probability monotonically increases with the magnetic field strength increasing. Moreover, from the snapshots of these simulations, we can also conclude that the strength of magnetic field also affect the margination rate, which is crucial for controlled drug delivery. These simulation results confirm that the non-uniform magnetic field can be used to promote the margination of magnetic particles in blood flow, increase their interaction with abnormal tumor microvasculature and further enhance tumor accumulation of encapsulated drug molecules. The success in modeling transport of magnetic particles in blood flow provides a powerful way to investigate and guide design of drug carriers for treatment of tumor. Besides, additional features can be easily implemented into current computational model through LAMMPS to further study other critical aspects in targeted drug delivery, such as adhesion of drug carriers on vessel wall near tumor site under ligand–receptor binding, and their diffusion within tumor tissue.