Modeling Brownian Microparticle Trajectories in Lab-on-a-Chip Devices with Time Varying Dielectrophoretic or Optical Forces

Lab-on-a-chip (LOC) devices capable of manipulating micro/nano-sized samples have spurred advances in biotechnology and chemistry. Designing and analyzing new and more advanced LOCs require accurate modeling and simulation of sample/particle dynamics inside such devices. In this work, we present a generalized computational physics model to simulate particle/sample trajectories under the influence of dielectrophoretic or optical forces inside LOC devices. The model takes into account time varying applied forces, Brownian motion, fluid flow, collision mechanics, and hindered diffusion caused by hydrodynamic interactions. We develop a numerical solver incorporating the aforementioned physics and use it to simulate two example cases: first, an optical trapping experiment, and second, a dielectrophoretic cell sorter device. In both cases, the numerical results are found to be consistent with experimental observations, thus proving the generality of the model. The numerical solver can simulate time evolution of the positions and velocities of an arbitrarily large number of particles simultaneously. This allows us to characterize and optimize a wide range of LOCs. The developed numerical solver is made freely available through a GitHub repository so that researchers can use it to develop and simulate new designs.


Introduction
Recent decades have seen rapid advances in the field of biotechnology. Lab-on-a-chip (LOC) devices capable of manipulating micro-and nano-sized bio-samples have played a significant role in fueling this progress. The research on designing novel and complex LOC devices is ongoing. A computational-physics framework capable of simulating the trajectory of a micro-or nano-sample can be a very useful tool for designing and analyzing LOCs [1,2].
Although the main application of LOCs is in the field of biology, the design process of the devices requires modeling several physical phenomena. Trapping and manipulating small-sized samples are often a key feature of LOCs. On-chip manipulation of micro-sized samples (or microparticles) is usually accomplished by using viscous drag forces applied through fluid flow along with dielectrophoresis (DEP) [3][4][5] or optical [6][7][8]/ optoelectronic [9][10][11] techniques (DEP is more widely used). LOCs can have integrated micro-electrodes and microfluidic channels to carry out these functions [12]. Designing a device to achieve a specific functionality requires accurately predicting how a micro-object behaves under the influence of relevant forces. For example, microfluidic particle/cell sorter devices often utilize material-selective DEP forces to create separate trajectories for different types of particles (e.g., dead vs live cells) [13][14][15][16][17][18]. The design process hinges on engineering these trajectories. Similar arguments can be made for LOC devices used in other applications as well. A mathematical simulation model capable of predicting particle trajectories can help designers identify potential issues and optimize the device before proceeding to the fabrication step; consequently, saving time and cost.
Along with the effects of external forces, colloidal particles (we use the term particle throughout the paper to refer to any colloidal micro-or nano-specimen of roughly spherical shape) in LOCs exhibit Brownian motion which can affect their trajectories [19]. Brownian motion arises from random collisions between the particle and the molecules of the suspension fluid [20,21]. Although the phenomenon is usually not prominent for large particle sizes (tens of microns) [18], it can be notable when sizes are in sub-micron range. Therefore, it should be included in a generalized model. The Langevin equation, which takes into account the effects of external forces and Brownian motion, can be used for this purpose [20,22]. The viscous drag force experienced by the moving particle in the suspension fluid (which itself can be in motion) is integrated within the equation. This makes it ideal for modeling colloidal particle trajectories in a static or moving fluid.
Unlike colloids in a boundless isotropic fluid, particles in LOC devices are bounded within a finite-sized liquid chamber. As such, additional mechanics need to be taken into account for modeling particle behavior. Firstly, a particle close to the walls of the fluid chamber or a microfluidic channel would experience hindered diffusion instead of free diffusion [23][24][25]. This is due to the hydrodynamic interaction between the particle and the no-slip boundary layer [2] of the fluid near a solid surface. Another factor to consider is particle collision with the solid surfaces of the chip which alters its motion. In multi-particle systems, particle-particle collisions are also possible. The effect of collisions cannot be directly included within the Langevin equation and therefore, must be modeled separately. In this work, we present a numerical model that takes into account all the aforementioned physics to calculate particle trajectories inside LOCs. The numerical solver uses a finitedifference scheme to solve the Langevin partial-differential equation and obtain the time evolution of particle positions. We model hindered diffusion by using a particle-position dependent diffusion tensor in the Langevin equation. A collision detection algorithm is used at each time-step. If detected, an elastic collision model is used to modify the results of the Langevin mechanics. Our generalized model is capable of simulating heterogeneous multi-particle systems, where each particle can differ in size, mass, and material properties. In addition, a large number of particles can be simulated simultaneously. The numerical solver computes the particle positions in parallel and, therefore, does not require long computation time even for large number of particles. Thus, it is ideal for simulating and analyzing various different LOC environments.
The numerical solver is implemented in python and is made available publicly through a GitHub repository [26]. We chose python as it is open source and has many freely available scientific-computing libraries. The software and the mathematical libraries required to run the solver are freely available. Along with the numerical engine, we utilized the graphical libraries to create built-in visualization schemes for analyzing relevant data. This includes the ability to save the animation of the particle motion in the form of a video file and logging the position and velocity values of each particle.
To demonstrate the usefulness of the platform, we present simulation results of two LOC systems. The first example shows optical trapping of multiple microparticles. A dynamic nature is incorporated by activating and deactivating the trap at specific time instances. The corresponding simulation results show the trapping mechanics, as well as the dynamics of the particles when the trap is released. The second example covers a more complex LOC that uses DEP to sort and separate cells. Such LOCs have many applications [12,14,15]. A microfluidic device with flowing liquid is considered for this case. Material selective DEP force is used to direct viable (live) and non-viable (dead) yeast cells along different paths. These two distinctly different examples show the versatility of our solver for simulating various LOC configurations. Moreover, the solver is developed in modular form. Thus, switching from one device geometry to another requires modifying only a few modules and plugging in external force terms.
The rest of the paper is organized as follows: Section 2 introduces the Langevin equation and its discretization to the finite difference form. The particle position dependent diffusion tensor and collision mechanics are discussed in Sections 3 and 4, respectively. Section 5 describes how all the physics were integrated in the numerical solver. The simulation results for the two different LOCs are discussed in Section 6. Finally, concluding remarks are made in Section 7.

