원시데이터 수집 시스템
선정목록으로

A variational level set methodology without reinitialization for the prediction of equilibrium interfaces over arbitrary solid surfaces

간접 관련 필름·전자재료 · (18) VENT(방수통기 부품) (11) 배리어 필름(15) 디스플레이 패널재료

기본 정보

저자
  1. Karim Alamé — Department of Aerospace Engineering and Mechanics, University of Minnesota, Minneapolis, MN 55455, USA
  2. Sreevatsa Anantharamu — Department of Aerospace Engineering and Mechanics, University of Minnesota, Minneapolis, MN 55455, USA
  3. Krishnan Mahesh — Department of Aerospace Engineering and Mechanics, University of Minnesota, Minneapolis, MN 55455, USA
DOI
10.1016/j.jcp.2019.109184
저널
Journal of Computational Physics
발행년도
2019
발행기관
Elsevier BV
피인용수
6
라이선스
publisher-specific-oa
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.1016/j.jcp.2019.109184
토픽
Surface Modification and Superhydrophobicity
OpenAlex ID
W2995455475

평가 내용

관련도
간접 관련
사업분야
필름·전자재료 · (18) VENT(방수통기 부품)
부 분야
(11) 배리어 필름, (15) 디스플레이 패널재료
R&D 측면
분석·모델링
확신도
0.70
근거 용어
equilibrium interfaces, rough surfaces, superhydrophobic surfaces, liquid-solid surface tension, level set methodology
판단 근거
본 논문은 거친 표면(rough surfaces) 위에서 액체 계면의 평형 상태를 예측하는 수치 해석 방법론을 다룹니다. 이는 코오롱인더스트리의 방수통기 부품(18)이나 필름(11) 개발 시 표면 거칠기에 따른 젖음성(wetting) 및 투과 성능을 시뮬레이션하는 데 활용될 수 있습니다.
R&D 활용 포인트
방수통기용 멤브레인(ePTFE 등)이나 기능성 필름의 표면 거칠기 제어를 통한 초발수(superhydrophobic) 특성 설계 및 액체 침투 방지 성능 예측 모델링에 활용 가능함.
평가 입력
본문 96,116자 중 30,032자 발췌

초록

초록이 없습니다.

본문 96,116자

