Competing Marangoni effects form a stagnant cap on the interface of a hydrogen bubble attached to a microelectrode

The formation of a stagnant cap on a bubble attached to a microelectrode is studied by means of numerical simulation including both thermoand solutocapillary effects. Recently, strong Marangoni flow in an electrolyte around electrogenerated bubbles was observed by Yang et al. [1] and Massing et al. [2]. High local current density above the electrode led to Ohmic heating of the electrolyte near the bubble foot and resulted in thermocapillary convection. However, the experimentally observed Marangoni convection can be predicted better if a stagnant cap of surfactants on the top of the bubble is assumed. The present work provides evidence that supports this hypothesis and simulates the stagnant cap utilizing two methods. In the first method, a critical stagnation angle θs , which marks the border of the stagnant cap, is specified. At the top of the bubble above the stagnation θs the interface motion is suppressed whereas at the bottom of the bubble below the stagnation θs the thermocapillary effect dominates. In the more extensive second method, a transport equation for the surfactant concentration on the bubble interface is included. In this method, the thermoand solutocapillary effects compete along the entire interface of the bubble. As a result, the top part of the bubble interface will stagnate. We quantify the rigidity of the bubble interface by a dimensionless number, the elasticity number. This elasticity number is the ratio of the solutocapillary stress due to surfactant variation to the thermocapillary stress due to temperature variation. The relevant temperature variation is due to Ohmic heating and is observed to scale with the square of the potential difference. As a consequence, the Marangoni velocity is also found to scale with the square of the potential difference. Additionally, the forces acting on the bubble before detachment are analysed. Special attention is given to the Marangoni force that is more dominant than reported previously because we included the force caused by the uneven pressure distribution along the bubble interface. The pressure distribution is uneven due to a secondary Marangoni vortex in the wedge between the bubble and the electrode. Furthermore, a general framework for Marangoni numbers is introduced to quantify the effect of each specific source of surface stress variation upon the spatial distribution of each variable governed by a convection-


