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

Using the Polynomial Particle-in-Cell Method for Liquid-Fabric Interaction

간접 관련 패션 · (24) 패션(코오롱FnC) (3) 자동차 인테리어 소재(17) 스펀본드 부직포

기본 정보

저자
  1. Robert Dennison — The University of Sheffield, U.K., --- Select a Country ---
  2. Steve Maddock — The University of Sheffield, U.K., --- Select a Country ---
DOI
10.5220/0012359300003660
저널
Proceedings of the 17th International Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications
발행년도
2024
발행기관
–
피인용수
0
라이선스
cc-by-nc-nd
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.5220/0012359300003660
토픽
Surface Modification and Superhydrophobicity
OpenAlex ID
W4392402369

평가 내용

관련도
간접 관련
사업분야
패션 · (24) 패션(코오롱FnC)
부 분야
(3) 자동차 인테리어 소재, (17) 스펀본드 부직포
R&D 측면
분석·모델링
확신도
0.70
근거 용어
Liquid-fabric interaction, Cloth simulation, Porous fabric, Physically-Based Modeling
판단 근거
본 논문은 액체와 섬유(천/실) 간의 상호작용을 물리적으로 시뮬레이션하는 수치 해석 모델(PolyPIC)에 관한 연구입니다. 이는 코오롱인더스트리의 패션(24)용 기능성 원단(투습방수 등)이나 자동차 인테리어(3), 부직포(17) 소재의 수분 흡수/배출 특성을 디지털 환경에서 예측하고 설계하는 R&D 기법에 응용될 수 있습니다.
R&D 활용 포인트
기능성 섬유(투습방수, 냉감, 흡습속건 등) 개발 시, 실제 실험 전 액체 침투 및 확산 거동을 컴퓨터 시뮬레이션으로 정밀하게 예측하여 개발 기간과 비용을 단축하는 데 활용 가능합니다.
평가 입력
본문 37,598자 중 30,032자 발췌

초록

Liquid-fabric interaction simulations using particle-in-cell (PIC) based models have been used to simulate a wide variety of phenomena and yield impressive visual results.However, these models suffer from numerical damping due to the data interpolation between the particles and grid.Our paper addresses this by using the polynomial PIC (PolyPIC) model instead of the affine PIC (APIC) model that is used in current state-of-theart wet cloth models.Theoretically, PolyPIC has lossless energy transfer and so should avoid any problems of undesirable damping and numerical viscosity.Our results show that PolyPIC does enable more dynamic coupled simulations.The use of PolyPIC allows for simulations with reduced numerical dissipation and improved resolution of vorticial details over previous work.For smaller scale simulations, there is minimal impact on computational performance when using PolyPIC instead of APIC.However, as simulations involve a larger number of particles and mesh elements, PolyPIC can require up to a 2.5× as long to generate 4.0s of simulation due to a requirement for a decrease in timestep size to remain stable.

본문 37,598자