본문 펼치기
p y ( 9) [Contents lists available at ScienceDirect](http://www.sciencedirect.com) ## Journal of Computational Physics [journal homepage: www.elsevier.com/locate/jcp](http://www.elsevier.com/locate/jcp) ### A variational level set methodology without reinitialization for the prediction of equilibrium interfaces over arbitrary solid surfaces Karim Alam´e <sup>a</sup>, Sreevatsa Anantharamu <sup>a</sup>, Krishnan Mahesh <sup>a,∗</sup> _aDepartment of Aerospace Engineering and Mechanics, University of Minnesota, Minneapolis, MN 55455, USA_ A R T I C L E I N F O _Article history_ : Received 19 July 2019 Accepted 12 December 2019 Available online xxxx Communicated by F. Gibou _2000 MSC:_ 41A05, 41A10, 65D05, 65D17 _Keywords:_ Variational Level Set, Level Set Method, Distance Regularized Level Set Equations, Gibbs Free Energy Minimization, Multiphase, Roughness 1. Introduction A B S T R A C T A robust numerical methodology to predict equilibrium interfaces over arbitrary solid surfaces is developed. The kernel of the proposed method is the distance regularized level set equations (DRLSE) with techniques to incorporate the no-penetration and volume-conservation constraints. In this framework, we avoid reinitialization that is typically used in traditional level set methods. This allows for a more efficient algorithm since only one advection equation is solved, and avoids numerical error associated with the re-distancing step. A novel surface tension distribution, based on harmonic mean, is prescribed such that the zero level set has the correct liquid-solid surface tension value. This leads to a more accurate prediction of the triple contact point location. The method uses second-order central difference schemes which facilitates easy parallel implementation, and is validated by comparing to traditional level set methods for canonical problems. The application of the method in the context of Gibbs free energy minimization, to obtain liquid-air interfaces is validated against existing analytical solutions. The capability of the methodology to predict equilibrium shapes over both structured and realistic rough surfaces is demonstrated. ⃝c 2019 Elsevier Inc. All rights reserved. The traditional level set (LS) formulation of moving fronts as devised by [1], has been applied to a wide variety of problems [2, 3, 4]. This is due to its relative ease of implementation, simplicity in applying Boolean operations, and ability to handle surface pinching or merging without the need for direct user intervention or complicated algorithms that detect when to perform ‘surgery’. Implementing the traditional level set methods (LSM) requires the use of upwind schemes to maintain numerical stability. As the LS evolves with time, the values of the level set function (LSF) begin to drift away from the original signed distance function (SDF), and the LSF often becomes steep or flat near the zero LS which affects stability. One remedy is to reinitialize the LS equation to restore the LSF to an SDF. ∗Corresponding author: Tel.: +1-612-624-4175; Email: kmahesh@umn.edu; ( _a_ ) / p y ( 9) ( _b_ ) θ _Y_ θ _Y_ Fig. 1: ( _a_ ) A schematic of a liquid droplet on a solid substrate and a zoomed in view of the liquid-solid contact showing air pockets where the surface roughness is more apparent. ( _b_ ) a schematic of a boundary layer with a zoom in view depicting a vapor pocket that grows due to a pressure gradient across a surface cavity. Young’s contact angle is given by θ _Y_ . This process is problem-dependent; the reinitialization needs to be done occasionally if the approximation of the LS is not sensitive to its approximation of an SDF. Otherwise, the reinitialization needs to be done every iteration which can get computationally expensive. The first reinitialization method was proposed by [5] which directly computes the SDF. The process is computationally expensive and is restricted to a band of points near the zero LS front. This leads to difficulties in locating and discretizing the front. The method proposed by [6] solves the reinitialization equation iteratively but fails when the LSF is far from an SDF. [7] proposed a model that addresses the issue; however, numerical error tends to shift the interface slightly from its original position [4]. In the context of variational LS formulations, [8] proposed an energy functional that regularizes the distance function as the LS deviates from an SDF. This is known as the distance regularized level set evolution (DRLSE) where the regularization term acts as a penalty to the deviation, thus maintaining an SDF without the need for an explicit reinitialization step. It was employed in the context of image segmentation but was not extended to solve general level set evolution (LSE) equations. The variational LSM without reinitialization has advantages over traditional LSM which include ease of implementation, higher efficiency due to lower computational cost, and the ability to use central difference schemes instead of upwind schemes. The LSE equations can be categorized into a PDE-based LSM (derived from motion equations) and variational LSM (derived by minimizing a certain energy functional) both of which can lead to similar governing equations while keeping the final steady-state solution the same. The main goal of this paper is to devise an easy, fast, accurate and robust method for calculating the equilibrium position of a liquid meniscus over an arbitrary rough surface. Having a model to predict the equilibrium position of an interface and its failure criterion is of great importance to numerical simulations and experiments. Figure 1( _a_ ) shows a schematic of a liquid droplet sitting on a solid substrate with a close-up of the surface and figure 1( _b_ ) shows a trapped vapor bubble growing out of a cavity due to a pressure gradient present in the boundary layer. Note that the problem can be broken into a macroscopic and a microscopic one. A macroscopic problem relies on predicting the liquid drop shape at equilibrium while conserving its volume. A microscopic problem deals with finding the equilibrium position of the meniscus on a rough substrate given an external pressure. A robust superhydrophobic surface should be designed to make a non-wetted stable Cassie state [9] and increase the critical pressure. In the context of cavitation, predicting nucleation sites and the critical pressure that causes vapor pockets to expand beyond the envelope of the cavity into the liquid is of great importance, where the presence of a hydrophobic surface would cause heterogeneous nucleation sites [10]. [11] introduced an analytical model for a simple cosine substrate and then a numerical model to predict interface shape over a two-dimensional (2D) rough periodic substrate defined by a fractal dimension [12]. Extension to higher dimensions was not explored. [13] explored the effect of anisotropy of roughness on wetting using Surface Evolver [14]. The Surface Evolver is three-dimensional (3D) but relies on triangulating the interfacial surface. This may require special attention during pinching and breakup where elements need to be added, deleted or merged. Also, the rough substrate was modeled as a simple grooved channel therefore it is not clear whether a more / p y ( 9) complicated geometry can be incorporated. [15] used the traditional LSM to capture the behavior of bubbles drops on a macroscopic scale, details of the interface shape and contact angles were not compared quantitatively to existing analytical solutions, but their qualitative results were encouraging. Our approach uses a variational level set methodology without reinitialization to capitalize on its advantages introduced earlier. The regularization term is based on the algorithm proposed by [8] which was only applied in the context of image segmentation to the best of our knowledge. We show that the DRLSE can be used in the context of both PDE-based and variational derived LSM. The algorithm minimizes the Gibbs free energy which is written in a general form that allows for the control of the dissolved gas saturation levels. The results show that the proposed model is effective in handling complicated geometries and can accurately predict interfacial equilibrium positions. The paper is organized as follows: the level set formulation, terminology, and notation, in both the traditional and variational sense, is presented in §2. A general framework for the Gibbs free energy equation, based on [16], written in the variational LS framework is introduced in §3; it allows for prescribing an external pressure and dissolved gas saturation levels. The algorithm and numerical implementation is presented in §4. It is validated using canonical level set test cases (e.g. curvature-driven flow and motion in the normal direction) in §5. This is crucial since minimizing the LSF of the Gibbs free energy leads to a governing evolution equation that can be written as a combination of motion in the normal direction with curvature-driven diffusion. The Gibbs energy model is validated with the analytic solution of the Young-Laplace equation and the solution over a cosine substrate derived by [11]. Results of our numerical experiments to highlight the robustness of the algorithm are shown in §6. The numerical experiments explore the equilibrium shape of a drop/interface over a variety of rough substrates that include longitudinal grooves, posts, and realistically rough surfaces. The paper is summarized in §7. 2. Level Set Formulation _2.1._ _Traditional Level Set Formulation_ Traditional level set formulation of moving fronts introduces an implicit level set function φ( x, _t_ ) such that the zero level set contour represents the required interface Γ = { x | φ( x, _t_ ) = 0}. Given the interface Γ( _t_ ) bounding an open region Ω <sup>+</sup>, we wish to compute its evolution under a velocity field u ( x, _t_ ). This velocity can be a function of the interfacial geometry (e.g. normals or curvature), position, time, or external physics. The level set function φ has the following properties: φ( x, _t_ ) > 0 for x ∈ Ω <sup>+</sup> (1) φ( x, _t_ ) = 0 for x ∈ ∂Ω (2) φ( x, _t_ ) < 0 for x ∈ Ω <sup>−</sup>, (3) where Ω <sup>+</sup> is the interior of the region bounded by Γ, ∂Ω := Γ, and Ω <sup>−</sup> the exterior region of Γ given by its complement of Ω <sup>+</sup> ∪ ∂Ω. The normal to any level set is given by N = |∇ <sup>∇</sup> φ <sup><u>φ</u></sup> ( <sup><u>(</u></sup> x <sup><u>x</u></sup>, <sup><u>,</u></sup> _t_ <sup>_<u>t</u>_</sup> ) <sup><u>)</u></sup> | <sup>,</sup> (4) and the corresponding curvature of the interface is given by the divergence of its normal defined as: κ = ∇· The area (volume in 3D) of the domain enclosed by Ω: - ∇φ( <u>x</u> <u>,</u> _<u>t</u>_ <u>)</u> |∇φ( x, _t_ )| . (5) Ω 1, if φ( x, _t_ ) ≥ 0 (7) 0, if φ( x, _t_ ) < 0 . _H_ <sup>�</sup> φ( x, _t_ ) <sup>�</sup> d x, (6) where _H_ <sup>�</sup> φ( x, _t_ ) <sup>�</sup> is the Heaviside function area(Ω) = _H_ <sup>�</sup> φ( x, _t_ ) <sup>�</sup> = / p y ( 9) The directional derivative of _H_ <sup>�</sup> φ( x, _t_ ) <sup>�</sup> in the normal direction N is given by the Dirac delta function: δˆ( x, _t_ ) = ∇ _H_ <sup>�</sup> φ( x, _t_ ) <sup>�</sup> - N (8) such that it is non-zero on ∂Ω where φ( x, _t_ ) = 0. This can be rewritten as δˆ( x, _t_ ) = _H_ <sup>′�</sup> φ( x, _t_ ) <sup>�</sup> ∇φ( x, _t_ ) · N = _H_ <sup>′</sup> (φ( x, _t_ ))|∇φ( x, _t_ )|, (9) where the one-dimensional delta function is defined as δ <sup>�</sup> φ( x, _t_ ) <sup>�</sup> = _H_ <sup>′�</sup> φ( x, _t_ ) <sup>�</sup> in a distribution sense. The length (surface area in 3D) of an interface Γ( _t_ ) can therefore be directly found using the surface integral: length (Γ) = δ <sup>�</sup> φ( x, _t_ ) <sup>�</sup> |∇φ( x, _t_ )| d x . (10) Ω The motion of the interface is analyzed by convecting all the values of the level set function φ( x, _t_ ) with the velocity u ( x, _t_ ) according to a general equation of motion given by: <u>∂φ</u> ∂ _t_ <sup>+</sup> <sup>u</sup> <sup>· ∇φ = κ|∇φ|,</sup> (11) where the right-hand side determines the rate of diffusion. This will be referred to as a PDE-based LSM. The above equation can be expressed in operator form as: <u>∂φ</u> ∂ _t_ <sup>=</sup> <sup>_L_</sup> <sup>[φ],</sup> (12) where _L_ [φ] is the operator approximating all of the right hand side of the equation that is discretized using an appropriate numerical scheme. _2.1.1._ _Reinitializing Signed Distance Functions_ As the level set φ( x, _t_ ) evolves with time, the values of φ( x, _t_ ) begin to drift away from the originally signed distance function (SDF). The level sets deteriorate to form shocks, flat or steep shapes. One remedy is to reinitialize the level set equation in order to restore φ( x, _t_ ) back to an SDF. [6] proposed the reinitialization equation given by: <u>∂φ</u> ∂ _t_ <sup>+</sup> <sup>_S_</sup> <sup>(φ</sup> <sup>_o_</sup> <sup>)(|∇φ| −</sup> <sup>1) = 0,</sup> (13) where _S_ (φ _o_ ) is a sign function that is 1 in Ω <sup>+</sup>, 0 on ∂Ω and −1 on Ω <sup>−</sup> . However, this may cause a circular dependency since the values near the interface in Ω <sup>+</sup> use φ( x, _t_ ) in Ω <sup>−</sup> for the boundary points and vice versa. This balances out if we assume that φ remains smooth at all times, which is not always the case. If φ is not smooth, or is steeper on one side, then the circular dependency may lead the reinitialization equation to move the interface to an incorrect location. Therefore, a numerically smeared sign function is typically used instead: <u>φ</u> _<u>o</u>_ _S_ (φ _o_ ) = ~~<u>�</u>~~ φ <sup>2</sup> _o_ + (∆ _x_ ) <sup>2</sup> , (14) where _S_ (φ _o_ ) remains constant for the duration on reinitialization, and has better properties if φ( x, _t_ ) is not smooth or if |∇φ _o_ | is far from 1. The numerical smearing also reduces its magnitude, causing a slower propagation speed of the information near the interface thereby reducing circular dependencies. In an ideal case, the interface remains stationary during reinitialization. However, numerical error tends to shift the interface slightly [4]. [17] provides a comprehensive review of the most recent advances in the traditional LSM. In summary, reinitialization still comes at a computational cost and the inconsistency between theory and implementation remains. _2.2._ _Variational Level Set Formulation_ An alternative to the evolution of a PDE-based LSM can be directly derived from the problem of minimizing a certain energy functional defined by the level set function. This is known as the variational level set method [15]. The variational formulation is proposed as follows, let an energy functional J(φ) be defined as: J(φ) = E _int_ (φ) + E _ext_ (φ), (15) / p y ( 9) where E _ext_ (φ) is the external energy functional related to a physical mechanism to be determined, and E _int_ (φ) is the internal energy functional given by: E _int_ (φ) = αR _p_ (φ), (16) where α is a positive parameter that controls the effect of R _p_ (φ) which penalizes the deviation of φ( x, _t_ ) from an SDF. To minimize the energy functional J(φ), we need to find the steady-state solution of φ( x, _t_ ) by stepping in the direction of steepest descent of J(φ). This is given by the negative Fr´echet derivative J <sup>′</sup> (φ) such that φ <sup>_n_</sup> <sup>+1</sup> = φ <sup>_n_</sup> - γ J <sup>′</sup> (φ <sup>_n_</sup> ), (17) where γ is the step size taken to be as a ‘time-step’ _dt_ . We can write the evolution equation as a gradient flow that minimizes J(φ): <u>∂φ</u> ∂φ <sup>J</sup> <sup>,</sup> (18) <u>∂φ</u> ∂ _t_ <sup>= −</sup> <sup><u>∂</u></sup> ∂φ <sup>J</sup> which will be referred to as the variational-based LSM that can also be expressed in operator form as Eq. (12): <u>∂φ</u> ∂ _t_ <sup>=</sup> <sup>_L_</sup> <sup>[φ].</sup> (19) The above equation highlights the fact that we can obtain the same operator for the traditional and variational formulation of the level set methodology. The key difference is how this operator is discretized and solved; this will be discussed later in §4. _2.2.1._ _Distance Regularization as an Alternative to Reinitialization_ It is crucial to keep the level set as an approximate SDF during its evolution as discussed in §2.1.1, where any function φ( x, _t_ ) satisfying |∇φ| = 1 is an SDF [18]. [8] proposed an energy functional that regularizes the distance function as the level set deviates from an SDF in the vicinity of the front. The penalty functional is given by: R _p_ (φ) = _p_ (|∇φ|) d x ; (20) Ω this serves as a metric to characterize how close φ( x, _t_ ) is to an SDF. The energy density _p_ (|∇φ|) is a potential function defined as: _p_ (|∇φ|) =  (21π) <sup>2</sup> <sup>(1 −</sup> <sup>cos(2π|∇φ|)),</sup> if |∇φ| < 1 (21) 21 <sup>(|∇φ| −</sup> <sup>1)2,</sup> if |∇φ| ≥ 1 . (21π) <sup>2</sup> <sup>(1 −</sup> <sup>cos(2π|∇φ|)),</sup> if |∇φ| < 1 It is evident that _p_ (|∇φ|) has two minima at |∇φ| = 0 and |∇φ| = 1.The function _p_ (|∇φ|) is twice differentiable, this can be verified by finding the roots of its first derivative and checking the sign of the second derivative, _p_ <sup>′</sup> (|∇φ|) and _p_ <sup>′′</sup> (|∇φ|) respectively, such that _p_ <sup>′</sup> (|∇φ|) = 21π <sup>sin(2π|∇φ|),</sup> if |∇φ| < 1 (22) |∇φ| − 1, if |∇φ| ≥ 1 and _p_ <sup>′′</sup> (|∇φ|) =  cos(2π|∇φ|), if |∇φ| < 1 (23) 1, if |∇φ| ≥ 1 . The roots of _p_ <sup>′</sup> (|∇φ|) are seen at the zero line intersection for |∇φ| = 0, 0.5 and 1. The sign of _p_ <sup>′′</sup> (|∇φ|), which is positive for |∇φ| = 0 and 1, indicates that they are minimums. The Fr´echet derivative in the _L_ <sup>2</sup> inner product of the regularization energy functional R _p_ (φ) can be shown to be: where _dp_ is defined as ∂R _p_ ∂φ <sup>= −∇· (</sup> <sup>_dp_</sup> <sup>(|∇φ|)∇φ),</sup> (24) _dp_ (|∇φ|) = _p_ <sup>′</sup> (|∇φ|)/|∇φ| . (25) / p y ( 9) The use of a double-well potential has more favorable properties than using a simple potential function 2 <sup><u>1</u></sup> which was initially introduced by [19]. The advantage is seen in the limiting values of |∇φ| given by 2 <sup><u>1</u></sup> <sup>(|∇φ| −</sup> <sup>1)2</sup> |∇limφ|→0 <sup>_dp_</sup> <sup>(|∇φ|) =</sup> |∇limφ|→∞ <sup>_dp_</sup> <sup>(|∇φ|) = 1 .</sup> (26) We can verify that the boundedness is lost for the simple potential function which can lead to undesirable effects |∇limφ|→0 <sup>|</sup> <sup>_dp_</sup> <sup>(|∇φ|)| = ∞</sup> <sup>.</sup> (27) Physically, in the regions where |∇φ| is close to zero, the diffusion rate is positive and arbitrarily large. For this case, the diffusion is backwards, which drastically increases |∇φ| causing oscillations to appear as peaks and valleys in the final level set φ. The oscillations appear at a distance from the zero crossing of the level set but nevertheless may cause a slight shift in the interface location. Therefore for a double-well potential, the function _dp_ (|∇φ|) is always bounded such that | _dp_ (|∇φ|)| < 1, for all values of |∇φ| ∈ [0, ∞). (28) For 0 < |∇φ| < 1/2, the diffusion rate _dp_ (|∇φ|) is positive, resulting in a forward diffusion which further decreases |∇φ| to zero. For (1/2) < |∇φ| < 1, the diffusion rate _dp_ (|∇φ|) is negative, resulting in a backward diffusion which increases |∇φ| towards unity. For |∇φ| - 1, the diffusion is positive again which leads to forward diffusion, reducing the value of |∇φ| towards 1. 3. The Model: Gibbs Free Energy Consider a thermodynamic system in its general form comprised of a surface, submerged in a bulk liquid consisting of water and dissolved gas, and entrapped air bubbles within the surface cavities consisting of vapor and free gas. The equilibrium liquid-gas interface position is obtained through the minimization of the total Gibbs free energy of a multi-component system [20, 21] that is given by: _Gtot_ = ι ( _U_ ι + _pLV_ ι − _TS_ ι) + _Gint_, (29) where _Gtot_ denotes the total Gibbs free energy, _U_ ι the internal energy of the system, _pL_ the liquid pressure, _V_ ι the volume of each phase ι in the system, _T_ the temperature, and _S_ ι the entropy of each phase. _Gint_ denotes the free energy of all interfaces present in the system, _SG_ <sup>ι</sup> <sup>) + τ</sup> <sup>_LS ALS_</sup> <sup>,</sup> (30) _Gint_ = ι (τ _LGA_ <sup>ι</sup> <sup>ι</sup> _LG_ <sup>+ τ</sup> <sup>_SGA_</sup> <sup>ι</sup> where τ _LG_, τ _SG_ and τ _LS_ represent the surface tension of the liquid-gas (LG), solid-gas (SG) and liquid-solid (LS) interfaces respectively. Similarly _ALS_, _ASG_ and _ALS_ represent the surface areas of each corresponding phase. It can be shown that the total free energy can be written as <sup>∗</sup> _V_ <sup>)</sup> <sup>+</sup> <sup>_nV_</sup> <sup>_RT_</sup> <sup>ln</sup> <sup>_<u>p</u>_</sup> _p_ <sup>_<u>V</u>_</sup> <sup>∗</sup> _V_ _<u>pG</u>_ _Gtot_ = ( _pL_ - _pG_ - _pV_ ) _VG_ + τ _LG_ ( _ALG_ + _ASG_ cos θ _Y_ ) + _nGRT_ ln _s_ ( _pL_ - _p_ <sup>∗</sup> _V_ _V_ _p_ <sup>∗</sup> _V_ + _Go_ ( _pL_, _T_, _s_ ), (31) a form shown by [16]. Here, the first term in the right-hand side of Eq.(31) is attributed to the bulk phases, where _pG_ and _pV_ are the entrapped gas and vapor pressure respectively, and _VG_ is the volume of the entrapped gas. The second term represents surface tension attributed to the interface simplified using Young’s equation, where θ _Y_ is Young’s contact angle. The third term is attributed to the difference in chemical potential between the free gas in the entrapped air within the cavity and dissolved gas in the liquid phase where _nG_ is the mole number of entrapped gas, _R_ the ideal gas constant, _T_ the temperature, _s_ the dissolved gas saturation level and _p_ <sup>∗</sup> _V_ <sup>the saturated vapor pressure.</sup> <sup>The fourth</sup> term is the energy contribution of unsaturated vapor where _nv_ is the mole number of vapor in the cavity. The last term _Go_ is the free energy of the wetted Wenzel state [22] which is a constant for a given _pL_, _T_, and _s_ at the reference state where _Go_ ( _pL_, _T_, _s_ ) = _ntot_ µ _DG_ + _n_ H2O µ _W_ + τ _LS AS_ . (32) / p y ( 9) In Eq. (32) the total gas mole number of the system is given by _ntot_ and _n_ H2O is the mole number of water and its vapor, µ _DG_ and µ _W_ are the chemical potentials of the dissolved gas and water respectively. Note that in order to obtain an equilibrium state, which is an energy minimum of the system, the first-order variation of the total free energy should be set to zero i.e. δ _Gtot_ = 0. Classical geometry formulas described in [23, 24] are used to obtain the expression _<u>pG</u>_ δ _Gtot_ = ( _pL_ - _pG_ - _pV_ ) δ _VG_ + τ _LG_ (δ _ALG_ + δ _ASG_ cos θ _Y_ ) + _RT_ ln _s_ ( _pL_ - _p_ <sup>∗</sup> _V_ _V_ <sup>∗</sup> _V_ <sup>)</sup> <sup>δ</sup> <sup>_nG_</sup> <sup>+</sup> <sup>_RT_</sup> <sup>ln</sup> _p_ <sup>_<u>p</u>_</sup> <sup>∗</sup> <sup>_<u>V</u>_</sup> _V_ _p_ <sup>∗</sup> _V_ δ _nG_ . (33) The variation with respect to the first and second term determines the shape and location of the interface since it results in the Young-Laplace equation: _pL_ - _pG_ - _pV_ = −τ _LG_ κ . (34) The third term gives the variation with respect to δ _nG_, which is the chemical equilibrium condition between the free and dissolved gas in water: _pG_ = _s_ ( _pL_ - _p_ <sup>∗</sup> _V_ <sup>) .</sup> (35) The fourth term gives the variation with respect to δ _nV_, which is the equilibrium equation between vapor and water: _pV_ = _p_ <sup>∗</sup> _V_ <sup>.</sup> (36) _3.1._ _Overview of Gibbs Free Energy in a Variational Level Set Formulation_ Define an energy functional E(φ) where φ( x, _t_ ) > 0 represents the liquid phase, φ( x, _t_ ) < 0 represents the gas phase and φ( x, _t_ ) = 0 represents the liquid-gas interface. Define another level set ψ( x ) that represents the solid roughness, ψ( x ) ≥ 0 for the region inside the solid substrate and ψ( x ) < 0 outside the solid. Then, E(φ) based on the bulk and interfacial energies can be written as: E(φ) = EB(φ) + EI(φ), (37) where EB(φ) and EI(φ) are the bulk and interfacial surface energy respectively. Using Eq. (31), the bulk energy due to the pressure difference is given by EB = ( _pL_ - _pG_ - _pV_ ) _VG_ . Denote ∆ _p_ = _pG_ + _pV_ - _pL_ then substitute Eq. (35) and Eq. (36) to get ∆ _p_ = (1 − _s_ )( _pV_ - _pL_ ). Using Eq. (6), EB(φ) = − ∆ _pH_ <sup>�</sup> - ψ( x ) <sup>�</sup> _H_ <sup>�</sup> φ( x, _t_ ) <sup>�</sup> d x, (38) Ω where _H_ (−ψ( x )) ensures that the pressure difference is only applied outside the solid region. The energy functional due to the interfacial surface energies from Eq. (31) is given by EI = τ _LG_ ( _ALG_ + _ASG_ cos θ _Y_ ). Note that the contact angle satisfies |τ _LS_ - τ _SG_ | = τ _LG_ cos θ _Y_ . If 0 ≤ θ _Y_ ≤ π/2, then the liquid is said to be wetted, else if π/2 < θ _Y_ ≤ π, then the liquid is said to be non-wetted. The surface tension is represented as a function of ψ( x ) such that, τ(ψ) = τ <sup>+</sup>, for ψ( x ) ≥ 0 (39) τ <sup>−</sup>, for ψ( x ) < 0, where τ <sup>+</sup> = |τ _LS_ - τ _SG_ | and τ <sup>−</sup> = τ _LG_ . Using Eq. (10), the interfacial surface energy is written as EI(φ) = τ <sup>�</sup> ψ( x ) <sup>�</sup> δ <sup>�</sup> φ( x, _t_ ) <sup>�</sup> |∇φ( x, _t_ )| d x . (40) Ω Since the solid does not vary temporally, substitute τ <sup>�</sup> ψ( x ) <sup>�</sup> for τ( x ): EI(φ) = τ( x )δ <sup>�</sup> φ( x, _t_ ) <sup>�</sup> |∇φ( x, _t_ )| d x . (41) Ω The interface is not allowed to penetrate into the solid, therefore a no penetration constraint is enforced: G1(φ) = _H_ <sup>�</sup> - φ( x, _t_ ) <sup>�</sup> _H_ <sup>�</sup> ψ( x ) <sup>�</sup> d x = 0 ; (42) Ω / p y ( 9) this prevents any overlap or penetration between the two regions described by φ( x, _t_ ) ≥ 0 and ψ( x ) ≥ 0. The volume of the liquid phase is required to remain conserved, therefore the second constraint imposed is volume conservation given by: G2(φ) = _H_ <sup>�</sup> φ( x, _t_ ) <sup>�</sup> _H_ <sup>�</sup> - ψ( x ) <sup>�</sup> d x = _Vo_, (43) Ω where _Vo_ is the initial volume of the liquid. This is necessary for problems which require the conservation of the volume of the bubble. For problems where we assume an infinite supply of liquid (i.e. a system where the liquid reservoir is much larger than the air cavities), this constraint is not used. In order to minimize E(φ), we define the auxiliary energy functional J(φ) that contains the Gibbs energy, penalty function and the two constraints, given by: J(φ) = αR _p_ (φ) + E(φ) + µG1(φ) + λG2(φ), (44) where R _p_ (φ) is the penalty term that enforces φ to be an SDF in the vicinity of the interface, α is the weighting and µ and λ are the Lagrange multipliers that satisfy the two constraints mentioned above. Then the Fr´echet derivative in the _L_ <sup>2</sup> norm of J(φ) is given by: - <u>∂EI</u> ∂φ <sup>, χ</sup> + - ∂R _p_ ∂φ <sup>, χ</sup> + - <u>∂EB</u> ∂φ <sup>, χ</sup> + - <u>∂G1</u> ∂φ <sup>, χ</sup> + - <u>∂G2</u> ∂φ <sup>, χ</sup> . (45) - <u>∂J</u> ∂φ <sup>, χ</sup> = - <u>∂J</u> ∂φ <sup>, χ</sup> lim ϵ→0 <u>1</u> ϵ - J(φ + ϵχ) −J(φ) = is given in Eq. (24). The second term can be shown to be: The first term in the right-hand side - <u>∂R</u> _<u>p</u>_ R _<u>p</u>_ ∂φ <sup>, χ</sup> - <u>∂EI</u> ∂φ <sup>, χ</sup> = ∂Ω Ω δ <sup>�</sup> φ( x, _t_ ) <sup>�</sup> ∇· δ <sup>�</sup> φ( x, _t_ ) <sup>�</sup> <sup><u>∂φ(</u></sup> <sup><u>x</u></sup> <sup><u>,</u></sup> <sup>_<u>t</u>_</sup> <sup><u>)</u></sup> ∂ _n_ δ <sup>�</sup> φ( x, _t_ ) <sup>�</sup> <sup><u>∂φ(</u></sup> <sup><u>x</u></sup> <sup><u>,</u></sup> <sup>_<u>t</u>_</sup> <sup><u>)</u></sup> <u>τ(</u> <u>x</u> <u>)</u> |∇φ( x, _t_ )| <sup>χ d</sup> <sup>s</sup> <sup>−</sup> �τ( x ) <sup>∇φ(</sup> <sup><u>x</u></sup> <sup><u>,</u></sup> <sup>_<u>t</u>_</sup> <sup><u>)</u></sup> |∇φ( x, _t_ )| χ d x, (46) where the first term is eliminated by taking <sup><u>∂φ</u></sup> ∂ _n_ <sup><u>∂φ</u></sup> ∂ _n_ <sup>= 0 at the boundaries ∂Ω.</sup> <sup>The rest of the terms follow as:</sup> - <u>∂EB</u> - ∂φ <sup>, χ</sup> = − Ω ∆ _p_ δ <sup>�</sup> φ( x, _t_ ) <sup>�</sup> _H_ <sup>�</sup> - ψ( x ) <sup>�</sup> χ d x, = − ∆ _p_ δ <sup>�</sup> φ( x, _t_ ) <sup>�</sup> _H_ <sup>�</sup> - ψ( x ) <sup>�</sup> χ d x, (47) Ω - <u>∂G1</u> ∂φ <sup>, χ</sup> = − Ω δ <sup>�</sup> φ( x, _t_ ) <sup>�</sup> _H_ <sup>�</sup> ψ( x ) <sup>�</sup> χ d x, (48) and - <u>∂G2</u> ∂φ <sup>, χ</sup> = Ω δ <sup>�</sup> φ( x, _t_ ) <sup>�</sup> _H_ <sup>�</sup> - ψ( x ) <sup>�</sup> χ d x . (49) The evolution equation given by Eq. (18) can now be defined for an infinitesimal step-size as: <u>∂φ(</u> <u>x</u> <u>,</u> _<u>t</u>_ <u>)</u> = α∇· ∂ _t_ _dp_ �|∇φ( x, _t_ )|�∇φ( x, _t_ ) + δ <sup>�</sup> φ( x, _t_ ) <sup>��</sup> ∇· �τ( x ) <sup>∇φ(</sup> <sup><u>x</u></sup> <sup><u>,</u></sup> <sup>_<u>t</u>_</sup> <sup><u>)</u></sup> |∇φ( x, _t_ )| - +∆ _pH_ (−ψ( x )) + µ _H_ (ψ( x )) - λ _H_ (−ψ( x )) . (50) To determine the value of the Lagrange multipliers, we enforce the fact that the constraints do not vary in time, i.e. _<u>d</u>_ _dt_ <sup>G1(φ) = 0</sup> (51) _<u>d</u>_ _dt_ <sup>G2(φ) = 0 .</sup> (52) Therefore, the Lagrange multipliers can be obtained as: µ = − <u>Ω</u> δ <sup>�</sup> φ( x, _t_ ) <sup>��</sup> α∇· _dp_ �|∇φ( x, _t_ )|�∇φ( x, _t_ ) + δ <sup>�</sup> φ( x, _t_ ) <sup>�</sup> ∇· - - �� _t_ )|�∇φ( x, _t_ ) + δ <sup>�</sup> φ( x, _t_ ) <sup>�</sup> ∇· τ( x ) <sup>∇φ�</sup> <sup><u>x</u></sup> <sup><u>,</u></sup> <sup>_<u>t</u>_</sup> <sup><u>)</u></sup> _H_ <sup>�</sup> ψ( x ) <sup>�</sup> d x |∇φ( <u>x</u> <u>,</u> _<u>t</u>_ <u>)|</u> <u>�</u> �τ( x ) <sup>∇φ�</sup> <sup><u>x</u></sup> <sup><u>,</u></sup> <sup>_<u>t</u>_</sup> <sup><u>)</u></sup> |∇φ( <u>x</u> <u>,</u> _<u>t</u>_ <u>)|</u> δ <sup>2�</sup> φ( x, _t_ ) <sup>�</sup> _H_ <sup>�</sup> ψ( x ) <sup>�</sup> d x Ω and δ <sup>�</sup> φ( x, _t_ ) <sup>��</sup> �|∇φ( x, _t_ )|�∇φ( x, _t_ ) + δ <sup>�</sup> φ( x, _t_ ) <sup>��</sup> - - - �� φ( x, _t_ ) + δ <sup>�</sup> φ( x, _t_ ) <sup>��</sup> ∇· τ( x ) <sup>∇φ�</sup> <sup><u>x</u></sup> <sup><u>,</u></sup> <sup>_<u>t</u>_</sup> <sup><u>)</u></sup> + ∆ _p_ _H_ <sup>�</sup> - ψ( x ) <sup>�</sup> d x |∇φ( <u>x</u> <u>,</u> _<u>t</u>_ <u>)|</u> <u>�</u> (53) . (54) α∇· _dp_ ∇· �τ( x ) <sup>∇φ�</sup> <sup><u>x</u></sup> <sup><u>,</u></sup> <sup>_<u>t</u>_</sup> <sup><u>)</u></sup> |∇φ( <u>x</u> <u>,</u> _<u>t</u>_ <u>)|</u> + ∆ _p_ λ = <u>Ω</u> δ <sup>2�</sup> φ( x, _t_ ) <sup>�</sup> _H_ <sup>�</sup> - ψ( x ) <sup>�</sup> d x Ω The above equations use the fact that and / p y ( 9) 9 _H_ (ψ( x )) _H_ (−ψ( x )) = 0 (55) _H_ <sup>2</sup> (ψ( x )) = _H_ (ψ( x )) . (56) Note that at steady state, equilibrium is reached (i.e. ∂φ/∂ _t_ = 0 and λ = 0). Assuming no solid is present (i.e. µ = 0) and τ( x ) = τ _LG_, we get ∆ _p_ = τ _LG_ ∇· i.e. the Young-Laplace equation in Eq. (34) is recovered. 4. Numerical Implementation - ∇φ( <u>x</u> <u>,</u> _<u>t</u>_ <u>)</u> |∇φ( x, _t_ )| ; (57) In practice, the Heaviside function _H_ (φ) and the delta function δ(φ) are slightly smoothed out such that:  1, if φ > ϵ - <u>πφ</u> ϵ �� , if |φ| ≤ ϵ (58) _H_ ϵ(φ) = <u>1</u> 2 �1 + <sup><u>φ</u></sup> ϵ <sup>+</sup> π <sup><u>1</u></sup> <sup>sin</sup> �1 + <sup><u>φ</u></sup> ϵ <sup>+</sup> π <sup><u>1</u></sup> 0, if φ < −ϵ and δϵ(φ) =  0, if |φ| > ϵ <u>1</u> 2ϵ �� (59) , if |φ| ≤ ϵ, �1 + cos - <u>πφϵ</u> where ϵ is the numerical width of δ(φ) and _H_ (φ) is taken to be slightly larger than the width of a grid cell (ϵ = 1.5∆ _x_ ). The DRLSE can be implemented with a simple finite difference scheme. The spatial gradients ∂φ/∂ _xi_ are obtained using a central difference scheme and the temporal partial derivative ∂φ/∂ _t_ is approximated using forward difference. Heun’s method is also implemented so that we obtain a second-order approximation with a slightly lower CourantFriedrichs-Lewy (CFL) restriction. The evolution equation is discretized using the forward Euler as, φ <sup>_n_</sup> _i_, <sup>+</sup> _j_, <sup>1</sup> _k_ _i_ <sup>_n_</sup>, _j_, _k_ <sup>+</sup> <sup>_dtL_</sup> <sup>(φ</sup> _i_ <sup>_n_</sup>, _i_ <sup>_n_</sup>, _j_, _k_ <sup>),</sup> (60) <sup>_n_</sup> _i_, <sup>+</sup> _j_, <sup>1</sup> _k_ <sup>= φ</sup> _i_ <sup>_n_</sup>, and for Heun’s method as φ¯ <sup>_n_</sup> _i_, <sup>+</sup> _j_, <sup>1</sup> _k_ <sup>_n_</sup> _i_, _j_, _k_ <sup>+</sup> <sup>_dtL_</sup> <sup>(φ</sup> _i_ <sup>_n_</sup>, _j_ _i_ <sup>_n_</sup>, _j_, _k_ <sup>)</sup> (61) <sup>_n_</sup> _i_, <sup>+</sup> _j_, <sup>1</sup> _k_ <sup>= φ</sup> <sup>_n_</sup> _i_, <sup>_n_</sup> _i_, <sup>+</sup> _j_, <sup>1</sup> _k_ <sup>=</sup> <sup><u>1</u></sup> 2 <sup><u>1</u></sup> φ¯ <sup>_n_</sup> _i_, <sup>+</sup> _j_, <sup>1</sup> _k_ 2 <sup>_n_</sup> _i_, <sup>+</sup> _j_, <sup>1</sup> _k_ <sup>+</sup> <sup>_dtL_</sup> <sup>(¯φ</sup> _i_ <sup>_n_</sup>, φ <sup>_n_</sup> _i_, <sup>+</sup> _j_, <sup>1</sup> _k_ <sup><u>1</u></sup> _i_, _j_, _k_ <sup>+</sup> <sup><u>1</u></sup> 2 <sup>φ</sup> <sup>_n_</sup> 2 _i_ <sup>_n_</sup>, _j_, _k_ <sup>).</sup> (62) The key difference here is the fact that the operator _L_ [φ] in the variational formulation does not describe a HamiltonJacobi equation with a curvature regularization of the traditional formulation but a reaction-diffusion type problem. Here the LSE equation is written out explicitly as: - + ∇τ · <sup>∇φ</sup> |∇φ <sup>∇φ</sup> |∇φ| <sup>+</sup> <sup>_H_</sup> <sup>(−ψ)∆</sup> <sup>_p_</sup> <sup>+ µ</sup> <sup>_H_</sup> <sup>(ψ) −</sup> <sup>λ</sup> <sup>_H_</sup> <sup>(−ψ)</sup> , (63) <u>∂φ</u> τ ∇· - ∇φ |∇φ| ∂ _t_ <sup>= α∇· (</sup> <sup>_dp_</sup> <sup>(|∇φ|)∇φ) + δ(φ)</sup> where there is no need for reinitialization or replacing δ(φ) with |∇φ|. This allows for the flexibility of initializing φ as a binary function. The initial condition LS does not necessarily have to be an SDF, |∇φ| = 1 is only enforced in the vicinity of φ = 0 where δ(φ) is active. It suffices to define a divergence function _div_ (·) that can be used for both the regularization term and the normals to obtain curvature which is given by κ = ∇· N . Some attention to detail of implementation was required for the Lagrange multipliers. The term in the denominator of the Lagrange multipliers µ given in Eq. (53) causes leakage since the width of δ(φ) becomes too narrow; the term δ <sup>2</sup> (φ) _H_ <sup>2</sup> (ψ) is particularly sensitive and is replaced with δ(φ)|∇φ| _H_ (ψ). Numerically, the assumptions in Eq. (55) and Eq. (56) do not hold. This is inconsequential when there is no requirement for volume conservation since λ = 0. However for cases where volume conservation is required, it is important to keep their product explicitly in the discretized equations so that the τ(ψ) / p y ( 9) Harmonic using τ <sup>∗</sup> Harmonic using τ <sup>+</sup> Arithmetic using τ <sup>+</sup> −ϵ ψ Fig. 2: Surface tension distribution using the traditional arithmetic mean with τ <sup>+</sup> (dashed blue line), harmonic mean with τ <sup>+</sup> (dash-dot red line) and harmonic mean with τ <sup>∗</sup> (solid black line). The solid interface location is denoted by the vertical dashed line at ψ = −ϵ. The illustrated example uses τ <sup>−</sup> = 1 and τ <sup>+</sup> = |τ <sup>−</sup> cos θ _Y_ | where θ _Y_ = 140 <sup>◦</sup> . equations balance out. Otherwise, the curvature diffusion term causes the interface to eventually disappear. Therefore, the discrete Lagrange multipliers are written as: <sup>∇φ</sup> |∇φ| <sup>+ ∆</sup> <sup>_pH_</sup> <sup>(−ψ) −</sup> <sup>λ</sup> <sup>_H_</sup> <sup>(−ψ)</sup> <u>Ω</u> δ <sup>�</sup> φ <sup>��</sup> α∇· _dp_ �|∇φ|�∇φ + δ <sup>�</sup> φ <sup>��</sup> τ ∇· - ∇φ - �� ∇· + ∇τ · <sup>∇φ</sup> _H_ <sup>�</sup> ψ <sup>�</sup> d x |∇φ| |∇φ| <sup>+ ∆</sup> <sup>_pH_</sup> <sup>(−ψ) −</sup> <sup>λ</sup> <sup>_H_</sup> <sup>(−ψ)</sup> <u>�</u> - ∇φ |∇φ| - + ∇τ · <sup>∇φ</sup> |∇φ (64) δ <sup>�</sup> φ <sup>��</sup> δ <sup>�</sup> φ <sup>�</sup> |∇φ| _H_ <sup>�</sup> ψ <sup>�</sup> d x Ω and µ = − <sup>∇φ</sup> |∇φ| <sup>+ ∆</sup> <sup>_pH_</sup> <sup>(−ψ) + µ</sup> <sup>_H_</sup> <sup>(ψ)</sup> τ ∇· - ∇φ - �� ∇· + ∇τ · <sup>∇φ</sup> _H_ <sup>�</sup> - ψ <sup>�</sup> d x |∇φ| |∇φ| <sup>+ ∆</sup> <sup>_pH_</sup> <sup>(−ψ) + µ</sup> <sup>_H_</sup> <sup>(ψ)</sup> <u>�</u> α∇· �|∇φ|�∇φ + δ <sup>�</sup> φ <sup>��</sup> _dp_ - ∇φ |∇φ| - + ∇τ · <sup>∇φ</sup> |∇φ| . (65) λ = <u>Ω</u> δ <sup>2�</sup> φ <sup>�</sup> _H_ <sup>2�</sup> - ψ <sup>�</sup> d x Ω The terms are integrated using a trapezoidal rule. The surface tension values are different for the LG interface, and the LS interface. Prescribing a binary distribution for τ( x ) given by Eq. (39) leads to a stair-casing effect. Similar to [15], surface tension is given as a distribution with a slight shift in the argument of the Heaviside function to move the stiffest change away from the solid boundary, τ( x ) = τ <sup>+</sup> + (τ <sup>−</sup> - τ <sup>+</sup> ) _H_ (−ψ − ϵ). (66) In the paper by [15], the bubble shape at equilibrium was not compared to a analytic solution and the contact angle at the triple-line junction was not reported. Qualitatively, the results were promising and demonstrated the effectiveness of the method. However, in our experience, the surface tension distribution caused the interface location to have a mismatch when compared to analytic solution, with errors ranging between 2% to 8%. The reason for this error is due to the smoothing of the Heaviside function. At equilibrium, the Heaviside function at the interface location has a value of _H_ (φ) = 0.5, this leads to an under predicted value of τ <sup>+</sup> at the solid interface causing a mismatch in the contact angle and in turn the equilibrium position. To remedy this effect, we found that a temporary surface tension value τ <sup>∗</sup> can be defined such that the correct value of surface tension within the solid is obtained at the interface location. A harmonic mean is used in Eq. (66) to further reduce any errors that stem from the lower value of the dummy variable. The surface tension distribution becomes as follows �−1 , (67) τ( x ) = - _<u>H</u>_ <u>(−ψ −</u> <u>ϵ)</u> + <sup><u>1 −</u></sup> <sup>_<u>H</u>_</sup> <sup><u>(−ψ −</u></sup> <sup><u>ϵ)</u></sup> τ <sup>−</sup> τ <sup>∗</sup> where / p y ( 9) <u>τ</u> <sup>+</sup> <u>τ</u> <sup>−</sup> τ <sup>∗</sup> = 2τ <sup>−</sup> - τ <sup>+</sup> <sup>.</sup> (68) Note that substituting Eq. (68) in Eq. (67) gives the desired value of τ( x ) = τ <sup>−</sup> at the interface where _H_ (φ) = 0.5. Although the value inside the solid is incorrect, the value remains inconsequential since the no-penetration constraint and the formulation are only relevant outside the solid. Figure 2 presents a comparison between the different surface tension models. The harmonic mean using τ <sup>∗</sup> achieves the desired value of τ <sup>+</sup> at a faster rate for a given interface location. The pseudo-code is summarized in Algorithm 1: <u>Algorithm 1</u> <u>Pseudo-code using Heun’s method</u> 1: Initialize Φ <sup>0</sup> := {φ <sup>0</sup> _ijk_ <sup>}</sup> _ni_, _xj_,, _kn_ = _y_,1 _nz_ <sup>.</sup> <sup>Choose τ+, τ−, α,</sup> <sup>_dt_</sup> <sup>and</sup> <sup>_T_</sup> <sup>.</sup> 2: Set the solid boundary ψ. 3: Calculate surface tension distribution using Harmonic mean with τ <sup>∗</sup> 4: Compute _H_ ψ := _H_ ϵ(ψ), τψ := τ(ψ) and _H_ −ψ := _H_ ϵ(−ψ). 5: for _n_ = 1 to _T_ do 6: Define _div_ (·) = ∇· () using central difference. 7: Compute the discrete δφ := δϵ(φ) and _H_ φ := _H_ ϵ(φ). 8: Compute gradients ∇φ = ∂φ/∂ _xi_ using central difference. f 9: Compute magnitude of the gradient |∇φ| = (∂φ/∂ _x_ ) <sup>2</sup> + (∂φ/∂ _y_ ) <sup>2</sup> + (∂φ/∂ _z_ ) <sup>2</sup> . 10: Compute normals N = ∇φ/|∇φ|. 11: Compute curvature term κ(φ) := _div_ ( N ). 12: Compute the penalty term P(φ) := α _div_ ( _dp_ (|∇φ|)∇φ). 13: Compute gradient of surface tension distribution ∇τ using central difference. 9: Compute magnitude of the gradient |∇φ| = 14: Compute Lagrange multipliers λ(φ), µ(φ) using trapezoidal rule. 15: Set _f_ = P(φ) + δφ[τκ(φ) + ∇τ · N + _H_ −ψ∆ _p_ + µ(φ) _H_ ψ − λ(φ) _H_ −ψ] 16: Define _f_ = L (φ) 17: for _k_ = 1 to _nz_ do 18: for _j_ = 1 to _ny_ do 19: for _i_ = 1 to _nx_ do 20: φ¯ <sup>_n_</sup> _i jk_ <sup>+1</sup> <sup>= φ</sup> <sup>_n_</sup> _ijk_ <sup>+</sup> <sup>_dt_</sup> _ijk_ <sup>_n_</sup> <sup>]</sup> <sup>_n_</sup> _i jk_ <sup>+1</sup> <sup>= φ</sup> <sup>_n_</sup> <sup><u>1</u></sup> 2 <sup>φ¯</sup> _ijk_ <sup>_n_</sup> <sup>+1</sup> <sup>+</sup> 2 <sup><u>1</u></sup> 21: φ <sup>_n_</sup> _i jk_ <sup>+1</sup> <sup><u>1</u></sup> 2 <sup>φ</sup> <sup>_n_</sup> _ijk_ <sup>+</sup> <sup><u>1</u></sup> 2 <sup>_n_</sup> _ijk_ <sup>+</sup> <sup>_dt_</sup> <sup>L</sup> <sup>[φ</sup> <sup>_n_</sup> 21: φ <sup>_n_</sup> _i jk_ <sup>+1</sup> <sup>=</sup> <sup><u>1</u></sup> 2 <sup>φ</sup> <sup>_n_</sup> _ijk_ <sup>+</sup> <sup><u>1</u></sup> 2 <sup>φ¯</sup> _ijk_ <sup>_n_</sup> <sup>+1</sup> <sup>+</sup> 2 <sup><u>1</u></sup> <sup>_dt_</sup> <sup>L</sup> <sup>[¯φ</sup> <sup>_n_</sup> _ijk_ <sup>+1]</sup> 22: end for 23: end for <sup>_n_</sup> _i jk_ <sup>+1</sup> <sup>=</sup> <sup><u>1</u></sup> 2 24: end for 25: Update next time level φ <sup>_n_</sup> <sup>_n_</sup> _ijk_ <sup>= φ</sup> _ijk_ <sup>_n_</sup> <sup>+1</sup> _ijk_ 26: end for 27: <u>return</u> _Remark._ In the formulation by [15], the traditional level set is employed; the evolution of φ given by Eq. (50) without the penalty term and δ(φ) is replaced by |∇φ|. Note that the operator L[φ] in §2.1 describes a convection-diffusion equation given in Eq. (11). The system of LSE contains Hamilton-Jacobi equations coupled to curvature and stiff source terms. Singularities may develop in the solution and the numerical implementation requires much of the modern level set technology to obtain a stable solution [25]. The crucial ingredients are: (i) Break up the parabolic and hyperbolic terms and address each one with the appropriate numerical discretization. (ii) High-order accurate essentially non-oscillatory schemes (originating in the study of hyperbolic conservation laws) developed for Hamilton-Jacobi equations. (iii) Reinitialization of each LSF to be an SDF using Eq. (13). (iv) The curvature definition uses the explicit term involving the gradients of φ given by: κ = (φ <sup>2</sup> _x_ <sup>2</sup> _x_ <sup>φ</sup> <sup>_yy_</sup> <sup>−</sup> <sup>2φ</sup> <sup>_x_</sup> <sup>φ</sup> <sup>_y_</sup> <sup>φ</sup> <sup>_xy_</sup> <sup>+ φ2</sup> _y_ <sup>2</sup> _y_ <sup>φ</sup> <sup>_xx_</sup> <sup>+ φ2</sup> _x_ <sup>2</sup> _x_ <sup>φ</sup> <sup>_zz_</sup> <sup>−</sup> <sup>2φ</sup> <sup>_x_</sup> <sup>φ</sup> <sup>_z_</sup> <sup>φ</sup> <sup>_xz_</sup> <sup>+ φ2</sup> _z_ <sup>2</sup> _z_ <sup>φ</sup> <sup>_xx_</sup> <sup>+ φ2</sup> _y_ <sup>2</sup> _y_ <sup>−</sup> <sup>2φ</sup> <sup>_y_</sup> <sup>φ</sup> <sup>_z_</sup> <sup>φ</sup> <sup>_yz_</sup> <sup>+ φ</sup> _z_ <sup>2</sup> _z_ <sup>2φ</sup> <sup>_yy_</sup> <sup>)/|∇φ|3/2 .</sup> (69) However, the Lagrange multiplier requires the use of a distance function to define curvature on or near the front using a separate definition given by: κ = trace[[ _I_ - φ _D_ <sup>2</sup> φ] <sup>−1</sup> _D_ <sup>2</sup> φ], (70) / p y ( 9) where _D_ <sup>2</sup> φ is the Hessian of φ. This formula yields a constant value of κ normal to the front and gives the correct value on the front. All of which is not necessary in the current formulation. Note that in traditional level set methodologies, the reinitialization step enforces a local volume conservation [26]. The numerical integration uses a 9-point quadrature formula in two spatial dimension. As mentioned earlier, the constraints in the current algorithm are enforced in a global sense. In order to test the local integration method, a 27-point quadrature formula is employed for the general three spatial dimensions given by 1 _p_, _q_, _r_ =1 ( _p_, _q_, _r_ )�(0,0,0) _fi_ + _p_, _j_ + _q_, _k_ + _r_ d x . (71) Ω _ijk_ _fijk_ d x ≈ <sup><u>1</u></sup> 78 52 _fi jk_ + The local volume conservation could not be satisfied. It is worth noting that the local integration was also tested on the no-penetration constraint using the original formulation of µ using Eq. (53) instead of Eq. (64) with the standard surface tension model given by Eq. (66) instead of Eq. (67). The algorithm gave correct results for the interface contact points and radius of curvature over a cosine surface. However, for the locations where there is a liquid-solid overlap, the interface leaks about 3-cells deep into the solid (for regions of high curvature) and 1-cell deep (for shallow regions). It is not evident if the interface will leak more in regions of extremely large curvature (e.g. sharp peaks), therefore the method where the constraints are enforced globally will be used since it is more robust. 5. Validation We begin with the effect of distance regularization as a method to satisfy |∇φ| = 1, next we build up in complexity of the evolution equation where we make sure that the method can solve traditional level set problems such as motion in the normal direction and curvature-driven flows. We validate our energy minimization model of the Gibbs free energy with the analytic solution of [11]. We finally present some results over general geometries to demonstrate the effectiveness and flexibility of the proposed algorithm. _5.1._ _Distance Regularization as Reinitialization_ The effect of distance regularization as a method of reinitialization is demonstrated by simulating the forward and backward (FAB) diffusion problem with a binary LSF. Define the initial binary level set function φ _o_ by - _co_, for x ∈ Ω _o_ 0, for x ∈ ∂Ω _o_ _co_, for x ∈ Ω - Ω _o_, φ _o_ ( x ) =  (72) where _co_ is a positive constant. Note that φ _o_ does not need to be initialized as an SDF like traditional LSM; this allows for flexibility in initialization due to its simplicity and practicality. The region Ω _o_ is taken to be a square of side length 60 embedded in a square domain on a 100 × 100 grid, the time-step is taken to be _dt_ = 0.5 and α = 0.4. Define φ _o_ with a constant of _co_ = 10 which creates a steep jump of width 2 _co_ as shown in figure 3( _a_ ), the solid red line highlights the zero crossing of φ _o_ . The evolution of φ follows from the description of the properties of double-well potential given in §2.2.1. We solve a simple FAB diffusion evolution equation given by <u>∂φ</u> <sup><u>∂</u></sup> ∂φ <sup>J</sup> <sup>= −α∂</sup> ∂φ <sup>R</sup> <sup>_p_</sup> (73) ∂φ <sup>R</sup> <sup>_p_</sup> <sup>= α∇· (</sup> <sup>_dp_</sup> <sup>(|∇φ|)∇φ) .</sup> <u>∂φ∂</u> _t_ <sup>= −</sup> <sup><u>∂</u></sup> ∂φ <sup>J</sup> At _t_ = 0 the zero crossing of φ _o_ has a |∇φ _o_ | >> 1 due to the steep jump in the binary initialization. As a result, the diffusion rate α _dp_ (|∇φ|) is positive and drives a forward diffusion which reduces |∇φ| until it reaches unity; the forward diffusion stops once |∇φ| = 1. For the case where |∇φ| becomes less than unity, α _dp_ (|∇φ|) becomes negative for (1/2) < |∇φ| < 1, therefore the backward diffusion increases the value of |∇φ| to unity. Figure 3( _b_ ) shows the final result of φ where the level set is an SDF in the vicinity of the zero level set crossing. Figure 3( _c_ ) shows a cross-section of φ for _y_ = 50 where the dashed red line indicates the zero crossing. Note that |∇φ| = 1 is satisfied within _co_ and − _co_ about the zero crossing, which will be defined as the signed distance band (SDB). Figure 3( _d_ ) shows a cross-section of |∇φ| where the SDB, of width approximately 2 _co_, is highlighted with the dashed blue lines. On either sides of the SDB the binary function is constant, therefore |∇φ| = 0 and α _dp_ (|∇φ|) > 0 indicating a forward diffusion that keeps φ flat at its constant value since the double-well potential is at a minimum. / p y ( 9) _Remark._ The bottom row of figure 3 uses the standard reinitialization method to provide a comparison to distance regularization. Figure 3( _e_ ) shows the final level set where the step function no longer exists compared to figure 3( _b_ ). The cross-section in figure 3( _f_ ) gives a clearer picture of the difference; the standard reinitialization ensures that the entire level set is an SDF, hence the slope on both ends of the discontinuity at _x_ = 50 have a value of unity satisfying |∇φ| = 1. Figure 3( _g_ ) shows the cross-section of |∇φ|, note how its value of unity is satisfied everywhere in the domain with the exception of the discontinuity, whereas figure 3( _d_ ) shows the |∇φ| being satisfied locally near the region of φ = 0 over a band width of 2 _co_ . However, both methods round the corners of the zero level set square contour. Therefore, one of the main differences between the two methods is that distance regularization only cares about the region around the zero level set within a certain band of width 2 _co_, and everything else in the far field remains a constant. This makes the DRLSE method highly localized. _5.2._ _Curvature-Driven Flow_ Traditional LSM has been used extensively in the context of externally driven flows. This involves both an externally generated velocity field, or a self-generated field u that depends directly on φ. Consider the motion by mean curvature where the interface moves in the normal direction to the interface with a velocity proportional to its curvature. The velocity field is defined by u = −κ N where κ = ∇· (∇φ/|∇φ|) such that the evolution equation becomes <u>∂φ</u> ∂ _t_ <sup>−</sup> <sup>κ</sup> <sup>N</sup> <sup>· ∇φ = 0,</sup> (74) and since the normal N is along the gradient direction ∇φ, it is equivalent to <u>∂φ</u> ∂ _t_ <sup>−</sup> <sup>κ|∇φ| = 0.</sup> (75) The above results in a parabolic equation φ _t_ = κ|∇φ| that can be solved using central differencing with a stringent timestep restriction for stability. In the context of variational level set methodology, we can show that a mean curvature flow can be obtained by minimizing an external energy defined by the surface area of the LSF given by E _ext_ (φ) = _L_ 0(φ) = δ(φ)|∇φ| d x . (76) Ω Taking the Fr´echet derivative of E _ext_ with respect to the _L_ <sup>2</sup> inner product gives <u>∂E</u> _<u>ext</u>_ - ∇φ = −δ(φ)∇· ∂φ |∇φ| . (77) This is similar to the curvature-driven evolution equation with the exception that δ(φ) is |∇φ| instead. [15] simply replaced the terms in their formulation and reasoned that using |∇φ| is less stiff. Although both of the evolution equations are curvature driven, it is worth pointing out that they are inherently different. The equation given by φ _t_ = δ(φ)∇· (∇φ/|∇φ|) moves the zero level set only which is only active due to δ(φ). However, the equation given by φ _t_ = |∇φ|∇· (∇φ/|∇φ|) moves all the level sets by their respective curvatures i.e. all the neighboring values of the level set evolve with the same law. [27] argues that by definition, we can allow all the level sets to move by a perturbation of an energy functional that measures the total length of all level curves E _ext_ (φ) = β _L_ β(φ) dβ = Ω |∇φ| d x, (78) where _L_ β(φ) = where _L_ β(φ) = �Ω <sup>δ(φ −</sup> <sup>β)|∇φ| d</sup> <sup>x</sup> <sup>.</sup> <sup>Note that the variation of φ only affects ∇φ but does not move the level sets.</sup> <sup>Since</sup> the level set is a signed distance function, we can define a new level set norm [27] instead of the usual _L_ <sup>2</sup> norm as ⟨ _f_, _g_ ⟩φ = The Fr´echet derivative obtained from this new norm is Ω _<u>g</u>_ _f_ |∇φ| <sup>d</sup> <sup>x</sup> <sup>.</sup> (79) φ <sup>= −</sup> - <u>χ</u> |∇φ| |∇φ| <sup>d</sup> <sup>x</sup> <sup>.</sup> (80) - <u>∂E</u> _<u>ext</u>_ ∂φ <sup>, χ</sup> - <u>∂E</u> _<u>ext</u>_ ∂φ <sup>, χ</sup> Ω - ∇φ |∇φ| lim ϵ→0 <u>1</u> ϵ - E _ext_ (φ + ϵχ) −E _ext_ (φ) = ∇· / p y ( 9) ( _a_ ) ( _b_ ) ( _c_ ) ( _d_ ) ( _e_ ) ( _f_ ) ( _g_ ) Fig. 3: The evolution of a level set function under the effect of distance regularization. ( _a_ ) The initial level set φ _o_ where the red solid line indicates φ _o_ = 0. ( _b_ ) The final level set after diffusion where the solid red line indicates φ = 0. ( _c_ ) A cross-section of the final level set function where the red dashed line indicates φ = 0. ( _d_ ) A cross-section of |∇φ| where the blue dashed lines indicate the width of the signed distance band. ( _e_ ) The final level set after standard reinitialization. ( _f_ ) A cross-section of the final level set function after standard reinitialization. ( _g_ ) A cross-section of |∇φ| after standard reinitialization. / p y ( 9) This results in <u>∂E</u> _<u>ext</u>_ = −∇· ∂φ - ∇φ |∇φ| |∇φ|, (81) which lends itself to the traditional curvature-driven flow discussed earlier in this section. The evolution equation solved is given by <u>∂φ</u> ∂ _t_ <sup>= α∇· (</sup> <sup>_dp_</sup> <sup>(|∇φ|)∇φ) + ∇·</sup> - ∇φ |∇φ| |∇φ| . (82) Note that as mentioned earlier we can advect all the level curves in the context of energy minimization such that we can replicate the motion of a curvature-driven flow. Isolating the zero level set curve gives an evolution equation that does not look like the typical curvature-driven flow, but since the current method is only concerned with the region around the interface, it is able to handle both equations without running into stability problems. This was tested for both formulations but we will only present the traditional cases for brevity. The only difference observed between the two formulations is the rate at which the curves reach the desired final solution. _5.2.1._ _Seven-Pointed Star_ Consider a seven pointed star given by the following parameterized curve γ( _s_ ) = <sup>�</sup> 20 + 10 cos(7 · 2π _s_ ) <sup>��</sup> cos(2π _s_ ), sin(2π _s_ ) <sup>�</sup> for _s_ ∈ [0, 1], (83) such that the zero level set is defined from polar coordinates is given by - φ( x, 0) = || x - xc || − 20 + 10 cos 7 · arctan <sup>�</sup> ( _y_ - _yc_ )/( _x_ - _xc_ ) <sup>���</sup>, (84) where xc is the offset parameter. We shift the petal shapes of the star from its center by 20 units of length which effectively increases the relative size of the petal shape compared to the main body, a scaling factor of 10 for the star size and 7 points for the number of petals in the star. The computational domain is a square with side length of 100 units and a grid size of 100 × 100. The time-step is _dt_ = 0.1 and α = 0.4. The star-shaped level curve is centered at (50, 50). The simulation is run for 600 iterations. Figure 4 shows the progression of the front evolving under the curvature-driven flow for _t_ = 0.0, 7.5, 15, 22.5, 30.0, 37.5, 45.0, 52.5, 60.0. The star-shaped curve collapses to a circle under this motion where the region of positive curvature (peaks) collapses inwards and the regions of negative curvature (troughs) propagate outward. _5.2.2._ _Wound Spiral_ Figure 5 shows results of the same curvature-driven motion for a wound spiral given by the following parameterization θ = 2π _D_ <sup>√</sup> _s_ for _s_ ∈ [0, 1], (85) such that _s_ = ( _k_ + _a_ )/( _np_ + _a_ ) where _k_ is an integer that loops over the total number of points _np_, and the value of _a_ determines the shape of the spiral head in the center. The location of the points is defined by _xp_ = _xc_ + _sf_ <sup>�</sup> _D_ /(1 + _D_ ) <sup>~~√~~</sup> _s_ cos(θ) <sup>�</sup> and _yp_ = _yc_ + _sf_ <sup>�</sup> _D_ /(1 + _D_ ) <sup>~~√~~</sup> _s_ sin(θ) <sup>�</sup>, (86) where xc is the center location of the domain, _sf_ the scaling factor for the spiral size and _D_ the number of spirals. Define a distance function _d_ ( x ) = || x - xp || such that the zero level set comes out as φ( x, 0) = _d_ ( x ) − _w_ (87) where _w_ is the width of the spirals. The computational domain is a square with side length of 100 units and a grid size of 100 × 100. The time-step is _dt_ = 0.1 and α = 0.4. The wound spiral level curve is centered at xc = (50, 50) with _np_ = 400, _D_ = 2.5, _a_ = 3 and _sf_ = 50. The simulation is run for 3000 iterations. Figure 5 shows the progression of the front evolving under a curvature-driven flow for _t_ = 0.0, 37.5, 75.0, 112.5, 150.0, 187.5, 225.0, 262.5, 300.0. The wound spiral collapses to a circle under this motion where the region of positive curvature (spiral ends) collapse faster than the elongated regions. / p y ( 9) Fig. 4: Evolution of the star-shape under a curvature-driven flow. The images are snapshots in time from left to right, top to bottom where the star collapses unto a circle for _t_ = 0.0, 7.5, 15.0, 22.5, 30.0, 37.5, 45.0, 52.5, 60.0. / p y ( 9) Fig. 5: Evolution of the spiral under a curvature-driven flow. The images are snapshots in time from left to right, top to bottom where the ends of the spiral unwind faster than the interior region for _t_ = 0.0, 37.5, 75.0, 112.5, 150.0, 187.5, 225.0, 262.5, 300.0. / p y ( 9) _5.2.3._ _Dumbbell_ The previous examples presented level curves in 2D. Here, we show that the method is also applicable in 3D where we examine the curvature-driven motion of a dumbbell-shaped level surface. The level surface is initialized by taking advantage of the simplicity of Boolean functions in the LSM. Consider the union of two spheres and a cylinder given by: (88) φ _left_ ( x ) = φ _right_ ( x ) = �( _x_ - _xc_ + _o_ ) <sup>2</sup> + ( _y_ - _yc_ ) <sup>2</sup> + ( _z_ - _zc_ ) <sup>2</sup> - _r_, �( _x_ - _xc_ - _o_ ) <sup>2</sup> + ( _y_ - _yc_ ) <sup>2</sup> + ( _z_ - _zc_ ) <sup>2</sup> - _r_, φ _center_ ( x ) = max - ~~�~~ �� ��| _x_ - _xc_ | − _o_ �, ( _y_ - _yc_ ) <sup>2</sup> + ( _z_ - _zc_ ) <sup>2</sup> - _w_, φ( x, 0) = min[φ _le ft_, φ _right_, φ _center_ ], where xc are the domain center coordinates, _o_ is the distance between the center of the spherical shells and the center of the cylinder, _r_ the radius of the spherical shells and _w_ the radius of the center cylinder. Figure 6 demonstrates the ability of the level set methodology to handle pinching, merging and separation of surfaces without any special mathematical or algorithmic ‘surgery’. The initial dumbbell level set evolves under the motion of mean curvature, and the handle shrinks faster due to its higher curvature than the spherical shells on both ends. This leads to a pinch-off at the center where the implicit surface separates into two tear drop surfaces that also shrink due to curvature. The computational domain is a cube with side length of 100 units and grid size of 100 × 100 × 100. The time-step is _dt_ = 0.1 and α = 0.4. The dumbbell level surface is centered at xc = (50, 50, 50) with _r_ = 10, _w_ = 5 and _o_ = 20. The case is run for 160 iterations. Figure 6 shows the progression of the front evolving under a curvature-driven flow for _t_ = 0.0, 2.0, 4.0, 6.0, 8.0, 10.0, 12.0, 14.0, 16.0. Figure 7 shows a cut slice at _z_ = 50 where the evolution of the dumbbell leading up to pinching is more clear. _5.3._ _Motion in the Normal Direction_ Consider motion in the normal direction where the interface evolves under an internally generated velocity field. The velocity field is defined by u = _a_ N where _a_ is a constant that can be either positive or negative. The equations of motion for the level set equation are given by: <u>∂φ</u> ∂ _t_ <sup>+</sup> <sup>_a_</sup> <sup>N</sup> <sup>· ∇φ = 0,</sup> (89) which can be rewritten as <u>∂φ</u> ∂ _t_ <sup>+</sup> <sup>_vn_</sup> <sup>|∇φ| = 0,</sup> (90) where _vn_ = _a_ is the constant velocity in the normal direction. This motion can also be represented as a case of energy minimization. Express the energy functional in terms of a volume enclosed by the surface φ < 0 such that E _ext_ (φ) = _vn_ Ω Taking the Fr´echet derivative of E⌉§⊔ with an _L_ <sup>2</sup> norm gives _H_ (−φ) d x . (91) <u>∂E</u> _<u>ext</u>_ = _vn_ δ(−φ) = − _vn_ δ(φ). (92) ∂φ A similar argument to §5.2 can be made. The Dirac delta functional singles out the zero level set. In order to obtain motion in the normal direction, all the level sets should minimize their values such that the volume enclosed under each respective level curve _V_ β(φ) = �Ω <sup>_H_</sup> <sup>(−φ + β) d</sup> <sup>x</sup> <sup>tends to zero.</sup> <sup>The definition of the energy functional becomes:</sup> Ω <sup>_H_</sup> <sup>(−φ + β) d</sup> <sup>x</sup> <sup>tends to zero.</sup> <sup>The definition of the energy functional becomes:</sup> Ω E _ext_ (φ) = _vn_ β _H_ (−φ + β) d x dβ . (93) / p y ( 9) 9 Fig. 6: Evolution of a dumbbell shaped surface under a curvature-driven flow. The images are snapshots in time from left to right, top to bottom where the handle of the dumbbell shrinks faster than the spherical shells due to its high curvature leading to a pinch-off for _t_ = 0.0, 2.0, 4.0, 6.0, 8.0, 10.0, 12.0, 14.0, 16.0. Fig. 7: A 2D slice in the middle of the dumbbell at _z_ = 50 for the zero level set contour evolving under curvature-driven motion for _t_ = 0.0, 2.0, 4.0, 6.0, 8.0, 10.0, 12.0, 14.0, 16.0. / p y ( 9) Therefore by definition, the Fr´echet derivative of E _ext_ using the new norm is defined as: φ <sup>=</sup> <sup>_vn_</sup> Ω δ(−φ + β) |∇φ| |∇ <sup><u>χ</u></sup> φ| <sup>d</sup> <sup>x</sup> <sup>dβ,</sup> (94) = - <u>∂E</u> _<u>ext</u>_ ∂φ <sup>, χ</sup> β lim ϵ→0 <u>1</u> ϵ E _ext_ (φ + ϵχ) −E _ext_ (φ) where β Ω Ω δ(−φ + β) |∇φ| <sup><u>χ</u></sup> |∇φ| <sup>d</sup> <sup>x</sup> <sup>dβ = −</sup> |∇φ| |∇ <sup><u>χ</u></sup> φ| <sup>d</sup> <sup>x</sup> <sup>.</sup> (95) Therefore, the expression can be written as <u>∂E</u> _<u>ext</u>_ = − _vn_ |∇φ| . (96) ∂φ The evolution equation becomes <u>∂φ</u> ∂ _t_ <sup>= α∇· (</sup> <sup>_dp_</sup> <sup>(|∇φ|)∇φ) +</sup> <sup>_vn_</sup> <sup>|∇φ|.</sup> (97) The above equation leads to the traditional motion in the normal direction. We validate this type of motion for _vn_ = −1 and _vn_ = 1, where the latter describes the motion by which all the level curves maximize the volume they enclose. Given the above, we compare the effect of reinitialization using DRLSE, traditional reinitialization and no reinitialization for several cases that will be discussed in the following sections. _5.3.1._ _Circle with vn_ = −1 Consider a level curve of a circle given by the following implicit equation: φ( x, 0) = || x - xc || − _r_ . (98) The domain is a square of size 100 × 100 units where xc = (50, 50) and _r_ = 25, the time-step is _dt_ = 0.1 and α = 0.4. Figure 8 shows the evolution of a contracting circle under a constant velocity _vn_ = −1 which is a result of minimizing the volume enclosed by φ < 0. We solve the equation given by φ _t_ = |∇φ| using DRLSE which is posed as a level set evolution for a reaction-diffusion type problem. For the traditional level set, the equation solved keeps the velocity term on the left hand side (φ _t_ −|∇φ| = 0), this requires a class of high-order schemes for the advection where the level set is reinitialized after each time-step. The top row in figure 8 shows the results from the DRLSE, middle row for the traditional level set with reinitialization, and the bottom row for traditional level set without reinitialization. The left column (figures 8 _a_, _d_ and _g_ ) shows a cut plot in the plane of _y_ = 50, the solid thick black line is the initial level set location, the subsequent colored lines are the time evolved level sets. The dashed red line indicates the zero level set crossing. The center column (figures 8 _b_, _e_ and _h_ ) is a contour plot of the zero level set crossing shown in the thick solid red line, expanding zero level sets over time are shown in the solid blue line. The right column (figures 8 _c_, _f_ and _i_ ) shows the final level set function. The first striking feature of not reinitializing the level set is the ringing observed in figure 8( _a_ ). This is a well known issue; the level curves are no longer signed distance functions as they tend to drift away from their initialized value. The errors accumulate leading each level set curve to intersect and develop noisy features and steep gradients that further corrupt the numerical approximation of |∇φ|. The advection equation becomes stable once the level set function is reinitialized. The regions where the level set pile up on each other (e.g. near the center of the domain where a kink exists), noisy features develop. This is also evident in figure 8( _b_ ) where we clearly observe the unstable level set contours near the center of the domain. In the regions where the level sets separate from each other (domain boundaries), we get the flattening of φ as shown in figure 8( _a_ ) in the region furthest from the kink. The steepening and flattening effects increase numerical errors as shown in figure 8( _c_ ) where numerical errors are the largest in the center. Thus in order to reduce these errors, one has to reset the location of the isocontours of each level curve via reinitialization. Figures 8( _d_ ), ( _e_ ) and ( _f_ ) show the results of the traditional level set advection with reinitialization. The level set functions are well-behaved, figure 8( _d_ ) shows the level set moving upwards while maintaining the kink at _xc_ with a slight rounding of the edges. The signed distance function is maintained. Figure 8( _e_ ) shows the isocontours as the level set moving inwards, note the loss of symmetry in the regions where the normals have either of their components equal to zero. Higher order schemes, finer grids and lower time-steps can correct for the asymmetries. Figures 8( _g_ ), ( _h_ ) and ( _i_ ) show the results for the DRLSE. Note that as the level set curve shifts upwards in figure 8( _g_ ), the kink is maintained at _xc_ without any rounding in the corner. The far field has level sets piling up but this has no effect on the solution since the level sets are moving away from the boundaries and towards the center of the circle. Accuracy is / p y ( 9) ( _a_ ) ( _b_ ) ( _c_ ) ( _d_ ) ( _e_ ) ( _f_ ) ( _g_ ) ( _h_ ) ( _i_ ) Fig. 8: A comparison of the inward motion in the normal direction of a circle for the level set methodology without reinitialization, traditional reinitialization and DRLSE from top to bottom respectively. Left column is a cut plane at _y_ = 50 for the evolution of the contour over time. The solid thick black line is the initial state, the colored lines are the subsequent time-steps and the red dashed line is the zero level set crossing. The center column is the evolution of the zero level set curves with time, solid red line is the initial condition and the solid blue lines represent the subsequent time-steps. The right most column shows the evolution of the level set surface with the solid red line highlighting the zero level set crossing. / p y ( 9) ( _a_ ) ( _b_ ) ( _c_ ) ( _d_ ) ( _e_ ) ( _f_ ) Fig. 9: A comparison of the outward motion in the normal direction of a star-shaped contour for the level set methodology without reinitialization, traditional reinitialization and DRLSE from left to right respectively. Top row is the evolution of the zero level set curves with time, solid red line is the initial condition and the solid blue lines represent the subsequent time-steps. Bottom shows the evolution of the level set surface with the solid red line highlighting the zero level set crossing. maintained as it nears the center, the level curves maintain their circular shape as they advect inwards. Figures 8( _f_ ) and ( _i_ ) show differences in the far field where the lobes are less uniform but are inconsequential to the final solution. Note that a similar test case was performed using _vn_ = 1 for the circular shape (not shown here); similar behavior is observed. _5.3.2._ _Seven-Pointed Star with vn_ = 1 Consider the same implicit function described in §5.2.1. Figure 9 shows the behavior of a more complicated shape for the case of the outward motion in the normal direction. Qualitatively, similar trends are observed when compared to the circular shape. This ensures that even more complicated shapes are handled effectively given our numerical scheme. Figure 9( _a_ ) shows the ringing generated in the far field as the zero level set curve advects away from the initial star. Figure 9( _b_ ) is well-behaved with reinitialization but still loses its symmetrical shapes around the star lobes. The curvature diffuses at a faster rate leading to an early flattening of the curve. Figure 9( _c_ ) shows a symmetrical outgrowth of the seven pointed star. As mentioned in previous sections, figures 9( _d_ ), ( _e_ ) and ( _f_ ) are the final level set surface showing the large numerical errors for the no reinitialization case, and a well-behaved final solution for the traditional level set and DRLSE. Similar to the conclusions made above, the flattening of the level set at _xc_ is inconsequential to the final solution since the zero level curve is moving away from it. _5.4._ _Energy Minimization_ We take the LS formulation of the Gibbs free energy model presented in §3.1 and solve the governing equations using the variational formulation presented in §4. The governing evolution equations are a combination of curvaturedriven flow with motion in the normal direction. Longitudinal grooves are used first because of the well-defined corners. This causes the interface to pin at the edges and allows for direct comparison to the Young-Laplace equation. Then a cosine wavy substrate is simulated to compare to the analytic solution obtained by [11]. _Rnumerical_ _y_ / p y ( 9) _w_ _hp_ _x_ Fig. 10: Equilibrium interface location for a 2D grooved substrate. The thick solid line represents the grooved geometry and the thin solid line the zero level set curve represents the interface. The dashed-dot black line represents the radius of curvature of the meniscus, the dashed line denotes the width of the groove and the dotted line the meniscus height (measured from the contact points). _5.4.1._ 2 _D Longitudinal Grooves_ Consider a rough substrate representing a longitudinal groove, the level set that represents the solid is given by: ψ( x ) = ( _y_ - _yc_ ) − sgn - _h_, cos <sup>�</sup> _kx_ ( _x_ - _xc_ ) <sup>��</sup> , (99) such that _h_ = 1, with a wavelength of π such that _kx_ = 2 to get multiple grooves and _sgn_ the sign function. The grooves are shifted by xc = (0, 1, 0) so that the bottom of the surface corresponds to the origin. The domain extents are [ _Lx_, _Ly_, _Lz_ ] = [2π, 3, 2π] and grid size _nx_ × _ny_ × _nz_ = 256 × 123 × 1. The time-step is taken to be _dt_ = 10 <sup>−4</sup> and α = 0.4. For an external pressure of ∆ _p_ = 1, and a non-dimensional τ <sup>−</sup> = 1, the Young-Laplace equation gives a radius of curvature _Ranalytic_ = 1. From the current results, the radius of curvature is computed numerically from the contact points and penetration depth _hp_ into the groove using _Rnumerical_ = _w_ <sup>2</sup> /(8 _hp_ ) + _hp_ /2 = 0.993 where _w_ is the groove width. The error is 0.7% showing good agreement with the theoretically predicted results. _5.4.2._ 2 _D Wavy Substrate_ Consider a wavy substrate using a profile given by: ψ( x ) = ( _y_ - _yc_ ) − _h_ cos <sup>�</sup> _kx_ ( _x_ - _xc_ ) <sup>�</sup> . (100) The peak to valley height _h_ of the wavy substrate is taken to be twice the critical height _hcr_ where _hcr_ = - tan θ _Y_ [11] and θ _Y_ = 140 <sup>◦</sup> . The wavelength of the substrate is taken to be 2π such that _kx_ = 1. The substrate is shifted by xc = (0, _hcr_ ). The domain extents are [ _Lx_, _Ly_, _Lz_ ] = [2π, 4, 2π] with a spatial resolution of _nx_ × _ny_ × _nz_ = 256 × 164 × 1 and a time-step of _dt_ = 10 <sup>−5</sup> . [11] derived an analytical model to predict the interface equilibrium location given an external pressure field. They analyzed the asymptotic behavior of the system and proposed a simple criterion for the minimum _hcr_ that prevents a Wenzel state. Their solution can predict the pressure value required to overcome the energy barrier to transition from a Cassie state to a Wenzel state. Using our model, we perform a parametric study of different values of pressure and compare the resulting interface shape and location to the analytic solution. The pressure value that leads to the Wenzel state is obtained using the analytic solution for the above conditions which comes out to be 0.25. The values of external pressure prescribed are: ∆ _p_ = 0.05, 0.1, 0.15, 0.2, 0.26 where the last value was picked to test if we can predict interface failure. The regularization coefficient for this particular problem was varied to gauge its effect on the interface location. For the first case we use α = 0.4, for the next two cases we use α = 0.8 and for the last two we use α = 0.4. We also tested α = 0.2 for the third case (not presented here); overall we did not see an appreciable effect, the error in interface location varied within 1% − 3%. Note that all selected values of α satisfy the CFL condition for a given time-step. For all the cases, the simulation is terminated when equilibrium is achieved. This is determined by keeping track of the Gibbs free energy over time until it tends to a steady state. _y_ / p y ( 9) ∆ _p_ _x_ Fig. 11: Equilibrium interface location for a cosine substrate. The solid black lines represent the numerical simulations and the symbols are Carbone’s results. The arrow indicates increasing external pressure. Symbols are: ∆ _p_ = 0.05 ( _2_ ), 0.1 (△), 0.15 ( _3_ ), 0.2 (⃝), 0.26 (▽). The inset shows a zoomed in plot for ∆ _p_ = 0.2 with different surface tension models: harmonic mean using τ <sup>∗</sup> (solid line), arithmetic mean using τ <sup>∗</sup> (dashed line), harmonic mean using τ <sup>+</sup> (dashed-dotted line), and arithmetic mean using τ <sup>+</sup> (dotted line). <u>∆</u> _<u>p</u>_ _<u>y</u>_ <u>¯</u> _<u>analytic</u>_ _<u>y</u>_ <u>¯</u> _<u>numerical</u>_ _<u>E</u>_ <u>(%)</u> _<u>aanalytic</u>_ _<u>anumerical</u>_ _<u>E</u>_ <u>(%)</u> _<u>Ranalytic</u>_ _<u>Rnumerical</u>_ _<u>E</u>_ <u>(%)</u> 0.05 2.901 2.906 0.17 0.69 0.71 2.3 19.93 19.316 3.1 0.1 2.57 2.59 0.77 0.91 0.92 1.3 9.93 9.78 1.55 0.15 2.16 2.17 0.55 1.173 1.17 0.085 6.66 6.56 1.54 0.2 1.63 1.66 1.4 1.50 1.49 0.86 4.98 4.944 0.81 Table 1: Comparison between the analytic and numerical values obtained for: the mean LG interface height _y_ ¯, interface contact point _a_, and radius of curvature _R_ for a given external pressure ∆ _p_ . Once the change in |( _G_ <sup>_n_</sup> _tot_ <sup>+1</sup> _tot_ <sup>_n_</sup> <sup>)/</sup> <sup>_Gn_</sup> Once the change in |( _G_ <sup>_n_</sup> _tot_ <sup>+1</sup> <sup>−</sup> <sup>_G_</sup> _tot_ <sup>_n_</sup> <sup>)/</sup> <sup>_Gn_</sup> _tot_ <sup>| < O(10−3) the simulation is stopped.</sup> <sup>Figure 11 shows a comparison between</sup> our numerical model (solid lines) and the analytic solution (symbols). Good agreement is observed. Note that for the value of ∆ _p_ = 0.26, the interface fails and lies exactly on top of the cosine substrate. The inset in figure 11 shows the effect of different surface tension models. We fix ∆ _p_ at 0.2 and change the method with which surface tension is computed. It is evident that using the harmonic mean distribution of Eq. (67) yields the most accurate results. Using an arithmetic distribution given in Eq. (66) with τ <sup>∗</sup> instead of τ <sup>+</sup> underestimates the location by 7%. Note that using τ <sup>+</sup> with either arithmetic or harmonic distribution significantly underestimates the location with error around 33%. Table 1 shows quantitative results for the mean LG interface height, the triple line contact points and radius of curvature. These quantities are manually extracted from a visualization software. _5.5._ 2 _D Droplet at a Wall_ Consider a flat solid wall initialized as a binary function instead of an SDF given by: <sup>_n_</sup> _tot_ <sup>+1</sup> <sup>−</sup> <sup>_Gn_</sup> _co_, for _y_ < _h_ (101) - _co_, for _y_ ≥ _h_, ψ( x ) =  where _h_ = 0.2 and _co_ = 3ϵ. A rectangular droplet of length 0.4 and width 0.6 centered at ( _xc_, _yc_ ) = (0.5, 0.4) is initialized on the solid wall. The domain extents are [ _Lx_, _Ly_, _Lz_ ] = [1, 1, 1]. The simulation is run using three different grid resolutions _nx_ × _ny_ × _nz_ = 50 × 50 × 1, 100 × 100 × 1 and 200 × 200 × 1. The time-step taken for each grid is 10 <sup>−5</sup>, 10 <sup>−6</sup> and 10 <sup>−7</sup> respectively with α = 0.4. The bulk energy here is the gravitational potential energy, i.e. _h_ ( x ) - g instead of ∆ _p_, where g is the magnitude and direction of the gravitational force which is taken to be unity in this example. ( _a_ ) _y_ / p y ( 9) ( _b_ ) _V_ / _Vo_ _x_ _t_ / _t f_ Fig. 12: Evolution of a 2D bubble over an unwetted wall from an initial binary rectangle to its equilibrium position. ( _a_ ) The dashed black line is the initial condition of a binary rectangle, and the solid black line is the final equilibrium location. ( _b_ ) volume conservation over time for three different grid resolutions: red solid line for 50 × 50, green dashed line for 100 × 100 and blue dashed-dot line for 200 × 200. The time axis is shown on a log scale. The surface tension values are τ <sup>−</sup> = 0.6 and τ <sup>+</sup> = 0.5 which corresponds to θ _Y_ = 140 <sup>◦</sup> . Figure 12( _a_ ) shows the evolution from the initial rectangular droplet (dashed line) into a droplet at equilibrium (solid line) that satisfies the contact angle of θ _Y_ = 139.72 <sup>◦</sup>, which is within 0.2% of the prescribed contact angle. Figure 12( _b_ ) shows the volume of the liquid normalized by the initial volume as it evolves in time (on a log scale) up until the equilibrium solution. Similar to the previous simulations, we track the Gibbs free energy until it reaches steady state (not shown here). As the interface evolves from an initial binary function, the volume experiences a sharp oscillation as the penalty term smears out the interface to satisfy an SDF. The jump in volume is significantly reduced as the grid resolution is increased. The volume then plateaus as the interface reaches equilibrium. The change in volume at equilibrium from the coarsest grid to the finest are: 8.046 × 10 <sup>−3</sup> %, 5.037 × 10 <sup>−3</sup> % and 3.5 × 10 <sup>−4</sup> % respectively. For the finest grid, we ran the simulation 10 times longer after it reached equilibrium to quantify the effectiveness of volume conservation, and the largest change in volume observed was around 1.7%. _Remark._ To test the effect of the Lagrange multiplier constraints, the no-penetration constraint is turned off and as expected the bubble leaks into the solid wall deforming its equilibrium shape. Similar behavior is observed for the longitudinal grooves and wavy substrate where the interface does not feel the effect of the wall. When the volume conservation constraint is turned off, the binary rectangular bubble evolves into a droplet shape since it behaves like a curvature-driven flow, however it keeps shrinking until the drop disappears. 6. Numerical Experiments The numerical results for predicting equilibrium interfacial shapes over a variety of rough surfaces will be discussed. In the earlier section, we validated our results against the analytical solution of a cosine substrate obtained by [11] for different loading conditions. In the following sections, we demonstrate the robustness of the algorithm for different geometries such as a 3D wavy substrate, longitudinal grooves, posts, and random roughness. _6.1._ 3 _D Longitudinal Grooves_ Consider a rough substrate representing a 3D longitudinal groove, the level set that represents the solid is given by: ψ( x ) = ( _y_ - _yc_ ) − sgn - _h_, cos <sup>�</sup> _kx_ ( _x_ - _xc_ ) <sup>��</sup> , (102) / p y ( 9) Fig. 13: Equilibrium interface location for a 3D grooved substrate where the gray isosurface represents the rigid substrate and the cyan transparent isosurface of the zero level set represents the interface. such that _h_ = 1, where the wavelength is π such that _kx_ = 2. The grooves are shifted by xc = (0, 1, 0) so that the bottom of the surface corresponds to the origin. The domain extents are [ _Lx_, _Ly_, _Lz_ ] = [2π, 3, 2π] and grid size _nx_ × _ny_ × _nz_ = 128 × 62 × 128 for the 3D case. The time-step is taken to be _dt_ = 10 <sup>−5</sup> and α = 0.4. For an external pressure of ∆ _p_ = 1, and a non-dimensional τ <sup>−</sup> = 1, Young-Laplace give a radius of curvature _Ranalytic_ = 1. Figure 13 the error in the radius of curvature computed numerically is of similar order to the 2D validation case. _6.2._ _Grooved Posts_ In order to represent a post geometry, we make use of the Boolean operations. Consider the level sets that represent the solid: ψ1( x ) = ( _y_ - _yc_ ) − sgn - _h_, cos <sup>�</sup> _kx_ ( _x_ - _xc_ ) <sup>��</sup> , (103) which represents longitudinal grooves in the _x_ - _y_ plane extending in the _z_ −direction, and ψ2( x ) = ( _y_ - _yc_ ) − sgn _h_, cos <sup>�</sup> _kz_ ( _z_ - _zc_ ) <sup>��</sup>, (104) the longitudinal grooves in the _y_ - _z_ plane extending in the _x_ −direction. Take the intersection ψ = ψ1 ∩ ψ2 such that ψ( x ) = max(ψ1, ψ2). (105) This gives the post geometry where _h_ = 1. The wavelength is π such that we obtain _kx_ = 2 and _kz_ = 2. The domain extents are [ _Lx_, _Ly_, _Lz_ ] = [2π, 3, 2π] and grid size _nx_ × _ny_ × _nz_ = 128×62×128. The time-step is _dt_ = 10 <sup>−5</sup> and α = 0.4. Two different values for external pressure were simulated, ∆ _p_ = 0.5 and ∆ _p_ = 1. The aim was to demonstrate the capability of predicting failure. At ∆ _p_ = 0.5 the interface goes to equilibrium, when the value for pressure is doubled, the interface is no longer pinned and the interface fails and fills up the grooves. This process of failure is referred to as a depinned recession in [16]. _6.3._ 3 _D Wavy Substrate_ Consider a three-dimensional wavy substrate that is given by the following level set: ψ( x ) = ( _y_ - _yc_ ) − _h_ cos <sup>�</sup> _kx_ ( _x_ - _xc_ ) <sup>�</sup> cos <sup>�</sup> _kz_ ( _z_ - _zc_ ) <sup>�</sup>, (106) where the peak to valley height is _h_ = 2 _hcr_ where _hcr_ = - tan θ _Y_ and θ _Y_ = 140 <sup>◦</sup> . The wavelength in both direction is 2π such that _kx_ = 1 and _kz_ = 1. The substrate is shifted by xc = (0, _h_, 0) so that the valley corresponds to the / p y ( 9) ( _a_ ) ( _b_ ) Fig. 14: Equilibrium interface location for post geometries, the gray isosurface represents the rigid substrate and the cyan transparent isosurface of the zero level set represents the interface. ( _a_ ) Equilibrium shape for ∆ _p_ = 0.5 and ( _b_ ) interfacial failure at ∆ _p_ = 1 where the liquid completely wets the cavities of the post. Fig. 15: Equilibrium interface location for a 3D cosine substrate using a loading condition of ∆ _p_ = 0.2. The gray isosurface represents the rigid substrate and the cyan transparent isosurface of the zero level set represents the interface. / p y ( 9) Fig. 16: Equilibrium interface location for a random rough substrate for a loading condition of ∆ _p_ = 0.2. The gray isosurface represents the rigid substrate and the cyan transparent isosurface of the zero level set represents the interface. origin. The domain extents are [ _Lx_, _Ly_, _Lz_ ] = [2π, 3, 2π] and grid size _nx_ × _ny_ × _nz_ = 128 × 62 × 128. The time-step is _dt_ = 10 <sup>−5</sup> and α = 0.4. The interface is initialized at _y_ = 2.5 as a binary function, as the interface evolves and moves down towards the solid substrate, the Gibbs energy increases until it reaches steady state when the solution goes to an equilibrium position. The external pressure prescribed is ∆ _p_ = 0.2, the equilibrium solution is consistent with the two-dimensional case presented in the validation section if a cut plane is taken at _z_ = 0. _6.4._ _Random Roughness_ A Fractal geometry is used to represent a random rough surface. The geometry is specified as a composition of many elementary waves in the form of cos( k - x + ϕ). Define a range of amplitudes that tapers off based on a certain distribution: <u>1</u> _hmn_ = ( _m_ <sup>2</sup> + _n_ <sup>2</sup> ) <sup>β/2</sup> <sup>,</sup> (107) where _m_ and _n_ are the wavenumbers and β the spectral exponent. A Gaussian distribution _gmn_ is used to get a smooth random variation in its amplitudes such that _Amn_ = _gmnhmn_ . (108) The phase angle is also sampled from a Gaussian distribution and is scaled such that it varies between −π/2 and π/2: ϕ _mn_ = <sup><u>π</u></sup> (109) 2 <sup>_gmn_</sup> <sup>.</sup> The rough surface height distribution is then represented by a double sum over the wavenumbers in both spatial directions: _Amn_ cos( _kmn_ - x + ϕ _mn_ ), (110) _h_ _f_ ( x ) = _m_, _n_ this is scaled such that the maximum height from peak to valley is 2 _hcr_ . Then the level set that represents the solid is given by: ψ( x ) = ( _y_ - _yc_ ) − _h f_ ( x ) (111) For this simulation, _N_ = 10 for the spatial frequency resolution, and β = 1.5 which represents a fairly rugged surface. The domain extents are [ _Lx_, _Ly_, _Lz_ ] = [2π, 3, 2π] and grid size _nx_ × _ny_ × _nz_ = 128 × 62 × 128. The time-step is _dt_ = 10 <sup>−5</sup> and α = 0.4. The external pressure is ∆ _p_ = 0.2. Note that the algorithm reaches an equilibrium solution and is able to handle rough surfaces that have rapid variations in their structure. / p y ( 9) 9 Fig. 17: Drop shape at equilibrium for a flat surface. Top shows the binary cuboid initial condition. Bottom shows the final equilibrium solution for the drop. Surface tension values used are τ <sup>−</sup> = 0.6 and τ <sup>+</sup> = 0.5 in non-wetted conditions. _6.5._ _Drop Shapes_ The drop shape was also investigated in the context of the macroscopic formulation of the equilibrium solution. The bubble is initialized as a binary cuboid over a flat surface, longitudinal grooves, posts, and random rough surface using the methods described in the previous section. The surface parameters are described in the captions of the corresponding figures. All simulations were run using _dt_ = 10 <sup>−7</sup>, with domain extents of [ _Lx_, _Ly_, _Lz_ ] = [1, 1, 1] and grid size _nx_ × _ny_ × _nz_ = 200 × 200 × 200. Note that here the external pressure was substituted for _h_ ( x ) · g where g is the non-dimensional gravitational constant taken to be unity in the wall-normal direction. When initializing a binary cuboid on rough surfaces, some regions might overlap between the interface and solid, therefore it is best to define φ( x, 0) = φ( x, 0) ∪ (−ψ( x ) − ϵ). The key take-away point here is the ability of the algorithm to capture the different locus of contact points for different geometries as observed in figures (17-21), along with the anisotropy in the shape of the bubble as observed in figure 19 for the Wenzel state. / p y ( 9) Fig. 18: Drop shape at equilibrium for longitudinal grooves. Here _h_ = 0.025, _kx_ = 20π and _xc_ = (0, 0.15, 0). Figure shows the final equilibrium position for τ <sup>−</sup> = 0.6 and τ <sup>+</sup> = 0.5 in non-wetted conditions. Fig. 19: Drop shape at equilibrium for longitudinal grooves. Here _h_ = 0.025, _kx_ = 20π and _xc_ = (0, 0.15, 0). Figure shows the final equilibrium position for τ <sup>−</sup> = 0.6 and τ <sup>+</sup> = 10 <sup>−3</sup> to represent a Wenzel state where the liquid fills the grooves from the initial condition. Note the anisotropy in the drop shape due to wetting. / p y ( 9) Fig. 20: Drop shape at equilibrium over posts. The geometrical parameters are the same as the longitudinal grooves but is applied in both planes with τ <sup>−</sup> = 1 and τ <sup>+</sup> = 0.833 in non-wetted conditions. Fig. 21: Drop shape at equilibrium over random rough surface. Spatial frequency resolution _N_ = 96, β = 1.5 and the mean height _hcr_ = 0.15 with τ <sup>−</sup> = 0.6 and τ <sup>+</sup> = 0.5 in non-wetted conditions. Note the loss in spherical symmetry in the bubble shape. / p y ( 9) 7. Summary A variational level set methodology is developed in the framework of minimizing Gibbs free energy. The level set method avoids reinitialization by using a penalty term that regularizes the distance function. The method is able to reproduce canonical level set evolution cases such as motion in the normal direction and curvature-driven flow. The Gibbs free energy model is general in that it can incorporate an external pressure field with a dissolved gas concentration parameter, and a solid surface that can represent a wide range of geometries. The method is simple to implement, robust and parallel. The surface tension model uses a harmonic mean distribution modified to give the desired value of surface tension at the interface location. The modified harmonic mean distribution gave more accurate results when compared to other distributions. The algorithm is validated with canonical level set evolution test cases, the Young-Laplace equation and an analytic solution over a 2D wavy substrate. Good agreement is observed. Several geometries that include 3D longitudinal grooves, posts, a wavy substrate, and random roughness using fractal geometry were investigated and the algorithm is shown to handle complicated geometry. Simple solid surfaces like flat walls and grooves can be represented as a binary level set functions whereas more complicated geometry require smooth level sets. The effect of Lagrange multipliers is also explored; integrating the constraints over the entire domain is more robust as opposed to a local integration. Failure to enforce the no-penetration constraint causes the interface to leak into the solid wall. If the volume conservation constraint is violated, the drops behave like a curvature-driven flow; the interface shrinks/expands until it is completely out of the domain. In the context of microscopic problems, gravity effects can be ignored and an external pressure field can be applied to obtain an equilibrium meniscus shape over a wide range of rough surfaces. For macroscopic problems, the effects of gravity can be included. Liquid drops are able to reach an equilibrium shape while conserving volume. Different surfaces can lead to different equilibrium positions. We show that the algorithm is capable of capturing contact lines accurately and also the anisotropy in liquid drop shapes. The proposed algorithm provides a useful tool for studying properties of superhydrophobic surfaces and the inception of nucleation sites in the context of cavitation. Acknowledgment This work is supported by the United States Office of Naval Research (ONR) under ONR Grants N00014-121-0874 and N00014-17-1-2676 with Dr. Ki-Han Kim as technical monitor. The computations were made possible through the Minnesota Supercomputing Institute (MSI) at the University of Minnesota. References [1] S. Osher, J. A. Sethian, Fronts propagating with curvature-dependent speed: algorithms based on hamilton-jacobi formulations, J. Comput. Phys. 79 (1988) 12–49. [2] R. Malladi, J. A. Sethian, B. C. Vemuri, Shape modeling with front propagation: A level set approach, IEEE T Pattern Anal. 17 (1995) 158–175. [3] J. A. Sethian, Level set methods and fast marching methods: evolving interfaces in computational geometry, fluid mechanics, computer vision, and materials science, volume 3, Cambridge university press, 1999. [4] S. Osher, R. Fedkiw, Level set methods and dynamic implicit surfaces, volume 153, Springer Science & Business Media, 2006. [5] D. L. Chopp, Computing minimal surfaces via level set curvature flow, J. Comput. Phys. 106 (1993) 77–91. [6] M. Sussman, P. Smereka, S. Osher, A level set approach for computing solutions to incompressible two-phase flow, J. Comput. Phys. 114 (1994) 146–159. [7] D. Peng, B. Merriman, S. Osher, H. Zhao, M. Kang, A pde-based fast local level set method, J. Comput. Phys. 155 (1999) 410–438. [8] C. Li, C. Xu, C. Gui, M. D. Fox, Distance regularized level set evolution and its application to image segmentation, IEEE T. Image Process. 19 (2010) 3243–3254. [9] A. B. D. Cassie, S. Baxter, Wettability of porous surfaces, Trans. Faraday Soc. 40 (1944) 546–551. [10] C. E. Brennen, Cavitation and bubble dynamics, Cambridge University Press, 2014. [11] G. Carbone, L. Mangialardi, Hydrophobic properties of a wavy rough substrate, Eur. Phys. J. E. 16 (2005) 67–76. [12] F. Bottiglione, G. Carbone, Role of statistical properties of randomly rough surfaces in controlling superhydrophobicity, Langmuir 29 (2012) 599–609. [13] Y. Chen, B. He, J. Lee, N. A. Patankar, Anisotropy in the wetting of rough surfaces, J. Colloid Interf. Sci. 281 (2005) 458–464. [14] K. A. Brakke, The surface evolver, Exp. Math. 1 (1992) 141–165. [15] H.-K. Zhao, B. Merriman, S. Osher, L. Wang, Capturing the behavior of bubbles and drops using the variational level set approach, J. Comput. Phys. 143 (1998) 495–518. [16] Y. Xiang, S. Huang, P. Lv, Y. Xue, Q. Su, H. Duan, Ultimate stable underwater superhydrophobic state, Phys. Rev. Lett. 119 (2017) 134501. [17] F. Gibou, R. Fedkiw, S. Osher, A review of level-set methods and some recent applications, J. Comput. Phys. 353 (2018) 82–109. [18] V. I. Arnold, Geometrical methods in the theory of ordinary differential equations, volume 250, Springer Science & Business Media, 2012. / p y ( 9) [19] C. Li, C. Xu, C. Gui, M. D. Fox, Level set evolution without re-initialization: a new variational formulation, in: IEEE Comput. Soc. Conf., volume 1, IEEE, 2005, pp. 430–436. [20] L. Landau, E. Lifshitz, Statistical physics, part 1: Volume 5 (course of theoretical physics, volume 5), Publisher: Butterworth-Heinemann 3 (1980). [21] N. A. Patankar, Hydrophobicity of surfaces with cavities: making hydrophobic substrates from hydrophilic materials?, J. Adhes. Sci. Technol. 23 (2009) 413–433. [22] R. N. Wenzel, Resistance of solid surfaces to wetting by water, Ind. Eng. Chem. 28 (1936) 988–994. [23] T. Frankel, The geometry of physics: an introduction, Cambridge university press, 2011. [24] A. Giacomello, M. Chinappi, S. Meloni, C. M. Casciola, Metastable wetting on superhydrophobic surfaces: Continuum and atomistic views of the cassie-baxter–wenzel transition, Phys. Rev. Lett. 109 (2012) 226102. [25] H.-K. Zhao, T. Chan, B. Merriman, S. Osher, A variational level set approach to multiphase motion, J. Comput. Phys. 127 (1996) 179–195. [26] M. Sussman, E. Fatemi, An efficient, interface-preserving level set redistancing algorithm and its application to interfacial incompressible fluid flow, SIAM J. Sci. Comput. 20 (1999) 1165–1191. [27] S. Esodoglu, P. Smereka, et al., A variational formulation for a level set representation of multiphase flow and area preserving curvature flow, Commun. Math. Sci. 6 (2008) 125–148.

섹션 본문 154문단 · 57,215자

(제목 없음)

1A robust numerical methodology to predict equilibrium interfaces over arbitrary solid surfaces is developed. The kernel of the proposed method is the distance regularized level set equations (DRLSE) with techniques to incorporate the no-penetration and volumeconservation constraints. In this framework, we avoid reinitialization that is typically used in traditional level set methods. This allows for a more efficient algorithm since only one advection equation is solved, and avoids numerical error associated with the re-distancing step. A novel surface tension distribution, based on harmonic mean, is prescribed such that the zero level set has the correct liquid-solid surface tension value. This leads to a more accurate prediction of the triple contact point location. The method uses secondorder central difference schemes which facilitates easy parallel implementation, and is validated by comparing to traditional level set methods for canonical problems. The application of the method in the context of Gibbs free energy minimization, to obtain liquid-air interfaces is validated against existing analytical solutions. The capability of the methodology to predict equilibrium shapes over both structured and realistic rough surfaces is demonstrated.

Introduction

2The traditional level set (LS) formulation of moving fronts as devised by Osher and Sethian [1], has been applied to a wide variety of problems [2][3][4]. This is due to its relative ease of implementation, simplicity in applying Boolean operations, and ability to handle surface pinching or merging without the need for direct user intervention or complicated algorithms that detect when to perform 'surgery'. Implementing the traditional level set methods (LSM) requires the use of upwind schemes to maintain numerical stability. As the LS evolves with time, the values of the level set function (LSF) begin to drift away from the original signed distance function (SDF), and the LSF often becomes steep or flat near the zero LS which affects stability. One remedy is to reinitialize the LS equation to restore the LSF to an SDF. This process is problem-dependent; the reinitialization needs to be done occasionally if the approximation of the LS is not sensitive to its approximation of an SDF. Otherwise, the reinitialization needs to be done every iteration which can get computationally expensive. The first reinitialization method was proposed by Chopp [5] which directly computes the SDF. The process is computationally expensive and is restricted to a band of points near the zero LS front. This leads to difficulties in locating and discretizing the front. The method proposed by Sussman et al. [6] solves the reinitialization equation iteratively but fails when the LSF is far from an SDF. Peng et al. [7] proposed a model that addresses the issue; however, numerical error tends to shift the interface slightly from its original position [4].

3In the context of variational LS formulations, Li et al. [8] proposed an energy functional that regularizes the distance function as the LS deviates from an SDF. This is known as the distance regularized level set evolution (DRLSE) where the regularization term acts as a penalty to the deviation, thus maintaining an SDF without the need for an explicit reinitialization step. It was employed in the context of image segmentation but was not extended to solve general level set evolution (LSE) equations. The variational LSM without reinitialization has advantages over traditional LSM which include ease of implementation, higher efficiency due to lower computational cost, and the ability to use central difference schemes instead of upwind schemes. The LSE equations can be categorized into a PDE-based LSM (derived from motion equations) and variational LSM (derived by minimizing a certain energy functional) both of which can lead to similar governing equations while keeping the final steady-state solution the same.

4The main goal of this paper is to devise an easy, fast, accurate and robust method for calculating the equilibrium position of a liquid meniscus over an arbitrary rough surface. Having a model to predict the equilibrium position of an interface and its failure criterion is of great importance to numerical simulations and experiments. Fig. 1(a) shows a schematic of a liquid droplet sitting on a solid substrate with a close-up of the surface and Fig. 1(b) shows a trapped vapor bubble growing out of a cavity due to a pressure gradient present in the boundary layer. Note that the problem can be broken into a macroscopic and a microscopic one. A macroscopic problem relies on predicting the liquid drop shape at equilibrium while conserving its volume. A microscopic problem deals with finding the equilibrium position of the meniscus on a rough substrate given an external pressure. A robust superhydrophobic surface should be designed to make a non-wetted stable Cassie state [9] and increase the critical pressure. In the context of cavitation, predicting nucleation sites and the critical pressure that causes vapor pockets to expand beyond the envelope of the cavity into the liquid is of great importance, where the presence of a hydrophobic surface would cause heterogeneous nucleation sites [10]. Carbone and Mangialardi [11] introduced an analytical model for a simple cosine substrate and then a numerical model to predict interface shape over a two-dimensional (2D) rough periodic substrate defined by a fractal dimension [12]. Extension to higher dimensions was not explored. Chen et al. [13] explored the effect of anisotropy of roughness on wetting using Surface Evolver [14]. The Surface Evolver is three-dimensional (3D) but relies on triangulating the interfacial surface. This may require special attention during pinching and breakup where elements need to be added, deleted or merged. Also, the rough substrate was modeled as a simple grooved channel therefore it is not clear whether a more complicated geometry can be incorporated.

5Zhao et al. [15] used the traditional LSM to capture the behavior of bubbles drops on a macroscopic scale, details of the interface shape and contact angles were not compared quantitatively to existing analytical solutions, but their qualitative results were encouraging. Our approach uses a variational level set methodology without reinitialization to capitalize on its advantages introduced earlier. The regularization term is based on the algorithm proposed by Li et al. [8] which was only applied in the context of image segmentation to the best of our knowledge. We show that the DRLSE can be used in the context of both PDE-based and variational derived LSM. The algorithm minimizes the Gibbs free energy which is written in a general form that allows for the control of the dissolved gas saturation levels. The results show that the proposed model is effective in handling complicated geometries and can accurately predict interfacial equilibrium positions.

6The paper is organized as follows: the level set formulation, terminology, and notation, in both the traditional and variational sense, is presented in §2. A general framework for the Gibbs free energy equation, based on Xiang et al. [16], written in the variational LS framework is introduced in §3; it allows for prescribing an external pressure and dissolved gas saturation levels. The algorithm and numerical implementation is presented in §4. It is validated using canonical level set test cases (e.g. curvature-driven flow and motion in the normal direction) in §5. This is crucial since minimizing the LSF of the Gibbs free energy leads to a governing evolution equation that can be written as a combination of motion in the normal direction with curvature-driven diffusion. The Gibbs energy model is validated with the analytic solution of the Young-Laplace equation and the solution over a cosine substrate derived by Carbone and Mangialardi [11]. Results of our numerical experiments to highlight the robustness of the algorithm are shown in §6. The numerical experiments explore the equilibrium shape of a drop/interface over a variety of rough substrates that include longitudinal grooves, posts, and realistically rough surfaces. The paper is summarized in §7.

Traditional level set formulation

7Traditional level set formulation of moving fronts introduces an implicit level set function φ(x, t) such that the zero level set contour represents the required interface = {x | φ(x, t) = 0}. Given the interface (t) bounding an open region + , we wish to compute its evolution under a velocity field u(x, t). This velocity can be a function of the interfacial geometry (e.g. normals or curvature), position, time, or external physics. The level set function φ has the following properties:

8where + is the interior of the region bounded by , ∂ := , and − the exterior region of given by its complement of + ∪ ∂ . The normal to any level set is given by

9and the corresponding curvature of the interface is given by the divergence of its normal defined as:

10The area (volume in 3D) of the domain enclosed by :

11where H φ(x, t) is the Heaviside function

12The directional derivative of H φ(x, t) in the normal direction N is given by the Dirac delta function:

13such that it is non-zero on ∂ where φ(x, t) = 0. This can be rewritten aŝ

14where the one-dimensional delta function is defined as δ φ(x, t) = H φ(x, t) in a distribution sense. The length (surface area in 3D) of an interface (t) can therefore be directly found using the surface integral:

15The motion of the interface is analyzed by convecting all the values of the level set function φ(x, t) with the velocity u(x, t) according to a general equation of motion given by:

16∂φ ∂t

17where the right-hand side determines the rate of diffusion. This will be referred to as a PDE-based LSM. The above equation can be expressed in operator form as:

18where L[φ] is the operator approximating all of the right hand side of the equation that is discretized using an appropriate numerical scheme.

Reinitializing signed distance functions

19As the level set φ(x, t) evolves with time, the values of φ(x, t) begin to drift away from the originally signed distance function (SDF). The level sets deteriorate to form shocks, flat or steep shapes. One remedy is to reinitialize the level set equation in order to restore φ(x, t) back to an SDF. Sussman et al. [6] proposed the reinitialization equation given by:

20where S(φ o ) is a sign function that is 1 in + , 0 on ∂ and −1 on − . However, this may cause a circular dependency since the values near the interface in + use φ(x, t) in − for the boundary points and vice versa. This balances out if we assume that φ remains smooth at all times, which is not always the case. If φ is not smooth, or is steeper on one side, then the circular dependency may lead the reinitialization equation to move the interface to an incorrect location. Therefore, a numerically smeared sign function is typically used instead:

21where S(φ o ) remains constant for the duration on reinitialization, and has better properties if φ(x, t) is not smooth or if |∇φ o | is far from 1. The numerical smearing also reduces its magnitude, causing a slower propagation speed of the information near the interface thereby reducing circular dependencies. In an ideal case, the interface remains stationary during reinitialization. However, numerical error tends to shift the interface slightly [4]. Gibou et al. [17] provides a comprehensive review of the most recent advances in the traditional LSM. In summary, reinitialization still comes at a computational cost and the inconsistency between theory and implementation remains.

Variational level set formulation

22An alternative to the evolution of a PDE-based LSM can be directly derived from the problem of minimizing a certain energy functional defined by the level set function. This is known as the variational level set method [15]. The variational formulation is proposed as follows, let an energy functional J (φ) be defined as: (15) where E ext (φ) is the external energy functional related to a physical mechanism to be determined, and E int (φ) is the internal energy functional given by:

23where α is a positive parameter that controls the effect of the penalty functional R p (φ) which penalizes the deviation of φ(x, t) from an SDF. To minimize the energy functional J (φ), we need to find the steady-state solution of φ(x, t) by stepping in the direction of steepest descent of J (φ). This is given by the negative Fréchet derivative J (φ) such that (17) where γ is the step size taken to be as a 'time-step' dt. We can write the evolution equation as a gradient flow that minimizes J (φ):

24which will be referred to as the variational-based LSM that can also be expressed in operator form as Eq. (12):

25The above equation highlights the fact that we can obtain the same operator for the traditional and variational formulation of the level set methodology. The key difference is how this operator is discretized and solved; this will be discussed later in §4.

Distance regularization as an alternative to reinitialization

26It is crucial to keep the level set as an approximate SDF during its evolution as discussed in §2.1.1, where any function φ(x, t) satisfying |∇φ| = 1 is an SDF [18]. Li et al. [8] proposed an energy functional that regularizes the distance function as the level set deviates from an SDF in the vicinity of the front. The penalty functional is given by:

27this serves as a metric to characterize how close φ(x, t) is to an SDF. The energy density p(|∇φ|) is a potential function defined as:

28It is evident that p(|∇φ|) has two minima at |∇φ| = 0 and |∇φ| = 1. The function p(|∇φ|) is twice differentiable, this can be verified by finding the roots of its first derivative and checking the sign of the second derivative, p (|∇φ|) and p (|∇φ|) respectively, such that

29and

30The roots of p (|∇φ|) are seen at the zero line intersection for |∇φ| = 0, 0.5 and 1. The sign of p (|∇φ|), which is positive for |∇φ| = 0 and 1, indicates that they are minimums. The Fréchet derivative in the L 2 inner product of the regularization energy functional R p (φ) can be shown to be:

31where d p is defined as

32The use of a double-well potential has more favorable properties than using a simple potential function 1 2 (|∇φ| − 1) 2 which was initially introduced by Li et al. [19]. The advantage is seen in the limiting values of |∇φ| given by

33We can verify that the boundedness is lost for the simple potential function which can lead to undesirable effects lim |∇φ|→0 |d p (|∇φ|)| = ∞ . (27) Physically, in the regions where |∇φ| is close to zero, the diffusion rate is positive and arbitrarily large. For this case, the diffusion is backwards, which drastically increases |∇φ| causing oscillations to appear as peaks and valleys in the final level set φ. The oscillations appear at a distance from the zero crossing of the level set but nevertheless may cause a slight shift in the interface location. Therefore for a double-well potential, the function d p (|∇φ|) is always bounded such that |d p (|∇φ|)| < 1, for all values of |∇φ| ∈ [0, ∞).

34(28) For 0 < |∇φ| < 1/2, the diffusion rate d p (|∇φ|) is positive, resulting in a forward diffusion which further decreases |∇φ| to zero. For (1/2) < |∇φ| < 1, the diffusion rate d p (|∇φ|) is negative, resulting in a backward diffusion which increases |∇φ| towards unity. For |∇φ| > 1, the diffusion is positive again which leads to forward diffusion, reducing the value of |∇φ| towards 1.

The model: Gibbs free energy

35Consider a thermodynamic system in its general form comprised of a surface, submerged in a bulk liquid consisting of water and dissolved gas, and entrapped air bubbles within the surface cavities consisting of vapor and free gas. The equilibrium liquid-gas interface position is obtained through the minimization of the total Gibbs free energy of a multi-component system [20,21] that is given by:

36where G tot denotes the total Gibbs free energy, U ι the internal energy of the system, p L the liquid pressure, V ι the volume of each phase ι in the system, T the temperature, and S ι the entropy of each phase. G int denotes the free energy of all interfaces present in the system,

37where τ LG , τ SG and τ L S represent the surface tension of the liquid-gas (LG), solid-gas (SG) and liquid-solid (LS) interfaces respectively. Similarly A L S , A SG and A L S represent the surface areas of each corresponding phase. It can be shown that the total free energy can be written as

38a form shown by Xiang et al. [16]. Here, the first term in the right-hand side of Eq. (31) is attributed to the bulk phases, where p G and p V are the entrapped gas and vapor pressure respectively, and V G is the volume of the entrapped gas. The second term represents surface tension attributed to the interface simplified using Young's equation, where θ Y is Young's contact angle. The third term is attributed to the difference in chemical potential between the free gas in the entrapped air within the cavity and dissolved gas in the liquid phase where n G is the mole number of entrapped gas, R the ideal gas constant, T the temperature, s the dissolved gas saturation level and p * V the saturated vapor pressure. The fourth term is the energy contribution of unsaturated vapor where n v is the mole number of vapor in the cavity. The last term G o is the free energy of the wetted Wenzel state [22] which is a constant for a given p L , T , and s at the reference state where

39In Eq. (32) the total gas mole number of the system is given by n tot and n H 2 O is the mole number of water and its vapor, μ DG and μ W are the chemical potentials of the dissolved gas and water respectively. Note that in order to obtain an equilibrium state, which is an energy minimum of the system, the first-order variation of the total free energy should be set to zero i.e. δG tot = 0. Classical geometry formulas described in [23,24] are used to obtain the expression

40The variation with respect to the first and second term determines the shape and location of the interface since it results in the Young-Laplace equation:

41The third term gives the variation with respect to δn G , which is the chemical equilibrium condition between the free and dissolved gas in water:

42The fourth term gives the variation with respect to δn V , which is the equilibrium equation between vapor and water:

Overview of Gibbs free energy in a variational level set formulation

43Define an energy functional E(φ) where φ(x, t) > 0 represents the liquid phase, φ(x, t) < 0 represents the gas phase and φ(x, t) = 0 represents the liquid-gas interface. Define another level set ψ(x) that represents the solid roughness, ψ(x) ≥ 0 for the region inside the solid substrate and ψ(x) < 0 outside the solid. Then, E(φ) based on the bulk and interfacial energies can be written as:

44where E B (φ) and E I (φ) are the bulk and interfacial surface energy respectively. Using Eq. (31), the bulk energy due to the pressure difference is given by

45where H(−ψ(x)) ensures that the pressure difference is only applied outside the solid region. The energy functional due to the interfacial surface energies from Eq. (31) is given by E I = τ LG (A LG + A SG cos θ Y ). Note that the contact angle satisfies |τ L S − τ SG | = τ LG cos θ Y . If 0 ≤ θ Y ≤ π/2, then the liquid is said to be wetted, else if π/2 < θ Y ≤ π , then the liquid is said to be non-wetted. The surface tension is represented as a function of ψ(x) such that,

46where τ + = |τ L S − τ SG | and τ − = τ LG . Using Eq. (10), the interfacial surface energy is written as

47Since the solid does not vary temporally, substitute τ ψ(x) for τ (x):

48The interface is not allowed to penetrate into the solid, therefore a no penetration constraint is enforced:

49this prevents any overlap or penetration between the two regions described by φ(x, t) ≥ 0 and ψ(x) ≥ 0. The volume of the liquid phase is required to remain conserved, therefore the second constraint imposed is volume conservation given by:

50where V o is the initial volume of the liquid. This is necessary for problems which require the conservation of the volume of the bubble. For problems where we assume an infinite supply of liquid (i.e. a system where the liquid reservoir is much larger than the air cavities), this constraint is not used. In order to minimize E(φ), we define the auxiliary energy functional J (φ) that contains the Gibbs energy, penalty function and the two constraints, given by:

51where R p (φ) is the penalty term that enforces φ to be an SDF in the vicinity of the interface, α is the weighting and μ and λ are the Lagrange multipliers that satisfy the two constraints mentioned above. Then the Fréchet derivative in the L 2 norm of J (φ) is given by:

52The first term in the right-hand side ∂R p ∂φ , χ is given in Eq. (24). The second term can be shown to be:

53where the first term is eliminated by taking ∂φ ∂n = 0 at the boundaries ∂ . The rest of the terms follow as:

54and ∂G 2 ∂φ

55The evolution equation given by Eq. (18) can now be defined for an infinitesimal step-size as:

56To determine the value of the Lagrange multipliers, we enforce the fact that the constraints do not vary in time, i.e. d dt

57Therefore, the Lagrange multipliers can be obtained as:

58The above equations use the fact that

59and

60Note that at steady state, equilibrium is reached (i.e. ∂φ/∂t = 0 and λ = 0). Assuming no solid is present (i.e. μ = 0) and τ (x) = τ LG , we get

61i.e. the Young-Laplace equation in Eq. (34) is recovered.

Numerical implementation

62In practice, the Heaviside function H(φ) and the delta function δ(φ) are slightly smoothed out such that:

63where is the numerical width of δ(φ) and H(φ) is taken to be slightly larger than the width of a grid cell ( = 1.5 x). The DRLSE can be implemented with a simple finite difference scheme. The spatial gradients ∂φ/∂x i are obtained using a central difference scheme and the temporal partial derivative ∂φ/∂t is approximated using forward difference. Heun's method is also implemented so that we obtain a second-order approximation with a slightly lower Courant-Friedrichs-Lewy (CFL) restriction. The evolution equation is discretized using the forward Euler as,

64and for Heun's method as

65The key difference here is the fact that the operator L[φ] in the variational formulation does not describe a Hamilton-Jacobi equation with a curvature regularization of the traditional formulation but a reaction-diffusion type problem. Here the LSE equation is written out explicitly as:

66where there is no need for reinitialization or replacing δ(φ) with |∇φ|. This allows for the flexibility of initializing φ as a binary function. The initial condition LS does not necessarily have to be an SDF, |∇φ| = 1 is only enforced in the vicinity of φ = 0 where δ(φ) is active. It suffices to define a divergence function div(·) that can be used for both the regularization term and the normals to obtain curvature which is given by κ = ∇ · N. Some attention to detail of implementation was required for the Lagrange multipliers. The term in the denominator of the Lagrange multipliers μ given in Eq. (53) causes leakage since the width of δ(φ) becomes too narrow; the term δ 2 (φ)H 2 (ψ) is particularly sensitive and is replaced with δ(φ)|∇φ|H(ψ). Numerically, the assumptions in Eq. (55) and Eq. (56) do not hold. This is inconsequential when there is no requirement for volume conservation since λ = 0. However for cases where volume conservation is required, it is important to keep their product explicitly in the discretized equations so that the equations balance out. Otherwise, the curvature diffusion term causes the interface to eventually disappear. Therefore, the discrete Lagrange multipliers are written as:

67The terms are integrated using a trapezoidal rule. The surface tension values are different for the LG interface, and the LS interface. Prescribing a binary distribution for τ (x) given by Eq. (39) leads to a stair-casing effect. Similar to Zhao et al. [15], surface tension is given as a distribution with a slight shift in the argument of the Heaviside function to move the stiffest change away from the solid boundary,

68In the paper by Zhao et al. [15], the bubble shape at equilibrium was not compared to a analytic solution and the contact angle at the triple-line junction was not reported. Qualitatively, the results were promising and demonstrated the effectiveness of the method. However, in our experience, the surface tension distribution caused the interface location to have a mismatch when compared to analytic solution, with errors ranging between 2% to 8%. The reason for this error is due to the smoothing of the Heaviside function. At equilibrium, the Heaviside function at the interface location has a value of H(φ) = 0.5, this leads to an under predicted value of τ + at the solid interface causing a mismatch in the contact angle and in turn the equilibrium position. To remedy this effect, we found that a temporary surface tension value τ * can be defined such that the correct value of surface tension within the solid is obtained at the interface location. A harmonic mean is used in Eq. (66) to further reduce any errors that stem from the lower value of the dummy variable. The surface tension distribution becomes as follows where

69Note that substituting Eq. (68) in Eq. (67) gives the desired value of τ (x) = τ − at the interface where H(φ) = 0.5. Although the value inside the solid is incorrect, the value remains inconsequential since the no-penetration constraint and the formulation are only relevant outside the solid. Fig. 2 presents a comparison between the different surface tension models. The harmonic mean using τ * achieves the desired value of τ + at a faster rate for a given interface location. The pseudo-code is summarized in Algorithm 1:

70Algorithm 1 Pseudo-code using Heun's method. Define div(·) = ∇ · () using central difference.

7:

71Compute the discrete δ φ := δ (φ) and H φ := H (φ).

8:

72Compute gradients ∇φ = ∂φ/∂x i using central difference.

9:

73Compute magnitude of the gradient |∇φ| = (∂φ/∂x) 2 + (∂φ/∂ y) 2 + (∂φ/∂ z) 2 .

10:

74Compute normals N = ∇φ/|∇φ|.

11:

75Compute curvature term κ(φ) := div(N).

12:

76Compute the penalty term P(φ) := α div(d p (|∇φ|)∇φ). 13:

77Compute gradient of surface tension distribution ∇τ using central difference.

7814:

79Compute Lagrange multipliers λ(φ), μ(φ) using trapezoidal rule.

8015:

8116:

82for k = 1 to n z do 18:

83for j = 1 to n y do 19: Remark. In the formulation by Zhao et al. [15], the traditional level set is employed; the evolution of φ given by Eq. (50) without the penalty term and δ(φ) is replaced by |∇φ|. Note that the operator L[φ] in §2.1 describes a convection-diffusion equation given in Eq. (11). The system of LSE contains Hamilton-Jacobi equations coupled to curvature and stiff source terms. Singularities may develop in the solution and the numerical implementation requires much of the modern level set technology to obtain a stable solution [25]. The crucial ingredients are: (i) Break up the parabolic and hyperbolic terms and address each one with the appropriate numerical discretization.

84(ii) High-order accurate essentially non-oscillatory schemes (originating in the study of hyperbolic conservation laws) developed for Hamilton-Jacobi equations.

85(iii) Reinitialization of each LSF to be an SDF using Eq. (13).

86(iv) The curvature definition uses the explicit term involving the gradients of φ given by:

87However, the Lagrange multiplier requires the use of a distance function to define curvature on or near the front using a separate definition given by:

88where D 2 φ is the Hessian of φ. This formula yields a constant value of κ normal to the front and gives the correct value on the front. All of which are not necessary in the current formulation.

89Note that in traditional level set methodologies, the reinitialization step enforces a local volume conservation [26]. The numerical integration uses a 9-point quadrature formula in two spatial dimension. As mentioned earlier, the constraints in the current algorithm are enforced in a global sense. In order to test the local integration method, a 27-point quadrature formula is employed for the general three spatial dimensions given by

90The local volume conservation could not be satisfied. It is worth noting that the local integration was also tested on the no-penetration constraint using the original formulation of μ using Eq. (53) instead of Eq. (64) with the standard surface tension model given by Eq. (66) instead of Eq. (67). The algorithm gave correct results for the interface contact points and radius of curvature over a cosine surface. However, for the locations where there is a liquid-solid overlap, the interface leaks about 3-cells deep into the solid (for regions of high curvature) and 1-cell deep (for shallow regions). It is not evident if the interface will leak more in regions of extremely large curvature (e.g. sharp peaks), therefore the method where the constraints are enforced globally will be used since it is more robust.

Validation

91We begin with the effect of distance regularization as a method to satisfy |∇φ| = 1, next we build up in complexity of the evolution equation where we make sure that the method can solve traditional level set problems such as motion in the normal direction and curvature-driven flows. We validate our energy minimization model of the Gibbs free energy with the analytic solution of Carbone and Mangialardi [11]. We finally present some results over general geometries to demonstrate the effectiveness and flexibility of the proposed algorithm.

Distance regularization as reinitialization

92The effect of distance regularization as a method of reinitialization is demonstrated by simulating the forward and backward (FAB) diffusion problem with a binary LSF. Define the initial binary level set function φ o by

93At t = 0 the zero crossing of φ o has a |∇φ o | >> 1 due to the steep jump in the binary initialization. As a result, the diffusion rate αd p (|∇φ|) is positive and drives a forward diffusion which reduces |∇φ| until it reaches unity; the forward diffusion stops once |∇φ| = 1. For the case where |∇φ| becomes less than unity, αd p (|∇φ|) becomes negative for (1/2) < |∇φ| < 1, therefore the backward diffusion increases the value of |∇φ| to unity. Fig. 3(b) shows the final result of φ where the level set is an SDF in the vicinity of the zero level set crossing. Fig. 3(c) shows a cross-section of φ for y = 50 where the dashed red line indicates the zero crossing. Note that |∇φ| = 1 is satisfied within c o and −c o about the zero crossing, which will be defined as the signed distance band (SDB). Fig. 3(d) shows a cross-section of |∇φ| where the SDB, of width approximately 2c o , is highlighted with the dashed blue lines. On either sides of the SDB the binary function is constant, therefore |∇φ| = 0 and αd p (|∇φ|) > 0 indicating a forward diffusion that keeps φ flat at its constant value since the double-well potential is at a minimum.

94Remark. The bottom row of Fig. 3 uses the standard reinitialization method to provide a comparison to distance regularization. Fig. 3(e) shows the final level set where the step function no longer exists compared to Fig. 3(b). The cross-section in Fig. 3( f ) gives a clearer picture of the difference; the standard reinitialization ensures that the entire level set is an SDF, hence the slope on both ends of the discontinuity at x = 50 have a value of unity satisfying |∇φ| = 1. Fig. 3(g) shows the cross-section of |∇φ|, note how its value of unity is satisfied everywhere in the domain with the exception of the discontinuity, whereas Fig. 3(d) shows the |∇φ| being satisfied locally near the region of φ = 0 over a band width of 2c o . However, both methods round the corners of the zero level set square contour. Therefore, one of the main differences between the two methods is that distance regularization only cares about the region around the zero level set within a certain band of width 2c o , and everything else in the far field remains a constant. This makes the DRLSE method highly localized.

Curvature-driven flow

95Traditional LSM has been used extensively in the context of externally driven flows. This involves both an externally generated velocity field, or a self-generated field u that depends directly on φ. Consider the motion by mean curvature where the interface moves in the normal direction to the interface with a velocity proportional to its curvature. The velocity field is defined by u = −κ N where κ = ∇ · (∇φ/|∇φ|) such that the evolution equation becomes ∂φ ∂t

96and since the normal N is along the gradient direction ∇φ, it is equivalent to ∂φ ∂t

97The above results in a parabolic equation φ t = κ|∇φ| that can be solved using central differencing with a stringent time-step restriction for stability. In the context of variational level set methodology, we can show that a mean curvature flow can be obtained by minimizing an external energy defined by the surface area of the LSF given by

98Taking the Fréchet derivative of E ext with respect to the L 2 inner product gives

99This is similar to the curvature-driven evolution equation with the exception that δ(φ) is |∇φ| instead. Zhao et al. [15] simply replaced the terms in their formulation and reasoned that using |∇φ| is less stiff. Although both of the evolution equations are curvature driven, it is worth pointing out that they are inherently different. The equation given by φ t = δ(φ)∇ · (∇φ/|∇φ|) moves the zero level set only which is only active due to δ(φ). However, the equation given by φ t = |∇φ|∇ · (∇φ/|∇φ|) moves all the level sets by their respective curvatures i.e. all the neighboring values of the level set evolve with the same law. Esodoglu et al. [27] argues that by definition, we can allow all the level sets to move by a perturbation of an energy functional that measures the total length of all level curves

100where L β (φ) = δ(φ − β)|∇φ| dx. Note that the variation of φ only affects ∇φ but does not move the level sets. Since the level set is a signed distance function, we can define a new level set norm [27] instead of the usual L 2 norm as

101The Fréchet derivative obtained from this new norm is

102This results in

103which lends itself to the traditional curvature-driven flow discussed earlier in this section. The evolution equation solved is given by ∂φ ∂t

104Note that as mentioned earlier we can advect all the level curves in the context of energy minimization such that we can replicate the motion of a curvature-driven flow. Isolating the zero level set curve gives an evolution equation that does not look like the typical curvature-driven flow, but since the current method is only concerned with the region around the interface, it is able to handle both equations without running into stability problems. This was tested for both formulations but we will only present the traditional cases for brevity. The only difference observed between the two formulations is the rate at which the curves reach the desired final solution.

Seven-pointed star

105Consider a seven pointed star given by the following parameterized curve γ (s) = 20 + 10 cos(7 · 2π s) cos(2π s), sin(2π s) for s ∈ [0, 1],

106such that the zero level set is defined from polar coordinates is given by Fig. 5 shows results of the same curvature-driven motion for a wound spiral given by the following parameterization

Wound spiral

107such that s = (k + a)/(np + a) where k is an integer that loops over the total number of points np, and the value of a determines the shape of the spiral head in the center. The location of the points is defined by

108where x c is the center location of the domain, sf the scaling factor for the spiral size and D the number of spirals. Define a distance function d(x) = ||x − x p || such that the zero level set comes out as

Dumbbell

109The previous examples presented level curves in 2D. Here, we show that the method is also applicable in 3D where we examine the curvature-driven motion of a dumbbell-shaped level surface. The level surface is initialized by taking advantage of the simplicity of Boolean functions in the LSM. Consider the union of two spheres and a cylinder given by:

110where x c are the domain center coordinates, o is the distance between the center of the spherical shells and the center of the cylinder, r the radius of the spherical shells and w the radius of the center cylinder. Fig. 6 demonstrates the ability of the level set methodology to handle pinching, merging and separation of surfaces without any special mathematical or algorithmic 'surgery'. The initial dumbbell level set evolves under the motion of mean curvature, and the handle shrinks faster due to its higher curvature than the spherical shells on both ends. This leads to a pinch-off at the center where the implicit surface separates into two tear drop surfaces that also shrink due to curvature. Fig. 7 shows a cut slice at z = 50 where the evolution of the dumbbell leading up to pinching is more clear.

Motion in the normal direction

111Consider motion in the normal direction where the interface evolves under an internally generated velocity field. The velocity field is defined by u = aN where a is a constant that can be either positive or negative. The equations of motion for the level set equation are given by:

112which can be rewritten as ∂φ ∂t

113where v n = a is the constant velocity in the normal direction. This motion can also be represented as a case of energy minimization. Express the energy functional in terms of a volume enclosed by the surface φ < 0 such that

114Taking the Fréchet derivative of E ext with an L 2 norm gives

115A similar argument to §5.2 can be made. The Dirac delta functional singles out the zero level set. In order to obtain motion in the normal direction, all the level sets should minimize their values such that the volume enclosed under each respective level curve V β (φ) = H(−φ + β) dx tends to zero. The definition of the energy functional becomes:

116Therefore by definition, the Fréchet derivative of E ext using the new norm is defined as:

117where

118Therefore, the expression can be written as

119The evolution equation becomes ∂φ ∂t

120The above equation leads to the traditional motion in the normal direction. We validate this type of motion for v n = −1 and v n = 1, where the latter describes the motion by which all the level curves maximize the volume they enclose. Given the above, we compare the effect of reinitialization using DRLSE, traditional reinitialization and no reinitialization for several cases that will be discussed in the following sections.

Circle with v n = −1

121Consider a level curve of a circle given by the following implicit equation:

122The domain is a square of size 100 × 100 units where x c = (50, 50) and r = 25, the time-step is dt = 0.1 and α = 0.4. Fig. 8 shows the evolution of a contracting circle under a constant velocity v n = −1 which is a result of minimizing the volume enclosed by φ < 0. We solve the equation given by φ t = |∇φ| using DRLSE which is posed as a level set evolution for a reaction-diffusion type problem. For the traditional level set, the equation solved keeps the velocity term on the left hand side (φ t − |∇φ| = 0), this requires a class of high-order schemes for the advection where the level set is reinitialized after each time-step. The top row in Fig. 8 shows the results from the DRLSE, middle row for the traditional level set with reinitialization, and the bottom row for traditional level set without reinitialization. The left column (Figs. 8a, d and g) shows a cut plot in the plane of y = 50, the solid thick black line is the initial level set location, the subsequent colored lines are the time evolved level sets. The dashed red line indicates the zero level set crossing. The center column (Figs. 8b, e and h) is a contour plot of the zero level set crossing shown in the thick solid red line, expanding zero level sets over time are shown in the solid blue line. The right column (Figs. 8c, f and i) shows the final level set function. The first striking feature of not reinitializing the level set is the ringing observed in Fig. 8(a). This is a well known issue; the level curves are no longer signed distance functions as they tend to drift away from their initialized value. The errors accumulate leading each level set curve to intersect and develop noisy features and steep gradients that further corrupt the numerical approximation of |∇φ|.

123The advection equation becomes stable once the level set function is reinitialized. The regions where the level set pile up on each other (e.g. near the center of the domain where a kink exists), noisy features develop. This is also evident in Fig. 8(b) where we clearly observe the unstable level set contours near the center of the domain. In the regions where the level sets separate from each other (domain boundaries), we get the flattening of φ as shown in Fig. 8(a) in the region furthest from The level set functions are well-behaved, Fig. 8(d) shows the level set moving upwards while maintaining the kink at x c with a slight rounding of the edges. The signed distance function is maintained. Fig. 8(e) shows the isocontours as the level set moving inwards, note the loss of symmetry in the regions where the normals have either of their components equal to zero. Higher order schemes, finer grids and lower time-steps can correct for the asymmetries. Figs. 8(g), (h) and (i) show the results for the DRLSE. Note that as the level set curve shifts upwards in Fig. 8(g), the kink is maintained at x c without any rounding in the corner. The far field has level sets piling up but this has no effect on the solution since the level sets are moving away from the boundaries and towards the center of the circle. Accuracy is maintained as it nears the center, the level curves maintain their circular shape as they advect inwards. Figs. 8( f ) and (i) show differences in the far field where the lobes are less uniform but are inconsequential to the final solution. Note that a similar test case was performed using v n = 1 for the circular shape (not shown here); similar behavior is observed.

Seven-pointed star with v n = 1

124Consider the same implicit function described in §5.2.1. Fig. 9 shows the behavior of a more complicated shape for the case of the outward motion in the normal direction. Qualitatively, similar trends are observed when compared to the circular shape. This ensures that even more complicated shapes are handled effectively given our numerical scheme. Fig. 9(a) shows the ringing generated in the far field as the zero level set curve advects away from the initial star. Fig. 9(b) is well-behaved with reinitialization but still loses its symmetrical shapes around the star lobes. The curvature diffuses at a faster rate

Energy minimization

125We take the LS formulation of the Gibbs free energy model presented in §3.1 and solve the governing equations using the variational formulation presented in §4. The governing evolution equations are a combination of curvature-driven flow with motion in the normal direction. Longitudinal grooves are used first because of the well-defined corners. This causes the interface to pin at the edges and allows for direct comparison to the Young-Laplace equation. Then a cosine wavy substrate is simulated to compare to the analytic solution obtained by Carbone and Mangialardi [11].

2D longitudinal grooves

126Consider a rough substrate representing a longitudinal groove, the level set that represents the solid is given by:

127such that h = 1, with a wavelength of π such that k x = 2 to get multiple grooves and sgn the sign function. The grooves are

128shifted by x c = (0, 1, 0) so that the bottom of the surface corresponds to the origin. The domain extents are [L x , L y , L z ] = [2π , 3, 2π ] and grid size n x × n y × n z = 256 × 123 × 1. The time-step is taken to be dt = 10 −4 and α = 0.4. For an external pressure of p = 1, and a non-dimensional τ − = 1, the Young-Laplace equation gives a radius of curvature R analytic = 1.

129From the current results, the radius of curvature is computed numerically from the contact points and penetration depth h p into the groove using R numerical = w 2 /(8h p ) + h p /2 = 0.993 where w is the groove width. The error is 0.7% showing good agreement with the theoretically predicted results (Fig. 10).

2D wavy substrate

130Consider a wavy substrate using a profile given by:

131The peak to valley height h of the wavy substrate is taken to be twice the critical height h cr where h cr = − tan θ Y [11] and θ Y = 140 • . The wavelength of the substrate is taken to be 2π such that k x = 1. The substrate is shifted by x c = (0, h cr ). The domain extents are [L x , L y , L z ] = [2π , 4, 2π ] with a spatial resolution of n x × n y × n z = 256 × 164 × 1 and a time-step of dt = 10 −5 . Carbone and Mangialardi [11] derived an analytical model to predict the interface equilibrium location given an external pressure field. They analyzed the asymptotic behavior of the system and proposed a simple criterion for the minimum h cr that prevents a Wenzel state. Their solution can predict the pressure value required to overcome the energy barrier to transition from a Cassie state to a Wenzel state. Using our model, we perform a parametric study of different values of pressure and compare the resulting interface shape and location to the analytic solution. The pressure value that leads to the Wenzel state is obtained using the analytic solution for the above conditions which comes out to be 0.25.

132The values of external pressure prescribed are: p = 0.05, 0.1, 0.15, 0.2, 0.26 where the last value was picked to test if we can predict interface failure. The regularization coefficient for this particular problem was varied to gauge its effect on the interface location. For the first case we use α = 0.4, for the next two cases we use α = 0.8 and for the last two we use α = 0.4. We also tested α = 0.2 for the third case (not presented here); overall we did not see an appreciable effect, the error in interface location varied within 1% − 3%. Note that all selected values of α satisfy the CFL condition for a given time-step. For all the cases, the simulation is terminated when equilibrium is achieved. This is determined by keeping track of the Gibbs free energy over time until it tends to a steady state. Once the change in |(G n+1 tot − G n tot )/G n tot | < O(10 −3 ) the simulation is stopped. Fig. 11 shows a comparison between our numerical model (solid lines) and the analytic solution (symbols). Good agreement is observed. Note that for the value of p = 0.26, the interface fails and lies exactly on top of the cosine substrate. The inset in Fig. 11 shows the effect of different surface tension models. We fix p at 0.2 and change the method with which surface tension is computed. It is evident that using the harmonic mean distribution of Eq. (67) yields the most accurate results. Using an arithmetic distribution given in Eq. (66) with τ * instead of τ + underestimates the location by 7%. Note that using τ + with either arithmetic or harmonic distribution significantly underestimates the location with error around 33%. Table 1 shows quantitative results for the mean LG interface height, the triple line contact points and radius of curvature. These quantities are manually extracted from a visualization software.

2D droplet at a wall

133Consider a flat solid wall initialized as a binary function instead of an SDF given by: where g is the magnitude and direction of the gravitational force which is taken to be unity in this example. The surface tension values are τ − = 0.6 and τ + = 0.5 which corresponds to θ Y = 140 • . Fig. 12(a) shows the evolution from the initial rectangular droplet (dashed line) into a droplet at equilibrium (solid line) that satisfies the contact angle of θ Y = 139.72 • , which is within 0.2% of the prescribed contact angle. Fig. 12(b) shows the volume of the liquid normalized by the initial volume as it evolves in time (on a log scale) up until the equilibrium solution. Similar to the previous simulations, we track the Gibbs free energy until it reaches steady state (not shown here). As the interface evolves from an initial binary function, the volume experiences a sharp oscillation as the penalty term smears out the interface to satisfy an SDF. The jump in volume is significantly reduced as the grid resolution is increased. The volume then plateaus as the interface reaches equilibrium. The change in volume at equilibrium from the coarsest grid to the finest are: 8.046 × 10 −3 %, 5.037 × 10 −3 % and 3.5 × 10 −4 % respectively. For the finest grid, we ran the simulation 10 times longer after it reached equilibrium to quantify the effectiveness of volume conservation, and the largest change in volume observed was around 1.7%.

Remark.

134To test the effect of the Lagrange multiplier constraints, the no-penetration constraint is turned off and as expected the bubble leaks into the solid wall deforming its equilibrium shape. Similar behavior is observed for the longitudinal grooves and wavy substrate where the interface does not feel the effect of the wall. When the volume conservation constraint is turned off, the binary rectangular bubble evolves into a droplet shape since it behaves like a curvature-driven flow, however it keeps shrinking until the drop disappears.

Numerical experiments

135The numerical results for predicting equilibrium interfacial shapes over a variety of rough surfaces will be discussed. In the earlier section, we validated our results against the analytical solution of a cosine substrate obtained by Carbone and Mangialardi [11] for different loading conditions. In the following sections, we demonstrate the robustness of the algorithm for different geometries such as a 3D wavy substrate, longitudinal grooves, posts, and random roughness.

3D longitudinal grooves

136Consider a rough substrate representing a 3D longitudinal groove, the level set that represents the solid is given by:

137such that h = 1, where the wavelength is π such that k x = 2. The grooves are shifted by x c = (0, 1, 0) so that the bottom of the surface corresponds to the origin. The domain extents are [L x , L y , L z ] = [2π , 3, 2π ] and grid size n x × n y × n z = 128 × 62 × 128 for the 3D case. The time-step is taken to be dt = 10 −5 and α = 0.4. For an external pressure of p = 1, and a non-dimensional τ − = 1, Young-Laplace give a radius of curvature R analytic = 1. Fig. 13 shows the computed 3D

138interface. The error in the radius of curvature computed numerically is of similar order to the 2D validation case.

Grooved posts

139In order to represent a post geometry, we make use of the Boolean operations (Fig. 14). Consider the level sets that represent the solid: which represents longitudinal grooves in the x − y plane extending in the z−direction, and

140the longitudinal grooves in the y − z plane extending in the x−direction. Take the intersection ψ = ψ 1 ∩ ψ 2 such that

141This gives the post geometry where h = 1. The wavelength is π such that we obtain k x = 2 and k z = 2. The domain extents are [L x , L y , L z ] = [2π , 3, 2π ] and grid size n x × n y × n z = 128 × 62 × 128. The time-step is dt = 10 −5 and α = 0.4. Two different values for external pressure were simulated, p = 0.5 and p = 1. The aim was to demonstrate the capability of predicting failure. At p = 0.5 the interface goes to equilibrium, when the value for pressure is doubled, the interface is no longer pinned and the interface fails and fills up the grooves. This process of failure is referred to as a depinned recession in [16].

3D wavy substrate

142Consider a three-dimensional wavy substrate that is given by the following level set:

143where the peak to valley height is h = 2h cr where h cr = − tan θ Y and θ Y = 140 • . The wavelength in both direction is 2π such that k x = 1 and k z = 1. The substrate is shifted by x c = (0, h, 0) so that the valley corresponds to the origin. The domain extents are [L x , L y , L z ] = [2π , 3, 2π ] and grid size n x × n y × n z = 128 × 62 × 128. The time-step is dt = 10 −5 and α = 0.4.

144The interface is initialized at y = 2.5 as a binary function, as the interface evolves and moves down towards the solid substrate, the Gibbs energy increases until it reaches steady state when the solution goes to an equilibrium position. The external pressure prescribed is p = 0.2, the equilibrium solution is consistent with the two-dimensional case presented in the validation section if a cut plane is taken at z = 0 (Fig. 15).

Random roughness

145A Fractal geometry is used to represent a random rough surface (Fig. 16). The geometry is specified as a composition of many elementary waves in the form of cos(k · x + ϕ). Define a range of amplitudes that tapers off based on a certain distribution:

146where m and n are the wavenumbers and β the spectral exponent. A Gaussian distribution g mn is used to get a smooth random variation in its amplitudes such that A mn = g mn h mn .

147The phase angle is also sampled from a Gaussian distribution and is scaled such that it varies between −π /2 and π/2:

148The rough surface height distribution is then represented by a double sum over the wavenumbers in both spatial directions:

149this is scaled such that the maximum height from peak to valley is 2h cr . Then the level set that represents the solid is given by:

150For this simulation, N = 10 for the spatial frequency resolution, and β = 1.5 which represents a fairly rugged surface. The domain extents are [L x , L y , L z ] = [2π , 3, 2π ] and grid size n x × n y × n z = 128 × 62 × 128. The time-step is dt = 10 −5 and α = 0.4. The external pressure is p = 0.2. Note that the algorithm reaches an equilibrium solution and is able to handle rough surfaces that have rapid variations in their structure.

Drop shapes

151The drop shape was also investigated in the context of the macroscopic formulation of the equilibrium solution. The bubble is initialized as a binary cuboid over a flat surface, longitudinal grooves, posts, and random rough surface using the methods described in the previous section. The surface parameters are described in the captions of the corresponding figures. All simulations were run using dt = 10 −7 , with domain extents of [L x , L y , L z ] = [1, 1, 1] and grid size n x × n y × n z = 200 × 200 × 200. Note that here the external pressure was substituted for h(x) · g where g is the non-dimensional gravitational constant taken to be unity in the wall-normal direction. When initializing a binary cuboid on rough surfaces, some regions might overlap between the interface and solid, therefore it is best to define φ(x, 0) = φ(x, 0) ∪ (−ψ(x) − ).

152The key take-away point here is the ability of the algorithm to capture the different locus of contact points for different geometries as observed in Figs. 17-21, along with the anisotropy in the shape of the bubble as observed in Fig. 19 for the Wenzel state.

Summary

153A variational level set methodology is developed in the framework of minimizing Gibbs free energy. The level set method avoids reinitialization by using a penalty term that regularizes the distance function. The method is able to reproduce canonical level set evolution cases such as motion in the normal direction and curvature-driven flow. The Gibbs free energy model is general in that it can incorporate an external pressure field with a dissolved gas concentration parameter, and a solid surface that can represent a wide range of geometries. The method is simple to implement, robust and parallel. The surface tension model uses a harmonic mean distribution modified to give the desired value of surface tension at the interface location. The modified harmonic mean distribution gave more accurate results when compared to other distributions. The algorithm is validated with canonical level set evolution test cases, the Young-Laplace equation and an analytic solution over a 2D wavy substrate. Good agreement is observed. Several geometries that include 3D longitudinal grooves, posts, a wavy substrate, and random roughness using fractal geometry were investigated and the algorithm is shown to handle complicated geometry. Simple solid surfaces like flat walls and grooves can be represented as a binary level set functions whereas Surface tension values used are τ − = 0.6 and τ + = 0.5 in non-wetted conditions. τ − = 0.6 and τ + = 0.5 in non-wetted conditions. more complicated geometry require smooth level sets. The effect of Lagrange multipliers is also explored; integrating the constraints over the entire domain is more robust as opposed to a local integration. Failure to enforce the no-penetration constraint causes the interface to leak into the solid wall. If the volume conservation constraint is violated, the drops behave like a curvature-driven flow; the interface shrinks/expands until it is completely out of the domain. In the context of microscopic problems, gravity effects can be ignored and an external pressure field can be applied to obtain an equilibrium meniscus shape over a wide range of rough surfaces. For macroscopic problems, the effects of gravity can be included. Liquid drops are able to reach an equilibrium shape while conserving volume. Different surfaces can lead to different equilibrium positions. We show that the algorithm is capable of capturing contact lines accurately and also the anisotropy in liquid drop shapes. The proposed algorithm provides a useful tool for studying properties of superhydrophobic surfaces and the inception of nucleation sites in the context of cavitation. 21. Drop shape at equilibrium over random rough surface. Spatial frequency resolution N = 96, β = 1.5 and the mean height h cr = 0.15 with τ − = 0.6 and τ + = 0.5 in non-wetted conditions. Note the loss in spherical symmetry in the bubble shape.

Declaration of competing interest

154The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

참고문헌 32건

  1. Level set methods and fast marching methods : evolving interfaces in computational geometry, fluid mechanics, computer vision, and materials science Cambridge University Press eBooks · Cambridge University Press · 1999
  2. statistical-physics-part-1 1958
  3. Cavitation and Bubble Dynamics 2013 10.1017/cbo9781107338760
  4. The Surface Evolver Experimental Mathematics · Taylor & Francis · 1992 10.1080/10586458.1992.10504253
  5. RESISTANCE OF SOLID SURFACES TO WETTING BY WATER Industrial & Engineering Chemistry · American Chemical Society · 1936 10.1021/ie50320a024
  6. Capturing the Behavior of Bubbles and Drops Using the Variational Level Set Approach Journal of Computational Physics · Elsevier BV · 1998 10.1006/jcph.1997.5810
  7. Distance Regularized Level Set Evolution and Its Application to Image Segmentation IEEE Transactions on Image Processing · Institute of Electrical and Electronics Engineers · 2010 10.1109/tip.2010.2069690
  8. Fronts propagating with curvature-dependent speed: Algorithms based on Hamilton-Jacobi formulations Journal of Computational Physics · Elsevier BV · 1988 10.1016/0021-9991(88)90002-2
  9. <i>The Geometry of Physics: An Introduction</i> Physics Today · AIP Publishing · 1998 10.1063/1.882494
  10. An Efficient, Interface-Preserving Level Set Redistancing Algorithm and Its Application to Interfacial Incompressible Fluid Flow SIAM Journal on Scientific Computing · Society for Industrial and Applied Mathematics · 1999 10.1137/s1064827596298245
  11. A variational formulation for a level set representation of multiphase flow and area preserving curvature flow Communications in Mathematical Sciences · International Press of Boston · 2008 10.4310/cms.2008.v6.n1.a6
  12. Hydrophobicity of Surfaces with Cavities: Making Hydrophobic Substrates from Hydrophilic Materials? Journal of Adhesion Science and Technology · Taylor & Francis · 2009 10.1163/156856108x370073
  13. A Level Set Approach for Computing Solutions to Incompressible Two-Phase Flow Journal of Computational Physics · Elsevier BV · 1994 10.1006/jcph.1994.1155
  14. Hydrophobic properties of a wavy rough substrate The European Physical Journal E · Springer Science+Business Media · 2005 10.1140/epje/e2005-00008-y
  15. Level Set Methods and Dynamic Implicit Surfaces Applied mathematical sciences · Springer Nature · 2003 10.1007/b98879
  16. A PDE-Based Fast Local Level Set Method Journal of Computational Physics · Elsevier BV · 1999 10.1006/jcph.1999.6345
  17. Anisotropy in the wetting of rough surfaces Journal of Colloid and Interface Science · Elsevier BV · 2004 10.1016/j.jcis.2004.07.038
  18. Computing Minimal Surfaces via Level Set Curvature Flow Journal of Computational Physics · Elsevier BV · 1993 10.1006/jcph.1993.1092
  19. Level Set Evolution without Re-Initialization: A New Variational Formulation 2005 10.1109/cvpr.2005.213
  20. Geometrical Methods in the Theory of Ordinary Differential Equations Grundlehren der mathematischen Wissenschaften · Springer Nature · 1988 10.1007/978-1-4612-1037-5
  21. A Variational Level Set Approach to Multiphase Motion Journal of Computational Physics · Elsevier BV · 1996 10.1006/jcph.1996.0167
  22. Shape modeling with front propagation: a level set approach IEEE Transactions on Pattern Analysis and Machine Intelligence · IEEE Computer Society · 1995 10.1109/34.368173
  23. Wettability of porous surfaces Transactions of the Faraday Society · Royal Society of Chemistry · 1944 10.1039/tf9444000546
  24. Metastable Wetting on Superhydrophobic Surfaces: Continuum and Atomistic Views of the Cassie-Baxter–Wenzel Transition Physical Review Letters · American Physical Society · 2012 10.1103/physrevlett.109.226102
  25. Role of Statistical Properties of Randomly Rough Surfaces in Controlling Superhydrophobicity Langmuir · American Chemical Society · 2012 10.1021/la304072p
  26. Ultimate Stable Underwater Superhydrophobic State Physical Review Letters · American Physical Society · 2017 10.1103/physrevlett.119.134501
  27. A review of level-set methods and some recent applications Journal of Computational Physics · Elsevier BV · 2017 10.1016/j.jcp.2017.10.006
  28. The geometry of physics : an introduction 2004
  29. Level Set Methods and Dynamic Implicit Surfaces Applied Mechanics Reviews · American Society of Mechanical Engineers · 2004 10.1115/1.1760520
  30. Hydrophobicity Of Surfaces With Cavities: Making Hydrophobic Substrates From Hydrophilic Materials? Brill Academic Publishers eBooks · Brill · 2010 10.1163/ej.9789004165939.i-496.32
  31. Geometrical Methods in the Theory of Ordinary Differential Equations Grundlehren der mathematischen Wissenschaften · Springer Nature · 1983 10.1007/978-1-4684-0147-9
  32. Cavitation And Bubble Dynamics 1995 10.1093/oso/9780195094091.001.0001