Introduction
Bubbles adhering to electrodes or accumulating near electrodes avert efficient electrolysis. By reducing the active electrode area or decreasing the effective electrolyte conductivity bubbles contribute to significant losses during electrolysis. Quick removal of those bubbles, whilst maintaining a high production rate is there-liquid interfaces are known to induce capillary flow also known as Marangoni convection. Marangoni convection can be found in a wide range of gas-liquid systems from the famous tears of wine and coffee stain effect to nucleate pool boiling and flow surrounding electrogenerated hydrogen bubbles [1,[3][4][5] .
Experimental investigation of nucleation, growth and detachment of bubbles near an electrode can be challenging due to the vast amount of bubbles that are generated and their seemingly random spatial locations during typical electrolysis operation conditions. Therefore, many studies investigate individual bubbles that are generated on nano-or micro-electrodes. Bubbles growing on these electrodes are generated in an a priori determined location on the small electrode area, which makes optical experimentation feasible.
Preliminary studies of nanobubbles generated on nanoelectrodes were performed by Luo and White [6] , Perera et al. [7] and Chen et al. [8] . These studies provide measurements of stable hydrogen nanobubbles and pave the way towards a better understanding of bubble nucleation and growth. Besides nanoelectrodes, Fernández et al. [9] used electrochemical measurements, frequency analysis and high-speed photography to construct pictures of growth and release of microbubbles from platinum (Pt) microelectrodes. They identified a critical surface tension σ = 0 . 070 N / m below which a transition occurs from periodic to aperiodic detachment of microbubbles. Yang et al. [10] studied the dynamic nucleation, growth and detachment at similar (Pt) microelectrodes. They concluded that periodic current oscillations, resulting from the periodic formation and detachment of single bubbles, allow the bubble lifetime and size to be predicted from the transient current. This work was followed by a series of investigations that focus on detachment specifically due to Marangoni convection around these bubbles [1,2,11,12] . In the latter, different microelectrode sizes are investigated numerically. Also, a model of a planar electrode with a periodic bubble distribution is proposed, aimed at identifying more industrial applicable design parameters. Marangoni flow around a growing bubble at an electrode surface is known to delay detachment of bubbles and to influence fluid dynamics, heat and mass transfer of rising bubbles [13][14][15][16][17] . To our knowledge the first experimental observation of Marangoni convection during electrolysis was done by Guelcher et al. [18] . They found that thermocapillary convection was responsible for the mutual attraction between generated bubbles. Recently, Yang et al. [1] experimentally observed Marangoni convection during electrolysis near a bubble growing at a microelectrode. Using Particle Tracking Velocimetry (PTV) convective vortices were observed around the bubble. After improving the experimental setup with high-speed imaging employing particle image velocimetry (PIV) and using temperature-sensitive luminescent tracer particles both velocity and temperature around the bubble were measured. By comparing experimental results with detailed numerical simulations Massing et al. [2] concluded that the Marangoni flow was the result of thermocapillary convection induced by Ohmic heating of the electrolyte near the electrode. The simulated temperature profile along the bubble interface is in good agreement with experimental observations. The simulated convection showed good agreement with experimental observations near the foot of the bubble. However, significant discrepancies were found above the center half of the bubble. These discrepancies were hypothesized to be the result of other surface tension effects like the electrocapillary effect, whereas the solutocapillary effect was ruled out. These two effects will be revisited in the present work. In addition, we argue and provide supporting simulation evidence that the detailed experimental results of Massing et al. [2] can be best explained by the assumption of a stagnant cap on top of the electrogenerated bubbles. Bashkatov et al. [11] reported that oscillating detachment behaviour can be attributed to the competition between thermo-and electrocapillary convection, hinting to a possible explanation for the earlier mentioned discrepancies. The Marangoni convection around a bubble is the source of a force acting on the generated bubble. The existence of this additional force, the so-called Marangoni force, that retards or enhances bubble detachment was mentioned by numerous authors [1,2,11,12] .
Despite that, a complete description of the forces acting on an electrogenerated bubble before and during detachment is still lacking. Forces acting on the bubble include buoyancy, surface tension, and pressure contact forces. The buoyancy force and pressure contact force are known to lift the bubble whereas surface tension and hydrodynamic forces often retard the bubble detachment [19,20] . Analysis of detachment forces acting on electrogenerated bubbles is rare in literature. However, we can draw a useful analogy between electrogenerated bubbles and vapor bubbles during boiling [21] . Thermocapillary convection near a vapor bubble generated by strong local boiling is qualitatively comparable to thermocapillary convection near an electrogenerated bubble, which enables us to use a more developed field of research with more available literature [12] . Therefore, we can use relevant equations for forces acting on bubbles from literature about strong (thermocapillary driven) boiling. For example, the Fritz radius and other correlations for predicting the bubble departure radius can be used [22,23] . Sometimes these works also include the solutocapillary effect. For example Chen et al. [15] have recently shown that including both thermo-and solutocapillary Marangoni forces in the force balance of the bubble improves the estimate of bubble departure radius.
A stagnant cap on a bubble can be formed when contaminants are present in the liquid and consequently adsorb to the gas-liquid interface, making it partially immobile. Frumkin [24] was the first to observe a gradient in the monolayer of adsorbed contaminants at the interface of a fluid. In a later stage Levich [25] elaborated on the physico-chemical nature of this phenomenon. A model that describes the transport of the contaminants was developed and called "the stagnant cap model". This model was later improved upon by Griffith [26] , Sadhal and Johnson [27] and He et al. [28] . The surfactant molecules adsorbed to the interface are entrained by the flow towards the bottom of a rising bubble. As shown on numerous occasions the terminal velocity of bubbles in contaminated water decreases with increasing contaminant concentration due to additional drag to the stagnant part of the bubble [29] . However, surfactant concentration fields have only recently been visualized, showing the formation of a stagnant cap and reduced terminal velocity of rising bubbles [30] .
In our work, the stagnant cap formation is not due to the motion of the bubble through the liquid, but rather due to the temperature-driven Marangoni convection that transports contaminants to the top of the bubble. In our work, the partial stagnation of the interface is modelled in two ways. In the first model, a stagnation angle θ s is prescribed that defines the position of stagnation on the bubble interface. At the contaminant-free part of the bubble interface, a thermocapillary stress condition is applied, whereas at the stagnant cap a zero stress boundary condition is applied. The second model is more advanced because it incorporates a partial differential equation for the transport of the insoluble surfactant along the bubble interface. In this model, a solutocapillary effect is included, which competes with the thermocapillary effect. Shmyrov et al. [29] and Homsy and Meiburg [31] investigated the formation of such a stagnant cap in a two-dimensional geometry, a Hele-Shaw cell. This geometry is favorable compared to a bubble because the gas-liquid interface is not curved, which significantly simplifies the governing equations as well as experimental observations. They studied the extent of surface stagnation due to insoluble surfactants convecting over the gas-liquid interface. This stagnation zone depends on a single parameter E, the elasticity number, that describes the competition between thermocapillary and solutocapillary effect. Shmyrov et al. [29] also describes phase transitions in the layer of surfactants, and convincingly shows an agreement between theory, experiment and numerical simulations. In the present study, the numerical study performed by Shmyrov et al. [29] is used as a benchmark study for the implementation of a stagnation zone on a gas-liquid interface. For this benchmark study, we present a correction on the set of governing equations. Additionally, we incorporate a similar insoluble surfactant transport model in our numerical method. With the help of this implementation, we relate the point of stagnation on the bubble interface to the competing thermo-and solutocapillary effect. Additionally, we define an elasticity number E b that quantifies the rigidity of the bubble interface due to the transport of surfactants.
The paper is structured as follows: in Section 2 , we introduce the Marangoni effect and its origin. In Section 3 , we present the Marangoni flow near the electrogenerated bubble foot of a bubble with a prescribed stagnation point. In Section 4 , we describe a model where the Marangoni flow around a bubble is computed and where the dynamic stagnation point is determined by the transport of insoluble surfactants. In Section 5 we conclude our findings and address future research recommendations.

Marangoni effect
The surface tension σ of a gas-liquid interface depends on the temperature T , on the potential φ and on a species concentration vector c , consisting of n concentrations c i . Using a Taylor expansion, the change of the surface tension ( σ ) due to a changes of the temperature ( T ), the potential ( φ) and the concentrations ( c i ) is approximated by where σ T , σ φ and σ c , i are the partial derivatives of surface tension with respect to temperature, potential and concentration of species i . To asses the magnitude of Marangoni numbers and surface tension changes we use temperature, potential and concentration changes from simulations that will be discussed in more detail in Section 3 .
The Marangoni effect is a manifestation of the stress at a gasliquid interface due to gradients in surface tension. This stress leads to convection in the neighbouring phases. As a surface tension gradient finds its origin in temperature, potential or concentration gradients we assign different names to these separate origins. We distinguish: 1. thermocapillary convection, due to temperature gradients at gas-liquid interface, 2. solutocapillary convection, due to gradients in one or more species concentrations, 3. electrocapillary convection, due to gradients in the potential at the gas-liquid interface.
To estimate the importance of Marangoni convection on the distribution of variable ζ (temperature or a species concentration), the Marangoni number Ma ζ is defined as where ∇ s σ is the surface tension gradient with respect to spatial coordinates along the surface and σ is the change in surface tension over a typical length scale L, μ is the viscosity of the fluid and D ζ is the diffusion coefficient of variable ζ . We remark that we do not use ζ = φ, because the potential φ is governed by local electroneutrality and the resulting Laplace equation is therefore by definition not influenced by the velocity of the where where the first subscript ζ indicates the distribution of interest and the second subscript ξ indicates the origin of the Marangoni stress. Therefore ζ is either temperature or concentration, whereas the variable ξ is a variable of the set [ T , φ, c 1 , ...., c n ] . The sum over ξ runs over all variables in this set. σ ξ = ∂σ ∂ξ is the partial derivative of surface tension. The Marangoni number given in Eq. (4) , can be used to estimate the importance of the gradient in surface tension due to any gradient in ξ on establishing a solution for the transport equation of variable ζ . For example Ma T ,φ describes the relative importance of Marangoni convection due to a gradient ∇φ along the interface compared to thermal diffusion.
In other words, a large Ma T ,φ indicates that, compared to thermal diffusion, Marangoni convection induced by the potential gradient has a large effect on the temperature distribution. By assessing the different magnitudes of σ ξ ∇ s ξ , we can compare the relative importance of multiple Marangoni effects. Since it has already been shown by Massing et al. [2] that thermocapillary convection is present during electrolysis we can asses the relative importance by comparing σ ξ ∇ s ξ with σ T ∇ s T . In case | σ ξ ∇ s ξ | << | σ T ∇ s T | we can neglect the effect and in case | σ ξ ∇ s ξ | >> | σ T ∇ s T | we can neglect the thermocapillary effect.
Therefore in our analysis, we start by estimating the magnitude of the respective Marangoni numbers utilizing Eq. (4) before implementing Marangoni convection in respective transport equations of our numerical solver. In the next paragraph, we discuss the respective origins for Marangoni convection in more detail and we estimate their relative importance.

Thermocapillary effect
The Marangoni number that describes the influence on temperature distribution in the special case where there is only a thermocapillary effect, i.e. the species concentration and potential are constant over the interface of a bubble, can be written as where the characteristic length scale is the diameter d b of the bubble. The derivative of surface tension to temperature is σ T = ∂σ ∂T = −0 . 16 · 10 −3 N / mK [2] . We estimate the magnitude by estimating the gradient in temperature using ∇ s T ≈ T /d. Based on simulations by Massing et al. [2] the temperature difference along the bubble interface at the bubble foot is T ≈ 14 K . Other properties in Eq. (5) of the electrolyte can be found in Table 3 . The thermocapillary Marangoni number is Ma T , T ≈ 1 . 8 · 10 4 , which indicates strong thermal convection in the wedge area near the bubble foot. The Marangoni convection, due to the thermocapillary effect has a dominant effect on the temperature distribution around the bubble.

Solutocapillary effect
Solutocapillary effects can originate from gas concentration, electrolyte concentration and surfactant concentration gradients at a gas-liquid interface. It was found by Lubetkin [13] that gases present in electrolysis influence the surface tension. The gradients of the gas concentration can be predicted well with numerical methods, which has also been done in previous studies. Massing et al. [2] concluded that the influence of these gases on Marangoni convection would be minimal. They also concluded that the effect of variations in electrolyte concentration on the Marangoni convection can be ignored.
However, the role of contaminants/surfactants in previously done experiments was not mentioned by Massing et al. [2] and cannot be easily simulated without a priori assumptions. Interestingly, a small surfactant concentration c surfactant = 10 −7 mol / m 3 can significantly influence the flow behaviour around drops and bubbles [30,32] . In the case of surfactants, it is convenient to use a surface concentration , which is expressed in mol / m 2 . The surfactant Marangoni number is defined by where the partial derivative of the surface tension to surface concentration is σ = ∂σ ∂ ≈ −78 . 9 Nm / mol [29] . We can compute the gradient of surfactants along the gas-liquid interface with a set of transport equations that are addressed in Section 4 . The influence of surfactants on bubbles during electrolysis is a novel field of research. Lubetkin [13] mentioned the importance of surfactants in electrolysis systems and the possibility of the formation of a stagnant cap. A stagnant cap is a layer of surfactant molecules that occupies a part of the bubble interface. In contrast to the surfactantfree interface of the bubble, this layer suppresses the interface motion. Stagnant caps at bubble interfaces are encountered during the rise of bubbles through contaminated systems (with numerous surfactants). Surfactants adsorb to the bubble interface and due to motion of the interface are convected to the bottom of a rising bubble, where they form a stagnant cap. This stagnant cap reduces the rise velocity of bubbles significantly because the change from mobile to partially immobile interface increases the drag force acting on the bubble. Although there exist numerous models for the formation of a stagnant cap, there is no consensus on a definite model especially because measurement of surfactant concentration on bubble interface is a difficult procedure [25][26][27]33] . In Appendix A , we introduce a model that was proposed by Shmyrov et al. [29] and Homsy and Meiburg [31] that describes the formation of a stagnation zone due to the transport of insoluble and uncharged surfactants over the interface of a two-dimensional slot. Furthermore, in Section 4 we address the formation of a stagnant cap on a bubble interface. For now it is reasonable to assume that the changes in surface concentration can be in the order of Monolayer is the surface concentration necessary to cover the bubble with a layer of surfactants [29] . This leads to a Marangoni number Ma , = 6 . 4 · 10 5 which indicates that convection is dominant in the transport of surfactants along the interface.