본문 펼치기
## Using The Polynomial Particle-in-Cell Method for Liquid-Fabric Interaction Robert Dennison, Steve Maddock _The University of Sheffield_ _{rtdennison1, s.maddock}@sheffield.ac.uk_ Keywords: Physically-Based Modeling, Fluid Simulation, Cloth Simulation Abstract: Liquid-fabric interaction simulations using particle-in-cell (PIC) based models have been used to simulate a wide variety of phenomena and yield impressive visual results. However, these models suffer from numerical damping due to the data interpolation between the particles and grid. Our paper addresses this by using the polynomial PIC (PolyPIC) model instead of the affine PIC (APIC) model that is used in current state-of-theart wet cloth models. Theoretically, PolyPIC has lossless energy transfer and so should avoid any problems of undesirable damping and numerical viscosity. Our results show that PolyPIC does enable more dynamic coupled simulations. The use of PolyPIC allows for simulations with reduced numerical dissipation and improved resolution of vorticial details over previous work. For smaller scale simulations, there is minimal impact on computational performance when using PolyPIC instead of APIC. However, as simulations involve a larger number of particles and mesh elements, PolyPIC can require up to a 2 _._ 5 _×_ as long to generate 4 _._ 0 _s_ of simulation due to a requirement for a decrease in timestep size to remain stable. ### 1 INTRODUCTION In physics-based simulations for computer graphics, increasing attention is being focused on simulations involving a combination of two or more physical media. One area of particular interest is simulating the complex interactions between fluid and porous fabric. The liquid-fabric interaction model of Fei et al (Fei et al., 2018) is widely considered as the state-of-theart for this kind of coupled simulation. They make use of the affine particle-in-cell (APIC) model for the fluids and the material point method (MPM) using APIC transfers for cloth and yarn objects. Particle-in-cell (PIC) methods are a class of hybrid Eulerian-Lagrangian simulation methods, designed to benefit from the ease of particle advection found in Lagrangian methods with the simplicity of calculating forces and material properties on a regular Eulerian grid. In each time step, particle information is interpolated to nearby grid nodes where an updated velocity can be calculated. This new velocity can then be interpolated back to the particles which can be advected through the simulation domain. A known issue with PIC methods is that they suffer from numerical dissipation, as the interpolation stages act as a filter of high frequency and rotational velocities. This means that fluid simulations using PIC methods can seem overly viscous. APIC was introduced as an improvement to the standard PIC model (Jiang et al., 2015) and was developed to reduce the numerical dissipation by considering rotational velocity. Since its introduction, APIC has seen wide adoption by the visual effects industry. While APIC was developed in an effort to reduce damping of rotational velocities, it has been shown to still be introduce numerical damping. This makes it more challenging to use real world values for viscosity and elasticity, as the model will introduce viscosity numerically. The polynomial particle-in-cell model (PolyPIC) was introduced as a generalised extension of APIC to further reduce numerical dissipation (Fu et al., 2017), and has been shown to theoretically be able to achieve lossless energy transfers during the interpolation stages. By using a method with reduced energy loss, real world empirical data can be used as the model parameters, allowing for easier recreation of real world scenes by artists. Our paper is the first to use PolyPIC for liquidfabric interactions. We improve the work of Fei et al by incorporating polynomial transfers between the particles and grid. By substituting the affine transfers of APIC for higher order polynomials, the numerical damping of the model can be reduced. This also requires an alteration of some aspects of the pre Figure 1: Fluid splashing onto a square of yarn fabric using PolyPIC transfers. sented PolyPIC method to improve simulation stability. The results give a comparison of PolyPIC with APIC for coupled simulation scenarios and demonstrate that PolyPIC provides improved preservation of rotational velocity, leading to more dynamic simulations. The presented scenarios give a comparison of APIC and PolyPIC in a pure fluid simulation to showcase the differences of the two simulation approaches. The remainder of this paper is structured into five sections. Section 2 describes related work. Section 3 explains the implementation of PolyPIC for the liquid-fabric simulation. The results in section 4 provide a comparison of PolyPIC and APIC, with a discussion in section 5. Section 6 presents conclusions. ### 2 RELATED WORK Early work on wet cloth models focused on nonporous thin shells interacting with fluids (e.g. (Harada et al., 2007)), with subsequent work involving porous volumes (Lenaerts et al., 2008). The main drawback of this work was that it used a smoothed particle hydrodynamics framework, thus requiring a large number of particles internal to the object’s volume and impacting on computational performance. Huber et al (Huber et al., 2011) improved the computational performance by using a cellular automata approach which allowed for simple parallelization. Patkar et al (Patkar and Chaudhuri, 2013) used a mesh-based approach for solid simulation to remove the need for simulating large numbers of solid particles and also incorporated additional fluid effects such as dripping and surface flow. Further developments came with the application of position based dynamics (M¨uller et al., 2007) to the model presented by Lenaerts et al, thus allowing for larger time steps to be used (Shao et al., 2018). Another recent development by Fei et al (Fei et al., 2018) demonstrates both a porous cloth model using discrete shells (Grinspun et al., 2003) and discrete rods (Bergou et al., 2008) discretized using the material point method (MPM) (Sulsky et al., 1994) for cloth and yarn simulations, respectively. Zheng et al then added further realism to liquid-yarn interactions by modelling the defects in the constituent fibres of a material (Zheng et al., 2021). However, this work has currently only been used to model static fabric. Particle-in-cell methods have seen extensive use since first being introduced by Harlow et al (Harlow, 1962). The severe numerical dissipation of this method due to filtering caused by the number of interpolation steps led to the development of the fluid implicit particle (FLIP) method, which bypassed some of the interpolation steps to increase the dynamism of simulations by interpolating only the change in velocity from the grid to the particles rather than interpolating the velocity (Brackbill and Ruppel, 1986). The major drawback of the FLIP method was that reduced dissipation came at the cost of introducing more noise and instability to the simulations. Jiang et al (Jiang et al., 2015) developed the APIC method as a way of reducing the numerical dissipation of PIC in a stable way by storing an affine transform matrix on each particle, as well as a velocity vector. This reduced the energy loss of the PIC method and improved the stability of FLIP, and also improved the preservation of angular momentum of both previous iterations of the model. Recently PolyPIC (Fu et al., 2017) was developed as a generalized extension of APIC to allow for higher order transfers during the grid/particle transfers, further reducing the numerical dissipation and improving preservation of angular momentum. It achieves this by replacing the affine matrix used to store information about angular momentum with a more general polynomial function. The popularity of PIC methods led to their application to deformable materials by Sulsky et al to create MPM (Sulsky et al., 1994). Subsequent PIC developments have also continued to be adapted to elastic solids to continually improve MPM simulations, and MPM has been successfully applied to simulate a wide variety of materials such as snow (Stomakhin et al., 2013), viscoelastic solids (Fang et al., 2019) and even materials with phase changes such as lava or butter (Stomakhin et al., 2014). Despite the improvements of PolyPIC over APIC, PolyPIC has not yet been adapted to coupled simulation scenarios. ### 3 METHOD This paper builds on the work of Fei et al by replacing the APIC model with the PolyPIC model. APIC and PolyPIC differ only in the transfer steps (as shown in Figure 2), meaning PolyPIC transfers can be substituted into the model in the place of APIC transfers. Section 3.1 presents the standard PIC model, section 3.2 describes how APIC builds upon this and PolyPIC is explained in section 3.3. Finally, section 3.4 describes the application of PolyPIC to a mixture model. Fei et al used a staggered marker-and-cell (MAC) grid approach as it provides more accurate central differences over a standard collocated grid approach, so all work presented here is applied to MAC grids. Figure 2: The difference between the APIC and PolyPIC algorithms is the method of transferring data between the particles and the grid. PolyPIC uses generalized higher order polynomials whereas APIC uses affine transformation matrices. (Based on Figure 7 in (Jiang et al., 2015).) 3.1 The Particle-in-Cell Method The standard PIC model consists of particles which store information about their mass and velocity, which is interpolated to/from the grid node faces to advect the particles around the simulation domain, as shown in Figure 3. The yellow and blue boxes will be considered in subsections 3.2 and 3.3, respectively. Figure 3: The data stored by particles and grid node faces in PIC methods. White background boxes are consistent between all PIC variants. Velocity derivatives (yellow background) are introduced for APIC and scalar coefficients (blue boxes) are introduced in PolyPIC. (Based on a diagram in (Fu et al., 2017).) <u>Notation</u> <u>Type</u> <u>Meaning</u> ∆ _t_ s size of time step ∆ _x_ s size of grid node _xp_ v position of particle _p_ _xi_ α v position of face α of grid node _i_ _mp_ s mass of particle _p_ _vp_ v velocity of particle _p_ _mi_ α s mass of face α of grid node _i_ _vi_ α v velocity of face α of grid node _i_ _v_ ˜ _i_ α v intermediate velocity of face α of grid node _i_ _wip_ α s contribution of particle _p_ to face α of grid node _i_ _mip_ α s mass contributed by particle _p_ to face α of grid node _i_ ( _mv_ ) _ip_ α v momentum contributed by particle _p_ to face α of grid node _i_ C _p_ m velocity derivatives of particle _p_, as described in (Jiang et al., 2015) c _p_ α v velocity derivatives used for MAC grids _cpr_ α s scalar coefficient of scalar mode _r_ for particle _p_ in axis α I m identity matrix <u>e</u> <u>α</u> <u>v</u> <u>basis vector for axis α</u> Table 1: Notation used throughout this paper. Values are of type scalar s, vector v or matrix m. A PIC simulation consists of a total of _P_ particles and _Ni_ grid nodes, where superscript _n_ is used for a given quantity at the current timestep _n_ (e.g. _v_ <sup>_n_</sup> _p_ <sup>is the</sup> velocity of particle _p_ at timestep _n_ ) and α represents a face of a grid node for each axis 1 _≤_ α _≤_ _d_, where _d_ is the number of dimensions. The notation used throughout this paper is summarised in Table 1. In the standard PIC method, each particle stores its own mass and velocity. A weight function _N_ ( _x_ ) is defined to calculate the contribution of a particle to nearby grid cells during the interpolation steps and vice versa. Each particle within a nearby region of a grid node contributes some of its mass to each face (Equation 1). The mass contribution of each particle can then be multiplied by the particle’s velocity to calculate the momentum contribution of each particle (Equation 2). The momentum contribution can then be summed over all particles to calculate the total momentum for the grid node face (Equation 3). The total mass of the grid node face is the mass contributions of all particles (Equation 4). Finally, the velocity of each grid node face can be calculated by dividing the momentum by the mass (Equation 5). _m_ <sup>_n_</sup> <sup>_n_</sup> _ip_ α <sup>=</sup> <sup>_mn_</sup> _p_ ) <sup>_n_</sup> _ip_ α <sup>=</sup> <sup>_m_</sup> _ip_ <sup>_n_</sup> <sup>_n_</sup> _p_ <sup>_wip_</sup> <sup>α</sup> (1) _ip_ <sup>_n_</sup> α <sup>_vp_</sup> (2) ( _mv_ ) <sup>_n_</sup> ( _mv_ ) <sup>_n_</sup> _i_ α <sup>=</sup> ( _mv_ ) <sup>_n_</sup> _ip_ α (3) _m_ <sup>_n_</sup> _i_ α <sup>=</sup> _P_ ### ∑ _p_ =0 _P_ ### ∑ _p_ =0 _m_ <sup>_n_</sup> _ip_ α (4) _v_ <sup>_n_</sup> _i_ _v_ <sup>_n_</sup> _i_ α <sup>= (</sup> <sup>_mv_</sup> <sup>)</sup> _i_ <sup>_n_</sup> _i_ <sup>_n_</sup> α <sup>_/mn_</sup> _i_ _v_ <sup>_n_</sup> _i_ α <sup>= (</sup> <sup>_mv_</sup> <sup>)</sup> _i_ <sup>_n_</sup> α <sup>_/mn_</sup> _i_ α (5) where _wip_ α = _N_ ( _xp_ α _−_ _xi_ α) is the contribution of particle _p_ to face α of grid node _i_ . The mass of a grid node can change throughout the simulation, but the masses of particles are fixed. This means when interpolating from the grid nodes to the particles, we only update the particles’ velocities. Once the intermediate grid velocities _v_ ˜ _i_ α <sup>_n_</sup> <sup>+1</sup> have been calculated, they are interpolated back to the particles. To calculate the contribution of grid node momentum to each particle, first the momentum of each grid node must be calculated. This is done by multiplying the mass of each node face by the intermediate velocity of each node face and summing over the number of faces (Equation 6). Then the momentum of each particle can be calculated by summing the contributed momentum of each grid node over the number of grid nodes (Equation 7). Finally, the velocity of each particle can be calculated by dividing the momentum by the particle mass (Equation 8). 3.3 The Polynomial PIC method PolyPIC replaces the affine matrix of APIC with generalized polynomials which allow for a wider range of local behaviour capture (see Figure 3). For PolyPIC the number of modes used is given by _Nr_ . It uses polynomials of the form: ξ <sup>_n_</sup> <sup>+1</sup> ( x ) = x <sup>_n_</sup> _p_ <sup>_n_</sup> _p_ <sup>+(</sup> <sup>_I_</sup> <sup>+</sup> <sup>∆</sup> <sup>_tCn_</sup> _p_ <sup>+1</sup> _s_ ( z ) = _d_ ### ∏ β=1 _z_ <sup>_i_</sup> <sup>β</sup> (11) β _z_ <sup>_i_</sup> <sup>β</sup> where _z_ β is the β <sup>_th_</sup> component of z _∈_ R <sup>_d_</sup> with _i_ β _∈_ Z <sup>+</sup> . Before defining the transfers, we must first define a map of the simulation configuration at time _t_ <sup>_n_</sup> <sup>+1</sup> to _t_ <sup>_n_</sup>, denoted as ξ <sup>_n_</sup> <sup>+1</sup> ( _x_ ). As described by Fu et al, this map can take different forms for constant or affine material motion. Here, the affine map is given by Equation 12 (Equation 10 in Fu et al). <sup>_n_</sup> _p_ <sup>+1</sup> ) <sup>_−_</sup> <sup>1</sup> ( x _−_ x <sup>_n_</sup> _p_ <sup>+1</sup> <sup>_n_</sup> _p_ <sup>+1</sup> ) (12) ( _mv_ ) <sup>_n_</sup> _ip_ <sup>+1</sup> = _m_ <sup>_n_</sup> _ip_ α <sup>_v_</sup> <sup>˜</sup> <sup>_i_</sup> <sup>α</sup> <sup>_n_</sup> <sup>+1</sup> (6) ( _mv_ ) <sup>_n_</sup> _p_ <sup>+1</sup> = _d_ ### ∑ α=1 _Ni_ ( ### ∑ _i_ =0 ( _mv_ ) <sup>_n_</sup> _ip_ <sup>+1</sup> (7) ( _mv_ ) <sup>_n_</sup> _ip_ <sup>+1</sup> _v_ <sup>_n_</sup> _p_ <sup>+1</sup> <sup>_n_</sup> _p_ <sup>+1</sup> = ( _mv_ ) <sup>_n_</sup> _p_ <sup>+1</sup> <sup>_n_</sup> _p_ <sup>+1</sup> _/mp_ (8) The method of calculating C <sup>_n_</sup> _p_ <sup>is</sup> <sup>given</sup> <sup>in</sup> <sup>detail</sup> in (Jiang et al., 2015). The momentum transfer from the particles to the grid is then calculated by taking the sum of all the scalar modes multiplied by the corresponding scalar coefficients, given by Equation 13 (Equation 11 in Fu et al). The momentum contribution of each particle to the grid node faces can then be summed over all particles (Equation 3). The velocity of each grid node face can then be calculated by dividing the momentum by the mass (Equation 5). 3.2 The Affine PIC Method In the APIC method, alongside mass and velocity each particle also stores an affine matrix of velocity derivatives to enhance the preservation of rotational velocities (see Figure 3). Equations 1 and 4, used for transferring mass from the particles to the grid nodes, remain unchanged for APIC. The updated momentum transfer takes into account the velocity derivatives to preserve angular momentum (Equation 9 (Equation 13 in Jiang et al)). The grid momentum can calculated as with PIC using Equation 3. <sup>_n_</sup> _pr_ α (13) <sup>_n_</sup> _p_ <sup>_−_</sup> <sup>1</sup> ) _c_ <sup>_n_</sup> <sup>_n_</sup> _ip_ α <sup>=</sup> <sup>_m_</sup> _ip_ <sup>_n_</sup> ( _mv_ ) <sup>_n_</sup> _ip_ α _Nr_ ### ∑ _r_ =0 _sr_ (ξ <sup>_n_</sup> _p_ <sup>_n_</sup> _p_ <sup>(</sup> <sup>_xi_</sup> <sup>α</sup> <sup>_−_</sup> <sup>_xn_</sup> _p_ <sup>_−_</sup> <sup>1</sup> ( _mv_ ) <sup>_n_</sup> <sup>_n_</sup> _ip_ α <sup>=</sup> <sup>_mip_</sup> <sup>α(</sup> <sup>e</sup> <sup>α</sup> <sup>_vp_</sup> <sup>+</sup> <sup>c</sup> <sup>_T_</sup> _p_ ( _mv_ ) <sup>_n_</sup> _ip_ α <sup>=</sup> <sup>_mip_</sup> <sup>α(</sup> <sup>e</sup> <sup>α</sup> <sup>_vp_</sup> <sup>+</sup> <sup>c</sup> <sup>_T_</sup> _p_ α <sup>(</sup> <sup>_xp_</sup> <sup>_−_</sup> <sup>_xi_</sup> <sup>α))</sup> (9) where _mip_ α is calculated using Equation 1. The momentum transfers from the grid nodes to the particles are the same as those used in the standard PIC method given by Equations 6 - 8. At this stage the velocity derivatives of a particle, c _p_ α, are updated by calculating the gradient of the weights relating that particle to the grid node faces, ∇ _wip_ α, multiplied by the intermediate velocity, then summing over all grid nodes (Equation 10 (Equation 14 in Jiang et al)). where _sr_ is scalar mode _r_ . The coefficients _c_ <sup>_n_</sup> _pr_ α are calculated as a minimisation problem as described by Fu et al. To efficiently calculate the coefficients, the resultant linear system requires each dimension to be decoupled. The coefficients for modes 1 _≤_ _r ≤_ 2 <sup>_d_</sup> are naturally mass-orthogonal and so solutions can be efficiently found. However, higher order coefficients 2 <sup>_d_</sup> _< r_ _≤_ _Nr_ require modification to be orthogonalized. This is achieved by substituting the quadratic terms, _z_ β, in Equation 11 with _g_ β( _z_ β) defined in Equation 14. In contrast to the equation presented in Fu et al, the variables in Equation 14 are modified to orthogonalize the matrix, which produces more stable simulations. (14) 4 <sup>_n_</sup> _ip_ <sup>)2</sup> <sup>_−_</sup> <sup>_wn_</sup> _ip_ _z_ β(∆ _x_ <sup>2</sup> _−_ 4 _z_ <sup>2</sup> <u>β</u> <sup>2</sup> <u>β</u> <sup>)</sup> _g_ β( _z_ β) = ( _w_ <sup>_n_</sup> _ip_ _x_ <sup>2</sup> _−_ 4 _z_ <sup>2</sup> <u>β</u> <sup>)</sup> _−_ <sup><u>∆</u></sup> <sup>_<u>x</u>_</sup> <sup>2</sup> ∆ _x_ <sup>2</sup> 4 c <sup>_n_</sup> _p_ <sup>+</sup> α <sup>1</sup> <sup>=</sup> _Ni_ ### ∑ _i_ _Ni_ ### ∑ ∇ _wip_ α _v_ ˜ _i_ α <sup>_n_</sup> <sup>+1</sup> (10) Again, the momentum transfers from the grid to the particles are the same as those used in the standard PIC method given by Equations 6, 7 and 8. At this stage, the velocity derivatives _Cp_ can be calculated using the method described by Jiang et al and the coefficients _cpr_ α can be calculated as described by Fu et al. 3.4 Liquid-Fabric Interaction The model presented by Fei et al relies on the use of mixture theory to simulate the interactions between fluid and cloth (Nielsen and Østerby, 2013). Therefore, the momentum transfers need to be altered in order to be applied to mixtures. Let _m_ <sup>_n_</sup> _s,p_ <sup>be the mass</sup> of a solid particle _p_ at time _n_ and _m_ <sup>_n_</sup> _f_ _,p_ <sup>be</sup> <sup>the</sup> <sup>mass</sup> of a fluid particle _p_ at time _n_ . The fluid transfers are then the same as those given in Equations 3, 5 and 13, except only particles tagged as fluids are considered (Equations 15 - 17). <sup>_n_</sup> _pr_ α (15) ( _m_ _f v_ _f_ ) <sup>_n_</sup> _ip_ <sup>_n_</sup> _ip_ α <sup>=</sup> <sup>_mn_</sup> _f_ _f_ _,ip_ α <sup>_n_</sup> _p_ <sup>_−_</sup> <sup>1</sup> ) _c_ <sup>_n_</sup> _Nr_ ### ∑ _r_ =0 _sr_ (ξ <sup>_n_</sup> _p_ <sup>_n_</sup> _p_ <sup>(</sup> <sup>_xi_</sup> <sup>α</sup> <sup>_−_</sup> <sup>_xn_</sup> _p_ <sup>_−_</sup> <sup>1</sup> ( _m_ _f v_ _f_ ) <sup>_n_</sup> _i_ ( _m f v_ _f_ ) <sup>_n_</sup> _ip_ <sup>_n_</sup> _ip_ α (16) ### n i α = ∑ _p_ _v_ <sup>_n_</sup> _f_ <sup>_n_</sup> _f_ _,i_ α <sup>= (</sup> <sup>_m f v_</sup> <sup>_f_</sup> <sup>)</sup> _i_ <sup>_n_</sup> α _i_ <sup>_n_</sup> α <sup>_/mn_</sup> _f_ <sup>_n_</sup> _f_ _,i_ α (17) The solid transfers are very similar to the fluid transfers, except that absorbed fluid particles must be considered. To take account of absorption, we must also consider the mass of absorbed fluid particles when transferring the momentum of solids to the grid. The total mass of a solid particle is therefore given by summing the mass of the solid particle itself and the mass of the absorbed fluid particle, ( _m_ <sup>_n_</sup> _s,ip_ α <sup>+</sup> <sup>_mn_</sup> _f_ _,ip_ α <sup>).</sup> <sup>These</sup> <sup>solid-fluid</sup> <sup>mixture</sup> <sup>momen-</sup> tum transfers are given in Equations 18 - 20. _pr_ α ( _msvs_ ) <sup>_n_</sup> _ip_ <sup>_n_</sup> _ip_ α <sup>= (</sup> <sup>_mn_</sup> _s_ <sup>_n_</sup> _s,ip_ α <sup>+</sup> <sup>_mn_</sup> _f_ <sup>_n_</sup> _f_ _,ip_ α <sup>)</sup> <sup>_n_</sup> _p_ <sup>_−_</sup> <sup>1</sup> ) _c_ <sup>_n_</sup> _Nr_ ### ∑ _r_ =0 _sr_ (ξ <sup>_n_</sup> _p_ <sup>_n_</sup> _p_ <sup>(</sup> <sup>_xi_</sup> <sup>α</sup> <sup>_−_</sup> <sup>_xn_</sup> _p_ <sup>_−_</sup> <sup>1</sup> (18) - Figure 6 shows a ball of fluid falling onto a small square of yarn-based fabric draped over a sphere. - Figure 7 is similar to the small yarn scenario but shows a larger volume of liquid falling onto a medium sized square of yarn-based fabric. The latter three scenarios were used by Fei et al, enabling a comparison of the original model using APIC and the new model using PolyPIC. In the simulation results, particle colours are based on current particle velocity, where dark blue represents a low velocity and red a high velocity. Videos of each simulation can be found in the supplementary video. The simple dam break scenario (Figure 4) highlights the difference between PolyPIC and APIC outside of a coupled simulation context. This shows that using PolyPIC increases the conservation of angular momentum and so improves the resolution of vorticial detail of the fluid. As the final frame shows, PolyPIC particles have higher velocities than in APIC showing that numerical damping is reduced when using PolyPIC. Figure 4: A small dam break scenario using APIC (top) and PolyPIC (bottom) transfers. Particle colours indicate velocity (dark blue = low, red = high). PolyPIC shows improved resolution of vorticial details. A ball of fluid falling onto a small square of cloth fabric is shown in Figure 5. This example demonstrates the reduced numerical damping of PolyPIC causes less of the fluid to be absorbed by the cloth, as more splashes off as it is falling. The fluid that is absorbed exhibits more thin strand behaviour as it drips from the cloth in PolyPIC than APIC. Figure 5: Fluid splash onto a small piece of cloth using APIC (top) and PolyPIC (bottom) transfers. Particle colours indicate velocity (dark blue = low, red = high). The reduced damping means that more fluid splashes off the piece of cloth rather than being absorbed. The fluid that is absorbed exhibits more thin strand behaviour as it drips from the cloth in PolyPIC than APIC (see frame 4). ( _msvs_ ) <sup>_n_</sup> _i_ ( _msvs_ ) <sup>_n_</sup> <sup>_n_</sup> _ip_ α (19) ### n i α = ∑ _p_ <sup>_n_</sup> _f_ _,ip_ α <sup>)</sup> (20) _v_ <sup>_n_</sup> _s,_ <sup>_n_</sup> _s,i_ α <sup>= (</sup> <sup>_msvs_</sup> <sup>)</sup> _i_ <sup>_n_</sup> _i_ <sup>_n_</sup> α <sup>_/_</sup> <sup>(</sup> <sup>_mn_</sup> _s,_ <sup>_n_</sup> _s,ip_ α <sup>+</sup> <sup>_mn_</sup> _f_ ### 4 RESULTS Four scenarios have been used to test the model that has been developed: - Figure 4 shows a simple dam break scenario to highlight the differences between APIC fluids and PolyPIC fluids. - Figure 5 shows a ball of fluid falling onto a small square of cloth draped over a sphere. A ball of fluid falling onto a small square of yarn fabric is shown in Figure 6. This scenario shows that the PolyPIC yarns exhibit less sagging than APIC, as they stretch less under their own weight. The reduced damping also makes the PolyPIC yarns spring back from being stretched by the fluid faster. Figure 6: Fluid splashing onto a small square of yarn fabric using APIC (top) and PolyPIC (bottom) transfers. Particle colours indicate velocity (dark blue = low, red = high). The PolyPIC yarns exhibit less sagging than APIC (see frame 1). The reduced damping makes the PolyPIC yarns spring back faster from being stretched (see frames 3-5). Figure 7: Fluid splashing onto a medium sized square of yarn fabric using APIC (top) and PolyPIC (bottom) transfers. Particle colours indicate velocity (dark blue = low, red = high). PolyPIC causes more energy to be transferred from the falling fluid to the yarn and results in a more dynamic result. A breakdown of performance information for each presented example is shown in Table 2. Particles make up the objects that are being simulated. In the simulation, all particles are flagged as being either fluid or solid particles. Fluid particles are the particles used to simulate the bulk fluid. Elements are the mesh elements that make up the fabric (triangles for cloth simulations, rod segments for yarn simulations) and are used for calculating the movement of absorbed fluids. The ‘small’ simulations use a piece of fabric that is <sup>1</sup> /4 the size of the ‘medium’ simulation ( <sup>1</sup> /2 of both the width and height). Simulations were run using an Intel i9-12900K CPU, and each example was repeated 3 times and the mean performance results are presented. The source code can be found at [https://github.com/robden820/libwetcloth.](https://github.com/robden820/libwetcloth) For simulations involving PolyPIC, 8 fluid scalar modes and 8 solid scalar modes were used for all examples. As can be seen in Table 2, as the number of par Figure 8: Mean particle energy for the dam break scenario, calculated as the sum of kinetic energy and gravitational potential energy. PolyPIC improves the energy preservation over APIC, but the effect per particle is minor. ticles increases, the impact of the additional complexity of the PolyPIC model increases. The dam break scenarios use the largest number of particles to clearly demonstrate the difference in fluid behaviours when using PolyPIC, but also to highlight the additional computational impact of PolyPIC over APIC. The small cloth splash scenario has the smallest number of simulated particles and elements and shows the smallest difference in seconds per step and peak memory usage between APIC and PolyPIC of all the examples. Some of the simulations require use of a smaller timestep value due to stability issues (see Section 5). Additionally, an energy plot is presented for the dam break scenario in Figure 8 and for the interactions scenarios in Figure 9 (due to variation in the simulation setup, each simulation stabilises around a different final mean energy). The plots show the mean energy per particle for the presented scenarios, calculated as the sum of the kinetic energy and gravitational potential energy. Figure 8 shows that for a simulation involving only fluid particles, the improvement in energy preservation gained by using PolyPIC in the place of APIC is minimal, however, as shown in Figure 4 there is still a difference in the simulations visual output achieved using PolyPIC. Figure 9 shows a similar trend for the interaction scenarios, and PolyPIC has a small impact in the long term energy preservation of the simulation. However, simulations involving PolyPIC require more time to reach a stable energy level. The increased oscillations of PolyPIC before reaching this stable energy level indicate that PolyPIC suffers less from numerical damping than APIC, leading to more dynamic simulations. ### 5 DISCUSSION As shown in the comparison scenarios, visually, PolyPIC provides a notable increase in simulation dynamics. Whilst theoretically PolyPIC has been shown #fluid particles <u>(avg)</u> #elements (avg) #particles (avg) s/step (avg) total run time <u>(mins)</u> peak memory <u>(GB)</u> Example simulation duration <u>(s)</u> timestep (s) Dam Break Small (APIC) Dam Break Small <u>(PolyPIC)</u> Splash Cloth Small (APIC) Splash Cloth Small <u>(PolyPIC)</u> Splash Yarn Small (APIC) Splash Yarn Small <u>(PolyPIC)</u> Splash Yarn Medium (APIC) Splash Yarn Medium <u>(PolyPIC)</u> 5.0 0.0002 0.510 217 1.978 310929 310929 0 <sup><u>†</u></sup> 5.0 0.0002 1.172 499 2.040 310839 310839 0 <sup>†</sup> 4.0 0.0002 0.480 167 0.896 12359 1360 20406 4.0 0.0001 0.428 282 0.842 12228 1228 20406 4.0 0.0002 0.454 155 1.056 23074 3471 19799 4.0 0.0002 0.579 197 1.109 23233 3630 19799 4.0 0.0002 1.897 818 9.300 119520 40320 79596 4.0 0.00005 1.460 1958 5.764 116416 37213 79596 Table 2: Timing and storage data for APIC and PolyPIC for three example scenarios. <sup>†</sup> The dam break simulations involved no fabric, so required 0 mesh/rod elements. deleted from the simulation. This reduces the number of fluid particles to be simulated in later timesteps, allowing each step to be simulated faster. Figure 9: Mean particle energy for the interaction scenarios, calculated as the sum of kinetic energy and gravitational potential energy. Change in energy preservation in PolyPIC and APIC is minimal, although the energy of PolyPIC oscillates for a longer period before reaching a constant value. Due to differences in the simulation setup (e.g. fabric at different world heights, rigid sphere in cloth scenario), each simulation stabilises around a different final mean energy. to be lossless when transferring velocity between the particles and the grid (shown in the supplementary material of Fu et al), this can’t be achieved in practice. For fluids, using polynomial modes involving multi-quadratic terms (i.e. _Nr_ _>_ 2 <sup>_d_</sup> ) causes the simulation to become unstable, even when a very small time step is used. For solids in a non-coupled scenario, the maximum number of modes can be used without effecting the overall stability of the simulation. However, when simulating coupled interaction, stability issues become increasingly severe as higher order modes are introduced. As can be seen in Table 2, when comparing the dam break scenarios, an increase in the time required for each simulation step can be seen when using PolyPIC rather than APIC. In the interaction scenarios, the time per simulation generally decreases, but the average number of fluid particles in the simulation also decreases. The reduced numerical damping of PolyPIC causes the fluid to splash off the fabric rather than being absorbed, so the fluid particles leave the domain of the simulation faster, and the particles are The fabric-interaction simulations for APIC were both able to be simulated using a timestep of ∆ _t_ = 2 _e_ <sup>_−_</sup> <sup>4</sup> _s_, but using this value for the PolyPIC scenarios caused the simulation to become unstable. Whilst the same timestep enabled stable simulation of the small yarn PolyPIC scenario, we found using a timestep of ∆ _t_ = 1 _e_ <sup>_−_</sup> <sup>4</sup> _s_ and ∆ _t_ = 5 _e_ <sup>_−_</sup> <sup>5</sup> _s_ allowed the small cloth and medium yarn PolyPIC simulation to remain stable for their duration, respectively. This means that while in general there was only a small change in the time required for each simulation step, the need for a smaller timestep for PolyPIC resulted in an overall increase in the time taken to run the simulation, as shown in Table 2. Possible future work would be to experiment with more stable simulation frameworks such as positionbased dynamics (M¨uller et al., 2007) which has been shown to reduce the need for small timesteps. Also, in the yarn examples, the individual yarns quickly become tangled after collision with the fluid. Using a more robust collision handling technique such as incremental potential contact (Li et al., 2020) could improve the stability of the simulations. ### 6 CONCLUSIONS The work presented by Fei et al is widely considered to be the state-of-the-art for liquid-fabric interaction simulations. This paper has replaced APIC with PolyPIC in their model and performed a comparison of the PolyPIC model with the APIC model in the context of liquid-fabric interactions. Using PolyPIC in place of APIC for liquid-fabric interaction improves the dynamism of simulations, increasing energy transfer between the fluid and cloth/yarn and increasing the resolution of vorticial details and small scale splashes. However, PolyPIC has a higher computation cost over APIC and the reduced numerical damping of PolyPIC also caused stability issues requiring the use of a smaller time step. This requirement for smaller timesteps highlights the need for a greater consideration of techniques to improve simulation stability and inter-yarn collision detection. Despite this limitation, this paper demonstrates the potential of PolyPIC as a method of improving liquidfabric interaction simulations based on PIC methods. ### ACKNOWLEDGEMENTS This research is supported by a Frank Greaves Simpson Scholarship from the University of Sheffield. ### REFERENCES Bergou, M., Wardetzky, M., Robinson, S., Audoly, B., and Grinspun, E. (2008). Discrete elastic rods. _ACM_ _Transactions on Graphics_, 27(3):1–12. Brackbill, J. and Ruppel, H. (1986). FLIP: A method for adaptively zoned, particle-in-cell calculations of fluid flows in two dimensions. _Journal_ _of_ _Computational_ _Physics_, 65:314–343. Fang, Y., Li, M., Gao, M., and Jiang, C. (2019). Silly rub ber: an implicit material point method for simulating non-equilibrated viscoelastic and elastoplastic solids. _ACM Transactions on Graphics_, 38:1–13. Fei, Y. R., Batty, C., Grinspun, E., and Zheng, C. (2018). A multi-scale model for simulating liquid-fabric interactions. _ACM Trans. Graph._, 37(4). Fu, C., Guo, Q., Gast, T., Jiang, C., and Teran, J. (2017). A polynomial particle-in-cell method. _ACM Transac-_ _tions on Graphics_, 36(6):222:1–222:12. Grinspun, E., Hirani, A., Desbrun, M., and Schr¨oder, P. (2003). Discrete Shells. In _Proceedings_ _of_ _the_ _2003_ _ACM SIGGRAPH/Eurographics Symposium on Com-_ _puter Animation_ . Harada, T., Koshizuka, S., and Kawaguchi, Y. (2007). Real time Fluid Simulation Coupled with Cloth. _EG_ _UK_ _Theory and Practice of Computer Graphics_ . Harlow, F. H. (1962). The particle-in-cell method for nu merical solution of problems in fluid dynamics. Technical Report LADC-5288. Huber, M., Pabst, S., and Straßer, W. (2011). Wet cloth simulation. In _International Conference on Computer_ _Graphics and Interactive Techniques_ . Jiang, C., Schroeder, C., Selle, A., Teran, J., and Stomakhin, A. (2015). The affine particle-in-cell method. _ACM_ _Transactions on Graphics_, 34(4):51:1–51:10. Lenaerts, T., Adams, B., and Dutr´e, P. (2008). Porous flow in particle-based fluid simulation. _ACM_ _Trans._ _Graph._, 27. Li, M., Ferguson, Z., Schneider, T., Langlois, T., Zorin, D., Panozzo, D., Jiang, C., and Kaufman, D. M. (2020). Incremental potential contact: intersectionand inversion-free, large-deformation dynamics. _ACM_ _Transactions on Graphics_, 39(4). M¨uller, M., Heidelberger, B., Hennix, M., and Ratcliff, J. (2007). Position based dynamics. _Journal_ _of_ _Visual_ _Communication_ _and_ _Image_ _Representation_, 18(2):109–118. Nielsen, M. B. and Østerby, O. (2013). A two-continua approach to Eulerian simulation of water spray. _ACM_ _Transactions on Graphics_, 32(4):1–10. Patkar, S. and Chaudhuri, P. (2013). Wetting of Porous Solids. _IEEE Transactions on Visualization and Com-_ _puter Graphics_, 19(9):1592–1604. Shao, X., Wu, W., and Wang, B. (2018). Position-based simulation of cloth wetting phenomena. _Computer_ _Animation and Virtual Worlds_, 29(1):e1788. Stomakhin, A., Schroeder, C., Chai, L., Teran, J., and Selle, A. (2013). A material point method for snow simulation. _ACM Transactions on Graphics_, 32(4):1–10. Stomakhin, A., Schroeder, C., Jiang, C., Chai, L., Teran, J., and Selle, A. (2014). Augmented MPM for phasechange and varied materials. _ACM_ _Transactions_ _on_ _Graphics_, 33(4):1–11. Sulsky, D., Chen, Z., and Schreyer, H. L. (1994). A par ticle method for history-dependent materials. _Com-_ _puter_ _Methods_ _in_ _Applied_ _Mechanics_ _and_ _Engineer-_ _ing_, 118(1):179–196. Zheng, Y., Chi, X., Chen, Y., and Wu, E. (2021). Stains on imperfect textile. _Virtual_ _Reality_ _&_ _Intelligent_ _Hard-_ _ware_, 3:142–155.

