14
1 Functional Thin Films on Surfaces Orestis Vantzos, Omri Azencot, Max Wardeztky, Martin Rumpf, and Mirela Ben-Chen Abstract—The motion of a thin viscous film of fluid on a curved surface exhibits many intricate visual phenomena, which are challenging to simulate using existing techniques. A possible alternative is to use a reduced model, involving only the temporal evolution of the mass density of the film on the surface. However, in this model, the motion is governed by a fourth-order nonlinear PDE, which involves geometric quantities such as the curvature of the underlying surface, and is therefore difficult to discretize. Inspired by a recent variational formulation for this problem on smooth surfaces, we present a corresponding model for triangle meshes. We provide a discretization for the curvature and advection operators which leads to an efficient and stable numerical scheme, requires a single sparse linear solve per time step, and exactly preserves the total volume of the fluid. We validate our method by qualitatively comparing to known results from the literature, and demonstrate various intricate effects achievable by our method, such as droplet formation, evaporation, droplets interaction and viscous fingering. Finally, we extend our method to incorporate non-linear van der Waals forcing terms which stabilize the motion of the film and allow additional effects such as pearling. Index Terms—Computer Graphics, Three-Dimensional Graphics and Realism, Animation. F 1 I NTRODUCTION T HE intricate motion of a viscous thin film subject to external forces, such as gravity, inspires research in physics, mathematics and computer science, among other scientific disciplines. In many scenarios the domain on which the fluid resides is curved rather than flat. The tear film on the cornea of the eye [1], the dynamics of lava flows [2] and the formation of ice on the aerofoil of an aircraft [3], are all examples related to the evolution of thin films on curved geometries. The goal of this paper is to suggest a method for simulating thin films on surfaces, which is based on gradient flow evolution and the operator view of the flow induced by tangent vector fields. Generally, the Navier–Stokes equations coupled with ap- propriate boundary conditions are assumed to give a good approximation of the film’s dynamics. However, for the flows we are interested in, these equations are considered difficult to solve numerically, especially on curved domains. Moreover, in the case of thin films we can assume an extremely small height-to-length ratio which leads to a substantial simplification through the lubrication approxima- tion [4]. Namely, under the assumptions of the lubrication model, the evolution of the film’s mass density is governed by a fourth-order nonlinear partial differential equation (PDE). A natural approach to simulate thin films within this reduced model would then be to discretize the resulting PDE (e.g., [5]). Choosing such a strategy, however, one will be faced with two main challenges. First, one will need to derive a suitable set of discrete differential operators acting on discrete curved domains (e.g., triangle meshes). Then, the second task will be to construct a proper numerical time integration scheme. While any attempt to discretize general O. Vantzos, O. Azencot and M. Ben-Chen are with the Computer Science Department, Technion – Israel Institute of Technology, Israel M. Wardeztky is with Institute of Numerical and Applied Mathematics, University of G¨ ottingen, Germany M. Rumpf is with the Institute of Numerical Simulation, University of Bonn, Germany PDEs will encounter these obstacles, in the particular case of thin films, the restriction on the time step size (see e.g., [6]) makes the usage of explicit schemes impractical. Although it is possible to use implicit schemes instead, such schemes do not guarantee in general the preservation of the underlying structure. For example, conserved quantities in the continuous setting (such as the total volume of the thin film) may become non-conserved in a discrete framework. Due to the above obstacles, direct discretization of the PDE is usually considered less attractive. An alternative point of view is to leverage the gradient flow structure which is known to exist for thin film equations (see e.g., [7], [8]). In this model, the motion of the film is determined by the minimizer of a certain cost function, which is defined over the manifold of all possible densities of the film with prescribed volume. Intuitively, the cost function is minimized when the resistance of the fluid to flow due to dissipation induced by friction balances the additional forces (e.g., surface tension and gravity) that act on the film. One of the advantages of this approach is that every gradient flow has a natural time discretization which leads to a variational problem. In practice, it allows for significantly larger time steps compared to explicit numer- ical schemes. Furthermore, by construction, the associated energy is guaranteed to decrease at each step. However, we still need to address the issues of modeling the underlying mass transport and the conservation of fluid volume. A reasonable choice within the gradient flow model is to minimize the cost function under an additional con- straint given by the transport equation. Intuitively, the trans- port equation describes how the mass density is affected by the motion of the fluid through the corresponding velocity field. Recently, [9] suggested a coordinate-free approach for solving the transport equation on triangulated surfaces by representing tangent vector fields as linear operators on scalar functions. Their method is advantageous since it avoids the complicated integration of the fluid’s motion, while ensuring the preservation of the integral of the transported quantity.