Electrocapillary effect
The electrocapillary effect is a phenomenon that arises at the gas-liquid interface, due to the presence of surface charge. Compared to the thermocapillary and solutocapillary effects, the electrocapillary effect is less understood. It is well-known that bubbles can carry surface charge, but the origins of this charge remain disputed [34][35][36][37] . Bashkatov et al. [11] concluded that the surface charge on a hydrogen bubble in a 1M H 2 SO 4 solution was of the order σ φ = ∂σ ∂φ ≈ 2 · 10 −3 C / m 2 to predict the observed detachment diameter with their model. They assumed that this surface charge was distributed homogeneously over the gas-liquid interface of the bubble. On the contrary, in the simulations by Carnie et al. [37] surface charge was allowed to transport along the mobile interface.
Additionally, Bateni et al. [38] and Sato et al. [39] reported a positive surface charge of σ φ of 10 −7 C / m 2 . In the present work we use the values obtained by Bateni et al. [38] and Sato et al. [39] . We base this choice on the fact that the proposed surface charge by Bashkatov et al. [11] leads to significant surface tension variations. The position at which such surface tension variations take place is in the wedge between the bubble and electrode. The electrocapillary effect then has a profound contribution to the Marangoni convection; M a T ,φ and M a ,φ are then strongly negative ( −4 · 10 4 and −5 · 10 7 respectively). This implies that the electrocapillary effect is the dominant capillary effect causing the Marangoni velocity at the interface u M . Additionally, the electrocapillary Marangoni velocity u M points in the same direction as the thermocapillary effect, tangential to the bubble interface towards the top of the bubble. Massing et al. [2] has already convincingly shown that especially in the wedge between the bubble and electrode the thermocapillary effect without an electrocapillary effect is strong enough for the motion of the bubble interface. The surface charge can also change if the surfactants at the interface are charged. Assuming that a positively charged surfactant remains homogeneously distributed at the bubble interface the surface charge leads to stronger electrocapillary convection, also in the wedge mentioned above. However, Carnie et al. [37] reported that surface charge of surfactants can be inhomogeneously distributed, which further complicates the problem.
Johnson [40] introduced an electrocapillary Marangoni number to estimate the importance of surface tension induced convection to the formation of a potential field. However, we assume that there is electroneutrality in the electrolyte and therefore there is no velocity component in the equation for computing the potential φ. In other words the electrocapillary effect is present but can only influence the distribution of temperature and surfactants.

Combined Marangoni effects
As mentioned before, Marangoni convection often has a combination of origins. To assess which of those are dominant we investigate the derivative of surface tension to variable ξ multiplied by the respective change of variable ξ along the bubble interface, σ ξ ξ . We also deconstruct the contributions of the thermosoluto-and electrocapillary effect to the combined Marangoni numbers Ma T , ξ and Ma , ξ , where the summation symbol indicates that we sum add up all three capillary effects. Based on this deconstruction we can ignore the influence of the electrocapillary effect because of its relative insignificance to all Marangoni numbers, see Table 1 where M a ζ ,φ << M a ζ , and M a ζ ,T . On the contrary, the thermo-and solutocapillary effect are dominant in establishing a temperature and surfactant distribution. Therefore, these two capillary effects should be considered in the describing equations.

Bubble with prescribed stagnation point
The work of Massing et al. [2] convincingly demonstrates the importance of the thermocapillary effect near the bubble foot. The temperature along the bubble matched the experimental results. However, the model fails to reach a quantitative agreement on the velocity in electrolyte outside the wedge between bubble and electrode. We argue that this agreement can be obtained when we assume that there is a stagnant cap on top of the electrogenerated bubble. In this section, we introduce a numerical model that simulates Marangoni convection around a bubble with stagnant cap. In paragraph 3.1 , we define the case and the geometry. In paragraph 3.2 , we introduce the governing equations. In paragraph 3.3 , we describe the numerical method used for solving these equations and discuss its accuracy. Finally, in paragraph 3.4 the results of simulated Marangoni flow with a prescribed stagnation point are discussed.

Case definition
The geometry is based on the experimental setup used by Massing et al. [2] . In this experiment the flow around a growing bubble generated on a microelectrode was studied. Massing et al. [2] also simulated the flow around this bubble, in a late stage of the growth cycle. In these simulations they used a fixed bubble size. The flow was simulated around this non-growing bubble fixed to a microelectrode with a contact angle of θ c = 4 .  Table 2 other specifications of the geometry are listed. The simulations are performed on a 2D-axisymmetric grid. This allows us to reduce the simulation time of the problem significantly.
The novelty of this geometry in comparison with that of Massing et al. [2] is the stagnant cap present on the bubble interface.
The size of this stagnant cap is defined by the stagnation angle θ s , which in Fig. 1 is 90 • . This implies that half of the bubble is covered in surfactants. In the special cases where the stagnation angle θ s = 4 . 2 • or 180 • the entire interface of the bubble is covered with surfactants or the case is identical to the one simulated by Massing et al. [2] . The boundary conditions that are enforced on the prescribed stagnant cap are introduced in paragraph 3.2.4 .
In this paragraph we discuss the simulation assumptions made. When the bubble was d b = 1 . 120 mm in the experiment, the growth rate of the bubble d d b / dt ≈ 0 . 166 mm /s, which is much smaller than the measured Marangoni velocity at the lower half of the bubble and smaller than the Marangoni velocity at the top half of the bubble, at least there where the velocity was measured. Therefore, we conclude that the growth rate of the bubble is insignificant for development of the flow field except perhaps near the top of the bubble where no experimental data is available. We further illustrate this by comparing the characteristic timescale for bubble growth in the experiment t exp , half of the bubble. Because we observe t exp , Marangoni < t exp , growth the flow field will develop quickly compared to the growth rate of the bubble. In other words the flow field close to the bubble is quasi steady around t/τ b = 0 . 8 . This justifies neglecting the bubble growth rate observed in the experiment and the use of a fixed bubble size in our simulations [2] . Close to the bubble the same convective timescales apply for the temperature field. So we can conclude that the temperature close to the bubble is also quasi steady compared to the growth of bubble. Far away from the bubble where there is no Marangoni flow, the diffusive timescale is dominant and this timescale is larger than the time scale of the bubble growth. Therefore far away from the bubble we cannot simulate the temperature profile accurately. However, most of the generated heat escapes the domain via the micro electrode and copper element. Therefore, we expect that the temperature far away from the bubble (close to the anode) does not influence the temperature close to the bubble. For the same reason we can therefore reduce the height of the domain to H = 5 · 10 −3 m which is sufficiently high to capture the flow phenomena close to the bubble.