섹션 본문 48문단 · 27,050자

(제목 없음)

1Liquid-fabric interaction simulations using particle-in-cell (PIC) based models have been used to simulate a wide variety of phenomena and yield impressive visual results.However, these models suffer from numerical damping due to the data interpolation between the particles and grid.Our paper addresses this by using the polynomial PIC (PolyPIC) model instead of the affine PIC (APIC) model that is used in current state-of-theart wet cloth models.Theoretically, PolyPIC has lossless energy transfer and so should avoid any problems of undesirable damping and numerical viscosity.Our results show that PolyPIC does enable more dynamic coupled simulations.The use of PolyPIC allows for simulations with reduced numerical dissipation and improved resolution of vorticial details over previous work.For smaller scale simulations, there is minimal impact on computational performance when using PolyPIC instead of APIC.However, as simulations involve a larger number of particles and mesh elements, PolyPIC can require up to a 2.5× as long to generate 4.0s of simulation due to a requirement for a decrease in timestep size to remain stable.

INTRODUCTION

2In physics-based simulations for computer graphics, increasing attention is being focused on simulations involving a combination of two or more physical media.One area of particular interest is simulating the complex interactions between fluid and porous fabric.The liquid-fabric interaction model of Fei et al (Fei et al., 2018) is widely considered as the state-of-theart for this kind of coupled simulation.They make use of the affine particle-in-cell (APIC) model for the fluids and the material point method (MPM) using APIC transfers for cloth and yarn objects.

