Benchmarking and Validation of a Combined CFD-Optics Solver for Micro-Scale Problems

In this work we present a new approach for coupled CFDOptics problems that consists of a combination of a Finite Element Method (FEM) based flow solver with a ray tracing based tool for optic forces that are induced by a laser. This is a setup that is mainly encountered in the field of optical traps. We combined the open-source computational fluid dynamics (CFD) package FEATFLOW with the ray tracing software of the LAT-RUB with this task in mind. We benchmark and analyze the solver first based on a configuration with a single spherical particle that is subjected to the laser forces of an optical trap. The setup is based on an experiment which is then compared to the results of our combined CFD-Optics solver. As an extension of the standard procedure to simulate such problems we present a method with a timestepping scheme that contains a macro step approach. The results show that this macro time-stepping scheme provides a significant acceleration of the standard procedure while still maintaining good accuracy. A second configuration is analyzed that involves non-spherical geometries such as micro rotors. We describe a procedure that is able to efficiently and accurately calculate optical forces with surface triangulations as input geometries. Then we proceed to compare simulation results of the final angular velocity of the micro rotor with experimental measurements.


Introduction
The main topic in this work is the implementation, benchmarking and numerical analysis of a combined CFD-Optics solver for problems that involve a fluid component, a rigid body component and an optics component that usually is a laser used as i.e. an optical trap. Optical traps or optical tweezers are devices that use a laser to manipulate an object (usually on a micro-scale). The range of application for these devices is from biological and medical applications to their use in micro technology. As one can easily infer from these applications a simulation with any real world relevance should be able to handle geometries that are non-spherical and can in principle be of any geometrically complex shape. Therefore, in the following sections we show how non-spherical geometry can be included in the proposed solver. A typical application example of optical tweezers with non-spherical geometry is the combination of several differently shaped parts in a micro-assembly process. Furthermore, optical traps can be used to induce rotation of micro rotors or to power micro pumps. The analyzed phenomena in this work appear on a micro-scale to up to 20 microns. In this kind of small scale environment it is advisable to take a look at the validity of the underlying theory of the employed Navier-Stokes fluid solver. In recent studies [1] it could be shown that Navier-Stokes solvers can still produce accurate results in a range of 80 nanometers given certain side conditions regarding the Reynolds number and the domain dimensions. In another publication [4] the FEATFLOW solver has already proven its ability to accurately predict fluid phenomena on a scale of several hundreds of microns. Concerning the general fluid flow configurations we are dealing with low Reynolds number, laminar flow setups for which the FEATFLOW solver also has been shown to produce accurate results for various fluid [6,7,5] phenomena as well as for the prediction of hydrodynamic forces flow in the context of sedimentation problems or particulate flow simulations [2]. The coupling of the CFD solver with the ray tracing optics solver was done in order to enhance existing numerical simulation procedures for optical traps or tweezers. Often simulations for these kind of problems are done in a vacuum whereas in real applications of the technique the objects are always embedded in a surrounding medium (i.e. a fluid such as water). The downside of this approach is that the dampening friction forces of the fluid are not taken into account which would result in such a simulation overestimating i.e. the velocities of the particles involved. A simple improvement technique for this simulation approach would be to estimate the hydrodynamic forces based on the Stokes model which in case of laminar flows with spherical particles expresses the hydrodynamic friction as F h = 6πηRv, where η is the fluid viscosity, R the radius of the sphere and v the flow velocity relative to the particle. This method of introducing hydrodynamic forces into the simulation has severe limitations though. The restriction to spherical geometries prohibits the application to advanced configurations where more complex geometries are common and where not only translational displacement is induced by the optic forces, but also rotation. In case of a rotating non-spherical geometry the resulting velocity will be different over the surface of the geometry so that the simple Stokes model is not applicable in this case. Furthermore, a hydrodynamics simulation component that is based on the Stokes model would be a one-way interaction where the fluid force has an influence on the particle, but the particle motion would have no influence on the fluid flow. This is why in our approach a two-way coupling is established that is based on the direct numerical evaluation of the hydrodynamic forces. Apart from the two-way interaction of fluid and laser forces other advantages of using the Fictitious-Boundary Method (FBM) are the ability to include non-spherical geometry and to resolve flow features which allows to gain a better understanding of the involved microfluidics.