Case specific details
During the experiments, a 1 M H 2 SO 4 electrolyte solution was used and a constant Faradic current of −2 . 95 mA was maintained at a constant voltage, which is in accordance with the measured current in this part of the bubble cycle [2] . In our simulations, a similar current of −2 . 98 mA was maintained for a potential difference of −4 . 45 V between anode and cathode. At the electrolyte quartz interface and the sidewall r = R the normal derivative of φ is set to zero.
In determining the temperature throughout the domain we use the same ρ, c p and D T as Massing et al. [2] which are mentioned in Table 3 . The Péclet number inside the bubble is Pe ≈ 0 . 1 implying that diffusive heat transport is dominant inside the H 2 bubble [2] . Therefore, we neglect the convective term inside the H 2 bubble, such that the bubble is treated as a solid part of the domain.

Governing equations
To determine the Marangoni flow around the bubble solving the equations for potential, temperature and flow velocity is necessary. The equations and boundary conditions that determine the solution are introduced in the following paragraphs.

Primary current distribution
The primary current density distribution → j in the electrolyte is computed from the gradient of the potential, → j = κ el ∇φ, (7) where κ el is the electric conductivity. The potential distribution φ in the geometry is computed from the Laplace equation:

Heat transfer
As Massing et al. [2] argued, diffusive transport is dominant inside the H 2 bubble and we can therefore neglect convection in this domain. The temperature distribution T (r, z, t ) is governed by where → u , ρ, c p , κ, Q are the velocity, the density, heat capacity, thermal conductivity and heat source respectively. It is well known that electrochemical heating of the electrolyte occurs near electrodes. This heating is especially pronounced when the local current density → j is high. To compute the electrochemical heating Ohm's law is used. The corresponding heat source in the electrolyte is then In the bubble and in the solid parts of the domain Q = 0 is assumed.
We use the same boundary conditions as Massing et al. [2] did; T = 293 . 15 K at the bottom (the horizontal exterior walls of the copper and quartz glass), all other exterior walls are insulating. Therefore, heat inside the domain will not increase indefinitely because the heat created due to Ohmic heating of the electrolyte is allowed to diffuse out of the domain through the horizontal exterior walls of the copper and quartz glass elements.

Laminar flow
To determine the flow velocity where μ, p and p ref are the dynamic viscosity, the pressure and the reference pressure in point A (see Fig. 1 ). At the bubble interface the normal component of the velocity vanishes and the tangential component is determined by the boundary conditions specified in the next paragraph. At all other boundaries except for the symmetry axis the no-slip boundary condition is enforced

Bubble with prescribed stagnant cap
In case a prescribed stagnant cap is assumed, the bubble interface is split into a mobile region (free of surfactants) and an immobile region (covered with surfactants). At the mobile part of the interface the tangential stress is determined by the thermocapillary effect where θ c is the contact angle and θ s the stagnation angle. At the immobile interface the tangential stress is prescribed to be zero: where ˜ r = r 2 + ˜ z 2 with ˜ z = z b − z and z b = 558 . 5 μm at the bubble center, and θ = arccos ( ˜ z / ˜ r ) are spherical coordinates. u θ is the tangential velocity at the bubble interface. At angles θ c ≤ θ ≤ θ s , we assume that the stress at the interface is zero because the thermocapillary effect is suppressed by the presences of surfactants. The motion of the interface is therefore no longer determined by a temperature gradient. In other words, thermo-and solutocapillary effects com pete with each other resulting in zero stress on the stagnant cap. In Section 4 this competition is addressed in more detail.
From the experimental measurements performed by Massing et al. [2] the stagnation angle can be estimated, since we expect the interface motion to diminish at angles θ s < θ ≤ π . The stagnation angle observed from these experiments is θ s ≈ 50 • to 70 • .

Numerical method
The aforementioned set of governing partial differential equations is solved using a finite element method implemented in COMSOL® Multiphysics version 5.5 for spatial discretization [41] . The backward Euler scheme is used for time discretization. In this paragraph we provide a verification of the implemented numerical method by means of comparison to aforementioned numerical results of Massing et al. [2] and a grid convergence study.
To produce an accurate solution to the set of equations, we require the solution to be independent of the number of grid elements. At the same time we strive to limit the number a grid elements to reduce simulation time. We inspect the accuracy of the solution by considering the absolute velocity | → u | in the vicinity of the bubble (5 μm from the interface), because here gradients in temperature, potential and velocity are largest. Fig. 2 a shows the results of the grid refinement study, and we conclude that N = 10 0 0 is sufficiently large for a grid independent solution on the scale of the figure. We also observe that there is a good match with the numerical data from Massing et al. [2] for the lower half of the bubble. In the top half of the bubble small differences are observed, those are created by differences in mesh and simulation time. We performed transient simulations similar to those performed by Massing et al. [2] . The time in these simulations is denoted by t. Note that the transient behavior in the simulation cannot be compared to the transient behavior in the experiment i.e. t = t exp and t = 0 does not correspond to the time at which the bubble diameter is zero. Instead, t = 0 corresponds to the starting conditions of the simulation which are fixed bubble size, constant temperature throughout the domain and zero velocity. The results from Massing et al. [2] were obtained for simulations times of t = 1 s . They also performed simulations with a simulation time of t = 6 s , and they concluded that the temperature profile did not change. For the velocity profile, the transient in the simulation takes longer, specifically at the top of the bubble where we had already indicated that the Marangoni velocity is up to one order of magnitude smaller. In Fig. 2 b the temporal evolution of the velocity profile along the bubble is plotted. The simulation are done for N = 10 0 0 and t = [0 . 5 , 1 , 3 , 10] s where we indicate that at t = 3 s the solution does not change significantly anymore. The difference between simulations of t = 1 and 3 s is small and it is difficult to conclude which of the two is the best compared to the experiment as the differences clearly occur in the top half of the bubble where in the experiment the growth of the bubble might have had a small effect on the flow field. In the rest of this work, N = 10 0 0 is used and the simulation time is set to t = 3 s unless mentioned otherwise.

Results
In this subsection we present the simulation results of the simple stagnant cap model introduced in Section 3 . In Fig. 4 the simulated velocity profiles at a distance of 5 and 35 μm from the bubble are compared to the experimental result by Massing et al. [2] . Due to the stagnant cap on at least the top half of the bubble surface, the profiles converged more rapidly in these cases, so that a simulation time of 1 s was sufficient. The results show a range of stagnation angles θ s , including θ s = 180 ( i.e. no stagnant cap).
At the stagnation point, a sharp transition of the boundary condition is applied, as shown in Eqs. (13) and (14) . The bottom part of the bubble the interface is surfactant-free and thus only the thermocapillary effect applies there. The surfactants reside on the top of the bubble interface (the cap). There, they counterbalance the thermocapillary effect and the total stress at the interface reduces to zero.
Like observed by Massing et al. [2] the simulated temperature profile agrees well with the experimental measurements of the temperature, see Fig. 3 . Based on Fig. 4 we can conclude that the addition of a stagnant cap with an a priori defined stagnation angle improves the agreement with experimental measurements of the velocity. It becomes evident that a stagnant cap of θ s ≈ 55 • is the best choice to predict the Marangoni flow around the bubble in this experiment [2] . Because of the remarkable agreement between experiment and simulation, a stagnant cap was likely present at the bubble interface in the experiments. Subsequently, a stagnant cap eludes to the presence of surfactants at the interface even-though surfactants were not mentioned in the work of Massing et al. [2] . The electrolyte in the experiment might have been slightly contaminated by surfactants. In Section 4 , we will revisit this topic and include a surfactant transport at the bubble interface to account for the formation of a stagnant cap, which is a dynamic process. In that model, it is not necessary to prescribe a stagnation angle θ s . Instead we can prescribe an initial concentration of surfactants on the interface, similar to what Shmyrov et al. [29] propose.