3Particle-in-cell (PIC) methods are a class of hybrid Eulerian-Lagrangian simulation methods, designed to benefit from the ease of particle advection found in Lagrangian methods with the simplicity of calculating forces and material properties on a regular Eulerian grid.In each time step, particle information is interpolated to nearby grid nodes where an updated velocity can be calculated.This new velocity can then be interpolated back to the particles which can be advected through the simulation domain.A known issue with PIC methods is that they suffer from numerical dissipation, as the interpolation stages act as a filter of high frequency and rotational velocities.This means that fluid simulations using PIC methods can seem overly viscous.APIC was introduced as an improvement to the standard PIC model (Jiang et al., 2015) and was developed to reduce the numerical dissipation by considering rotational velocity.Since its introduction, APIC has seen wide adoption by the visual effects industry.

4While APIC was developed in an effort to reduce damping of rotational velocities, it has been shown to still be introduce numerical damping.This makes it more challenging to use real world values for viscosity and elasticity, as the model will introduce viscosity numerically.The polynomial particle-in-cell model (PolyPIC) was introduced as a generalised extension of APIC to further reduce numerical dissipation (Fu et al., 2017), and has been shown to theoretically be able to achieve lossless energy transfers during the interpolation stages.By using a method with reduced energy loss, real world empirical data can be used as the model parameters, allowing for easier recreation of real world scenes by artists.

