# Technical Talk: A multi-scale model for simulating liquid-fabric interactions

Hello. Let me start my talk with an event happened

during my lunch. So someday, I was enjoying my own lunch. But, the coffee was too hot and I didn’t

notice that. So in a panic, I had my coffee spilled, which

wets and stains my shirt. To make things worse, I dropped the coffee

cup onto floor. The coffee soon splashed onto the carpet. My next move was rushing into bathroom to

wash my shirt. And as I finished, I wrung out the water,

which trickles and drips from my shirt. So as we see, in our everyday life, it is

really often to see wet clothes. And in a movie, life can get more dramatic. For example here this man is enjoying his

yogurt but suddenly his wife pour water onto his head, making his hairs and clothes wet. So what if we have a character in a film or

an animation, and we want this character interacts with liquid? Last year we did wet hairs. But we don’t only want naked characters. Our characters should have clothes, right? But wet clothes may have very different outlook

than wet hairs. The liquid can get absorbed into the sheet

of fabric. And the liquid may propagates through the

fabric, and finally drips off from the fabric. So we need a different methods to handle liquid-fabric

interactions. Also previously, we didn’t derive the physics

between liquid and solid, from the first principle. So this year we want to work toward a principled

model for two-way coupling. Also, we want a unified physics that can handle

various phenomena related to wet fabrics Third, we need an efficient numerical solver. That’s our paper this year, a multi-scale

model for liquid-fabric interactions. To explore this topic, let‘s begin with

a continuum representation of fabrics. Here’s a photo of woven fabrics. If we put it under microscope, we may firstly

see all the yarns. And if zoom-in more closely, we may see the

individual fibers. So the entire fabric is composed of individual

strands bundled into thin oriented fibers. In computer animation, varies fabric models

have been proposed. For example, in large scale, we can model

the fabric as a surface that has some thickness, or if we want more details, we model the fabric

as individual yarns. Or if we really want to be hardcore we can

model the individual fibers although it’s usually considered as intractable for animations. But even with these geometries, how could

we interacts them with liquid? If we set these geometries as boundary conditions

for the liquid, it would be too complicated for the yarns and fibers, and too thin to

capture even just model the fabric as surface. So instead in this project, we take a continuum

model, where we model the continuum equivalent for the fabrics. For example, if we model the fabrics as a

thick surface, then only part of its volume is occupied by these fibers, and we solve

the dynamics of these volumes. So we can define volume fraction and porosity

to describe how much solid or empty space is inside a unit volume of porous media. And when there’s fluid comes in, these tiny

pockets inside and between these fibers may collect fluids and are largely responsible

for the wetting behavior we observe at the coarse scale. In summary, by modeling fabric as mixtures,

instead of using boundary conditions, we can characterize different microstructure with

several scaler field, such as the volume fraction or saturation With such representation, we are able to handle

fabrics with different mass density, by calculating the buoyancy for partially saturated porous

media. Besides buoyancy, we can calculate drag force

and capillary pore pressure from the continuum representation, which have analytical forms

that are defined on local microstructures. When the cloth is submerged into liquid, the

fabric will absorb liquid into its pores, and when the liquid detaches, it will drip

from the cloth. These effects are treated with a continuum

representation. The liquid may also propagate on cloth, where

we need the physics model for this flow inside the fabric. We show a quasi-static model that can be derived

from the dynamic continuum model. Finally, we implemented a splitting scheme

to solve the equations. So these contributions correspond to what

we wanted: a unified, principled physics model for liquid-fabric mixture, and an efficient

numerical solver. With these contributions, we are able to simulate

rich varieties of liquid-fabric interactions. The basic scenario is this water splash on

a mesh-based cloth. When the liquid has high velocity, it can

penetrate through the cloth from one side to another, but as it is slowed down by viscous

drag, it will attach to the cloth surface and start to slip. More than one kind of cloth, we can simulate

wet cloth with a wide range of parameters. Here we show from left to right the number

of threads is increased. Fabrics with higher number of threads are

less possible to be soaked by water and can become dried more easily since less water

can stay there. More than soft cloth, our method can also

support stiff materials. For example here we show pouring water on

a porous, nonwoven, plastic sheet that has much higher Young’s modulus and higher Poisson

ratio. More than the permeable case, we are also

able to simulate the case where the liquid is sufficiently viscous and the drag force

is large to prevent the liquid from going through the cloth. More than triangular meshes, our method can

also handle geometries made by different elements. Here we show a wet handwoven fabric made by

individual yarns. Please remember that, all of these above,

are able to be handled in our unified physics model and solved by the same numerical solver. Previous methods on wet cloth mostly addressed

only some specific aspects, but they’re very inspiring to our method. And more relevant to our method, people previously

proposed methods to simulate mixtures. For example, moistures, as well as a wide

range of multi-fluid phenomena. More recently, there are works simulating

porous sand and water, which can be very predictable for some engineering applications. Our method are inspired by these previous

works. Let’s start briefly reviewing the theory

of simulating mixtures, namely mixture theory. The mixture theory is a continuum theory popular

in soil mechanics. Before the World War II, a preliminary version

of the mixture theory was used to design solid dams, but we found that it can be also descriptive

for the dynamics of wet fabrics. Here we have a piece of nonwoven cloth. If we cut it and reveal its cross-section,

and zoom-in we’ll see its porous structure. Let’s fill it with liquid, and further zoom-in Here the inertia of the solid phase is then

balanced by The internal stress of the solid matrix,

The external force, And the interaction force between solid and

liquid phase. Similarly for the liquid phase

Its inertia is balanced by The internal pressure of the liquid phase,

The external force, And the interaction force between solid and

liquid phase. Finally we have the incompressibility condition