Marangoni force
The thermocapillary effect forces the motion of the gas-liquid interface. This motion exerts viscous stress on the fluid resulting in vortices forming around the bubble. This viscous stress gives rise to a force acting on the bubble. By integrating the stresses over the bubble interface this Marangoni force on the bubble can be calculated. Massing et al. [2] did this by integrating the shear stress over the interface. However, they did not include the non-viscous part of the stress tensor (the pressure part of the stress tensor). At first sight, this seemed a reasonable assumption because the pressure appears to be constant along the bubble interface. However, while investigating electrodes of different sizes, Hossain et al. [12] found a small second vortex in the wedge area between electrode and bubble. This second vortex is created because a temperature 'hot spot' is located above the electrode corner on the bubble interface, see Fig. 5 a. The location of this 'hot spot' is consistent with the geometrical equation shown in fig. 6 in the work of Hossain et al. [12] (the temperature 'hot spot' is found at an angle θ m ≈ 6 • for α = r b /r el = 11 . 2 ).
Starting from this temperature 'hot spot' the temperature decreases along the bubble interface in two directions. This temperature gradient along the interface drives the thermocapillary motion of the interface. Consequently, the interface motion leads to the motion of liquid towards the contact point. Subsequently, the liquid is forced into this small wedge and it accumulates there leading to an increased pressure, see Fig. 5 b. Because the fluid cannot accumulate indefinitely in the wedge area, it starts flowing away from the high pressure along the electrode surface, as can be seen from the flow pattern in Fig. 5 b. Consequently, a re-circulation area or vortex is observed at the bubble foot. Important for the calculation of the complete hydrodynamic force on the bubble is that we take the observed variations in pressure into consideration. Interestingly, the non-viscous part of the stress tensor amounts to a significant part of the hydrodynamic force, F H . The z-component of the force on the bubble excluding buoyancy and surface tension effects is defined by where S 1 is the bubble surface, p l is the liquid pressure at the interface, p ref = 101325 Pa is the reference pressure, and τ is the viscous part of the stress tensor. F H is the formal force that is due to the motion of the liquid. Since all motion in the present case is due to the Marangoni effect, we call

Bubble detachment forces
The Marangoni force has been associated with an increase in bubble detachment diameter for electrogenerated bubbles [2,[11][12][13]20] . Interestingly, only Granados Mendoza [19] , Baczyzmalski et al. [20] , Duhar and Colin [42] addressed the other forces that are acting on the bubble. The resultant force in the vertical z-direction acting on an electrogenerated hydrogen bubble is given by where F B is the buoyancy force, F H is the hydrodynamic force (see Eq. (15) ), F s is the surface tension force and finally F cp is the contact pressure force. The z-components of these forces are given by where ρ g , p g , ρ l , p l , → g , r c , S 2 and θ c are the gas density and pressure inside the bubble, the liquid density and pressure, the gravitational acceleration vector, the contact radius, the contact area and the contact angle, respectively. F s and F H are the main forces that keep the bubble attached to the surface, whereas the buoyancy force and contact pressure force pull the bubble from the surface. We computed the Marangoni force for a range of bubble sizes r b , Fig. 6 . It should be noted that for small bubbles with a bubble radius r b < 360 μm the assumption of a fixed bubble size is less realistic. In all simulations, the bubble shape was assumed to be spherical, and the contact line pinned to the same position at (r, z) = (41 , 0) μm . The contact angle then increases for decreasing bubble radii. A stagnation angle θ s = 55 • was used in these simulations. In Fig. 6 also the resultant force F res is displayed. Small bubbles ( r b < 430 μm ) are pushed towards the electrode ( F res < 0 ). Large bubbles ( r b > 430 μm ) with θ c = 4 . 8 • should detach from the electrode, which is not observed in the experiments by Massing et al. [2] . In their experiments detachment occurs at a bubble radius r b ≈ 650 μm . We hypothesize that detachment does not occur between bubble radii 430 μm < r b ≤ 650 μm because the contact angle θ c , that is pinned at r c , starts to increase as a neck starts to form between bubble and electrode. An increase in contact angle will lead to an increase in the surface tension force F s , that will retard the bubble from detaching. Theoretically this increase in contact angle could continue until θ c = 90 • where the surface tension force F s is maximum. In reality, the detachment apparently occurs before this contact angle is reached, which might be due to an interfacial instability onsetting before θ c = 90 • . Because the contact angle at the moment of detachment was not measured, we compute the contact angle for 430 μm < r b < 650 μm from the requirement F res = 0 . The contact angle then increases to θ c = 28 • at the experimentally observed departure radius of the bubble r dep ≈ 650 μm . We note that our reasoning implies that, very close to the bubble foot, the assumption of a spherical bubble does not hold for r b > 430 μm .
Therefore, it is advised that in the future the bubble is also simulated with a growing and deformable interface. This could influ-ence the results when detachment radius surpasses r b > 430 μm . This deformation could influence the velocity profile in the wedge area and it could influence the pressure distribution. Furthermore, Bashkatov et al. [11] observed the formation of a carpet of microbubbles beneath the large detaching bubble, which could also influence the detachment and force balance significantly. Addressing these problems, in the form of simulations with a growing and deformable bubble interface, is a pivotal step towards understanding bubble detachment.

Bubble with dynamic stagnation point
In Section 3 a simplified model with a prescribed stagnation angle θ s was used to simulate Marangoni convection around the electrogenerated bubble. The a priori assumption of a stagnation angle beyond which the thermocapillary stress is counterbalanced is ad hoc . Modeling surfactant transport and the associated solutocapillary effect on the bubble surface is a more extensive way to describe the prevailing surface dynamics. We investigate this approach for an insoluble surfactant, so that there is no adsorption and desorption of surfactants. The only input parameters that are required are the average surfactant concentration, the diffusion coefficient of the surfactants and the partial derivative of surface tension to surfactant concentration σ . In this section we assume that the surfactant was oleic acid. This choice is favourable because this surfactant is insoluble and the dependency of surface tension to surfactant concentration is well documented [29] . We illustrate that the competition between thermo-and solutocapillary convection is responsible for the formation of a stagnant cap and thus has a significant influence on the Marangoni convection around the bubble. In Section Appendix A a benchmark study is performed to validate the implemented method.

Theory
In addition to the set of equations introduced in Section 3.2 , an equation for the transport of surfactant along the bubble interface is needed. The surfactant transport equation is given by where D = 10 −9 m 2 / s is the diffusion coefficient of the surfactants on the interface. Initially, at t = 0 in the simulation the surfactant molecules will be homogeneously distributed such that the initial concentration everywhere on the interface is 0 .