5Our paper is the first to use PolyPIC for liquidfabric interactions.We improve the work of Fei et al by incorporating polynomial transfers between the particles and grid.By substituting the affine transfers of APIC for higher order polynomials, the numerical damping of the model can be reduced.This also requires an alteration of some aspects of the pre- The remainder of this paper is structured into five sections.Section 2 describes related work.Section 3 explains the implementation of PolyPIC for the liquid-fabric simulation.The results in section 4 provide a comparison of PolyPIC and APIC, with a discussion in section 5. Section 6 presents conclusions.

RELATED WORK

6Early work on wet cloth models focused on nonporous thin shells interacting with fluids (e.g.(Harada et al., 2007)), with subsequent work involving porous volumes (Lenaerts et al., 2008).The main drawback of this work was that it used a smoothed particle hydrodynamics framework, thus requiring a large number of particles internal to the object's volume and impacting on computational performance.Huber et al (Huber et al., 2011) improved the computational performance by using a cellular automata approach which allowed for simple parallelization.Patkar et al (Patkar and Chaudhuri, 2013) used a mesh-based approach for solid simulation to remove the need for simulating large numbers of solid particles and also incorporated additional fluid effects such as dripping and surface flow.

7Further developments came with the application of position based dynamics (Müller et al., 2007) to the model presented by Lenaerts et al, thus allowing for larger time steps to be used (Shao et al., 2018).Another recent development by Fei et al (Fei et al., 2018) demonstrates both a porous cloth model using discrete shells (Grinspun et al., 2003) and discrete rods (Bergou et al., 2008) discretized using the material point method (MPM) (Sulsky et al., 1994) for cloth and yarn simulations, respectively.Zheng et al then added further realism to liquid-yarn interactions by modelling the defects in the constituent fibres of a material (Zheng et al., 2021).However, this work has currently only been used to model static fabric.