Coupling of the CFD and Ray Tracing Solvers
The first step in the implementation of the combined solver is to define an interface that allows us to use the result of either solver in the other so that they are coupled in both directions. Thus, we chose an interface that communicates the result of the optics solver to the CFD solver where it is included as an additional force term F o in the Newton-Euler equations which are solved in the particle motion step of the CFD solver. In a single step of this coupling approach we first step the fluid solver, then we update the hydrodynamic forces F h with the new fluid solution, then in a step of the ray tracing solver the current optic forces are computed so that we can apply the total force from this time step to the particle and update its velocity. This velocity we then set as a Dirichlet boundary condition in the CFD solver which establishes the two-way coupling. Formally, the approach can be described as follows: After execution of a Navier-Stokes step (see 1) we evaluate the hydrodynamic forces (see 2) that are acting on the particle in the current time step: For further details on how to solve eq. 2 numerically we refer to the publication [2]. The next step of the combined solver is the calculation of the optic forces by the ray tracing method which gives us the optic force F o and the torque T o as a result. With these quantities we can compute the motion of the particle by the Newton-Euler equations: We can introduce the force terms F h for the hydrodynamic force, T h for the hydrodynamic torque as well as their analogons for the optics contribution F o and T o into (3), additionally we can add any forces F col , T col that may arise from particle collisions here. Thus, we can update the velocity v p and the angular velocity ω p of the particle in the next step of the solver (4): After this step of the solver the coupling to the fluid solver is established by setting the updated linear and angular velocity of the particle as a Dirichlet boundary condition:

Computational Aspects of the Coupling
In this particular case of coupling two separate software packages, we were dealing with a MPI-parallel code based on domain decomposition in case of the CFD-solver and in case of the ray tracing solver for optic forces -a serial code.
Although there exist several efficient methods for parallelization of ray tracing codes we opted to use the serial state of the software. The reason for this choice being that although plenty of parallelization schemes exist it is hard to find a scheme that truly harmonizes well with the domain decomposition approach used by the CFD-solver which means a scheme that uses the given resources in an effective manner where the used compute resources do not remain (partially) idle while one of the other components does its work. Furthermore, we realized that in a step of the combined solver the CFD-solver clearly requires the bigger share of the total computation time. Quantitatively this would be at least 90% of the total time for a time step, of course depending on the amount of cores used in the parallel computation, but for the usual size of a compute job in the scenarios investigated in this work this relation holds true. Because of this we considered the use of a serial computation step in the combined solver an acceptable circumstance that does not pose a significant performance hit to the overall simulation procedure. In the practical realization this was done by introducing the serial computation step after the hydrodynamics calculation and then distributing the solution of the ray tracing solver to the MPI-processes of the CFD-solver.

Test Case for Spherical Particles and Comparison with Experimental Data
As a validation case for the combined solver described in the preceding section we decided to start with a simple case of a spherical particle. We conducted an experiment and measurements as basis for the validation case. In the experiment we analyzed the behavior of a particle on a scale of several microns under the influence of optical forces that are applied by an optical trap. We trapped a particle in the optical trap and then released it by turning off the laser. Without the optical trap holding the particle in place it begins to slowly move away from the center of the trap because of several factors of the surrounding fluid medium i.e. Brownian motion. As soon as the particle had moved away a micron from the center of the trap, the laser was again turned on and we measured the time it takes until the particle reaches the center of the optical trap again. This setup we then replicated in the combined CFD-Optics solver and we compared the simulated results with the experimental data (see section 3).