Surfactant phases
When the surfactants are transported along the interface a variety of surfactant phases can be observed when a stagnant cap forms. Shmyrov et al. [29] introduced the surfactant-free state, gaseous state, liquid-expanded state and condensed state. When surfactants are transported to the top of the bubble they are pressed closer together, see Fig. 7 . When compression on the top of the bubble occurs, the mutual interaction between surfactants changes. For oleic acid the mutual interaction between the molecules is repulsive, and therefore the mutual repulsion between the surfactants becomes stronger. This increase in mutual interaction force is often referred to as surface pressure . The introduction of surfactant phases aids in modeling this increase in surface pressure as is demonstrated in the work of Shmyrov et al. [29] . In the surfactant-free state, the surface pressure is zero ( i.e. the surface tension is not reduced by present surfactants). On the surfactant-free interface, the only capillary effect present is the thermocapillary effect. In the gaseous state, the surface pressure ∝ σ and the surfactants reduce the surface tension. In the gaseous phase, both the thermo-and solutocapillary effect are present. More interestingly, they balance each other as surfactant and temperature gradients have opposite signs. The surfactant concentration increases along the interface. This increase in continues up to the point where the surfactants are so densely packed that their mutual surfactant repulsion increases. We can identify this point with a phase transition surface concentration * = 0 . 38 · Monolayer = 2 . 731 · 10 −6 mol / m 2 , where the interface enters the liquid-expanded phase [29] . In the liquid-expanded case the surface pressure ∝ (k + 1) σ , here k is the factor by which the repulsive force increased. In the case of oleic acid this factor k = 10 . The condensed phase is a purely theoretical state because the mutual repulsion between surfactants in this phase goes to infinity. Shmyrov et al. [29] found that the stagnation point in a Hele-Shaw slot coincided with the transition from a surfactantfree to a gaseous surfactant phase. For further information on the surfactant, the reader is referred to the work of Shmyrov et al. [29] and to Appendix A . We hypothesize that a similar stagnation angle θ s will coincide with the transition from surfactant-free to gaseous phase on the bubble interface.
To implement both thermo-and solutocapillary effect we prescribe a stress condition on the bubble interface. Similar to the implementation of the thermocapillary effect the solutocapillary effect is implemented via a tangential stress at the interface of the bubble. Taking into account the various states that occur in the surfactant layer at the bubble interface, the stress is given by with Here δ = 0 . 05 is the width of the slope in the error function that accounts for the transition from the gaseous state to the liquidexpanded state that occurs when exceeds * [29] . Note here that f = 0 as long as < * .

Numerical settings
Eq. (20) does not convergence easily. Stability issues arise from a low surfactant diffusion coefficient D . In pre-modelled transport solvers often stabilization methods are used to artificially increase diffusion. We manually implemented an upwind type artificial diffusion where h = 5 · 10 −5 m is the representative grid size, which reduces if the grid is refined. For infinitely fine grids, D a → D . The secondterm on the right-hand side is small if the velocity is small, i.e. there where the physical diffusion is important and convection unimportant. The simulations were performed until 3 s, and the velocity, temperature and surfactant concentration profiles shown are converged. It should be clarified here that the average surface concentration 0 of insoluble surfactants is very large in the initial stage of the bubble cycle and rapidly decreasing afterwards because of the bubble growth. However, in the final stages of the bubble growth the change in bubble radius and therefore the change in average surface concentration is small. Therefore, in our simulations 0 refers to the average surface concentration for fixed radius r b . In the initial stages of the growth cycle the solutocapillary effect would be more dominant and would suppress interface motion. In this work our conclusions are limited to the distribution of surfactants for a fixed bubble size with a diameter that corresponds to the final stages of the bubble cycle. The evolution of the surfactant distribution during the bubble growth is outside the scope of this work.

Results
We compare the velocity and temperature profiles to the profiles measured by Massing et al. [2] . The surfactant concentration is used to determine the stagnation angle θ s at the bubble interface. Fig. 8 shows the velocity distributions at 5 and 35 μm from the bubble. One can clearly observe a reduced velocity in the top part of the bubble, indicating a stagnation of the interface. It is also clear that by increasing the initial concentration at the bubble interface the stagnant cap will grow larger. We can recognize this stagnant cap by identifying where | → u | ≈ 0 . It is evident that the presence of surfactants does not significantly influence the velocity at the bubble foot θ < 20 • . Higher along the bubble surface the surfactants have stronger reducing effect on the velocity, as surface motion is suppressed by the solutocapillary effect. An initial concentration 0 = 0 . 5 * shows the best agreement with experiments.
We should mention that there is no certainty about which type of surfactant was present in the experiment. These results illustrate the importance of a small 0 ≤ 10 −6 mol / m 2 surface concentration of insoluble oleic acid molecules, as they clearly form a stagnant cap. The material properties that would change in case we are dealing with other insoluble surfactants are the monolayer concentration * and the partial derivative of surface tension to surface concentration σ . In Fig. 10 we have indicated how doubling of σ leads to the formation of a larger stagnant cap for any given initial concentration. Also, from Fig. 10 we can observe that if we were dealing with a surfactant that has a larger monolayer concentration than oleic acid, the cap would become smaller.
Temperature variations along the bubble interface are caused by Ohmic heating of the electrolyte. This Ohmic heating is pronounced above the corner of the electrode, as we saw in Fig. 5 a. It was established by Hossain et al. [12] that the position where the current density reaches its maximum is the location where Ohmic heating is most pronounced (a temperature 'hot spot'). Evidently, the temperature will be high in the wedge area between electrode and bubble. This temperature 'hot spot' will then result in two vortices as was already shown in the previous section, Fig. 5 a. In Fig. 9 a, the temperature 5 μm from the bubble is plotted for the dynamic surfactant cap model. A good agreement with experimental measurements is obtained from the simulations for all initial surface concentrations 0 . We observe that an increase in initial concentration only has a slight influence on the temperature distribution on the bubble. We observe a relatively strong decrease of temperature around the angle where interface becomes stagnant, see inset of Fig. 9 a. This relatively strong decrease is caused by the transition from primarily convective to primarily diffusive transport of heat. The top of the bubble is dominated by diffusive heat transport, while in the surfactant-free area convection dominates the transport of heat. This temperature drop is equivalent to the drop observed by Shmyrov et al. [29] and Homsy and Meiburg [31] and is discussed in A.3 . Note that the temperature drop and transition from surfactant-free to gaseous surfactant state do not  coincide because the temperature was measured 5 μm from the bubble interface.
Given the presence of surfactants on the bubble interface and a decreasing temperature towards the top of the bubble, the surfactants are pushed along the interface towards the top of the bubble. The concentration of surfactants increases towards the top of the bubble, see Fig. 9 b. At the top of the bubble the surface concentration reaches a maximum, while at the bottom of the bubble the surfactants are absent. From Fig. 9 b one can obtain the stagnation angle θ s that corresponds to an initial concentration 0 / * i.e. the angle at which 0 / * ≥ 0 . 01 . This is shown in Fig. 10  The larger the initial concentration, the more surfactants are compressed into a small surface at the top of the bubble. As a result, at an initial concentration of 0 / * = 0 . 7 and 0.9 the local concentration at the top of the bubble exceeds the phase transition concentration * . Therefore, when > * , the surfactants are in the liquid-expanded state. The surfactants can thus be brought into a liquid-expanded state if there is a large initial concentration. Another way in which the surfactants can be brought into a liquid-expanded state if the balance of thermo-and solutocapillary effect shifts towards stronger thermocapillary convection. We will address two examples where this balance is shifted in the next paragraph by varying the potential applied over the electrolyte.