8Particle-in-cell methods have seen extensive use since first being introduced by Harlow et al (Harlow, 1962).The severe numerical dissipation of this method due to filtering caused by the number of interpolation steps led to the development of the fluid implicit particle (FLIP) method, which bypassed some of the interpolation steps to increase the dynamism of simulations by interpolating only the change in velocity from the grid to the particles rather than interpolating the velocity (Brackbill and Ruppel, 1986).The major drawback of the FLIP method was that reduced dissipation came at the cost of introducing more noise and instability to the simulations.

9Jiang et al (Jiang et al., 2015) developed the APIC method as a way of reducing the numerical dissipation of PIC in a stable way by storing an affine transform matrix on each particle, as well as a velocity vector.This reduced the energy loss of the PIC method and improved the stability of FLIP, and also improved the preservation of angular momentum of both previous iterations of the model.Recently PolyPIC (Fu et al., 2017) was developed as a generalized extension of APIC to allow for higher order transfers during the grid/particle transfers, further reducing the numerical dissipation and improving preservation of angular momentum.It achieves this by replacing the affine matrix used to store information about angular momentum with a more general polynomial function.

10The popularity of PIC methods led to their application to deformable materials by Sulsky et al to create MPM (Sulsky et al., 1994).Subsequent PIC developments have also continued to be adapted to elastic solids to continually improve MPM simulations, and MPM has been successfully applied to simulate a wide variety of materials such as snow (Stomakhin et al., 2013), viscoelastic solids (Fang et al., 2019) and even materials with phase changes such as lava or butter (Stomakhin et al., 2014).Despite the improvements of PolyPIC over APIC, PolyPIC has not yet been adapted to coupled simulation scenarios.This paper builds on the work of Fei et al by replacing the APIC model with the PolyPIC model.APIC and PolyPIC differ only in the transfer steps (as shown in Figure 2), meaning PolyPIC transfers can be substituted into the model in the place of APIC transfers.Section 3.1 presents the standard PIC model, section 3.2 describes how APIC builds upon this and PolyPIC is explained in section 3.3.Finally, section 3.4 describes the application of PolyPIC to a mixture model.Fei et al used a staggered marker-and-cell (MAC) grid approach as it provides more accurate central differences over a standard collocated grid approach, so all work presented here is applied to MAC grids.

11Figure 2: The difference between the APIC and PolyPIC algorithms is the method of transferring data between the particles and the grid.PolyPIC uses generalized higher order polynomials whereas APIC uses affine transformation matrices.(Based on Figure 7 in (Jiang et al., 2015).)

The Particle-in-Cell Method

12The standard PIC model consists of particles which store information about their mass and velocity, which is interpolated to/from the grid node faces to advect the particles around the simulation domain, as shown in Figure 3.The yellow and blue boxes will be considered in subsections 3.2 and 3.3, respectively.(Fu et al., 2017).)A PIC simulation consists of a total of P particles and N i grid nodes, where superscript n is used for a given quantity at the current timestep n (e.g.v n p is the velocity of particle p at timestep n) and α represents a face of a grid node for each axis 1 ≤ α ≤ d, where d is the number of dimensions.The notation used throughout this paper is summarised in Table 1.

13In the standard PIC method, each particle stores its own mass and velocity.A weight function N(x) is defined to calculate the contribution of a particle to nearby grid cells during the interpolation steps and vice versa.Each particle within a nearby region of a grid node contributes some of its mass to each face (Equation 1).The mass contribution of each particle can then be multiplied by the particle's velocity to calculate the momentum contribution of each particle (Equation 2).The momentum contribution can then be summed over all particles to calculate the total momentum for the grid node face (Equation 3).The total mass of the grid node face is the mass contributions of all particles (Equation 4).Finally, the velocity of each grid node face can be calculated by dividing the momentum by the mass (Equation 5).