Ray Tracing for Non-Spherical Particles
Apart from configurations with spherical micro-particles we aimed at presenting a method that is capable of handling configurations involving geometrically more complex objects because for many practically relevant applications a restriction to spherical shapes is not sufficient. Although it is possible to describe a lot of geometries used in i.e. micro-assemblies by an analytical description a more general approach to handling geometries is desirable. Because of this we chose to use surface triangulations as geometry description which are employed widely in ordinary (graphics related) ray tracing application and are well studied. Apart from a basic algorithm for optic force computation via the ray tracing approach, we added an extended procedure that makes use of an octree decomposition of the geometry/domain as an acceleration structure. With an octree data structure it is possible to reduce the number of expensive ray-triangle intersection tests by first testing the ray for intersection with the surrounding hull box of the geometry. In case of an intersection the hull box is recursively refined in an octree fashion until we only need to test a minimal number of triangles for intersection with the ray. For our purposes a recursive refinement of 5 levels was found to be most effective, for details we refer to section 3 .

Non-Spherical Test Case: Micro Rotors
Finally, we put our solver to the test in a realistic application with non-spherical geometry. As with the first test configuration we set up an experiment to that we could compare our simulation results. In the experiment a micro-rotor was placed in a surrounding fluid medium. An optical tweezer was used to induce a rotation of the micro-rotor. We then measured the final angular velocity ω f inal of the rotor. The final angular velocity ω f inal will vary depending on the power of the laser. Another way to influence the final angular velocity is by changing the rotor geometry. To introduce this geometry aspect into the experimental configuration, micro rotors with different rotor blade angles were used. We measured for different power settings of the optical tweezer the final angular velocities that the rotor would achieve. The process was then repeated for a micro rotor with a different rotor blade angle. For the simulation micro rotors were modeled by surface triangulations and the angle of the rotor blades was adjusted in accordance to the experiment.