Electrolysis at various applied potentials
Yang et al. [1] investigated the maximum velocity at 35 μm from a bubble and the current density for different applied potentials. They found an increasing Marangoni velocity for an increasing applied potential. At a higher potential difference the current density increases. The higher current density results in stronger Ohmic heating of the electrolyte at the bubble interface. The temperature and temperature gradient along the bubble interface consequently increase as shown in Fig. 11 a for three applied potentials. The temperature along the bubble interface is maximum near the electrode edge at an angle θ ≈ 6 • . At this point we respectively observe a temperatures ranging from of the potential. It becomes evident that the maximum temperature increases with a factor 4 due to the doubling of the applied potential. On account of a larger temperature, the thermocapillary convection on the bubble interface becomes stronger. Consequently, higher velocities are observed at the bubble interface and bulk, see Fig. 11 b. We also observe that the location of the stagnation of the interface changed, revealing a shifted balance between thermo-and solutocapillary convection. This shifted stagnation angle and capillary balance can also be observed in the location of the surfactants at the interface, see Fig. 12 .
Shmyrov et al. [29] and Homsy and Meiburg [31] encountered similar behaviour in a Hele-shaw cell. In this cell, they applied a linear decreasing heat flux to a flat interface covered with surfac-  tants. Increasing the magnitude of this flux led to the movement of the stagnation point x s (the coordinate tangential to the flat interface), i.e. it reduced the stagnant area. Although, in the case of a hydrogen bubble on a microelectrode we encounter a heat source Q in the electrolyte instead of a heat flux through an interface, we still find an analogy between the two problems which is the point of stagnation on the interface, either x s or θ s . Increasing the heat source is equivalent to increasing the heat flux in the Hele-shaw cell and leads to a smaller stagnant cap, i.e. a larger θ s . Shmyrov et al. [29] and Homsy and Meiburg [31] defined the elasticity number E, a dimensionless number that describes the ability of the surfactant layer to compress under the influence of the other interface stresses for example thermocapillary stress, electrocapillary stress or viscous stress exerted by the fluid on the interface. In our case, the compression of surfactants at the interface is caused by thermocapillary stress, and we can write the elasticity number for the compression on the interface of the bubble as where T and are variables that can be estimated beforehand. Shmyrov et al. [29] estimated ≈ 2 0 , which is a reasonable assumption for low initial surfactant concentrations 0 , see Fig. 9 b. For larger initial concentrations 0 → * this assumption becomes less accurate and → 0 . To estimate the temperature difference T along the interface we consider Eq. (9) . The temperature distribution in the electrolyte in the wedge between bubble and electrode is determined by diffusion and convection. To determine which of the two is dominant we investigate the convective and diffusive transfer of heat with corresponding length scales where the d 1 ≈ 10 −2 · d is the convective length scale (the length of the wedge along the wall and bubble interface), d 2 ≈ 10 −3 · d is the diffusive length scale (the width of the wedge between the wall and the bubble interface) and u m ≈ 0 . 02 m / s . This implies that the transport of heat in the electrolyte is dominated by diffusion in the wedge between bubble and electrode. Consequently, to derive an expression for the temperature variation we neglect the convective term in Eq. (9) . The heat source is estimated to is the length scale of the potential gradient. For a potential difference whereas potential differences of φ = −2 . 225 and −8 . 9 V results in T ≈ 3 . 4 and 55 K . This is in agreement with the findings of three simulations presented in Fig. 11 a where the maximum of the T profile along the bubble interface is proportional to ( φ) 2 . A similar proportionality is found for the velocity at the interface of the bubble where the proportionality factor is k 1 ≈ 0 . 01 due to the ratio of the normal (boundary layer thickness) and tangential (bubble circumference) length scales. In Fig. 11 b, we observe that the maximum velocity is indeed proportional to ( φ) 2 . The elasticity number E b of Eq. (24) can now be rewritten as such that the temperature difference is eliminated from the equation. This shows that the elasticity of the surfactant layer is inversely proportional to ( φ) 2 , i.e. the higher the potential difference, the stronger the surfactants are compressed. Using Eq. (28) we can, before simulating the case, find the balance between thermo-and solutocapillary effects for any initial surfactant concentration 0 and potential difference φ. For an initial concentration 0 = 0 . 5 * and potential difference φ = −4 . 45 V the elasticity number E b = 0 . 1 which indicates that the surfactants are strongly compressed. In the simulation where the φ = −8 . 9 V , the elasticity number is E b = 0 . 025 i.e. the surfactants are even stronger compressed. However, for a potential difference φ = −2 . 225 V the surfactants are less compressed as the elasticity number is E b = 0 . 4 . For very small potential differences, where E b > 1 , the thermocapillary effect lacks strength and is unable to compress the surfactants. The surfactants will maintain their initial distribution and at the entire interface of the bubble no stress is applied i.e. the stagnant cap is covering the entire bubble. Fig. 12 shows the surfactant concentration along the bubble interface. An increased potential difference leads to a steeper surfactant distribution, i.e. the surfactant are pushed more vigorously to the top of the bubble. The surfactants are therefore closer packed together and the interface reaches the liquid-expanded phase. Similarly, Shmyrov et al. [29] and Homsy and Meiburg [31] concluded the elasticity number E determines the level of compression and the stagnation point at the interface.

Conclusions
Our work shows that Marangoni convection near electrochemically generated bubbles is a result of the thermo-and solutocapillary effects at the bubble interface. The competition of these capillary effects results in the formation of a stagnant cap at the top of the bubble. This stagnant cap suppresses interface motion in the top of the bubble, while the bottom part of the bubble interface is mobile and drives a Marangoni flow. A stagnant cap originates from the compression of surfactants to a specific area on the bubble interface, in our case the top. When the entire bubble interface is covered by surfactants a monolayer is formed. The entire interface of the bubble in this case is stagnant. The addition of surfactant to an electrolyte solution therefore suppresses bubble interface motion.
Both of the two presented simulation methods that predict Marangoni convection around the bubble are a significant improvement upon existing models. Specifically, because the simulated velocity of the fluid agrees with the experimental measurements along the entire interface of the bubble. At the same time, simulated temperature distributions along the interface match accurately.
The first method prescribes a stagnation angle θ s on the bubble interface. The stagnation angle can be estimated from experimental results or used as a fitting parameter. The stagnation angle that provided the best match with experiments was θ s = 55 • . This first method is not computationally demanding but requires the measurement of the stagnation angle which may vary between experiments and electrolysis conditions.
The second method is more complicated because it also simulates the dynamic formation of a stagnant cap consisting of insoluble surfactant molecules. The oleic acid molecules are compressed and move to the top of the bubble, where the solutocapillary effect balances the thermocapillary effect and a stagnant cap is formed. It is found that the initial concentration of 0 ≈ 0 . 5 · * resulted in the best agreement with the experiment. Such an initial concentration corresponds to a stagnation angle of θ s = 57 • .
The Marangoni flow around the hydrogen bubble resulted in a Marangoni force that retards bubble detachment. A newly obtained insight is that the non-viscous part of the stress tensor influences this Marangoni force significantly. The resulting increase in Marangoni force occurs due to a small vortex structure in the wedge area between the bubble foot and the electrode. The Marangoni force was computed for several bubble radii. For the specific case r b = 560 μm the Marangoni force was determined to be F M = 3 . 68 μN , almost five times larger than previous reports. This large difference is due to the non-viscous contribution which accounts for 86% of the total force. Four forces determine the bubble detachment, of which the Marangoni and surface tension forces are the dominant retarding forces. It is suggested that above a certain diameter, the surface tension force increases with increasing bubble diameter, due to the formation of a neck with an increasing contact angle. The maximum contact angle that is reached is θ c = 28 • . This contact angle was computed without adaptation of the spherical geometry of the bubble for the formation of the neck and the deformation of the interface due to the pressure generated by the Marangoni flow. Therefore it is commendable to allow for surface deformation in future investigations of detachment.
This work has focused on microelectrodes and it confirms that a high current density above the corner of the electrode is the origin of the Marangoni convection in the electrolyte. This triggers the thermocapillary flow at the bubble interface and results in Marangoni convection around the bubble. In our work, we observe that the heating of the electrolyte above a microelectrode increased quadratically with the applied potential. This leads to an increase in Marangoni convection which also scales quadratically with the applied potential. Maintaining a low cell voltage and local current density in electrolysis cells is thus a method to suppress bubble interface motion. In future work, we will investigate if, for different sized electrodes, similar results can be obtained.

