First online X-ray fluorescence characterization of liquid-liquid extraction in microfluidics

Liquid-liquid extraction is a complex chemical purification process, which is associated with many thermodynamic and kinetic values. This makes its application in the recycling industry difficult, as it deals with waste streams that have highly variable compositions. In this regard, modelling an extraction process using microfluidics proves to be a useful approach to allow rapid adaptation to such composition changes, if development can be shown to be more accurate, faster, and safer than the classical batch approach with separate analysis. Here, the first automated microfluidic tool integrated with online X-ray fluorescence (XRF) is reported to study liquid-liquid extraction processes by enabling metal concentration quantification. The measurement is automated and performed for both aqueous and organic phases to improve accuracy. Overall, this fully automated approach shows that: (i) Thermodynamic and kinetic values associated with these processes can rapidly and efficiently be obtained simultaneously (in less than 13 hours with a resulting liquid use of less than 20 mL). (ii) Numerical simulations are consistent with the experimental data and provide rare insights regarding the respective contributions to the overall kinetic of the extraction system.

is highly variable, such as in the recycling industry. For this reason, tools enabling fast development of L-L extraction processes are required. [1] In this regard, modelling an extraction system using microfluidics can be extremely beneficial. For example, it allows for mass-transfer coefficients or kinetics to be studied. This is not possible in the case of emulsion-based studies in which: (i) the two phases contact area is unknown (and change in time) and; (ii) the speed of decantation is too slow to extract kinetics. [2] Moreover, from a hardware point of view, microfluidic systems are compact and relatively cheap compared to larger scale platforms and can be fully automated which makes experiments safer, faster, and more efficient. [3,4] For example, when dealing with hazardous compounds such as nuclear waste, it is useful to be able to enclose an apparatus in a small, shielded compartment. In addition, the sampling volumes are smaller, resulting in lower radioactivity levels and waste. Ultimately, well-known techniques can be newly implemented at the microfluidic scale with the same performances as their macro-scale counterparts. [5] The hardware design of the apparatus is critical for microfluidic L-L extraction as the liquids must first come in contact and then separate efficiently to be collected and measured, either online or offline. Any inter-phase leakage may yield flawed results.
In terms of chip design, guide structure [6][7][8][9][10] and droplet [2,[11][12][13][14][15][16] technologies require a highly stable flow rate with careful injection to maintain separation with higher risk of interface rupture. Recently, Dunne et al. developed a flow technique based on magnetic flow freeing themselves from the excessive hydrostatic pressure stemming from wall friction. [17] Nonetheless, such microfluidic networks with increasing complexity and length still result in higher hydrostatic pressures, which, in turn, could weaken the stability of the flow rate and the oil/water interface, when both fluids are in direct contact. The situation becomes increasingly challenging with a developing viscosity difference between the two phases. Hence, an alternative approach is to use a membrane-based extraction system to support physically the interface. [11,[18][19][20][21] The thickness of the membrane must be as low as possible to limit any additional transfer resistance. In the domain of equilibrium between complex fluids, the implementation of a physical membrane is crucial. [20] For more details on microfluidic L-L extractions, the reader can refer to the following reviews. [1,22] To avoid manual characterization and to exploit fully the automation capabilities of a microfluidic system, researchers implemented online characterization tools in microfluidic circuits. [1,5,15,[23][24][25] Spectroscopic techniques such as Raman, [26,27] infrared [24,[28][29][30] and UV-VIS [31] have been used extensively. However, only Hellé et al. directly applied online characterization for studying L-L extraction processes. [7] In comparison to these methods, X-ray fluorescence (XRF) enables the detection and quantification of a very broad range of chemical elements. The technique is highly selective since multiple elements can be measured simultaneously. Moreover, the heavier the elements, the better the detection. Thus, the nuclear and e-waste recycling industry often benefits from XRF detection systems. The technique is non-invasive and non-destructive regardless of the solvent nature, which is key advantage of in this system. Indeed, due to plasma instability influenced by organic vapor loading, inductively coupled plasma atomic emission spectroscopy measurements are usually unsuitable with organic solvents.
Currently, only a handful of studies have been performed using XRF in microfluidics but their technologies are offline and usually disconnected from any other microfluidic L-L extraction system. [32][33][34][35][36] Hence, in this paper, we report the first automated study using an online XRF spectrometer coupled with a microfluidic Liquid-Liquid extraction chip. It enables unique online dual monitoring of metal concentrations in both liquid phases, during extraction processes. Finally, we pushed the study to investigate the reverse-extraction (R-extraction), hence gathering better accuracy on equilibrium values, as well as rare insights on the contribution of the aqueous/organic interface resistance in the kinetics of the overall process.

MATERIALS AND METHODS
The extraction conditions are based on the work of El Maangar et al. who used a synergistic extractants mixture for extracting lanthanides. [18] We chose Lanthanum, Europium and Ytterbium as the target elements. The extractants are bis(2-ethylhexyl) phosphate (HDEHP) and N,N′-dimethyl, N,N′-dioctylhexylethoxymalonamide (DMDOHEMA). Table 1 details the composition of each phase used for the experiment. To fully demonstrate the capabilities of our system, we performed both extraction and reverseextraction (R-extraction). In R-extraction, the same concentration of metals is loaded into the organic phase ( Table 1). The objective is to study the symmetry of the reaction both in terms of kinetics and thermodynamics.
The concentrations were chosen based on previously published results. [18] All aqueous solutions have a nitric acid concentration of 0.3 mol L -1 . Similarly, all organic solutions contain a mixture of DMDOHEMA/HDEHP 25%/75% in Isane IP175. These conditions were chosen to provide the best range of values to be measured by our system in terms of kinetics and thermodynamics. The concentration of the rare earth elements (REE) was set at TA B L E 1 Composition of the solutions used for extraction and R-extraction 11.11 mmol L -1 for each of them. Using these values, we avoided saturating the extractants (0.9 mol L -1 ). The aqueous solutions were prepared by dilution and dissolution of nitric acid and lanthanide salts. The organic solution containing the extractants was prepared by dilution of both extractants. To prepare the organic solutions loaded with extractants and REE, we performed batch L-L extraction by contacting the aqueous and organic solutions manually in test tubes. The aqueous phase was analyzed by inductively coupled plasma optical emission spectroscopy (ICP-OES) to determine the concentration of REE before and after extraction. We used the concentration in the aqueous phase to calculate the concentration in the organic phase. As shown in Table 2, we obtained organic solutions each loaded with a single lanthanide. The Ytterbium was extracted from an aqueous solution containing only 20 mM to avoid the formation of a turbid 3 rd phase (described in ref [18] ).
These organic solutions were diluted with the pure organic solvent (Isane) with extractant mixture to obtain a solution with 11.11 mM of La 3+ , Eu 3+ , and Yb 3+ that was used for reverse-extraction in the microfluidic system (Table 1). These solutions were also used to prepare the calibration samples for the XRF chip, as described in the Supporting Information.
Apparatus: The experimental microfluidic platform comprised an extraction and a measurement system. As shown in Figure 1, the core of the apparatus was composed of a moving and a static part. The static part was the XRF system, composed of both the detector and the X-ray tube. The moving part was a 3D printed holder mounted on a motorized stage that held an extraction chip and an XRF chip. The stage moved between two positions (a) and (b) allowing to expose different areas of the XRF chip to the X-ray system. Therefore, the measurement is dual because either the aqueous or the organic phase is measured.
To perform L-L extraction in microfluidics, a membranebased technology was used as previously described in detail, studied and validated. [18,20] It was shown that the presence of the membrane avoids the delicate circulating droplet design that cannot exclude surface leaks. [1] To summarize, as shown in Figure 1C, two slabs of poly(methyl methacrylate) (PMMA) clamp the selected porous Polytetrafluoroethylene (PTFE) membrane via screws and silicon sealant. The slabs were each machined with a groove (rectangular section of 200 µm depth, 1000 µm in width, and 171 mm long for the contact area) that, when clamped against the membrane, becomes a sealed microfluidic channel. As shown in Figure 1D, there is one phase flow on each side of the device with a porous PTFE membrane separating the two phases. It is worth mentioning that the membrane is hydrophobic but not oleophobic, which means that the organic phase soaks and penetrates the membrane. This is required, since the two phases require to be in contact. The membrane is 70% porous, 30 µm thick with a pore size of 20 nm. Extraction occurs at the water-solvent interface that exists within the pores of the membrane. With this technology, the interfacial area is controlled. By varying the flow rate, the contact time between the two phases is also varied.

F I G U R E 1 A-B, Top view of the apparatus used for the extraction and XRF experiment:
The motorised stage moves both the XRF and extraction chip. The sketches show the positions that measure either the aqueous or the organic channel. C, Exploded view of the extraction chip (Reprinted from ref. [20] Copyright 2019, with permission from Elsevier) D, Cross-sectional view of the extraction chip, extraction occurs at the interface through the porous membrane. E, A picture of the whole microfluidic platform with the outer chamber doors opened Therefore, kinetic information can be obtained. Also, the capillary forces within the membrane pores and an additional static pressure, prevent the aqueous channel mixing the two phases. Figure 2A shows a side view of the XRF system. The X-ray source and XRF detector both point towards the XRF chip channel ( Figure 2B). The microfluidics XRF chip was 3D printed from Polylactic acid (PLA) with grooves of 0.2 mm in depth and 1 mm wide. This groove design was selected over other designs such as reservoirs (rectangular, spherical or elliptical) to facilitate and quicken the washing of the chip. We found that PLA compatibility with Isane is excellent. Compatibility of PLA with 0.3 M nitric acid makes it necessary to replace the XRF chip after ≈100 hours. The outline of the channel path makes an elliptical shape to match the projected X-ray beam on the surface ( Figure 2C). As shown in Figure 2D, a 7 µm thick polyimide film was glued to seal the grooves and make a microfluidic channel. This film must be as thin as possible to maximize the XRF signal.
As shown in Figure 2E, stainless steel capillaries were glued on the backside of the chip to connect the tubing. The resulting XRF spectrum after background subtraction is shown in Figure 2F. For each element, the spectrum shows the three most intense peaks of the L-transitions family. The analytes, La, Eu and Yb, were chosen because there is little overlapping of their major XRF peaks thus easing spectrum processing and reducing errors.
The entire platform was located within a climatecontrolled chamber where temperature is regulated with a tolerance of ±0.1 • C. All instruments were computercontrolled with our homemade Python software. Therefore, the platform was fully automatized with no human intervention during experiments. Temperature stability was verified by additional temperature sensors.
To study the extraction kinetics, the flow rates were varied from 20 down to 0.7 µL min -1 , which corresponds to contact times of 5 up to 48 minutes, respectively. The flow rates were identical for both aqueous and solvent circuits (ratio 1:1). This range was chosen according to the results reported in the article of El-Maangar et al. for a concentration of 0.3 mol L -1 of nitric acid in the aqueous phase. [18] In order to quantify the elements from the raw spectra, we used a calibration procedure described and further detailed in the Supporting Information. In other words, one XRF spectrum yields three concentration values for La, Eu, and Yb after processing with the calibration. We also took advantage of the dual information (organic and aqueous) provided by the system to correct the concentration values following a probabilistic approach, which is also further described in the Supporting Information. [18,37] F I G U R E 2 A, Side-view of the XRF system, (B) zoomed view of the measurement area (C) Top-view of the XRF chip channel path, the outline of the ellipse shows the projected X-ray beam exposure. D, Cross-sectional view of the XRF chip liquid channel (not to scale) (E) Side photograph of the XRF chip showing the inlet and outlet ports. F, XRF spectrum obtained from a solution containing La, Eu, Yb injected into the XRF chip

RESULTS AND DISCUSSION
The sketch of the microfluidic circuit used in this experiment is shown in Figure 3A. The extraction chip and the XRF chip were connected in series. Collection vials were used at the end of the circuit. For the aqueous path, a back-pressure of ≈60 mbar was adjusted to contain the organic phase in the respective channel. Indeed, due to the oleophilic character of the PTFE membrane, the organic phase would leak into the aqueous channel without additional static pressure. Moreover, the backpressure helped to equilibrate an eventual pressure difference arising between the organic and aqueous channels due to viscosity differences of changing phases. Indeed, higher viscosity liquids (e.g., organic phase), induce higher back-pressure at equal flow rate and may disturb the interface within the membrane. Figure 3B shows the REE concentration versus time of the aqueous and organic phases for all studied ions (La 3+ , Eu 3+ , and Yb 3+ ) obtained for various contact times during extraction and R-extraction. As a reminder, the solutions F I G U R E 3 A, Schematic of the microfluidic circuit used for the experiment. B, Concentration of rare earth elements versus time at various flow rates for both extraction and reverse extraction. The purge of the XRF chip is highlighted in green. The region of interest where the measurements were retained is highlighted in red used for this experiment are detailed in Table 1. For each contact time/flow rate, a specific sequence of instruction was sent to the instruments: first, a purge of the XRF chip with pure solvent was initiated automatically at the start of each measurement point to collect a reference spectrum (green zone in Figure 3B). Thereafter, the liquid valves were toggled to connect the XRF chip to the extraction chip and the system started injecting within the extraction chip, hence inducing a flow in both extraction and XRF chips connected in series. The system entered a transition period where both liquid injection frontlines must travel throughout the extraction chip, the tubing and the XRF chip. As expected, longer transition times were needed at lower flow rates. From the syringe end to the collection vial the volume of the circuit was around 100 µL. Using this value, the control program automatically calculated the required time to reach stable conditions based on the input flow rate. We found that stable conditions were reached after the liquid travelled through the entire circuit once. It is worth mentioning that only the XRF chip was purged with pure solvents. Indeed, the high flow rate (100 µL min -1 ) used for purging the XRF chip was incompatible with the extraction chip stability.
Once stable conditions were reached, we calculated the output concentration at each contact time by averaging the last 10 measurement points (red zone in Figure 3B), when a plateau was reached. Overall, the experiment lasted about 13 hours resulting in less than 20 mL of liquid waste for both phases and 400 spectra were collected (120 seconds per spectrum). A non-microfluidic/manual approach would have taken significantly more time and waste. The experiment was repeated at four temperatures from 20 to 35 • C for both extraction and R-extraction.
The raw data shown in Figure 3B are already extremely informative and give qualitative indication of the extraction efficiency in terms not only of yield, but also timescales involved. Every 1-2 hours, one equilibrium on a given point in the phase diagram was measured. [38] Moreover, the stabilization of the curves enables the evaluation of the thermodynamic equilibrium in complete safety. This allows to evaluate the free energy of transfer of three different solutes simultaneously. Then, after washing and purging the chip, another point in the phase diagram or another temperature can be studied. Also, the simultaneous analysis of ions with different ionic radii allows to directly determine the relation between distribution coefficients and surface charge of the extracted species. This was shown to be crucial and was never investigated in detail earlier, to the best of our knowledge, due to the time-consuming experimental campaigns. [39] Figure 4 shows transformation of raw data in concentrations of each REE as a function of the contact time during extraction and R-extraction. The thermodynamic equilib-F I G U R E 4 Concentration of Rare earth elements as a function of the contact time between the two liquids in the microfluidic chip at 25 • C. The curves are fitted using the simulation data rium is achieved after around 50 minutes for all studied cases.
The asymptotic behavior of extraction and R-extraction ensures equilibrium, a point that can be difficult to determine in the commonly used batch extraction, especially in the case of very slow kinetics. The self-consistency of the results of the microfluidic design proposed here allows a more reliable extrapolation to the pilot scale than with classical methods.
The extraction of REE significantly increases from La 3+ to, Eu 3+ , and Eu 3+ to Yb 3+ , which is primarily linked to the reduction in ionic radii along lanthanides series from La 3+ -6 coordinate (103 pm) to Yb 3+ -6 coordinate (86.8 pm). The decreased ionic radius along lanthanide series is caused by the poor shielding of 4f electrons, also called lanthanide contraction, which results in an increased effective nuclear charge from La 3+ to Yb 3+ . The more positive effective nuclear charge contributes to stronger bonding with the extractants and organic solvents that leads to higher extraction in organic medium. [40] Unlike most Liquid-Liquid extraction studies, great attention is focused on measuring the concentration of the species in both the aqueous and the organic phase. Such precise measurement is crucial to deduce accurate value of Gibbs free energy ΔG, using the general formula: Where R is the gas constant, T is the temperature in kelvin, [REE] org,eq and [REE] aq,eq are the REE concentrations at equilibrium (t ∞ ), in the organic and aqueous phases, respectively. The step in chemical potential shown in Figure S5 is the driving force of extraction, [41] and it includes not only the classical supramolecular complexation terms, but also interfacial and electrostatic terms that are strong in the solvent phase. [42] Since the apparatus is in a temperature-controlled chamber, rarely described entropy-enthalpy compensations are more precisely obtained than in any previously reported results. [43][44][45] Figure 5A shows the free energy as a function of the temperature ranging from 20 • C to 35 • C and indicates that the free energy associated with Europium is lower since the extraction ratio is higher. Since Ytterbium is heavily extracted, the values are highly variable with high measurement errors. Thus, it is shown as a red area located below 5 kJ mole -1 , due to the strong extraction yield specific to Ytterbium. Furthermore, a decomposition using van't Hoff method, allows to obtain a first evaluation of the temperature effect on complexation, interface, and solvent restructuration. Focussing mainly on the results obtained for Lanthanum and Europium, Figure 5B shows the calculated reaction enthalpy and entropy using the van't Hoff equation. The results indicate a slightly exothermic reaction with a negative entropy.
To investigate the reactions kinetics further, a numerical simulation of the extraction using the method described in Theisen et al. [20] was performed. The calculation considers diffusion of the ions through the liquids and ionic exchange at the organic/aqueous interface. The calculations were performed using Scilab. Table 3 lists the parameters used for the simulation. The distribution coefficient is variable depending on the chemical elements, the temperature, and the extraction/R-extraction. The input concen-F I G U R E 5 A, Free energy ΔG as a function of temperature for both extraction and R-extraction (B) Enthalpy and entropy calculated for Lanthanum and Europium. The error bars are calculated for a 90% confidence interval trations were either set at 0 or 11.11 mol L -1 for extraction or R-extraction. Although diffusion coefficients in aqueous media are well tabulated, diffusion coefficients values of metal ligands in organic media are scarce. The chosen D org value is estimated by using the values given in Touré et al. [46] for Neodymium extracted by HDEHP in dodecane. By taking these values as references, we estimated a D org of 7.25 × 10 -11 m 2 s -1 assuming an inverse linear relationship between the viscosity and the diffusion coefficient (Stokes-Einstein equation [47] ). Viscosity measurements and calculation are described in the Supporting Information. Figure 6A shows an example of spatial mapping of the ion concentration across both channels. As the liquids travel through the channels, the ions are transferred from aqueous to organic phase, and when ΔG is favorable (such as in this example), transfer into the organic phase still occurs along the channel despite its already high concentration in the organic channel. By setting the flow rate used in the experiments, we obtain the simulated kinetics curve shown in Figure 4 as dashed and dotted lines. The fitting of the experimental data is performed by varying the transfer coefficient at the interface k v . Using this approach, we

F I G U R E 6
Simulation results, (A) 2D mapping of the ion concentration in the channels. B, Calculated kinetics resistances after fitting of the experimental data with the simulation versus temperature gain rare insights into the ionic exchanges occurring at the interface.
To interpret the simulation results, we calculated the kinetics resistances associated with each stage of the extraction path: R aq , R int , R mem , and R org associated with the aqueous phase, the aqueous/organic interface phase, the membrane, and the organic phase, respectively (Table  S3). R int is the only resistance that drives the kinetics reactions based on chemistry. The other resistances are all based on ionic diffusion. This approach enabled us to determine whether the kinetics of a reaction is limited by diffusion or other origins such as the interface or the membrane. Figure 6B shows stacked bar plots of all resistances mentioned above versus temperature for lanthanum and europium. The R-extraction bars are filled with diagonal lines. Expectedly, R aq is much smaller than R mem and R org since D aq is ≈10 times higher than D org .
Even though the thickness of the membrane was chosen to be as low as possible (30 µm), its resistance still accounted for ≈30% of the total resistance. As demonstrated in the study from Theisen et al. 13 , R mem will increase at lower distribution coefficient. Nonetheless, our simulation enables us to estimate R mem and shows that it is of the same order of magnitude as R org . We observe overall that the diffusive organic resistance (R mem + R org ) accounts for at least 60% of the total resistance. This finding indicates the importance of the slow diffusion of the metal complexes in organic media in view of process upscaling. Regarding the interface resistance, we note three trends: (i) Higher temperature seems to lower R int (ii) R int contribution to the total resistance is lower for R-extraction and for Europium. In many cases, R int is close to 0 which indicates that the reaction is entirely diffusion limited. In other cases (e.g.,: La extraction), R int contribution can reach up to 30%. In those cases, the reaction is limited not only by diffusion but other origins as well. (iii) the total kinetics resistance appears to be lower for R-extraction than extraction. This trend arises from variations in R int and in distribution coefficients. This resistance asymmetry, especially for R int , could be explained by the presence of a multi layered structure of extracting molecules called interphase, located on the organic side at the water/organic interface. These structures could potentially induce such an asymmetry between extraction and R-extraction. Indeed, in the standard approach since Gibbs, water-air and water-solvent interfaces are "covered" by a dense layer of surface-active molecules. Measurement of surface tension allows precise determination of area per molecule, once more than 99.99% of contaminant surface active molecules have been taken away. [48] When neutron reflectivity became available, this was clearly shown as being an oversimplification: the most common case was adsorption of flat bilayers, that is, de facto a triple layer instead of a monolayer at the water-air interface. [49] More detailed studies evidenced multi layers of several tens of nanometres, which were present in the form of a surface-induced phase transition. Near the macroscopic water/solvent interface, multi layers are formed with nano-structures reminiscent of lamellar liquid crystals. [50,51] The whole volume, in which the solvent has a microstructure different from the bulk, is called the interphase and has been the object of intense investigation for the past 40 years. [52] The interphase is responsible for slowing down mass transfer, and can sometimes be directly observable optically. [53] Precise measurement of the thickness of the interphase is possible via Fabry-Perot interferometry and it has been shown that its thickness depends on the proximity of a thermodynamic phase boundary, in close analogy with the penetration length known in the case of thermotropic liquid crystals. [54] The equilibrium thickness diverges when a third phase phenomenon is approached, as has been directly deduced from nanometric surface wave determination. Therefore, the anisotropy and increase of interfacial resistivity measured by our device allows the design of process flowsheets that are safe from third-phase accidents. Overall, the microfluidic apparatus, combined with the numerical simulation, yields rare and useful insights into the kinetics of an extraction system and thus at the mesoscale.

CONCLUSION
Current Liquid-Liquid extraction processes lack the means to assess process windows quickly. This is one of the main issues for enabling efficient and fast recycling process development in hydrometallurgy, both in R&D and industrial production. This paper reports a first promising approach to studying Liquid-Liquid extraction processes using a novel XRF apparatus integrated into a microfluidics setup. Dual measurement on both aqueous and organic phases enables online quantification of metals, and therefore measurement of thermodynamic and kinetic values. The system described here performs extraction and characterization simultaneously. Solvent extraction and R-extraction of Lanthanum, Europium and Ytterbium were studied. The platform is fully automated, with extraction data for La, Eu, and Yb being obtained in 13 hours with less than 20 mL liquid waste. Kinetics and thermodynamics were analyzed using simulation and analysis tools perfectly adapted to Liquid-Liquid extraction. The contribution to the overall kinetics from various sources of resistance can be estimated, which delivers a counter-intuitive observation that the interface resistance can be asymmetric when considering extraction versus R-extraction. This work thus demonstrates the capability of the platform to study an L-L extraction system quickly, safely, and efficiently and to deliver results, which are otherwise difficult, if not impossible, to obtain especially at such speed. From an industrial recycler's point of view, this tool could significantly improve their capabilities to deal with variable waste sources. From an R&D point of view, screening, studying novel processes or tweaking existing processes becomes easier and more reliable, since human intervention and offline characterization are reduced.

Chip fabrication
The extraction chips were micro-machined from PMMA blocks. [18,20] The membrane was purchased from Cobetter Filtration with a thickness of 30 µm, a pore size of 20 nm, and a porosity of 70%. Using silicon glue and screw clamping, the membrane seals off and separates the channels. The advantage of this chip design is that it can be reopened, cleaned, and reused multiple times, only disposing of the membrane, which is not reusable. The XRF chip was 3D printed using the finest settings using an Ultimaker 3 extended in PLA. A polyimide film of 7 µm in thickness was bonded on top of the channel using the UV Katiobond 4594 epoxy glue. We used XRF liquid sample analysis cups to tighten the film before bonding. The steel tips (used as connections) were also bonded with the same UV epoxy.

Apparatus hardware
The entire platform is located within a Memmert, IPP 750 Plus temperature-controlled chamber. The chamber is wrapped with a 0.5 mm thick lead sheet to fully protect the users from ionizing radiations ( Figure S1). A 5 mm Tin plate was used to block most of the X-ray beam after going through the XRF chip. The microfluidic tubing is made of PTFE (0.45 mm ID). For liquid injection, syringe pumps were used (NE-4000 World Precision Instruments) with Hamilton 5 mL Gastight Syringes (Model 1005). The connections were made with stainless steel tips from Nordson (0.33 mm ID). The liquid valves were base mounted with three-ports (2-ways SMC LVM105R). To measure both phases and move the system a Thorlabs motorized stage was used (DDSM100/M). The customized parts were 3D printed using an Ultimaker 3 Extended. The entire apparatus is computer controlled using Python 3+.

XRF system
The X-ray fluorescence system is composed of an X-ray source and an X-ray detector. The X-ray tube is a Magnum 50 kV from Moxtek with a Silver anode. The X-ray detector is an X-123 SDD X-ray spectrometer from Amptek. The acquisition conditions were optimized to obtain the highest signal to noise ratio when measuring Lanthanum, Europium, and Ytterbium: 20 kV at 60 µA, an integration time of 120 seconds and a 0.2 mm-thick aluminum filter. Please note that, as X-rays are ionizing radiations, safety measures must be put in place to protect employees, which include safety interlocks, a beam stop (Tin plate, 5 mm thick) and a supplementary shielding of the outer shell of the incubator chamber containing the apparatus using lead sheets (0.5 mm in thickness). To avoid lead toxicity issues, the lead sheets must be coated.

C O N F L I C T O F I N T E R E S T
The authors declare no conflict of interest.

D ATA AVA I L A B I L I T Y S TAT E M E N T
The data that support the findings of this study are available from the corresponding author upon reasonable request.