Spherical Particle Test Case and Comparison with Experiments
For the first test case introduced in the previous section we conducted an experiment with a spherical particle to which we applied an optical force. The particle was made of polymethyl methacrylate (PMMA), a material which has a density ρ p = 1.18 g cm 3 . The particle was embedded in a surrounding medium of water which was modeled in the simulation as a fluid with density ρ f = 10 3 kg m 3 and viscosity µ = 10 −3 [P a · s]. The radius of the particle was 2 [µm] and the dimensions of computational domain were 20 × 20 × 20 [µm, µm, µm]. As boundary conditions for the simulation we applied symmetry boundary conditions to all sides of the domain. For the simulation the computational domain was covered with 262144 hexahedral cells which in the FEM-discretization are realized using the Q2P1-Element pair. In accordance to the experiment the particle was placed one micron away from the center of the optical trap which in the simulation coincides with the center of the optical trap. The exact setup of the case is summarized in table 1. The particle traveled a total distance of 1.0978 microns in the experiment in a time of 0.0292 seconds where the 1 micron distance was passed in 0.0259 seconds. The laser used in the experiment was modeled as a Gaussian ray with a wave length λ of 532 [nm], a numerical aperture of 1.     In figure 1 the simulation trajectory of the spherical particle over time is shown. The point of arrival at the center of the optical trap is highlighted with a marker. While in the simulation the particle arrived at the center of the trap after 0.0266 seconds whereas this time in the experiment was 0.0259 which gives a relative error of 2.7%. Although we were satisfied with the accuracy of the result, we considered improvements with regard to the computation time necessary. The difficulties regarding the computation time can be explained by the micro-scale and the low Reynolds number configuration of the case. These circumstances made it necessary to use a very small time step of ∆t = 1e − 7 in order to prevent convergence problems of the solver and inaccuracies in the hydrodynamic force computation. This means that although the simulated time in this case was only ≈ 0.03s it took 300000 time steps of the solver to complete the task. This actual simulation time in our parallel computation depends on the number of MPI-processes used and on the number of elements in the computational domain. When using a job size of 16 MPI-processes this would result in a final computation time of over a week. As an improvement to the usual time stepping method we tried a macro time-stepping scheme. The laminar flow property of the case and similar cases of microfluidics allows us to assume that there will not be rapid jumps in the velocity profile of the flow field and consequently of the hydrodynamic forces. This makes it possible to take a larger time step with the current particle velocity for the particle simulation in the Newton-Euler equations and then computing updated hydrodynamics for the new position of the particle. Thus, the macro time step is a step of just the particle solver component of the CFD-solver with a larger time step. Following the macro time step is a series of iterations of the regular combined CFD-Optics solver with the smaller time step in order to compute the current forces acting on the particle and its velocity more accurately and then doing another macro step. In the iterations of the combined CFD-Optics solver the velocity of the particle gets corrected, but another question is how many steps of the regular solver need to be performed before another macro step can be made. We employed two criteria in our simulations, the first one is a fixed number of iterations between the macro time steps. As a second criterion, we kept the solver iterating until the change in the hydrodynamic forces from one time step to the next fell below a certain tolerance. The results of the simulation using the macro time step are shown in figure 2. In the macro time step case the particle reached the center of the optical trap after 0.0253 seconds using 77 macro time steps and a number of 200 iterations of the regular solver with a time step of ∆T = 1e − 7. With the knowledge that the particle moves faster in the beginning of the simulation and slower towards the end, we adapted a smaller macro time step in the beginning of the simulation and a larger one during the flatter movement curve of the particle. The range of the macro step size was chosen adaptively in the range of [0.0001, 0.0005]. A total number of 23100 time steps were computed using the macro time step scheme which resulted in a significant improvement with regard to the overall computation time (using the same number of MPI-processes) compared to the standard time stepping scheme where 300000 time step were needed. Concerning the accuracy of the macro time stepping scheme we refer to figure 2. We see that in the curve of the macro time stepping scheme the center of the trap is reached in 0.0253 seconds. With regard to the experiment this would be a relative error of 2.3%. This however warrants a closer inspection as we know that with decreasing size of the macro time step the solution converges against the solution of the regular time stepping scheme. As the regular time stepping scheme showed a slightly higher value than the experiment, we know the nominally smaller error of the macro time stepping scheme is not due to superior accuracy, but due to the fact that a larger time step is taken for performance reasons, so that the macro time step approach results in a solution that is smaller than the experimental value and incidentally closer. It remains to note that both approaches produced results within 2 − 3% of the experiment. The macro time stepping scheme can be classified as an explicit Euler stepping scheme and thus shares the advantages and disadvantages of these kind of methods. As can be seen from the trajectory curve the method overestimates the actual velocity in the steep part of the curve which can be compensated by reducing the macro time step size and it also shows a steeper drop of velocity in the dropping part of the curve. Furthermore, despite of the particle remaining at the center of the optical trap with the macro time stepping scheme the particle slightly oscillates around the center of the trap.

Ray Tracing Solver for Non-Spherical Geometries
Before the routines for force calculation on non-spherical objects with triangulated surfaces could be integrated into the overall concept, the underlying routines first had to be verified. For this purpose, a comparison with wave optical solutions [3] was carried out. In addition, the results were compared with a geometric optics approach in which the intersections between beam and surface were calculated analytically. A comparatively small particle size was chosen to investigate the validity of the method at its limits . The result is shown in Fig.  3. For better comparison, the x-component of the trap efficiency is depicted. Here c 0 is the speed of light in vacuum, F x the x-component of the force vector, P the power of the laser and n U the index of refraction of the surrounding medium. The particle was moved perpendicular to the light ray direction. A good agreement with the wave-optical solution could be shown despite the fact that the particle radius of 2λ is relatively small for a geometric optics approach. Furthermore, the numerical aperture (NA) of 1.02 can also be considered relatively small which as a consequence leads to a bigger ray diameter in the focus. A geometric optics approach produces a more accurate result the larger the relation of particle radius r P to the beam waist radius w 0 is. In the other cases in this work we set a value of NA=1.2 with significantly higher particle sizes. Considering the influence of the number of triangles on the result, we see that already for 90 triangles which corresponds to a resolution of 36 • a good agreement with the analytical solution as well as with the wave optical solution is reached. Furthermore, an important parameter is the number of rays needed in the optical force computation to achieve an accurate result. For spherical particles a number of a few thousand rays is sufficient to arrive at the correct solution. For geometrically more complex shapes the number of rays used has to be increased. In the case at hand a number of 10.000 rays provided a basis for accurate and stable computations. An additional consideration is the number of ray reflections used in the computations. For efficiency reasons the aim is to keep it as low as possible and for accuracy reasons to keep it as high as necessary. In our case the beam intensity after three reflections has diminished so far that further reflections can be neglected. An important application of optical tweezers could be the use of micro rotors in microfluidics as a way of transporting fluids. In theoretical considerations analysis of the resulting torque plays a key role. In figure 4 an exemplary result for a torque computation induced by optical tweezers on a micro rotor is shown. For this example a more realistic numerical aperture of 1.2 was assumed. In the figure the three different components of the torque vector are plotted. As can be expected with incoming rays from zdirection the x-and y-components of the torque force are near zero when the rotor is in the center of the optical trap focus. This way in principle a stable rotor positioning in the focus of the laser is possible which is highly desirable when used as an active component of a microfluidic system. In the following we will look at some theoretical considerations of micro rotors in optical traps and construct a corresponding experiment which we then try to replicate in a simulation.