Declaration of Competing Interest
The authors declare the following financial interests/personal relationships which may be considered as potential competing interests: The second author (A.W.Vreman) is employed by Nouryon, a company selling specialty chemicals.  project funded by The Netherlands Enterprise Agency (RVO) and Nouryon.

Appendix A. Hele-Shaw slot with dynamic stagnation point
In Section 3 we introduced Marangoni convection around a bubble with a prescribed stagnation angle. Although we mentioned that surfactants at the gas-liquid interface form this stagnant cap, the surfactants are not taken into further consideration. The model is a rough simplification and neglects the dynamic behaviour of surfactants at the interface. To capture this dynamic behaviour, the surfactant transport along the gas-liquid interface of the bubble was modeled in Section 4 . The COMSOL model in Section 4 was inspired by the work of Shmyrov et al. [29] , who did not use COMSOL but an in house code. For the sake of completeness and to build confidence in our implementation, we present the simulations we performed for the Hele-Shaw slot configuration introduced by Shmyrov et al. [29] in this Appendix. The Hele-Shaw slot is a simpler configuration than the case of the bubble in the electrode, because the gas-liquid interface in the Hele-Shaw slot is not curved but flat. In this quasi two-dimensional domain Marangoni convection due to a temperature and surfactant gradients is simulated. The Hele-Shaw geometry allows for easier experimentation and a multitude of theoretical en numerical simplifications to the Navier-Stokes equations [31,43] . First we introduce the Hele-Shaw case (A.1) . In paragraph A.2 we address the governing equations. In paragraph A.3 we explain the physics underlying the formation of a stagnant cap utilizing the results of a parametric studies of initial surfactant concentration and the elasticity number, respectively.

A1. Case definition
The Hele-Shaw slot is a cuboid with length, height and width L : H : 2 d, respectively (see Fig. A.13 ). We assume that this cuboid is narrow such that L, H >> 2 d. The cuboid is filled with a liquid, and is open at the top surface where there is a gas-liquid interface. The surface at the top of the cuboid is heated in experiments with a lamp. This lamp is designed to provide a linear decreasing heat flux from left to right at the interface. Additionally, a surface concentration of surfactants is present on the gas-liquid interface. In this benchmark study oleic acid molecules are chosen, which are insoluble and thus only exist at the gas-liquid interface of the domain.
Given the presence of surfactants and a linear decreasing heat flux along the gas-liquid interface, a stagnant cap forms on the surface of the Hele-Shaw cell. The linear heat flux is the driving force that initiates motion at the interface. Due to presence of surfactants, the thermo-and solutocapillary effects are in competition. Worth mentioning are the variety of surfactant phases observed along the gas-liquid interface when a stagnant cap forms. Shmyrov et al. [29] shows the existence of a surfactant-free, gaseous state, liquid-expanded state and condensed state. As surfactants are pressed closer together and therefore their mutual interaction is more pronounced. For oleic acid and many other surfactants this implies that the repulsive force between the surfactant molecules increases, which is often referred to as surface pressure. The introduction of surfactant phases aids the modeling variations in surface pressure [29] . Obviously, in the surfactant-free state the interface does not experience any surface pressure, so then the thermocapillary effect dominates. In the gaseous regime the surface pressure ∝ σ ; when the surfactant is in this state the thermo-and solutocapillary effect balance each other. In the gaseous state the surfactant concentration rapidly increases along the interface. This increase in continues up to the point where the surfactants are so densely packed that their mutual surfactant repulsion increases, more precisely the derivative of the surface pressure with respect to strongly increases. We can identify this point with a phase transition surface concentration * = 0 . 38 · Monolayer = 2 . 731 · 10 −6 mol / m 2 , where the interface enters the liquid-expanded phase. In the liquid-expanded case ∝ kσ . The condensed phase is purely theoretical state with a mutual repulsion between surfactants going to infinity. This repulsion distribute the surfactants homogeneously over the interface.
The Marangoni flow induced by thermo-and solutocapillary effects are in competition. To quantify this competition Shmyrov et al. [29] and Homsy and Meiburg [31] introduced two dimensionless numbers: the initial concentration 0 and the elasticity number E, E = Surfactant Marangoni forces Thermal Marangoni forces = 2 σ 0 κ σ T dA (A.1) While Shmyrov et al. [29] used a trigonometric velocity profile in the shallow channel, we use the more physical parabolic velocity profile also used by Bratsun and De Wit [43] . Unfortunately, we could not reproduce several pre-factors of terms in the governing equations in Shmyrov et al. [29] , even not if we substituted the trigometric profile. For these reasons, our results are quantitatively somewhat different from those in Shmyrov et al. [29] , but the conclusions remain the same. It is found that the governing equations for the numerical implementation by Shmyrov et al. [29] were not entirely correct and therefore the following section states a set of equations we believe to be correct. Although we obtain the same qualitative conclusions as Shmyrov et al. [29] quantitative results are different. Furthermore, the limiting cases of complete mobile or immobile interface are in agreement with the theory provided by Shmyrov et al. [29] .  List of parameters used in parametric cases 1 and 2, similar to values used by Shmyrov et al. [29] .

A3. Results
We performed two parametric studies: one where the elasticity number E is varied and a second where the initial surface concentration of the surfactant 0 is varied. In this work we have used the same values of elasticity number and initial concentration as in the study of Shmyrov et al. [29] . The characteristic values in the simulations can be found in Table A. 4 .
In all simulations the Marangoni number is Ma = 10 0 0 . In the first parametric study the strength of the thermocapillary effect is varied by changing the elasticity number E. This implies that the thermocapillary Marangoni number Ma T is varied. The results are shown in three figures: Figs. A.14 a, b and A.16 represent the dimensionless-velocity of the interface v , temperature on the interface T and surfactant concentration . The motion of the interface on the left hand side of the domain is strong and stagnates at x s (see Fig. A.14 a). This stagnation occurs when thermo-and solutocapillary effects balance. The higher the elasticity number E the larger the stagnant area of the domain becomes, and it appears to be complete stagnant at E = 1. The transition from mobile to immobile interface is sharp and it corresponds to the transition from surfactant-free to gaseous state of the surfactants at the interface. In Fig. A.16 we observe the surface concentration becomes non-zero at this stagnation point x s . As a consequence of the sharp interface transition from mobile to immobile, the temperature distribution is not linear. On the mobile part of the interface ( x < x s ), convection is dominant and therefore the temperature profile rela-tively flat. On the immobile part of the interface ( x > x s ), diffusion is dominant and therefore the temperature profile relatively steep.
The second parametric study describes the effect of changing the initial surface concentration 0 on the velocity, temperature and surfactant concentration distribution. As can be seen from Fig. A.17 the increase of initial concentration implies that a larger part of the interface is covered by surfactants. The surface is therefore for a larger part immobile, see Fig. A.15 a. The temperature profile in Fig. A.15 b also indicates that the domain is dominated by diffusion if the initial concentration increases. By starting with a high initial concentration 0 ≈ 1 the surfactant state along the interface will primarily be the liquid expanded phase. Therefore, if 0 ≈ 1 most of the interface is immobile.
In conclusion the velocity profiles of both parametric studies show strong convective flow in the surfactant-free regime. Once there is a phase transition to the gaseous regime, where there are several surfactant molecules, there is a steep decrease of the velocity to zero. This decrease allows for the implementation of zero stress boundary conditions from some position x > x s . When dealing with a bubble this stagnant cap boundary condition can then be applied from some angle θ > θ s . This justifies the simulations in Section 3 . The stagnant cap that is formed depends on the competition between thermo-and solutocapillary effects. This competition is described by the elasticity number E, and together with the initial concentration it determines the location of the critical position for the stagnant cap x s .