14where w ipα = N(x pα − x iα ) is the contribution of particle p to face α of grid node i.

15The mass of a grid node can change throughout the simulation, but the masses of particles are fixed.This means when interpolating from the grid nodes to the particles, we only update the particles' velocities.Once the intermediate grid velocities ṽ iα n+1 have been calculated, they are interpolated back to the particles.To calculate the contribution of grid node momentum to each particle, first the momentum of each grid node must be calculated.This is done by multiplying the mass of each node face by the intermediate velocity of each node face and summing over the number of faces (Equation 6).Then the momentum of each particle can be calculated by summing the contributed momentum of each grid node over the number of grid nodes (Equation 7).Finally, the velocity of each particle can be calculated by dividing the momentum by the particle mass (Equation 8).

The Affine PIC Method

16In the APIC method, alongside mass and velocity each particle also stores an affine matrix of velocity derivatives to enhance the preservation of rotational velocities (see Figure 3).Equations 1 and 4, used for transferring mass from the particles to the grid nodes, remain unchanged for APIC.The updated momentum transfer takes into account the velocity derivatives to preserve angular momentum (Equation 9 (Equation 13 in Jiang et al)).The grid momentum can calculated as with PIC using Equation 3.

17where m ipα is calculated using Equation 1.

18The momentum transfers from the grid nodes to the particles are the same as those used in the standard PIC method given by Equations 6 -8.At this stage the velocity derivatives of a particle, c pα , are updated by calculating the gradient of the weights relating that particle to the grid node faces, ∇w ipα , multiplied by the intermediate velocity, then summing over all grid nodes (Equation 10 (Equation 14 in Jiang et al)).

19(10)

The Polynomial PIC method

20PolyPIC replaces the affine matrix of APIC with generalized polynomials which allow for a wider range of local behaviour capture (see Figure 3).For PolyPIC the number of modes used is given by N r .It uses polynomials of the form:

21where z β is the

22Before defining the transfers, we must first define a map of the simulation configuration at time t n+1 to t n , denoted as ξ n+1 (x).As described by Fu et al, this map can take different forms for constant or affine material motion.Here, the affine map is given by Equation 12 (Equation 10 in Fu et al).

23The method of calculating C n p is given in detail in (Jiang et al., 2015).The momentum transfer from the particles to the grid is then calculated by taking the sum of all the scalar modes multiplied by the corresponding scalar coefficients, given by Equation 13(Equation 11 in Fu et al).The momentum contribution of each particle to the grid node faces can then be summed over all particles (Equation 3).The velocity of each grid node face can then be calculated by dividing the momentum by the mass (Equation 5).where s r is scalar mode r.The coefficients c n prα are calculated as a minimisation problem as described by Fu et al.To efficiently calculate the coefficients, the resultant linear system requires each dimension to be decoupled.The coefficients for modes 1 ≤ r ≤ 2 d are naturally mass-orthogonal and so solutions can be efficiently found.However, higher order coefficients 2 d < r ≤ N r require modification to be orthogonalized.This is achieved by substituting the quadratic terms, z β , in Equation 11 with g β (z β ) defined in Equation 14.In contrast to the equation presented in Fu et al, the variables in Equation 14are modified to orthogonalize the matrix, which produces more stable simulations.

24Again, the momentum transfers from the grid to the particles are the same as those used in the standard PIC method given by Equations 6, 7 and 8.At this stage, the velocity derivatives C p can be calculated using the method described by Jiang et al and the coefficients c prα can be calculated as described by Fu et al.

Liquid-Fabric Interaction

25The model presented by Fei et al relies on the use of mixture theory to simulate the interactions between fluid and cloth (Nielsen and Østerby, 2013).Therefore, the momentum transfers need to be altered in order to be applied to mixtures.Let m n s,p be the mass of a solid particle p at time n and m n f ,p be the mass of a fluid particle p at time n.The fluid transfers are then the same as those given in Equations 3, 5 and 13, except only particles tagged as fluids are considered .

26The solid transfers are very similar to the fluid transfers, except that absorbed fluid particles must be considered.To take account of absorption, we must also consider the mass of absorbed fluid particles when transferring the momentum of solids to the grid.The total mass of a solid particle is therefore given by summing the mass of the solid particle itself and the mass of the absorbed fluid particle, (m n s,ipα + m n f ,ipα ).These solid-fluid mixture momentum transfers given in Equations 18 -20.

RESULTS

27Four scenarios have been used to test the model that has been developed:

28• Figure 4 shows a simple dam break scenario to highlight the differences between APIC fluids and PolyPIC fluids.

29• Figure 5 shows a ball of fluid falling onto a small square of cloth draped over a sphere.

30• Figure 6 shows a ball of fluid falling onto a small square of yarn-based fabric draped over a sphere.

31• Figure 7 is similar to the small yarn scenario but shows a larger volume of liquid falling onto a medium sized square of yarn-based fabric.

32The latter three scenarios were used by Fei et al, enabling a comparison of the original model using APIC and the new model using PolyPIC.In the simulation results, particle colours are based on current particle velocity, where dark blue represents a low velocity and red a high velocity.Videos of each simulation can be found in the supplementary video.

33The simple dam break scenario (Figure 4) highlights the difference between PolyPIC and APIC outside of a coupled simulation context.This shows that using PolyPIC increases the conservation of angular momentum and so improves the resolution of vorticial detail of the fluid.As the final frame shows, PolyPIC particles have higher velocities than in APIC showing that numerical damping is reduced when using PolyPIC.A ball of fluid falling onto a small square of cloth fabric is shown in Figure 5.This example demonstrates the reduced numerical damping of PolyPIC causes less of the fluid to be absorbed by the cloth, as more splashes off as it is falling.The fluid that is absorbed exhibits more thin strand behaviour as it drips from the cloth in PolyPIC than APIC.A ball of fluid falling onto a small square of yarn fabric is shown in Figure 6.This scenario shows that the PolyPIC yarns exhibit less sagging than APIC, as they stretch less under their own weight.The reduced damping also makes the PolyPIC yarns spring back from being stretched by the fluid faster.A breakdown of performance information for each presented example is shown in Table 2. Particles make up the objects that are being simulated.In the simulation, all particles are flagged as being either fluid or solid particles.Fluid particles are the particles used to simulate the bulk fluid.Elements are the mesh elements that make up the fabric (triangles for cloth simulations, rod segments for yarn simulations) and are used for calculating the movement of absorbed fluids.The 'small' simulations use a piece of fabric that is 1 /4 the size of the 'medium' simulation ( 1 /2 of both the width and height).Simulations were run using an Intel i9-12900K CPU, and each example was repeated 3 times and the mean performance results are presented.The source code can be found at https://github.com/robden820/libwetcloth.For simulations involving PolyPIC, 8 fluid scalar modes and 8 solid scalar modes were used for all examples.

34As can be seen in Table 2, as the number of par- The small cloth splash scenario has the smallest number of simulated particles and elements and shows the smallest difference in seconds per step and peak memory usage between APIC and PolyPIC of all the examples.Some of the simulations require use of a smaller timestep value due to stability issues (see Section 5).

35Additionally, an energy plot is presented for the dam break scenario in Figure 8 and for the interactions scenarios in Figure 9 (due to variation in the simulation setup, each simulation stabilises around a different final mean energy).The plots show the mean energy per particle for the presented scenarios, calculated as the sum of the kinetic energy and gravitational potential energy.Figure 8 shows that for a simulation involving only fluid particles, the improvement in energy preservation gained by using PolyPIC in the place of APIC is minimal, however, as shown in Figure 4 there is still a difference in the simulations visual output achieved using PolyPIC.Figure 9 shows a similar trend for the interaction scenarios, and PolyPIC has a small impact in the long term energy preservation of the simulation.However, simulations involving PolyPIC require more time to reach a stable energy level.The increased oscillations of PolyPIC before reaching this stable energy level indicate that PolyPIC suffers less from numerical damping than APIC, leading to more dynamic simulations.

DISCUSSION