1 Functional Thin Films on Surfaces - uni-goettingen.deddg.math.uni-goettingen.de/pub/ftf_tvcg.pdf1 Functional Thin Films on Surfaces Orestis Vantzos, Omri Azencot, Max Wardeztky,

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

  • 1

    Functional Thin Films on SurfacesOrestis Vantzos, Omri Azencot, Max Wardeztky, Martin Rumpf, and Mirela Ben-Chen

    Abstract—The motion of a thin viscous film of fluid on a curved surface exhibits many intricate visual phenomena, which arechallenging to simulate using existing techniques. A possible alternative is to use a reduced model, involving only the temporalevolution of the mass density of the film on the surface. However, in this model, the motion is governed by a fourth-order nonlinearPDE, which involves geometric quantities such as the curvature of the underlying surface, and is therefore difficult to discretize.Inspired by a recent variational formulation for this problem on smooth surfaces, we present a corresponding model for trianglemeshes. We provide a discretization for the curvature and advection operators which leads to an efficient and stable numericalscheme, requires a single sparse linear solve per time step, and exactly preserves the total volume of the fluid. We validate our methodby qualitatively comparing to known results from the literature, and demonstrate various intricate effects achievable by our method,such as droplet formation, evaporation, droplets interaction and viscous fingering. Finally, we extend our method to incorporatenon-linear van der Waals forcing terms which stabilize the motion of the film and allow additional effects such as pearling.

    Index Terms—Computer Graphics, Three-Dimensional Graphics and Realism, Animation.

    F

    1 INTRODUCTION

    THE intricate motion of a viscous thin film subject toexternal forces, such as gravity, inspires research inphysics, mathematics and computer science, among otherscientific disciplines. In many scenarios the domain onwhich the fluid resides is curved rather than flat. The tearfilm on the cornea of the eye [1], the dynamics of lavaflows [2] and the formation of ice on the aerofoil of anaircraft [3], are all examples related to the evolution ofthin films on curved geometries. The goal of this paper isto suggest a method for simulating thin films on surfaces,which is based on gradient flow evolution and the operatorview of the flow induced by tangent vector fields.

    Generally, the Navier–Stokes equations coupled with ap-propriate boundary conditions are assumed to give a goodapproximation of the film’s dynamics. However, for theflows we are interested in, these equations are considereddifficult to solve numerically, especially on curved domains.Moreover, in the case of thin films we can assume anextremely small height-to-length ratio which leads to asubstantial simplification through the lubrication approxima-tion [4]. Namely, under the assumptions of the lubricationmodel, the evolution of the film’s mass density is governedby a fourth-order nonlinear partial differential equation(PDE).

    A natural approach to simulate thin films within thisreduced model would then be to discretize the resultingPDE (e.g., [5]). Choosing such a strategy, however, one willbe faced with two main challenges. First, one will need toderive a suitable set of discrete differential operators actingon discrete curved domains (e.g., triangle meshes). Then,the second task will be to construct a proper numerical timeintegration scheme. While any attempt to discretize general

    • O. Vantzos, O. Azencot and M. Ben-Chen are with the Computer ScienceDepartment, Technion – Israel Institute of Technology, Israel

    • M. Wardeztky is with Institute of Numerical and Applied Mathematics,University of Göttingen, Germany

    • M. Rumpf is with the Institute of Numerical Simulation, University ofBonn, Germany

    PDEs will encounter these obstacles, in the particular caseof thin films, the restriction on the time step size (seee.g., [6]) makes the usage of explicit schemes impractical.Although it is possible to use implicit schemes instead, suchschemes do not guarantee in general the preservation of theunderlying structure. For example, conserved quantities inthe continuous setting (such as the total volume of the thinfilm) may become non-conserved in a discrete framework.Due to the above obstacles, direct discretization of the PDEis usually considered less attractive.

    An alternative point of view is to leverage the gradientflow structure which is known to exist for thin film equations(see e.g., [7], [8]). In this model, the motion of the filmis determined by the minimizer of a certain cost function,which is defined over the manifold of all possible densitiesof the film with prescribed volume. Intuitively, the costfunction is minimized when the resistance of the fluid toflow due to dissipation induced by friction balances theadditional forces (e.g., surface tension and gravity) that acton the film. One of the advantages of this approach is thatevery gradient flow has a natural time discretization whichleads to a variational problem. In practice, it allows forsignificantly larger time steps compared to explicit numer-ical schemes. Furthermore, by construction, the associatedenergy is guaranteed to decrease at each step.

    However, we still need to address the issues of modelingthe underlying mass transport and the conservation of fluidvolume. A reasonable choice within the gradient flow modelis to minimize the cost function under an additional con-straint given by the transport equation. Intuitively, the trans-port equation describes how the mass density is affected bythe motion of the fluid through the corresponding velocityfield. Recently, [9] suggested a coordinate-free approach forsolving the transport equation on triangulated surfaces byrepresenting tangent vector fields as linear operators on scalarfunctions. Their method is advantageous since it avoidsthe complicated integration of the fluid’s motion, whileensuring the preservation of the integral of the transportedquantity.

  • 2

    In this work, we argue that the gradient flow model com-bined with the operator view of tangent vector fields leadsto a robust and highly efficient simulation tool. Specifically,we consider the thin film model of [8] in the presence of aprecursor layer (i.e., the film resides on top of a very thin layerdefined over the whole domain) and in the geometric settingof triangulated surfaces. Under the assumption that we aregiven an approximate normal field, we present formulationsof discrete curvature operators which are tailored for ourmodel. In addition, we employ insights from [9] to advectthe mass function of the thin film in a manner whichcauses very little numerical dissipation, and is guaranteed toconserve exactly the total volume of the fluid. The resultingmethod boils down to a linear solve of a sparse system pertime step. We demonstrate the effects of curvature, gravity(see e.g., Fig. 1) and material parameters on the flow, andqualitatively compare our results to previous numericalsimulations. Finally, we present various effects (e.g., dropletformation and interaction) which are achievable within ourframework.

    1.1 Related Work

    As the behaviour of viscous thin films on surfaces has not,to the best of our knowledge, been previously simulated inthe graphics community, we focus our attention on Eulerianmethods from the computational fluid dynamics commu-nity, and to work on similar phenomena which appeared inthe computer graphics literature.

    The evolution of thin films over arbitrary domains hasbeen an active area of research in CFD for many decades. Werefer the interested reader to the seminal review by [10] andto the more recent review by [11]. These reviews present acontinuous model for thin films, based on lubrication theory,which defines a reduced model for the 3D Navier–Stokesequations given the assumption of a small thickness of thefilm.

    One approach to thin film simulation is to directly dis-cretize the governing PDE as was shown for planar (seee.g., [12], [13]) and curved (see e.g., [5]) domains. In general,this point of view leads to several challenges, of whichthe restriction on the time step size for explicit schemes isperhaps the most problematic. Namely, the application ofa CFL-type condition leads to the requirement that the timestep ⌧ is on the order of (�x)4, where �x is the minimal edgelength. To overcome this constraint, [6] employed convexitysplitting for their time integration scheme (within a level-setframework). Nevertheless, their scheme does not guaranteeconservation of the fluid’s volume, and has additional re-strictions due to the level-set formulation.

    An alternative discretization for thin films can be de-rived from the gradient flow model, for which a naturalvariational time integrator exists. In general, variationalintegrators are known to conserve the underlying structure,e.g., the variational scheme in [14] preserves a notion ofdiscrete momentum. For the case of thin films over curveddomains (see e.g., [8], [15]), the gradient flow approach leadsto an attractive numerical scheme. In the latter work, whichis closest to our approach, the authors used Discrete ExteriorCalculus (DEC) [16] for the spatial discretization, repre-senting the flux field with discrete 1-forms. Our approach

    differs from their work as we use a velocity based formu-lation, leverage [9] for the advection, and suggest discretecurvature operators. These changes allow us to generatestable simulations on meshes with obtuse triangles whichare common in graphics. A detailed comparison with [8] isgiven in Sections 2 and 4.

    We conclude with some representative related workfrom the graphics community literature. Free surface flowsfor highly viscous fluids were suggested in [17], whereeffects such as melting wax are demonstrated. While onecould consider adding a surface as a solid boundary and us-ing a similar approach for simulating viscous films, it wouldbe quite difficult to achieve the intricate effects we showwithout using a very dense grid resolution. More recently,various methods were proposed for modeling thin featuresin free surface flows by explicitly tracking the free surfacemesh [18], [19], by using thickened triangle meshes [20],tetrahedral elements [21], or simplicial complexes [22], tomention just a few. Such approaches, however, require care-ful manipulation of the connectivity and topology of thefree surface geometry, which are avoidable when simulatingfilms on surfaces, as the free surface can be represented as ascalar function.

    Finally, some approaches simulate water related phe-nomena. [23] model the contact angle with the surface,representing the free surface with a level-set based dis-tance field. While various effects are achievable with thisapproach, the method requires a high-resolution grid whichleads to a time-consuming system requiring a few days ofcomputation per simulation. On the other hand, using aheight field based method as in [24] considerably reducescomputational complexity, however, the instabilities andeffects we demonstrate below were not shown there.

    Fig. 1. Vanilla sauce on a chocolate bunny. The physical parameters areb = 20, ✏ = 0.1,� = 0.

  • 3

    1.2 ContributionsOur main contributions can be described as follows:

    • A discrete model for thin film evolution on generaltriangle meshes.

    • An efficient and robust scheme, which exactly pre-serves the total fluid’s volume.

    • Simulation of various intricate effects, such as finger-ing, evaporation and droplet formation, interactionbetween droplets and pearling.

    2 DYNAMICS OF THIN FILMSWe investigate the evolution of a layer of an incompressibleviscous fluid flowing with velocity v on top of a curvedsurface �, under the influence of surface tension and, poten-tially, gravity. The liquid layer is attached to the surface atthe liquid-solid interface, i.e., no-slip boundary condition(we extend this later), whereas the liquid-air surface isevolving freely. A typical scenario is illustrated in Figure 2showing the notation for various related quantities.

    Navier–Stokes equations. A common approach for mod-eling the evolution of thin liquid films is to consider theNavier–Stokes equations. These equations describe the fluid’svelocity in the liquid phase (the bulk), the surface tension onthe liquid-air interface (i.e., the free surface), and a suitableboundary condition for the velocity in the liquid-solid inter-face (i.e., on the solid surface). Formally, the fluid velocity vand the pressure p satisfy the equations:

    @tv + (v ·r)v � µ�v +rp = 0 in the bulkdiv v = 0 in the bulk

    v = 0 on the surface�n � �Hn = 0 at the free surface

    (1)

    where � = �p id+µ(rv +rvT ) is the stress tensor, µ and� are the viscosity and the capillary constants (see Fig. 2).Furthermore, the free surface x itself evolves according tothe kinematic condition @tx = v .

    Unfortunately, a straightforward discretization of theseequations is challenging. In particular, to achieve the typeof effects we show below, the main obstacle is due to theprohibitively small time steps which are imposed by sucha method. Moreover, the spatial discretization is also chal-lenging since Eulerian methods will require dense samplingof the domain, whereas Lagrangian techniques will involvecomplex tracking of the free surface. Therefore, direct dis-cretization of equations (1) is not practical for graphicsapplications for this type of problems.

    Lubrication approximation. Since we are interested in thinfilms, a reduction in dimensionality can be achieved byusing the lubrication approximation model (see e.g., [10]). Inthis model, the dynamics of the film are governed by theevolution of a function (i.e., a scalar quantity) defined onthe surface �.

    Given a characteristic scaling of height and length, thekey assumption to consider is a small height to lengthratio, i.e., ✏ = heightlength ⌧ 1. Then, one takes into accountan asymptotic expansion of the Navier–Stokes equationswith respect to ✏, where the resulting thin film equations

    n

    Air

    Liquid

    Solid

    v

    H

    H n

    Γ

    u

    Fig. 2. A typical scenario is illustrated for the full 3D Navier–Stokes (left)compared to the reduced lubrication model (right). Notice that under thelubrication assumptions the involved quantities are computed directly on�, e.g., u is a scalar function.

    are composed of the leading order terms. Taking this path,a derivation of a lubrication model without gravity for themass density u on curved domains yields equations of theform (see [5] and [8]):

    @tu = div� (M(u)r�p) (2a)

    M(u) =1

    3u3 id+

    6u4(H id�S) (2b)

    p = �H � ✏Tu� ✏��u (2c)

    where M(u) is the mobility tensor (to be discussed later)and p can be considered as a pressure-like quantity on thesurface, i.e., the fluid moves away from areas of high p. Hand K are the mean and Gaussian curvatures, T = H2�2K ,and S is the shape operator.

    Notice that inertia effects are neglected in this model, i.e.,the Reynolds number is assumed to be small, Re⌧ 1, as ex-pected (by simple scaling arguments) for a thin enough film.Moreover, we assume that the mass density u is a properfunction. As u is closely related to the fluid’s height h, thatis u = h � ✏2Hh

    2, the consequence of the former constraintis that the free surface is assumed to be representable as aheight function over �, and hence, e.g., contact angles higherthan ⇡/2 and wave-like structures cannot be modeled withequations (2).

    In addition to providing a reduced model for the Navier–Stokes equations, the thin films equations are also instru-mental for analyzing the behavior of the flow. As mentionedabove, the fluid flows towards low pressure areas thusvisualizing p allows to evaluate the underlying dynamicsof the film. Moreover, a qualitative study of the expectedflow can be done by estimating the different scales of thevarious components in p. For instance, the dominating termin Eq. (2c) is the mean curvature and hence the dynamicson curved domains are expected to be completely differentwhen compared to the flat case (where H = 0). Indeed, wedemonstrate this and other effects in the following example.

    In Figure 3 we show the color coding of the pressurecomputed for an initial uniform deposition of liquid on abumpy plane (left) and on the Scherk surface (right). Thesefigures suggest that the fluid is most likely to accumulateat the center of the respective surfaces, where the pressureis low. Indeed, we show in Figure 4 (top) the color codingof the evolution of the mass density u on the bumpy plane,starting from a uniform layer of fluid. In this case, since the

  • 4

    13

    -7.6

    -18

    2.6

    -0.01

    -0.06

    -0.09

    -0.03

    p0 p0

    Fig. 3. By visualizing the pressure we can identify regions where the fluidis likely to accumulate. For example, for an initially uniform layer of fluid,the initial pressure p0 indicates that fluid is expected to concentrate atthe respective centers, where the pressure is lowest. See Fig. 4 for thetemporal evolution of the flow.

    dominating term is H (top, left), the film flows towards themaximal mean curvature, at the center of the basin. Simi-larly, for a minimal surface, namely when H = 0, the termsthat govern the dynamics are the Gaussian curvature andthe Laplacian of u. In Figure 4 (bottom), we show frames ofthe flow on the Scherk minimal surface, starting again froma uniform layer of fluid. Here, the initial Laplacian of u is0 thus the minimal Gaussian curvature (bottom, left) drivesthe fluid towards the center of the surface.

    Unfortunately, the simulation of thin film flow basedon a PDE of the form (2) suffers from serious drawbacks.First, explicit discretization of equation (2) requires verystrong time step restrictions, and stable (semi-)implicit dis-cretizations allowing for large time steps, are unknown.Second, qualitative properties, such as volume preservationand energy decay, are difficult to ensure. Finally, on generaltriangulated surfaces it is unclear how to discretize thegeometric quantities in a physically consistent way.

    These issues motivate a different approach—instead ofdirectly discretizing the PDE, it is possible to model theevolution from the variational perspective of gradient flows,as was first suggested in [8]. To introduce the concepts to thegraphics community, and to keep the paper self contained,we first briefly describe the gradient flow model of thinfilms, and then discuss our modifications in the next section.

    Gradient flow model. The key insight behind the varia-tional approach is that the quantity p can be viewed asthe negative (Fréchet) derivative of the free energy functional

    E

    ✏(u) =Z

    n

    �Hu�✏

    2Tu2 +

    2|r�u|

    2o

    dx so that the PDE

    (2) is of the gradient flow form @tu = �G(�E✏(u)

    �u ). Theevolution of u then can be understood as a “steepest”descent for the free energy E✏, at a rate regulated by themobility M(u) via the function G(�) = div� (M(u)r��).The previous statement can be made precise by introducingthe flux f = �M(u)r�p, so that the PDE can be written inthe form of a flow equation as

    @tu = � div� f. (3)

    Then the gradient flow is equivalent to the statement thatthe free energy decays as ddtE

    ✏(u) = �D✏u(f, f) 0, where

    the bilinear form D✏u(f, f) =Z

    �f · M(u)�1f dx is known

    as the (viscous) dissipation. This in turn is equivalent to thevariational requirement that the density variation @tu and

    t=0H t=0.27 t=2.34

    t=0 t=3534t=281K

    Fig. 4. (top) The motion of the film primarily depends on the mean cur-vature thus the fluid concentrates in the center basin, u0 = 0.1, ✏ = 0.1.(bottom) For minimal surfaces (i.e., when H = 0) the film is mostlyinfluenced by the Gaussian curvature as shown for the Scherk’s surface,u0 = 0.1, ✏ = 1.

    the flux f minimize (at each time t) the so-called Rayleighfunctional 12D

    ✏u(f, f)+

    �E✏(u)�u (@tu) under the transport con-

    straint (3).Intuitively, the energy is an approximation of the area of

    the free surface, which should be minimized due to surfacetension, and the dissipation is the “price to pay” for the totalshear stress due to the flow inside the film. Hence, amongall the possible flows which preserve the mass of the fluid,we look for the one which optimally minimizes the area ofthe free surface and the stress inside the film.

    Finally, following the idea of natural time discretizationof gradient flows [25] and minimizing movements [26], weintegrate in time to arrive at a variational approximation ofuk+1 = u(tk + ⌧) given uk = u(tk):

    uk+1 = argminu=F⌧ (uk,f)

    1

    2⌧D

    ✏u(f, f) + E

    ✏(u)

    (4)

    where F⌧ (uk, f) denotes a suitable (approximate) solutionat tk + ⌧ of the initial value transport problem (3) withu(tk) = uk. The constrained minimization problem (4)is equivalent to discretizing the original PDE (2) in time;instead of the PDE then, one can describe (and discretize)the thin film flow through the three components of thegradient flow: the free energy E✏, the dissipation D and theflow equation (3) (or in the time-discrete setting the flowoperator F⌧ ).

    In [8], suitable energy and dissipation functionals arederived for gravity- and surface tension-driven thin filmflow on a smooth curved surface. The variational time dis-cretization (4) is coupled then with a spatial discretizationbased on Discrete Exterior Calculus, resulting in a fullydiscrete scheme on triangulated surfaces that addressessome of the shortcomings of PDE-based solvers pointed outpreviously. Specifically, discrete qualitative properties arestraightforward to preserve: the energy decay is built intothe time discretization (4), as will be shown later, and it isalso easier to set up discrete mass conservation for the flowequation than for the full PDE (2). In addition, because of theexplicit control on the energy decay, the variational schemeis very stable, allowing for large time steps.

    Unfortunately, directly applying that scheme for graph-ics purposes on general triangle meshes is challenging sincecurvature quantities and mass preserving transport aremore difficult to discretize in this setting. In [8] masspreservation was achieved by working with a flux-based

  • 5

    formulation, that lends itself naturally to a finite-volumeapproach such as Discrete Exterior Calculus. However, inthe presence of obtuse triangles, i.e., triangles with angleslarger than ⇡/2, negative entries can arise in the diagonalmatrices that the scheme uses to define inner productsbetween discrete k-forms. This can lead to non-convexityand eventually to instability and/or non-convergence ofthe variational scheme. Notice that for general meshes,eliminating these obtuse triangles is highly non-trivial.

    In the next section we present our approach for dis-cretizing the thin film gradient flow model on generaltriangulated surfaces. We first develop the discrete energyand dissipation terms by modeling the fluid as a prismaticlayer formed by an offset surface to the triangle mesh,which naturally introduces discrete curvature quantities. Inaddition, we switch to a velocity-based formulation of thetransport equation @tu + div�(uv) = 0, which allows us touse the new discretization suggested in [9], that does notsuffer from the aforementioned problem.

    3 THIN FILMS ON TRIANGULATED SURFACESAs we have previously seen in Figure 4, the film dynamicsare heavily dependent on the curvature operators, H , K andS. In their work [8] presented one dimensional applicationsand simulations on two dimensional surfaces where thecurvatures are easy to compute analytically (such as surfacesof revolution and graphs). One could, of course, extendtheir method to triangulated surfaces by choosing a set ofdiscrete curvature operators from the many available in theliterature (see e.g., [27]). We chose instead to go back tofluid mechanics and look for a definition of the energy anddissipation functionals that could be applied on continu-ous but non-smooth surfaces, such as a triangulated mesh.We present the resulting model in this section, but havereserved a more technical derivation for the supplementalmaterial.

    Our main observation is that if � is equipped with acontinuous vector field n that is approximately normal, onecan follow similar derivations as in [8], and arrive at energyand dissipation functionals given by (up to an O(✏2) error):

    E

    ✏(u) =Z

    �(bz �H)u+

    2(b cos ✓ � T )u2 +

    2|r�u|

    2 da

    (5)

    and

    D

    ✏u(v, v) =

    Z

    �v ·M(u)�1v da (6)

    M(u) =⇣

    � +u

    3

    id+✏u2

    12

    7H id�3S � 5S̄�

    (7)

    respectively, where (unlike in [8]) the curvature quantities inthese equations are now given in terms of the approximatenormal field n. In (5) we included the gravity terms thatinvolve the Bond number b, which measures the relativestrength of gravity vs. surface tension, the altitude z, and theangle ✓ of the surface normal with the vertical direction. Thediscrete total curvature T and shape operator S are givenin section 3.1 and the rotated shape operator S̄ is given insection 3.3. Moreover, we incorporated in (7) a constant �which allows for various slip conditions.

    i

    ν n1n3n2

    ei

    Fig. 5. (left) Prismatic layer of viscous fluid, depicted as a piecewiselinear field over a triangle. (right) Prismatic volume with tangential vectorfield v (red) and attached Hagen-Poiseuille type velocity profile ⇧s(v).

    3.1 Geometry of thin films on triangulated surfacesFor a smooth surface, the geometry of a liquid layer ismodeled by a scalar height function h, which describes theextension of the liquid along a surface normal direction at eachsurface point. In the limit of thin films, this height field isscaled by a global scaling parameter ✏. Then, the liquid layeris bounded by the surface on one side and by an offset alongthe surface normal by ✏h on the other. The laws of physicalmotion of the liquid are expressed by expanding the 3Dmotion up to second powers in ✏.

    Adopting this perspective for the case of a triangulatedsurface �, we take the approach of associating surfacenormals n as well as the offset function h with vertices andextending the resulting offset field linearly across triangles,leading to a prismatic liquid layer per triangle, see Figure 5(left). This approach ensures continuity of the offset fieldacross edges, which we harness to ensure mass conservationwhen the liquid evolves.

    There is, however, a caveat with this approach: it iswidely accepted that there exist no “best” vertex normals inthe discrete case. Consequently, we only require consistentnormals in the following sense. If the average edge lengthof the mesh is �x, it suffices that we are provided with aset of (unit length) vertex normals n such that the difference|⌫ � n|, between the normal ⌫ of any (flat) triangle of themesh and the vertex normal n of its vertices, is of order �x2.1

    As in the smooth case, the lubrication approximation re-quires an additional scaling variable ✏ in which the relevantphysical terms are developed up to second order. With thelateral extension of the film being measured in direction ofthe discrete normal n, we obtain the free surface

    �✏h = {x+ ✏h(x)n(x) |x 2 �}

    of the thin film at the liquid-gas interface and the fluidvolume V✏h = {x+ s✏h(x)n(x) |x 2 �, s 2 (0, 1]} .

    In order to derive the variational time discretization ofthe evolution of the thin film we make use of three differ-ent expansion formulas, namely the expansion of volume,area, and length with respect to the thickness parameter✏. Returning to the smooth case for a moment, such anexpansion leads to expressions in terms of curvatures ofthe underlying surface, containing the shape operator S,its trace, and its determinant, known as mean and Gausscurvature, respectively [28].

    1. Notice that this condition implies that r�n is both tangential andsymmetric up to order �x.

  • 6

    We exactly recover this geometric description in ourdiscrete model. Indeed, first recall that in the smooth settingthe shape operator is defined as the tangential gradient ofthe (smooth) unit normal field. Accordingly, we define inthe discrete case a generalized shape operator (in the sense ofconsidering arbitrary “normals” n) by

    S := �1

    2P (r�n+ (r�n)

    T )P , (8)

    where r� = PrR3 is the (triangle-based) tangential gra-dient on � and P = id�⌫ ⌦ ⌫ is the projection onto the(triangle-based) tangent space. From this shape operator wededuce a discrete mean curvature H = Tr(S) and a discreteGaussian curvature K = 12

    Tr(S)2 � Tr(S2)�

    . Notice thatin this setup S, and therefore also H and K , are constantper face.

    Second recall that in the smooth case, mean and Gaus-sian curvatures alternatively arise by considering first andsecond variations of offset volume and surface area. Thesame holds true in the discrete case, i.e., for our prismaticlayer. For example, for the expansion of offset volume we obtain(up to an O(✏3 + �x) error)

    Z

    V✏h

    dx =Z

    ✏h�✏2

    2Hh2

    da .

    Here H equals the trace of our generalized shape operator Sdefined above. Hence, the two alternative discrete definitionsof mean curvature (as the trace of the tangential gradientof the normal, and through the second order expansionof the of the offset volume) are consistent. Intuitively, thecorrection term ✏

    2

    2 Hh2, and in particular the appearance of

    mean curvature, accounts for change of surface area in thelateral direction.

    Notice that the integrand can be written as ✏u, withu = h � ✏2Hh

    2. Thus u describes (up to a factor of ✏) thefluid volume per surface area and can be considered as the localmass density. This quantity is an alternative and, from theviewpoint of the underlying conservation law, preferablevariable.

    Likewise, for the expansion of the surface area we obtain(up to an O(✏3 + �x) error) thatZ

    �✏h

    da =Z

    1� ✏hH +✏2

    2

    2h2K + |r�h|2�◆

    da .

    Notice that when h = 1, i.e., when one considers constantoffsets, then this expression is equal to the famous Steinerformula, known from differential geometry [29]. As before,H and K that arise from the expansion of the surface areaare exactly the mean and Gaussian curvatures, respectively,defined using our generalized shape operator S.

    3.2 EnergyThe first ingredient of our variational time discretization isthe energy of the thin film, given by the sum of surfaceenergy (the total area of the free surface �✏h, which tendsto be minimized due to surface tension) and gravitationalenergy (weighted by the Bond number b):

    E(h) =Z

    �✏h

    da+ bZ

    V✏h

    z dx .

    Here the Cartesian coordinate z denotes the altitude, i.e., weassume that gravity is acting along the z-direction.

    The surface energy was spelled out above. Analogouslyto the expansion of the offset volume, we obtain for theexpansion of gravitational energy (up to an O(✏3 + �x) error)that

    Z

    V✏h

    z dV =Z

    ✏zh+✏2

    2

    �h2Hz + h2 cos ✓�

    da .

    Here, per triangle, ✓ is the angle of the direction of gravitywith the triangle normal. Exchanging the height h againstthe mass density u and restricting to the (non constant)leading order terms we finally end up with the energyfunctional

    E

    ✏(u)=Z

    (bz �H)u+✏

    2(b cos ✓�T )u2 +

    2|r�u|

    2da (9)

    with T = H2 � 2K .

    3.3 Conservation law for the flowMass conservation during the temporal evolution of thefluid is one of the central physical principles of viscousflow [30]. Violations of this principle in numerical simula-tions lead to undesirable artefacts. For our approach, weoutline how mass conservation can be exactly maintained byworking with a conservation law in divergence form. Massconservation is a balance principle: the change of volumemust equal the flux of material across the volume boundary.On an arbitrary (triangular) patch T this translates into thebalance equation

    d

    dt

    Z

    V✏h(T )dx =

    Z

    F✏h(T )v · µ da ,

    where v is the fluid’s velocity vector and µ is the (inwardpointing) normal of the faces F✏h(T ) of the prism V✏h(T )above T (cf. Fig. 5 (right)). Using the divergence theoremof Gauss and Taylor expansions in the height, which corre-sponds to an expansion of the length functional on the edgesof the patch, we obtain the conservation law

    @tu = � div�

    uZ ✏

    0Qsv�,s ds

    ,

    where v�,s(x) is the tangential component of the velocityin the liquid layer and the tensor Qs = id�su

    S̄ �H id�

    accounts for the geometry of the prism V✏h(T ). The rotatedshape operator S̄ = �[⌫]⇥S[⌫]⇥ is defined via the skew-symmetric matrix [⌫]⇥, which in turn is given by requiringthat [⌫]⇥ · x = ⌫ ⇥ x for any vector x. We define the(weighted) average velocity v =

    R ✏0 Qsv�,s ds, independent

    of s, so that the conservation law is restricted to the triangu-lated surface � and takes the simple form

    @tu+ div�(u v) = 0 . (10)

    The weighting reflects the inclination and torsion of thefaces of the prisms. The advantage of working with anaveraged velocity is that it resides directly on the surface �.In the discrete case, this velocity field can be modeled usingpiecewise constant (per triangle) vector fields, and massbalance can be expressed using commonly used discretedifferential operators.

  • 7

    3.4 Dissipation and mobilityIn the previous section, we used averaging in order toreduce the velocity field in the bulk to a velocity field onthe surface. For treating dissipation, we require the oppositedirection, i.e., to reconstruct a velocity field in the bulkfrom the velocity filed on the surface. Since the inverseof averaging allows for many solutions, this reconstructionstep is not unique a priori. In order to single out a uniquevelocity field in the bulk, we invoke a physical principle byconsidering the field that causes least energy dissipation.

    Concretely, we require a (tensor) profile function ⇧ssuch that v�,s = ⇧sv and

    R ✏0 Qs⇧s ds = id (see Fig. 5

    (right)). Note that there are many possible velocity profiles⇧ : s 7! ⇧s that satisfy this integral constraint. Fromthe theory of viscous flows [31] we know that the phys-ically observed profile minimizes the viscous dissipationrate

    R

    V✏h|rv +rvT |2 dx. This is dominated by the vertical

    shear stress, i.e., the normal derivative of the tangentialvelocity, which can be expressed as a quadratic form inv. Approximating this quadratic form to leading order in✏, substituting v by ⇧(v), and optimizing the transporta-tion cost for given boundary conditions ⇧0 = 0 (no-slipat substrate) and zero shear stress at free surface underthe integral constraint

    R ✏0 Qs⇧s ds = id, yields an optimal

    profile ⇧⇤, which to leading order matches the well-knownHagen-Poiseuille profile. We thus obtain the dissipation asa function of the averaged velocity v as

    D

    ✏u(v, v) =

    Z

    �v ·M(u)�1v da , (11)

    where the mobility tensor is defined as

    M(u) =u

    3+ ✏

    u2

    12

    7H id�3S � 5S̄�

    .

    For a more detailed derivation of the optimal profile see thesupplemental material.

    3.5 Minimizing movement approachCombining the three building blocks we have derived, andusing the minimizing movement approach, we arrive at aneffective variational time discretization for the evolution ofa thin film on a triangulated surface. The energy E✏ (9)depends on the mass density u, whereas the dissipation D✏u(11) is a quadratic form on motion fields v. For given uk attime step k any mass density u at time step k + 1 resultsfrom the transport of uk via an underlying motion field.Hence, the time discrete conservation law (10) has to behandled as a constraint representing the coupling of u andv. Altogether, we iteratively define uk+1 as the minimizer uof the following constrained optimization problem:

    minu,v

    1

    2⌧D

    ✏uk(v, v) + E

    ✏(u)

    subject to u = T⌧ (v)(uk),

    where T⌧ (v) denotes the operation of transporting uk withconstant velocity v for a time interval of length ⌧ . Thefactor 12⌧ reflects the proper rescaling in time to obtain thedissipation to be spent to transform uk into u.

    We consider a number of extensions to this model, whichare known for the flat case [10]. The first one replaces on �

    the no-slip v = 0 by the Navier slip condition v = �@nv with� denoting the slip length (in case of large variation of thevelocity in the normal direction, the fluid undergoes slip-ping on the surface �). To reflect this one has to add � to themobility M . This slip boundary conditions accelerates themotion of the fluid. Furthermore, we consider evaporation.It takes the form of a sink term in the right hand side ofthe conservation law and is modeled in the time discretesetup by the constraint u � T⌧ (v)(uk) = � u(uk+ce)2 , for asmall constant ce. Intuitively, the evaporation rate is fasterfor thinner films, which reflects a faster heating of thinnerfilms.

    4 SPATIAL DISCRETIZATIONThe main challenge here is to define a stable discretizationof the transport equation (10) such that various properties(e.g., energy decay and mass preservation) will hold ongeneral triangle meshes. While many of the operators weuse are standard in geometry processing, we highlight theproperties these operators should possess such that theresulting optimization scheme would indeed be stable.

    Notation. We consider a triangle mesh and denote by V itsvertex set and by F its face set. We use bold faced symbolsto denote the spatial discrete analogues of continuous quan-tities (e.g., u is the discrete mass density). When required,we use the subscripts V and F to denote quantities on thevertices and the faces, respectively. The bracket [·] operatoris used to convert vectors in R|V| and R|F| to block diagonalmatrices in R|V|⇥|V| and R3|F|⇥3|F| respectively (replicatingeach entry 3 times for the latter).

    Functions, vector fields and inner products. We use atypical setup, i.e., piecewise-linear functions and piecewise-constant vector fields, with corresponding inner products.Specifically, we represent real-valued functions as scalars onthe vertices of the mesh, i.e., u 2 R|V|, and extend them tothe whole mesh using piecewise linear hat basis functions.Similarly, vector fields are treated as piecewise-constant onthe faces of the mesh, i.e., v 2 R3|F|.

    For defining discrete inner products we require vertexand face areas, denoted by AV 2 R|V| and AF 2 R|F|,respectively. For the vertex area we use 1/3 of the totalarea of its adjacent triangles, and we define an interpolatingmatrix IFV 2 R|V|⇥|F| which interpolates quantities fromfaces to the vertices, i.e., IFV (i, j) =

    AF (j)3AV(i)

    , iff vertex ibelongs to face j and 0 otherwise. This choice implies thatAF = (IFV )

    TAV , which will be important for consistencylater. Now, discrete inner products are defined by:Z

    �u1u2da = u

    T1GVu2,

    Z

    �hv1, v2ida = v

    T1 GFv2,

    where GV = [AV ] 2 R|V|⇥|V| and GF = [AF ] 2 R3|F|⇥3|F|denote the diagonal mass matrix of the vertices and thefaces.

    Differential Operators. Equations (5) and (10) require dis-crete gradient and divergence operators. In the smoothcase, these operators fulfill integration by parts, namelyon a surface without boundary we have:

    R

    �hv,r�ui da +R

    � u · div� v da = 0. In order to maintain discrete preser-vation of mass (see appendix A), we need the operators

  • 8

    grad� 2 R3|F|⇥|V| and div� 2 R|V|⇥3|F| to fulfill thisdiscretely, namely:

    vTGF (grad� u) + (div� v)TGVu = 0,

    for arbitrary v and u. Interestingly, the standard operators(e.g., as defined in [32, Chapter 3]) fulfill this property.

    Approximate normal field, curvature and gravity. As de-scribed in the previous section, all of the required curvaturequantities can be computed once a suitable approximatenormal field is given. In practice, we use the area-weightedaverages of triangle normals [32, pg. 42] as vertex normals.By applying the discrete gradient operator defined previ-ously, the tangential gradient of the discrete normal fieldper face j is:

    (r�n)j =1

    2AF (j)

    3X

    i=1

    nji(J eji)T

    !

    where the sum runs over the three vertex normals nji of theface and J eji is the rotated (by ⇡/2) edge opposite to vertexi in the triangle j (see Figure 5). The gravity quantities canbe computed as follows: z is the vertical coordinate functionand cos✓ is the vertical component function of n.

    Mobility. The discrete mobility M(u) is a 3|F| ⇥ 3|F|diagonal matrix, where for each face the associated quantitiescan be computed using Eq. (7), the curvature operators, andthe interpolated mass density uF on the faces (u is definedon vertices).

    Transport operator. In the continuous case, equation (10)guarantees that the integral of @tu vanishes on a closedsurface (since the divergence of any vector field integratesto 0). However, once we discretize u and v then div�(uv)is no longer well defined using our discrete operators, sinceuv is not a piecewise constant vector field. To avoid thisissue, we first apply the product rule to (10) and reformulatethe constraint as @tu = �(v · r�u + u div� v). We thenfollow [9] and define a directional derivative D(v) such that1

    TVGV (D(v) + [div� v])u = 0 for any u and v (see ap-

    pendix A for the proof). Specifically, the directional deriva-tive is given as D(v) 2 R|V|⇥|V| by D(v) = IFV [v]T• grad�,where [·]• 2 R3|F|⇥|F| converts vector fields to block diago-nal matrices.

    The main advantage of this point of view is that in thediscrete case the transport equation turns into a system ofODEs of the form @tu + Au = 0, for a constant matrixA, which can be solved using a matrix exponential [33].Thus, for a velocity v constant in time, the discrete transportequation can be solved in the time interval [tk, tk+⌧ ] to yieldthe solution

    u = exp (�⌧D(v)� ⌧ [div� v])uk (12)

    at t = tk + ⌧ , where ⌧ is the time step. In the case ofevaporation, we have an additional term �⌧ [uk + ce]�2 inthe exponential.

    We compared our transport scheme to the method of [8]on the bunny model which has obtuse triangles. Specifically,we computed the difference in energy and the minimal u inthe first iteration for different time step sizes. In Figure 6(left) we show that our method is consistently decreasing

    the energy, whereas the method of [8] actually increases theenergy for small time steps. In addition, we show in Figure 6(right) that their method yields negative values for u evenfor very small time steps, whereas ours preserves the initialvalue of the precursor layer.

    0.01e-43.34e-46.67e-410e-4-11.3

    -6.9

    -2.4

    0

    2.1

    0.01e-43.34e-46.67e-410e-4

    -0.71

    -0.45

    -0.2

    0.05

    τ

    δ( )

    min

    (u

    )

    Ours

    [Rumpf and Vantzos 2013]

    τ

    0

    Fig. 6. Comparison with [8]. (left) Plot of the observed energy reduction�(E) = E(t + ⌧) � E(t) as a function of the time step ⌧ , on a meshwith obtuse triangles. The present scheme consistently decreases theenergy (�(E) 0), whereas the other method has trouble with small timesteps. (right) Regarding the positivity of the solution, again on a meshwith obtuse triangles, the present method preserves the initial minimumu, whereas the other method exhibits negative values of u.

    Furthermore, the suggested transport mechanism ismore appropriate to the flows we are interested in thanthe one suggested by [8]. In particular, droplet formationand fingering instabilities are transport-dominated effects.Thus, a natural requirement from a transport mechanismis to exhibit minimum diffusion, allowing to capture betterresolved fingers on relatively coarse meshes as we demon-strate. We show in Figure 7 that starting from the sameinitial conditions, our scheme is qualitatively less diffusivecompared to the method of [8].

    5 FULLY DISCRETE MODELGiven the above discrete operators and quantities, we canwrite the fully-discrete optimization problem for computingu,v given uk:

    minu,v

    1

    2⌧D

    ✏uk(v,v) + E

    ✏(u)

    ,

    subject to u = exp (�⌧D(v)� ⌧ [div� v])uk.(13)

    Ours

    [Rumpf and Vantzos 2013]

    t=0 t=0.25 t=0.5

    Fig. 7. Starting from the same initial conditions and physical parameters,our transport scheme (top) achieves a better resolved finger comparedto the result (bottom) generated with the more diffusive scheme sug-gested in [8].

  • 9

    Then, the fully-discrete energy and dissipation are given by:

    E

    ✏(u) = aTGVu+✏

    2uT (GVB +L)u,

    D

    ✏uk(v,v) = v

    TGFM(uk)�1v,

    where a = bz�H , B = bcos✓�H2+2K, and the stiffnessmatrix L = �GV div� grad�.

    5.1 Properties

    Discrete energy. The discrete energy E✏(uk) is non increasing.Proof: Noticing that u = uk and v = 0 is an admissible

    pair for the minimization problem (13) since they satisfy theconstraint, we have immediately that:

    1

    2⌧D

    ✏uk(v

    k+1,vk+1)+ E✏(uk+1) 1

    2⌧D

    ✏uk(0, 0)+ E

    ✏(uk)

    ) E

    ✏(uk+1) E✏(uk)

    since D✏uk(vk+1,vk+1) � 0 and D✏uk(0, 0) = 0.

    Intuitively, since D is non-negative, if the fluid movedand “paid” with dissipation, then it found a smaller energysolution (otherwise it will have remained at the previousstate, with the same energy).

    Discrete mass. The total discrete mass m(u) =R

    � u da =1

    TVGVu is exactly preserved.

    Proof: The transport equation (12) can be written asu = exp(�⌧A)uk, where A = D(v) + [div� v]. In ap-pendix A we show 1TVGVA = 0 for any velocity v. Hence,we have m(uk) � m(u) = 1TVGV {id� exp(�⌧A)}u

    k =

    1

    TVGV

    n

    ⌧A� ⌧2

    2 A2 + . . .

    o

    uk = 0.

    5.2 OptimizationTo solve the discrete variational model (13) we use the firstorder approximation exp(�⌧A) ⇡ id�⌧A of the matrixexponential, so that the linear equation:

    u = uk � ⌧(D(v) + [div� v])uk (14)

    replaces the non-linear constraint (12). Hence, at every timestep we solve a quadratic problem with a linear constraint,which is convex for a small enough ⌧ (see §5.3 “DynamicTime-stepping”). As we will show next, this can be donevery efficiently, by solving a single linear system for u. Notethat it is straightforward to check that the results of §5.1 holdfor the linearized constraint as well, hence we gain efficiencyyet do not lose stability.

    The linear system. Using the method of Lagrange multipli-ers we obtain the first order necessary conditions:

    GFM(uk)�1v �

    D(uk) + [uk]div�⌘T

    GVp = 0

    GV (a+ ✏Bu) + ✏Lu�GVp = 0

    GV⇣

    u� uk + ⌧(D(v) + [div� v])uk⌘

    = 0,

    (15)

    where p is the dual variable.A key ingredient to deriving (15) is the dual opera-

    tor D(u), defined such that D(v)u = D(u)v, as it al-lows us to take derivatives with respect to v. This op-erator is: D(u) = IFV [grad� u]

    T• . Similarly, it holds that

    ([u]div�)v = [div� v]u.

    Figure |V| Avg. per step #steps Total timeFig. 1, Bunny* 38306 0.484 1999 967.8Fig. 4, Bumpy plane 40401 0.683 4996 3410.4Fig. 4, Scherk surface 40401 0.627 1997 1252.4Fig. 9, Rounded cube* 19728 0.142 4991 709.5Fig. 10, Sphere 40962 1.645 300 493.5Fig. 12, Moomoo* 16710 0.080 1981 158.4Fig. 13, Torus 40000 1.079 456 491.8Fig. 14, Moai 89126 3.106 314 975.3Fig. 15, Rain 10242 0.198 18001 3570.1Fig. 17, Pensatore 27732 0.818 991 810.3Fig. 16, Wine glass* 38976 0.708 496 351.1

    TABLE 1Timing statistics (in seconds). Asterisk denotes simulations where an

    iterative solver was used, whereas for the rest, we used a directnon-iterative solver.

    Finally, eliminating v and p, we arrive at the followingreduced linear system for u:⇣

    id+⌧✏R(uk,uke)(GVB+L)⌘

    u = uke�⌧R(uk,uke)GVa

    (16)

    where R(uk,uke) = F (uke)M(uk)G�1F F (u

    ke)

    T andF (uke) = D(u

    ke) + [u

    ke ]div� and uke = exp(�⌧ [uk +

    ce]�2)uk if evaporation is included and uke = uk otherwise.Thus, we obtain a fully discrete scheme where given an

    initial mass density u0, we evolve it in time using the aboveupdate rule.

    We implemented our method in MATLAB using stan-dard linear solvers for Eq. (16). In all our experiments,the method was very stable allowing for large time steps(on the scale of O(✏ + �x), which is excellent for 4th or-der problems) depending on the initial conditions and theunderlying mesh. The experiments were performed on anIntel(R) Xeon(R) processor with 32 GB RAM, and we showin Table 1 the statistics for the different simulations.

    5.3 Limitations

    Dynamic Time-Stepping. Given that the stiffness matrixL is positive semi-definite, the system (16) is invertible aslong as ⌧1 ✏kR(uk)k2kGFk2B 1, where B is the absolutetaken on the minimum value of B and it is a measure of howstrongly negative the quantity b cos ✓ � T is on the surface.Moreover, we employ a CFL-type condition depending onthe maximum velocity of the film v, and grid size, i.e., werequire that ⌧2v �x. Finally, we take the time step to be⌧ = min{⌧1, ⌧2}.

    Positivity Preservation. Unfortunately, even if we startfrom a strictly positive u0, the evolution of thefilm uk is not guaranteed to stay positive [8].

    u k

    v

    Fig. 8. Capillarity ridge with high ve-locity and undershooting.

    Aside from being non-physical, in the case ofnegative values, dropletsmight rupture. In practice,all of our simulations re-main positive, excludingthe evaporation example.Nevertheless, the evapora-tion term has a stabilizingeffect, indeed, negative mass concentrations are also evapo-rated. Intuitively, positivity is difficult to maintain due tothe jump in pressure along the triple line (the interface

  • 10

    where air, solid and liquid meet). Moreover, the so-calledcapillary ridge is formed, due to the competition betweensurface tension and other forcing effects, e.g., gravity, seeFigure 8 and 9. Thus, right where the film is at its thinnest,the resulting velocity is high, implying instability along thedirection of motion. We leave further investigation of theissue of positivity preservation for future work.

    Fig. 9. In the absence of gravity, the fluid departs areas where the meancurvature is strongly negative and capillary ridges form. Later, surfacetension balances the fluid on top of every face, cf. [5] (u0 = 0.1, b =0, ✏ = 0.1,� = 0).

    Meshes with creases. In general, the model we developedin Section 2 has a strong dependency on the consistencyof the vertex normals. In practice, general meshes mighthave creases, or small dihedral angles, which will cause Hto be arbitrarily negatively large and non-smooth. This canhave a detrimental effect on the simulation, as the fluid willbe drawn towards these singular locations. There are twopossible remedies for this situation: we can either refinethe mesh (possibly non-uniformly), however that wouldrequire additional pre-processing before one can apply ourscheme to an arbitrary model. Alternatively, we can add aregularizer to the energy so that it is easier to control thesimulation. We opted for the second option, as it makes ourmethod easier to use, and can allow the artist some freedomto control the simulation in a non-physical way. Hence,for meshes with creases (see e.g., Fig. 17), we multiplythe stiffness matrix L defined in Section 5 by a constant1 r 100. This effectively adds some numerical diffu-sion, allowing for more smooth solutions. Note that discreteconservation of mass is not affected by this modification.Detachment of fluid. As the fluid is “tied” to the surface,droplets cannot detach when they become too large. In thesecases, the droplets grow narrower and taller until equilib-rium is reached and the approximate lubrication solution isstable, although the full 3D flow is not. Note, that in thiscase one could potentially switch to a full 3D simulation,which will allow the droplet to separate from the surface.This is an interesting direction for future research.

    6 EXPERIMENTAL RESULTS

    Parameter exploration. We begin by exploring the effectof various parameter choices on the simulation of the thinfilm. For this example, we choose a sphere as a simplegeometric model with limited curvature effects on the flow.The basic experiment includes placing a concentration offluid at the top of the sphere, with slightly perturbed initialconditions to avoid perfect symmetry. Due to gravity thefluid flows downward, and the initial perturbations giverise to fingering instabilities, (see [34] for an experimentaldemonstration of fingering on a sphere). The result for the

    parameters ✏ = 0.05, b = 50,� = 0 is shown in Figure 10 (f),demonstrating the emergence of a secondary finger in thecenter (see also Fig. 16, showing multiple fingers in a wineglass).

    We refer to this setup as the reference configuration, andnow modify in every column of the figure a single param-eter to isolate its effect on the simulation, for which weshow a snapshot at time t = 10. Left: varying b changesthe speed with which the film flows downward, withoutstrongly affecting the shape of the fingers. Specifically, for alower b value (a), the secondary finger does not emerge yet,whereas for a higher b value (b) it is more pronounced thanin the reference configuration. Middle: changing ✏ affectsthe surface tension component, and therefore the shape ofthe fingers. Reducing ✏ yields thinner fingers (c), whereasincreasing it (d) makes more viscous thick fingers, and elim-inates the secondary finger. Right: increasing � considerablyspeeds up the fluid (e), allowing it to flow more freely in alldirections (as opposed to increasing b which causes fasterflow in the direction of gravity).

    Energy reduction. The numerical scheme we use is guar-anteed by construction to reduce the energy E(u) at everytime step. Figure 11 shows the energy decay in time, forthe different simulations in Figure 10. We observe that theslip parameter � affects the speed with which the energyis reduced, the gravity parameter b also affects the initialvalue of the energy, and the parameter ✏ has a minor impacton the energy, as it is dominated by the leading order term.

    Thin films interaction. Figure 12 demonstrates the flow andinteraction of thin films on the moomoo model. The higherbulk of fluid accumulates beneath the horns of the model,followed by a faster motion when it comes in contact withthe lower bulk of fluid (see also Figure 14). Then, the motionis mostly determined by the two main fingers flowing onthe sides of the model. In Fig. 15 we show the interactionof many droplets viewed from four sides of the unit sphere.We repeatedly pour new droplets at the top of the sphere ata fixed rate and drain the liquid from the bottom.

    Droplet formation. A thin film concentrating beneath a flat

    ε=0.05, b=30, β=0

    ε=0.05, b=50, β=0ε=0.1, b=50, β=0

    ε=0.05, b=50, β=0.05ε=0.005, b=50, β=0

    ε=0.05, b=75, β=0

    0.11

    0.04

    0

    0.08a c e

    d fb

    Fig. 10. Fingering behavior for varying parameters, at t = 10. In everycolumn, one parameter is modified from the reference configuration (f).See the text for details.

  • 11

    0 2 4 6 8 10−4

    −2

    0

    2

    4

    6

    8

    10

    (a)(b)(c)(d)(e)(f)

    t

    (u )

    Fig. 11. The energy E(u) for the simulations in Figure 10.

    surface develops an instability called droplet formation (cf.[35]). In Figure 13, we start with a uniform layer of fluidon the torus with small perturbations, and allow it to dropbeneath the torus due to gravity. As the fluid accumulatesaround the circular set of lowest points, droplets form.Evaporation. Figure 14 shows how evaporation (ce = 0.01)and the precursor layer affect the motion of the film. Wedeposit precursor layers of different heights on the twohalves of the Moai model and place a similar bulk of fluidnear the eyes. Due to the initially thicker precursor layer,even though it evaporates quickly, the film on the left partof the model flows to a greater distance compared to thefilm on the right. Eventually, all the film evaporates.

    7 VAN DER WAALS POTENTIAL TERM.As mentioned in the limitations section, a major drawbackof our method is that the positivity of the mass densityu is not guaranteed. One approach towards solving thisissue is to add the integrated non-linear potential termR

    � W (u)da ⇡ 1TVGVW (u) to the discrete energy E

    ✏(u).The purpose of this term is to penalize values of u thatare under a certain threshold up. A computationally simplechoice, commonly used to model intermolecular forces, isthe well-known Lennard-Jones (LJ) potential [36] given by

    W (u) =1

    2

    ⇣upu

    ⌘4�

    ⇣upu

    ⌘2.

    Fig. 12. Flow on the moomoo model (b = 20, ✏ = 0.1,� = 0). Note howthe upper and lower films interact: the larger mass density of the upperfilm causes it to catch up with the lower front leading to the formation ofquickly propagating fingers.

    Fig. 13. Starting from a perturbed uniform layer of fluid, the fluid flowsdownwards, accumulates and finally forms droplets.

    In the context of thin films, the LJ potential was usedin [37], and in addition to maintaining the height of theprecursor layer, it also leads to the spontaneous formation ofdroplets (pearling) due to the potential well (see inset figure).

    0up

    W(u)Namely, the modified energy favorslarge densities of fluid (where the po-tential is zero) or densities of the pre-cursor layer size (where the potentialhas a minimum). Overall, using the LJpotential stabilizes the simulation bypromoting the continued positivity ofthe solution. Although it is not entirely accurate physically,it is similar enough to the real intermolecular interactions,that occur between substrate, liquid film and the air anddetermine the hydrophobic/hydrophilic properties of thesurface, to achieve visually appealing results.

    The modifications needed to incorporate the LJ potentialcan be summarized as follows. The new energy is givenby E✏W (u) = E

    ✏(u) + 1TVGVW (u). Thus, the new Euler–Lagrange equations (15) can be reduced to the followingprimal-dual system

    p = a+ ✏�

    B +G�1V L�

    u+W 0(u) ,

    u = uk � ⌧R(uk)GVp .(17)

    Therefore, the resulting Newton system can be written as✓

    id �✏(B +G�1V L)� [W00(u)]

    ⌧R(uk)GV id

    ◆✓

    �p�u

    =

    rpru

    ,

    (18)where

    �rp = p� a� ✏(B +G�1V L)u�W

    0(u) ,

    �ru = u� uk + ⌧R(uk)GVp .

    The correction for �p can be eliminated, resulting in a singleequation for the update of u. The modified update rule (16)for the correction is given by

    id+⌧ R(uk)GV�

    ✏(B+G�1V L) + [W00(u)]

    �u =

    u� uk+⌧R(uk)GV�

    a+ ✏�

    B+G�1V L�

    u+W 0(u)�

    .(19)

    A single Newton step takes the form of u u� ��u, with0 < � 1 such that the energy is reduced. In practice wetook � = 1 in all of the examples that we show. As forthe initial guess for the Newton iterations, we took u =uk. Unfortunately, the concavity of W (u) poses a too strictrequirement on ⌧ for the system (19) to be invertible. Inpractice, we split the potential to its convex W+(u) and

  • 12

    Fig. 14. Evaporation effect on the evolution of the film.

    concave �W�(u) parts, so that the usual bound discussedin subsection 5.3 can be used. Specifically, we define

    W̃ (uk,u) = W+(u)�⇣

    W�(uk) +W 0�(u

    k)(u� uk)⌘

    ,

    where for the LJ potential we have W+(u) = 12�up

    u

    �4 andW�(u) =

    �upu

    �2. Finally, we modify the system (19) suchthat W 00(u) !W 00+(u) and W 0(u) !W 0+(u) �W 0�(uk).Note that a small value for the threshold up can approxi-mate an effectively de-wetted surface (i.e. a very thin pre-cursor layer) with droplets of apparently compact support.As small values of up exacerbate the non-convexity of theLJ potential, this necessitates smaller time steps.

    In Figure 18 we show the effect of pearling that occurswhenever a trail of thin layer of liquid appears during themotion. In Figure 19 we show that due to the high attractiveand repulsive forces, droplets emerge spontaneously. Bothof these effects are achievable due to the Van der Waals non-linear potential term.

    8 CONCLUSIONWe presented a novel method for simulating viscous thinfilm flow on triangulated meshes. Our approach is based ona variational time discretization and is therefore stable andallows for large time steps. Furthermore, we guarantee byconstruction that the discrete total mass is preserved andthat the discrete energy is non-increasing. The algorithm isbased on a single sparse linear solve per iteration, and istherefore very efficient. We demonstrated various intricatefilm motions, such as viscous fingering and droplet interac-tion.

    There are many potential extensions to our model. Forinstance, it might be possible to extend the model to handleeffects due to surface tension gradient. Also, our discretiza-tion of the mass transport constraint might be potentiallyuseful in additional applications. Finally, we mentionedvarious extensions throughout the paper such as positivitypreservation and fluid detachment which might be interest-ing to achieve.

    APPENDIXDISCRETE CONSERVATION OF MASSTo prove that mass is strictly preserved we recall the firstorder necessary conditions in the context of the Lagrangian.

    ⌧GFM(uk)�1v � ⌧

    D(uk) + [uk]div�⌘T

    GVp = 0

    GV (a+ ✏Bu) + ✏Lu�GVp = 0

    GV⇣

    u� uk + ⌧(D(v) + [div� v])uk⌘

    = 0

    It is interesting to note that, using the definition of L and adiscrete integration by parts, the second equation is equiva-lent to p = a+✏Bu�✏ div� grad� u in correspondence tothe corresponding continuous equation p = a+ ✏bu� ✏��u.

    At first, we rewrite the first equation and get

    v=M(uk)G�1F

    D(uk) + [uk]div�⌘T

    GVp

    =M(uk)G�1F

    [grad� uk]•(I

    FV )

    TGVp+ div�T [uk]GVp

    =M(uk)G�1F

    [(IFV )TGVp]grad� u

    k+div�T GV [u

    k]p⌘

    =M(uk)G�1F

    [GFIVFp]grad� u

    k�GF grad�[u

    k]p⌘

    =M(uk)⇣

    [pF ]grad� uk� grad�[u

    k]p⌘

    using the facts that GV and [uk] commute as diagonalmatrices, that [v]•uF = [uF ]v for any uF (discrete scalaron faces) and v (discrete vector), and that the interpolationmatrices are defined so that IVF = G

    �1F (I

    FV )

    TGV . Again, itis interesting to note that the equation above is an approxi-mation of the corresponding continuous one:

    v = M(uk)⇣

    pr�uk�r�(u

    kp)⌘

    = �ukM(uk)r�p

    Now, we consider the discrete m(u) = 1TVGVu with 1Va vector of ones of length |V|. Indeed, multiplying the thirdequation with 1TV , using the duality of D and D, and takinginto account that the interpolation matrix IVF is defined sothat IVF1V = 1F we obtain

    m(uk+1)�m(uk) = �⌧ 1TVGV (D(v) + [div� v])uk

    = �⌧ 1TVGV⇣

    D(uk) + [uk]div�⌘

    v

    = �⌧ vT⇣

    D(uk) + [uk]div�⌘T

    GV1V

    = �⌧ vTGF⇣

    [IVF1V ]grad� uk� grad�[u

    k]1V⌘

    = �⌧ vTGF⇣

    grad� uk� grad� u

    k⌘

    = 0 .

    pp/2

    p/2

    Fig. 15. Rain of droplets lead to their interesting interaction over thesphere (see the video for the full simulation). The sphere is shown fromits four sides, where the axis of rotation is shown above.

  • 13

    The key step is applying the previous calculation with p =1V and so the discrete conservation of mass is equivalent to thefact that a constant discrete pressure gives zero discrete velocity.

    REFERENCES[1] R. Braun, R. Usha, G. McFadden, T. Driscoll, L. Cook, and P. King-

    Smith, “Thin film dynamics on a prolate spheroid with applicationto the cornea,” J. of Eng. Math., vol. 73, no. 1, pp. 121–138, 2012.

    [2] R. Griffiths, “The dynamics of lava flows,” Ann. Rev. of FluidMechanics, vol. 32, no. 1, pp. 477–518, 2000.

    [3] T. G. Myers and J. P. Charpin, “A mathematical model for atmo-spheric ice accretion and water flow on a cold surface,” Int. J. ofHeat and Mass Transfer, vol. 47, no. 25, pp. 5483–5500, 2004.

    [4] O. Reynolds, “On the theory of lubrication and its application toMr. Beauchamp tower’s experiments, including an experimentaldetermination of the viscosity of olive oil.” Proc. of the Royal Societyof London, vol. 177, pp. 157–234, 1886.

    [5] R. V. Roy, A. J. Roberts, and M. Simpson, “A lubrication modelof coating flows over a curved substrate in space,” J. of FluidMechanics, vol. 454, pp. 235–261, 2002.

    [6] J. B. Greer, A. L. Bertozzi, and G. Sapiro, “Fourth order partialdifferential equations on general geometries,” J. of Comp. Physics,vol. 216, no. 1, pp. 216–246, 2006.

    [7] L. Giacomelli and F. Otto, “Rigorous lubrication approximation,”Interfaces and Free boundaries, vol. 5, no. 4, pp. 483–530, 2003.

    [8] M. Rumpf and O. Vantzos, “Numerical gradient flow discretiza-tion of viscous thin films on curved geometries,” Math. Models andMethods in Applied Sciences, vol. 23, no. 05, pp. 917–947, 2013.

    [9] O. Azencot, M. Ben-Chen, F. Chazal, and M. Ovsjanikov, “Anoperator approach to tangent vector field processing,” in CGF,vol. 32, no. 5. Wiley Online Library, 2013, pp. 73–82.

    [10] A. Oron, S. H. Davis, and S. G. Bankoff, “Long-scale evolution ofthin liquid films,” Rev. of modern physics, vol. 69, no. 3, p. 931, 1997.

    [11] R. Craster and O. Matar, “Dynamics and stability of thin liquidfilms,” Reviews of modern physics, vol. 81, no. 3, p. 1131, 2009.

    [12] L. Zhornitskaya and A. L. Bertozzi, “Positivity-preserving numer-ical schemes for lubrication-type equations,” SIAM J. on NumericalAnalysis, vol. 37, no. 2, pp. 523–555, 1999.

    [13] G. Grün and M. Rumpf, “Nonnegativity preserving convergentschemes for the thin film equation,” Numerische Mathematik,vol. 87, no. 1, pp. 113–152, 2000.

    [14] P. Mullen, K. Crane, D. Pavlov, Y. Tong, and M. Desbrun, “Energy-preserving integrators for fluid animation,” ACM Trans. Graph.,vol. 28, no. 3, p. 38, 2009.

    [15] O. Vantzos, “Thin viscous films on curved geometries,” Ph.D.dissertation, Universitäts-und Landesbibliothek Bonn, 2014.

    [16] A. N. Hirani, “Discrete exterior calculus,” Ph.D. dissertation, Cal-ifornia Institute of Technology, 2003.

    Fig. 16. Multiple fingers on the inside of a glass of wine (b = 500, ✏ =0.0001,� = 0).

    Fig. 17. Thin film flow on a geometrically complicated model. Note howstarting from a few blobs of fluid, the film naturally follows the creases ofthe object, merges and splits accordingly.

    [17] M. Carlson, P. J. Mucha, R. B. Van Horn III, and G. Turk, “Meltingand flowing,” in Proc. of SCA 2002, 2002, pp. 167–174.

    [18] C. Wojtan, M. Müller-Fischer, and T. Brochu, “Liquid simulationwith mesh-based surface tracking,” in ACM SIGGRAPH 2011Courses. ACM, 2011.

    [19] Y. Zhang, H. Wang, S. Wang, Y. Tong, and K. Zhou, “A deformablesurface model for real-time water drop animation,” Vis. and Comp.Graph., IEEE Trans. on, vol. 18, no. 8, 2012.

    [20] C. Batty, A. Uribe, B. Audoly, and E. Grinspun, “Discrete viscoussheets,” ACM Trans. Graph., vol. 31, no. 4, p. 113, 2012.

    [21] P. Clausen, M. Wicke, J. R. Shewchuk, and J. F. O’brien, “Simulat-ing liquids and solid-liquid interactions with lagrangian meshes,”ACM Trans. Graph., vol. 32, no. 2, p. 17, 2013.

    [22] B. Zhu, E. Quigley, M. Cong, J. Solomon, and R. Fedkiw, “Codi-mensional surface tension flow on simplicial complexes,” ACMTrans. Graph., vol. 33, no. 4, p. 111, 2014.

    [23] H. Wang, P. J. Mucha, and G. Turk, “Water drops on surfaces,”ACM Trans. Graph., vol. 24, no. 3, pp. 921–929, 2005.

    [24] H. Wang, G. Miller, and G. Turk, “Solving general shallow waveequations on surfaces,” in Proc. of SCA 2007, 2007, pp. 229–238.

    [25] F. Otto, “The geometry of dissipative evolution equations: theporous medium equation,” Comm. in Partial Differential Equations,vol. 26, no. 1-2, pp. 101–174, 2001.

    Fig. 18. The two big droplets (top, left) travel fast enough to leave a trailof fluid behind (top, middle and right), which later separates into severalsmaller droplets (bottom). This phenomenon is known as pearling.

  • 14

    [26] E. Giorgi and L. Ambrosio, “New problems on minimizing move-ments,” in Ennio De Giorgi selected papers. Springer, 2006, pp.699–714.

    [27] T. D. Gatzke and C. M. Grimm, “Estimating curvature on trian-gular meshes,” Int. J. of shape modeling, vol. 12, no. 01, pp. 1–28,2006.

    [28] M. P. Do Carmo, Differential geometry of curves and surfaces.Prentice-Hall Englewood Cliffs, 1976, vol. 2.

    [29] H. Federer, Geometric measure theory. Springer New York, 1969,vol. 1996.

    [30] A. J. Chorin and J. E. Marsden, A mathematical introduction to fluidmechanics. Springer, 1990, vol. 3.

    [31] C. Pozrikidis, Introduction to theoretical and computational fluid dy-namics. Oxford University Press, 2011.

    [32] M. Botsch, L. Kobbelt, M. Pauly, P. Alliez, and B. Lévy, Polygonmesh processing. CRC press, 2010.

    [33] M. Hochbruck and A. Ostermann, “Exponential integrators,” ActaNumerica, vol. 19, pp. 209–286, 2010.

    [34] D. Takagi and H. E. Huppert, “Flow and instability of thin filmson a cylinder and sphere,” J. of Fluid Mech., vol. 647, p. 221, 2010.

    [35] A. Sharma and R. Khanna, “Pattern formationin unstable thin liquid films,” Phys. Rev. Lett.,vol. 81, pp. 3463–3466, Oct 1998. [Online]. Available:http://link.aps.org/doi/10.1103/PhysRevLett.81.3463

    [36] J. E. Jones, “On the determination of molecular fields. ii. from theequation of state of a gas,” in Proceedings of the Royal Society ofLondon A: Mathematical, Physical and Engineering Sciences, vol. 106,no. 738. The Royal Society, 1924, pp. 463–477.

    [37] G. Grün and M. Rumpf, “Simulation of singularities and in-stabilities arising in thin film flow,” European Journal of AppliedMathematics, vol. 12, no. 03, pp. 293–320, 2001.

    Fig. 19. Starting from a slightly perturbed uniform layer of fluid (top, left),droplets quickly form due to the attractive/repulsive forces resulting fromthe van der Waals non-linear potential (top, middle and right). Later, thedroplets travel downwards due to gravity and several merges betweendroplets occur (bottom).