for the entire mixture, which says there is a pressure to make the divergence of the combined

velocity as zero. It’s apparent that correctly modeling the

dynamics, depends heavily on correctly handling the interaction forces and this incompressible

condition. Let’s firstly consider the saturated mixture. The interaction force is usually composed

by two types of force, the pressure force, which in charge of buoyancy, and drag force,

which includes viscous drag due to frictional effect between liquid and solid phases, and

inertial drag caused by wake turbulence around the solid phase. These are important since we find that correctly

handle buoyancy and drag force will dramatically increase the plausibility of simulation. For example, here we compare the simulation

with and without buoyancy force applied to the cloth, using fabrics with differing mass

densities. With the correct pressure gradient applied

to the fabrics, the left one rises; the middle one drifts; and the right one sinks. By contrast, if the pressure gradient is neglected,

the fabrics sink and come to rest at the bottom regardless of their mass densities. Also the nonlinearity of drag forces has a

significant impact. The most obviously distinct visual phenomenon

is the formation of “kinks” around regions where the relative velocity is large, which

also appears in a real experiment when pulling a cloth rapidly. For unsaturated mixtures, additionally the

pressure force also includes capillary suction Here the capillary pressure is simply the

difference between liquid pressure and air pressure. Here we demonstrate the effect where zero

pore pressure is applied when the contact angle is 90 degrees. There is no wicking effect and the liquid

is less attracted to the cloth. We have a nice physics model for mixture. We then propose a method to discretize the

model and solve the dynamics. The cloth and yarns are too thin to construct

a grid that exactly matches the scale of their thickness. But we also want to simulate the liquid propagation

inside solid object. So instead of simulating as a whole, we adopt

a two-scale framework: Firstly, a staggered grid is used to simulate

the bulk liquid, where the liquid particles are used for Lagrangian

advection, and secondly, the solid vertices and elements

are used for a on-manifold porous flow. For this porous flow, we need to solve a convection-diffusion

equation on meshes or rods. So if we take our momentum equation of liquid,

and the incompressible condition from the mixture theory, ignoring the inertia of liquid

since we assume the liquid inside cloth or yarn is of creeping flow, and substitute the

momentum into the incompressible condition, we’ll get a quasi static equation of liquid,

which is a convection-diffusion equation over the saturation S_r. In other word, we can simply solve this equation

to evolve the saturation field over time on the cloth or yarn manifold. To discretize this equation, we need define

differential operators on meshes and rods. Here we have three types of elements, where

the cloth is modeled as a triangle mesh, the yarn is modeled as a sequence of cylinders,

and the cloth-yarn junction vertex is used for a rag or towel. To define the discrete differential operators,

we associated these elements with a finite volume computed in a typical barycentric style. With this weighting scheme we can then define

discrete operators and solve the diffusion-convection equation on both clothes and yarns. Here we compare our diffusion model with real

experiment. Although we cannot capture the non-uniform

capillary perfectly, we may have a similar result quantitively. Since we have simulated the cloth-yarn joint,

we show that our model can handle a scenario involving both cloth and yarn: we splash a

ball of water onto a fuzzy cloth that has many short strands protruding from its surface. This cloth has a stiffer visual look than

regular cloth, it absorbs more water, and the drag force is also stronger. We also need to solve equations for the mixtures

on the Eulerian grid, and we introduce a novel semi-implicit integration. After discretization and advection, we have

three equations to solve, the momentum equation for solid, for liquid, and the incompressibility

condition. As we can see here, the pressure is coupled

with velocities by divergence-free and pressure gradient; while the two velocities is coupled by drag

force. Notice that we have a non-symmetric system. It tends to be ill-conditioned because we

usually have large drag force, which makes the off-diagonal term very large. So how do we solve this challenge? We observed that, the only non-diagonal term

on the top left is the Jacobian matrix, so let’s firstly remove it and use explicit

integration. Because the block upper left now only contains

diagonal matrix, we can do a gauss elimination to remove the off-diagonal terms Then we get a large, non-symmetric matrix,

and the solid velocity gets decoupled from liquid velocity. Because the top left block contains only diagonal

terms, We can perform a Schur complement to insert

the liquid and solid velocity into the pressure equation. Now we have only unknown is the pressure at

next time step. The middle terms is diagonal, and thus the

left hand side is symmetric positive definite. This is actually a Poisson equation,

and can be easily solved with any iterative Poisson solver! Now with the pressure in the next time step

in hand, we then insert it back to the original equations for solid and liquid velocities. To handle stiff material, we can again integrate

the solid velocity implicitly for stability. In summary, we convert a fully-coupled, large,

non-symmetric and ill-conditioned system into three independent, smaller, symmetric positive

definite system, which are much easier to solve, but at the cost of losing some incompressibility. Although in practice we didn’t observe artifact

due to this. While I have shown lots of results before,

in the following I’ll show an additional interesting result. So with this numerical framework, we are able

to simulate liquid coupled with rather complex geometries. Here we simulate a towel, with yarns grown

out from its surface. We can see there’s dripping and splashing

during tightening. There are several future works. For example, we can have better parameter

capturing from real world to better match experiments, we may develop better cohesion

model, also better capture the fine-scale liquid bridge that are not available in a

continuum theory. Similarly we may have better preconditioner

when solving the fabrics. We have preprint, video and source code released

on our website, where the repository contains source code for two-way coupling of mixtures,

clothes and yarns simulator, liquid simulator, MPM collision handler, and Houdini projects

for surfacing and rendering Thank you.

## 2 Replies to “Technical Talk: A multi-scale model for simulating liquid-fabric interactions”

You are a genius. But when can we expect to see any use of it in anything?

Would be cool if they used this kind of physics in games