36As shown in the comparison scenarios, visually, PolyPIC provides a notable increase in simulation dynamics.Whilst theoretically PolyPIC has been shown to be lossless when transferring velocity between the particles and the grid (shown in the supplementary material of Fu et al), this can't be achieved in practice.For fluids, using polynomial modes involving multi-quadratic terms (i.e.N r > 2 d ) causes the simulation to become unstable, even when a very small time step is used.For solids in a non-coupled scenario, the maximum number of modes can be used without effecting the overall stability of the simulation.However, when simulating coupled interaction, stability issues become increasingly severe as higher order modes are introduced.

37As can be seen in Table 2, when comparing the dam break scenarios, an increase in the time required for each simulation step can be seen when using PolyPIC rather than APIC.In the interaction scenarios, the time per simulation generally decreases, but the average number of fluid particles in the simulation also decreases.The reduced numerical damping of PolyPIC causes the fluid to splash off the fabric rather than being absorbed, so the fluid particles leave the domain of the simulation faster, and the particles are deleted from the simulation.This reduces the number of fluid particles to be simulated in later timesteps, allowing each step to be simulated faster.

38The fabric-interaction simulations for APIC were both able to be simulated using a timestep of ∆t = 2e −4 s, but using this value for the PolyPIC scenarios caused the simulation to become unstable.Whilst the same timestep enabled stable simulation of the small yarn PolyPIC scenario, we found using a timestep of ∆t = 1e −4 s and ∆t = 5e −5 s allowed the small cloth and medium yarn PolyPIC simulation to remain stable for their duration, respectively.This means that while in general there was only a small change in the time required for each simulation step, the need for a smaller timestep for PolyPIC resulted in an overall increase in the time taken to run the simulation, as shown in Table 2.

39Possible future work would be to experiment with more stable simulation frameworks such as positionbased dynamics (Müller et al., 2007) which has been shown to reduce the need for small timesteps.Also, in the yarn examples, the individual yarns quickly become tangled after collision with the fluid.Using a more robust collision handling technique such as incremental potential contact (Li et al., 2020) could improve the stability of the simulations.

CONCLUSIONS

40The work presented by Fei et al is widely considered to be the state-of-the-art for liquid-fabric interaction simulations.This paper has replaced APIC with PolyPIC in their model and performed a comparison of the PolyPIC model with the APIC model in the context of liquid-fabric interactions.Using PolyPIC in place of APIC for liquid-fabric interaction improves the dynamism of simulations, increasing energy transfer between the fluid and cloth/yarn and increasing the resolution of vorticial details and small scale splashes.However, PolyPIC has a higher computation cost over APIC and the reduced numerical damping of PolyPIC also caused stability issues requiring the use of a smaller time step.This requirement for smaller timesteps highlights the need for a greater consideration of techniques to improve simulation stability and inter-yarn collision detection.Despite this limitation, this paper demonstrates the potential of PolyPIC as a method of improving liquidfabric interaction simulations based on PIC methods.

Figure 1 :

41Figure 1: Fluid splashing onto a square of yarn fabric using PolyPIC transfers.

Figure 3 :

42Figure 3: The data stored by particles and grid node faces in PIC methods.White background boxes are consistent between all PIC variants.Velocity derivatives (yellow background) are introduced for APIC and scalar coefficients (blue boxes) are introduced in PolyPIC.(Based on a diagram in(Fu et al., 2017).)

Figure 4 :

43Figure 4: A small dam break scenario using APIC (top) and PolyPIC (bottom) transfers.Particle colours indicate velocity (dark blue = low, red = high).PolyPIC shows improved resolution of vorticial details.

Figure 5 :

44Figure 5: Fluid splash onto a small piece of cloth using APIC (top) and PolyPIC (bottom) transfers.Particle colours indicate velocity (dark blue = low, red = high).The reduced damping means that more fluid splashes off the piece of cloth rather than being absorbed.The fluid that is absorbed exhibits more thin strand behaviour as it drips from the cloth in PolyPIC than APIC (see frame 4).

Figure 6 :

45Figure 6: Fluid splashing onto a small square of yarn fabric using APIC (top) and PolyPIC (bottom) transfers.Particle colours indicate velocity (dark blue = low, red = high).The PolyPIC yarns exhibit less sagging than APIC (see frame 1).The reduced damping makes the PolyPIC yarns spring back faster from being stretched (see frames 3-5).

Figure 7 :

46Figure 7: Fluid splashing onto a medium sized square of yarn fabric using APIC (top) and PolyPIC (bottom) transfers.Particle colours indicate velocity blue = low, red = high).PolyPIC causes more energy to be transferred from the falling fluid to the yarn and results in a more dynamic result.

Figure 8 :

47Figure 8: Mean particle energy for the dam break scenario, calculated as the sum of kinetic energy and gravitational potential energy.PolyPIC improves the energy preservation over APIC, but the effect per particle is minor.ticlesincreases, the impact of the additional complexity of the PolyPIC model increases.The dam break scenarios use the largest number of particles to clearly demonstrate the difference in fluid behaviours when using PolyPIC, but also to highlight the additional computational impact of PolyPIC over APIC.The small cloth splash scenario has the smallest number of simulated particles and elements and shows the smallest difference in seconds per step and peak memory usage between APIC and PolyPIC of all the examples.Some of the simulations require use of a smaller timestep value due to stability issues (see Section 5).Additionally, an energy plot is presented for the dam break scenario in Figure8and for the interactions scenarios in Figure9(due to variation in the simulation setup, each simulation stabilises around a different final mean energy).The plots show the mean energy per particle for the presented scenarios, calculated as the sum of the kinetic energy and gravitational potential energy.Figure8shows that for a simulation involving only fluid particles, the improvement in energy preservation gained by using PolyPIC in the place of APIC is minimal, however, as shown in Figure4there is still a difference in the simulations visual output achieved using PolyPIC.Figure9shows a similar trend for the interaction scenarios, and PolyPIC has a small impact in the long term energy preservation of the simulation.However, simulations involving PolyPIC require more time to reach a stable energy level.The increased oscillations of PolyPIC before reaching this stable energy level indicate that PolyPIC suffers less from numerical damping than APIC, leading to more dynamic simulations.

Figure 9 :

48Figure 9: Mean particle energy for the interaction scenarios, calculated as the sum of kinetic energy and gravitational potential energy.Change in energy preservation in PolyPIC and APIC is minimal, although the energy of PolyPIC oscillates for a longer period before reaching a constant value.Due to differences in the simulation setup (e.g.fabric at different world heights, rigid sphere in cloth scenario), each simulation stabilises around a different final mean energy.

참고문헌 13건

  1. A material point method for snow simulation ACM Transactions on Graphics · Association for Computing Machinery · 2013 10.1145/2461912.2461948
  2. FLIP: A method for adaptively zoned, particle-in-cell calculations of fluid flows in two dimensions Journal of Computational Physics · Elsevier BV · 1986 10.1016/0021-9991(86)90211-1
  3. A two-continua approach to Eulerian simulation of water spray ACM Transactions on Graphics · Association for Computing Machinery · 2013 10.1145/2461912.2461918
  4. Augmented MPM for phase-change and varied materials ACM Transactions on Graphics · Association for Computing Machinery · 2014 10.1145/2601097.2601176
  5. Position based dynamics Journal of Visual Communication and Image Representation · Elsevier BV · 2007 10.1016/j.jvcir.2007.01.005
  6. The affine particle-in-cell method ACM Transactions on Graphics · Association for Computing Machinery · 2015 10.1145/2766996
  7. Real-time Fluid Simulation Coupled with Cloth TPCG · 2007 10.2312/localchapterevents/tpcg/tpcg07/013-020
  8. Position‐based simulation of cloth wetting phenomena Computer Animation and Virtual Worlds · Wiley · 2017 10.1002/cav.1788
  9. A polynomial particle-in-cell method ACM Transactions on Graphics · Association for Computing Machinery · 2017 10.1145/3130800.3130878
  10. A particle method for history-dependent materials Computer Methods in Applied Mechanics and Engineering · Elsevier BV · 1994 10.1016/0045-7825(94)00033-6
  11. A multi-scale model for simulating liquid-fabric interactions ACM Transactions on Graphics · Association for Computing Machinery · 2018 10.1145/3197517.3201392
  12. Stains on imperfect textile Virtual Reality & Intelligent Hardware · Elsevier BV · 2021 10.1016/j.vrih.2021.01.001
  13. The particle-in-cell method for numerical solution of problems in fluid dynamics Proceedings of symposia in applied mathematics · American Mathematical Society · 1963 10.1090/psapm/015/9942