Langevin Equation
The motion of a colloidal micro-or nano-particle under the influence of an external force-field can be modeled using the Langevin equation. For a colloidal particle in a low Reynolds number environment with shear-flow, the Langevin equation has the form [20,[27][28][29]: Here, t is the time variable, m, r and v(r, t) are the mass, position, and velocity of the particle, respectively, v f (r, t) is the velocity of the fluid, k B is the Boltzmann constant, T is the temperature, F ext is the net external applied force acting on the particle, is a random process with zero mean and unit variance. The mv(r, t) term represents the inertia of the particle. This term can often be dropped for small particles where the mass is negligible [20]. The (r)W(t) is the fluctuating force resulting from random collisions between the particle and fluid molecules. The F ext term encapsulates all external forces acting on the particle (e.g., optical trapping force, dielectrophoretic force, gravitational force, etc.). Whereas most research articles use the derivatives of the position vector, we express Equation (1) in terms of the velocity vector and its derivative. We do so for easier subsequent integration of collision physics into the model which depends on the velocity vectors. Thus, directly solving the velocity vectors simplifies the analysis. Equation (1) is a stochastic differential equation. The presence of the discontinuous white noise term makes solving a stochastic differential equation more complex than solving an ordinary differential equation [30]. Our approach to numerically solve Equation (1) involves using the Euler-Maruyama method to convert it into a finite difference equation [30,31]. We use the following discretization scheme: Here, i = 0, 1, · · · N t represents the time index and ∆t is the time step. The set of discrete time where the numerical solution is calculated is given by t i = i∆t. The term w i is a random vector whose Cartesian components are Gaussian random numbers with zero mean and unit variance. Solving for v i+1 from Equation (2) gives: Here, T∆t is a unit-less tensor quantity defined to make the equation compact. It should be noted that we use v i+1 instead of v i in the right hand side of Equation (2). This ensures the stability of the numerical scheme for arbitrary ∆t values. This fact can be verified by setting the fluid velocity, the white noise term, and the external force to be zero and observing the simplified velocity update equation As the multiplicative factor is less than unity (every component of ↔ Λ is positive), the velocity will remain bounded over successive iterations and thus, stay stable.
After calculating the velocity vector at a given time step i, the position vector can be easily calculated using the Euler-Cromer method [32]: The position and velocity data of each particle is calculated using the same equations. The process is repeated for the next discrete time instance until the simulation end time is reached.

Diffusion Tensor and Hydrodynamic Interactions
The Langevin equation contains the diffusion tensor which is a representation of the fluid-particle interaction. The diffusion tensor in an isotropic homogeneous medium, ↔ D 0 , depends on the material properties of the suspension medium, particle size, and the temperature. It is given by [23,24]: where ↔ I is a 3 × 3 unit tensor, r o is the radius of the particle, and η is the dynamic viscosity of the medium. Equation (5) is equivalent to using a scalar diffusion coefficient. For LOC devices, however, the fluid chamber or microfluidic channels are not large enough compared to the particle size for assuming isotropic conditions. In addition, particles are often located near the bottom surface during manipulation in such devices. So, the particle dynamics are different from the isotropic case. The hydrodynamic interactions between the particle and the static fluid layers near a surface hinder the diffusion process. Thus, the diffusion tensor becomes dependent on the relative position of the particle with respect to the solid surfaces of the device. The generalized diffusion tensor for such cases is given by [23,24]: ↔ H(r) is a 3 × 3 unitless tensor that depends on the distance of the particle from the solid surfaces. For a geometry aligned with the coordinate system, only the diagonal elements of the tensor will be non-zero, i.e., The majority of the hydrodynamic interactions in LOCs arise from the bottom/top surface along which particle manipulation takes place. Thus, we consider a case with a single solid surface located at the z = 0 plane. The components of ↔ H(r) can be expressed as H 11 (r) = H 22 (r) = H (r) and H 33 (r) = H ⊥ (r) where [23][24][25]: Here, z is the z-position of the particle. In Figure 1, H (r) and H ⊥ (r) are plotted as functions of the normalized variable z/r o . It can be observed that for particle position far from the z = 0 surface (i.e., high z/r o values), the value of both terms approach unity and the diffusion tensor approaches the free space diffusion tensor. The closer the particle is to the surface, the larger the variation is from the free space case. Values less than unity suggests that the diffusion process is hindered near solid surfaces.

Collision Mechanics
In a multi-particle system, particle-particle collisions need to be taken into account when simulating particle trajectories. We consider a system with N p particles where particle p and particle q collide at time instance i. Their mass, position, and initial velocity are m p , The collision mechanics in three-dimensional systems can be treated by considering the velocities along the normal and tangential directions separately. We note that the velocity along the normal direction of the colliding surfaces are altered after collision, whereas the tangential velocity components are unaffected [33]. First, we define the normal vector: The normal and tangential component of the particle p velocity is then given by v p,i ·n n and v p,i − v p,i ·n n, respectively. One-dimensional elastic collision formula can be applied for the normal directions. The velocity after the collision for particle p is given by: It can be noted that the first term of Equation (10) is identical to the 1D elastic collision formula along the normal axis. Simplifying Equation (10) Swapping the subscripts p and q in Equation (11) gives the modified velocity equation for particle q.
In addition to particle-particle collisions, collisions with a wall/solid-surface may also occur in LOC systems (e.g., collision with bottom substrate, sidewalls of microfluidic channels, etc.). Assuming that the walls are much more massive than the particles, the velocity of a particle after collision can be calculated using a reflection operation. If particle p collides with a flat wall with surface normaln col,pw , then the velocity is modified as: Using Equations (11) and (12), most common collision mechanics occurring in LOC environments can be modeled.

Physics Integration
We incorporate all the aforementioned physics into the particle dynamics solver. The solver starts with randomly populated position and velocity vectors for each particle. A vector white noise term is generated from a normal distribution. The particle position depended diffusion tensor is calculated from Equation (6). Then Equation (3) and (4) is used to find predicted particle velocity and position for the next time step (i.e., v i+1 and r i+1 , respectively). As the Langevin equation does not take into account the presence of any obstacles in the particle path, the calculated position vector may represent an unphysical condition (i.e., two particles overlapping, particles going through walls, etc.). To correct for this, the Euclidean distances between each particle pair and each particle-wall pair are calculated to check for collisions. If a collision is detected, then position and velocity given by the Langevin equations needs to be adjusted. Using Equation (11) or Equation (12), the velocity vector is adjusted as: The corresponding adjusted position vector is: The velocity and position vectors are replaced by the adjusted quantities (i.e., v p,i+1 ← v adj p,i+1 and r p,i+1 ← r adj p,i+1 ) before proceeding to the next time step. The Python code implements the entire process in parallel for all the particles (i.e., p = 0, 1, · · · N p − 1) inside a single time loop. The implemented wall collision physics is general and works for any arbitrary polygon geometry. The flowchart shown in Figure 2 shows all the calculation steps.

Initialization
Set i = 0 Assign random values to r 0 and v 0

Diffusion Tensor
Calculate D(r i )

White noise
Generate w i from normal distribution Collision detected? Velocity Adj.

Loop
Repeat while

Results
Using the developed algorithm, we present simulation results of two example LOC setups. The first example is a typical optical trapping setup with a Gaussian beam. The second example is a microfluidic LOC device that uses dielectrophoresis to sort or separate live and dead yeast cells.

Optical Trap
We consider an optical trapping experiment with a Gaussian beam. We implement a time dependent external force, modeling an optical beam that is turned ON and OFF at specific time instances. For simplicity, we assume a conservative gradient-force profile resulting from a Gaussian potential well, u(r), centered around the origin. The potential is defined as: Here, A d = 120k B T µm −3 is the depth of the volume density of the potential well (i.e., depth of the potential well normalized with respect to particle volume), r o is the radius of a particle, w = 10 µm is representative of the width of the well, and r is the radial distance from the trap center (assumed to be at the origin) to the particle position. The corresponding force profile, F opt (r), is given by [7,34]: The force profile is shown in Figure 3. Due to the symmetry of the potential well, we only plot the radial component of the force, F r . The x, y and z components of the force can easily be calculated from Equation (16) as well. Both the potential profile and the force profile are assumed to scale linearly with particle volume. This is a commonly used approximation for optical traps [35]. The conservative force-profile approximation is also commonly accepted for most cases. However, for some cases, especially involving near-field trapping, it is possible to have non-conservative force components [7]. Instead of Equation (16), more generalized approaches are necessary to model the force for those cases. For the current case, we define the F ext term in the particle dynamics model as: This represents a case when the optical beam is ON during the time interval 1 s < t < 8 s. The interval boundaries are set arbitrarily. It should be noted that other possible external force terms (e.g., gravitational sedimentation, thermophoresis, etc.) can also be added here.  We consider N p = 4 polystyrene beads (density, ρ = 1055 kg/m 3 ) suspended in water (dynamic viscosity, η = 8.9 × 10 −4 Pas, and temperature, T = 300 K) with radii r o,0 = 1.5 µm, r o,1 = 2.5 µm, and r o,2 = r o,3 = 2 µm. The corresponding particle masses can be calculated from the volume and density values. A solid bottom surface is assumed to be located at the z = 0 plane. With these conditions, the simulation was run from t = 0 to t = 12 s with a step size of ∆t = 0.01 s. The simulations results are shown in Figures 4 and 5. From Figure 4, we can see the particle positions at an arbitrary time instance (t = 6.3 s), when they are trapped on the optical spot. The associated multimedia file 1 is an animated video that shows the same results for all time instances. Figure 5 show the positions and velocities of the particles as a function of time. The position plots show that the particles start moving towards the origin at around t = 1 s, when the Gaussian optical spot (centered around the origin) is turned ON. As the particles move towards the optical spot, they start colliding with each other. This is represented by the spiky nature of the plots during the time interval from t ≈ 2 s to t ≈ 8 s. After t > 8 s, the optical spot is turned OFF and the particles are no longer trapped. During this time the Brownian motion dominates as the particles move randomly. It should be noted that a particle does not always become trapped when the optical spot is active. Trapping occurs only when a particle is within the capturing range of the trap [36,37]. In other instances of the simulation, where the random initial position of a particle is significantly away from the optical spot, the particle does not become trapped.

Dielectrophoretic Cell Sorting or Separation
For our second example, we simulate a microfluidic device that uses DEP forces for cell sorting or separation which is a common application of LOCs [15][16][17]. Specifically, we focus on the separation of viable (live) and non-viable (dead) yeast cells using the device proposed by Doh et al. in their paper [15]. The device uses tapered electrodes embedded within a microfluidic chamber. The structure is shown in Figure 6a. The fluid walls are 50 µm high. The electrodes having a height of 0.12 µm can be considered planar. The electrodes have a length of 350 µm (along the x axis) and the gap between them is 16 µm. The top and bottom electrodes have a width (along y axis) of 20 µm, whereas the width of the tapered middle electrode spans 46-70 µm. The top and bottom electrodes are electrically shorted externally. An AC voltage of 4 V at 5 MHz is applied between the center electrode and the other electrodes. A strong field is created between the electrodes generating dielectrophoretic forces. As a solution of cells flows from left to right, the electrodes exert different forces on live and dead cells, modifying their trajectories. Thus, specific cells can be diverted to specific microfluidic channels. We choose this device as an example as it incorporates some of essential particle manipulation mechanics (e.g., fluid flow, dielectrophoretic force, etc.) used in many LOC devices.
To use our numerical solver to simulate this device, first we have to model the forces acting on the cells. The time averaged DEP force, F DEP , on the cells can be approximated as [3,15,17]: Here, 0 is the permittivity of free space, m = 80 is the relative permittivity of the medium, r o = 3 µm [38] is the cell radius,C M is the Clausius-Mossotti factor, [·] is the operator that outputs the real part of its argument, and E is the electric field. E depends on the geometry of the electrodes and the device. It can be noted that the sign of C M determines whether F DEP is attractive (positive DEP) or repulsive (negative DEP). SinceC M depends on the material properties of the cells, they differ from live cells to dead cells [39]. We use the multi-shell model to calculateC M for viable and non-viable yeast cells [3]. The procedure is discussed in detail in the Supplementary Information Document. We take the geometrical and material parameters of the cells and the device dimensions from the literature [15,40,41]. Plugging in these values, we find that at f = 5 MHz, the viable and non-viable cells have relative permittivities of viable = 199.94, and nonviable = 18.82, respectively, and have conductivities of σ viable = 0.36 S/m and σ nonviable = 0.013 S/m, respectively. These values correspond to C M, viable = 0.945 and C M, nonviable = −0.25. Thus, the viable cells experience positive DEP, whereas the non-viable cells experience negative DEP.
The electric field term in Equation (18) can be calculated using any of the widely available numerical electromagnetic field solvers for any arbitrary device geometry. We use Comsol Multiphysics ® for this purpose. The calculated electric potential and field distributions are shown in Figure 6b,c. The corresponding force values on a viable yeast cell (calculated using Equation (18)) are shown in Figure 6d. It can be seen that the force pulls the viable cells near the gap regions between the electrodes where the field intensity is maximum. For a non-viable cell, the sign of the force would be reversed and scaled by a factor of | C M, nonviable |/| C M, viable | ≈ 0.26.
Here, v f (r, t) has units of µm/s. The y component of the fluid velocity for a given x component is approximated from the slope of the channels so that the average flow is tangential to the fluid wall. A 3D moving average filter was applied to make the velocity profile smoother. It should be stated that this flow profile is an approximation. We also ignore any fluid flow that might be induced by the non-uniform electric field [42]. It is possible to plug in more accurate data from an external solver in our code. However, the piece-wise model is sufficiently accurate for the current demonstration problem. In the future, we plan to implement a numerical fluid flow solver and integrate it with our particle dynamics solver.
From Equations (18) and (19), we plug in the F ext = F DEP and the fluid flow velocity in Equations (3) and (4) to solve the particle dynamics in the time range t = 0 to t = 6 s with a time step of ∆t = 5 ms. Like the optical trapping example, the particle-particle collision and particle-wall collision models are included in the simulation.  The sorting mechanics can be analyzed further by plotting the trajectory of a few cells, as shown in Figure 8. During 0 < t < 0.8 s, the y position of the all the cells remain constant as they are not yet near the electrodes to experience the dielectrophoretic force.
At this stage, driven by the fluid flow, their motion is limited to the x direction. During 0.8 s < t < 3.5 s, the cells are within the region of influence of the electrodes. The live cells move toward the high field region (the region between the electrodes) and dead cells move away from there. Since the y = 0 line is at the middle of the two high field regions (note Figure 6c), the dead cells accumulate around this line. On the other hand, the live cells accumulate near the top or bottom electrodes. At t > 3.5 s, each cell enters one of the three output microfluidic channels. The fluid flows in the top and bottom channels change directions creating a shift in cell trajectory. This can be noted in Figure 8 as the live cells follow a trajectory parallel to the top or bottom channels. The dead cells follow a constant y path through the center channel. This is consistent with the experimental results reported by Doh et al. in their paper [15]. Thus, the simulation accurately demonstrates the cell sorting or separation mechanics.

Conclusions
A numerical model that can simulate behavior of particles in LOC devices was developed. Using the model, we successfully simulated the operations of an optical trap and a dielectrophoretic cell sorter. The numerical solver is generally applicable and can simulate most LOC devices once the external force terms are defined. It can be used for the development and optimization of new and existing LOC devices. The solver was coded using open-source Python libraries and can be run on freely accessible compilers. We also made our code for the solver publicly available [26]. Due to the general nature, the developed solver can be of interest to researchers working on biomicrofluidics and LOC devices.

Data Availability Statement:
The data that support the findings of this study are available from the corresponding author upon reasonable request.

Acknowledgments:
The authors thank Paul C. Hansen, Yao-Te Cheng and Max Yuen for their helpful suggestions.

Conflicts of Interest:
The authors declare no conflicts of interest.