Numerical Simulation of Micro Rotors
An experiment was conducted for the final test case of our combined CFD-Optics solver. In the experiment we triggered rotation of a micro rotor by using optic forces. The micro rotor was embedded in a surrounding medium of a water/tenside mixture. The properties of the mixture are almost identical with those of water and its viscosity was determined to be µ = 1.1 [mP a · s] and in the corresponding simulation we set the fluid density to ρ f = 1 g/cm 3 . The material of the micro rotor as well had a density of ρ rotor = 1 g/cm 3 . We used rotor blades that are attached at different angles in order to get a dependency on the geometry into the configuration. A real micro rotor is shown in figure 5 and a surface triangulation of a micro rotor used in the simulation is shown in figure 6. We used attachment angles of 45 • and 60 • in the experiment as well as in the simulation.  We show the results of the simulation compared to the experimental data in figure 7 where the final angular velocity ω f inal depending on the power of the laser is displayed. We observe that there is a linear relation between the laser power and the final angular velocity ω f inal . We can see that this linear relation is reproduced correctly by the simulation. Furthermore, the relation between the 60 • rotor and the 45 • rotor where the 60 • rotor consistently attains a higher final angular velocity for all power settings of the laser is predicted correctly by the simulation. When looking at the value of the final angular velocity, we see that the simulation computes a higher value than was recorded in the experiment. A possible explanation for the discrepancy is that the surface triangulation of the rotor was not exactly matching the rotor geometry in the experiment. It is worth noticing though, that the computed values are consistently higher in the simulation and the shear relation between the 60 • rotor and the 45 • curves show a good agreement. We can conclude from these simulations that in this form a highly accurate numerical solution could not be computed, but that qualitatively a good predictor for the relevant phenomena could be computed that was able to reproduce geometry dependent correlations.

Conclusion
In the presented work we developed a combined CFD-Optics solver for configurations with spherical as well as non-spherical geometries. The coupling between the CFD-Solver and the ray tracing optics solver was done by injecting a ray tracing step after the hydrodynamics computation step of the CFD-Solver and then adding up the forces. The combined solver was put to the test in different benchmark configurations for which we generated experimental data. As a consequence of our findings in the optic trap setup with a spherical particle we enhanced our simulation procedure by a macro time stepping scheme which could greatly reduce computation time while maintaining good accuracy.
Furthermore, we pursued our second goal which was the inclusion of nonspherical geometries in order to simulate practically relevant configurations. For the optics component of the combined solver an enhanced ray tracing solver based on the octree algorithm was implemented. This approach enabled us to calculate optic forces for surface triangulations with a large number of triangles in an efficient and accurate manner. As test case for non-spherical geometries we conducted an experiment with micro rotors. In this benchmark configuration the solver proved to be able to predict the relevant features and phenomena of the case.