Elsevier

Applied Mathematics and Computation

Volume 343, 15 February 2019, Pages 195-213
Applied Mathematics and Computation

A stable tensor-based method for controlled fluid simulations

https://doi.org/10.1016/j.amc.2018.09.051Get rights and content

Abstract

The association between fluids and tensors can be observed in some practical situations, such as diffusion tensor imaging and permeable flow. For simulation purposes, tensors may be used to constrain the fluid flow along specific directions. This requires a customized mathematical model for describing fluid motion influenced by tensor. In this work, we propose a formulation for fluid dynamics to locally change momentum, deflecting the fluid along intended paths. Building upon classical computer graphics approaches for fluid simulation, the numerical method is altered to accommodate the new formulation. Gaining control over fluid diffusion can also aid on visualization of tensor fields, where the detection and highlighting of paths of interest is often desired. Experiments show that the fluid adequately follows meaningful paths induced by the underlying tensor field, resulting in a method that is numerically stable and suitable for visualization and animation purposes.

Introduction

Methods for controlling fluid simulations have been an active research topic since [1], which employed user-defined keyframe images to guide the simulation. Many of the works related to this subject [2], [3], [4], [5], [6], [7] are target-driven. This means that the fluid follows arbitrary paths in order to reach and form a pre-specified target shape. Fattal and Lischinski [8] followed this pattern, but, differently from others, used external forces to direct the fluid. A similar approach was presented in [9], using a distance function as the external force.

The works mentioned above are mainly concerned with the final state of the fluid, letting the fluid flow freely during the intermediate steps. Here, we are interested in controlling fluid flow throughout the entire simulation. Most methods related to this problem use external forces to restrict fluid flow to specific paths [10], [11], [12]. There are also methods based on deformation of the underlying grid [13], [14], adapting the velocity fields according to the deformed grid. Interpolation of flow fields were also attempted in [15] in order to generate incompressible fluid animations.

Despite the seeming artificiality of these control mechanisms, the idea of a constrained or directed fluid flow can be observed in certain real scenarios, which makes these methods applicable outside an animation context. For example, if we look into porous media flow, fluid motion is restricted by the medium. The amount of fluid that can flow through the pores can be measured by a physical quantity called permeability, which is defined as a tensor. Interestingly, in diffusion tensor imaging, tensor fields obtained from DT-MRI, a magnetic resonance imaging technique, describe the fiber patterns of water inside organic tissue. These diffusion tensors represent the probability of water flowing in specific directions. So, given this relationship between anisotropic flow and tensors, a natural question arises: would it be viable to use tensors to control and direct a fluid along paths of interest? How can we provide a straightforward way of simulating anisotropic transport in an easy-to-use and stable manner?

This work intends to demonstrate that tensors can be successfully used to control fluids, whether it be for simulation or animation applications. In our approach, fluid flow is controlled by tensor fields, which are interpreted as an inherent part of the medium. The fluid in our simulations is not rigidly bound to a path, as in typical force-based methods, nor is deformed by precomputed velocity fields. We leverage on the probabilistic nature of tensors to smoothly deviate fluid towards paths of interest. Similar rationale have been used before in visualization contexts, where fluids are influenced by tensors to follow specific paths, whether by altering viscosity and pressure [16] or by molding advection and introducing tensor-based external forces [17].

Our focus is on a special category of tensors defined by Westin et al. [18], namely the orientation tensors. These are symmetric positive semidefinite rank-2 tensors usually related to covariance estimations. Mathematically, a local orientation tensor can be defined as follows:B=ni=1λieieiT.In this work, we use a scaled version of the tensor B, denoted as T=βB, where β is a boosting factor.

To achieve our purposes, we adapted a common fluid simulation method, first proposed by Stam [19], by customizing the mathematical model behind it so that the tensor information is used to locally alter fluid momentum. A new discretization for the basic simulation steps of Stam’s approach is also proposed in order to reflect the adapted equations. The main contributions of this work are summarized as follows:

  • 1.

    a system of partial differential equations whose solution lead to a tensor-based customized description of fluid flow,

  • 2.

    a stable numerical method for the aforementioned system of equations,

  • 3.

    a method that allows for constructing tensor fields aimed at controlling fluids,

  • 4.

    a method potentially applicable to the visualization of diffusion tensor fields.

Stam’s method is divided in 3 steps: advection, diffusion and projection. We used tensors to introduce anisotropy information in each one of them. For the diffusion part, we employed some discretizations proposed by Günter et al. [20], which used them to model heat diffusion in magnetised plasmas. Anisotropic diffusion is a challenging problem to which many physics researchers have proposed various solutions. Mimetic Finite Difference (MFD) methods [21] are commonly employed in this context. The number of available MFD methods is quite large, so a good reference for the interested reader is the review article by Lipnikov et al. [22].

Section snippets

Proposed method

As in Stam’s approach, we used an Eulerian representation of the fluid, aligning the grid cells with the field. Each tensor is located at the center of its corresponding cell. We work on the idea of the tensor acting as something that deflects velocities passing through its cell, locally reducing or amplifying momentum in the process. Depending on the degree of alignment between tensor and velocities, the tensor could be physically interpreted as a pump (alignment to eigenvectors with high

Results

The experiments here described were conceived as a proof of concept of our work. First we compare our proposal to Stam’s original method, and then we show how we can design tensor fields with the purpose of controlling simulations. Apart from our smoke renderings, which were produced via the Mitsuba [32] rendering software, all other figures use colors to indicate values of interest, such as fluid speed or tensor anisotropy. Colors range from blue (lowest value) to red (highest value), with

Conclusions

This work investigated the relationship between symmetric positive-definite tensors and fluids, and how to couple these two elements to produce controlled fluid simulations. We presented a mathematical model for simulating fluid flow based on tensor fields, by proposing a set of partial differential equations that adapt the classic Navier–Stokes equations. This resulted in the development of a customized version of the Stable Fluids [19] method, where tensors dictate fluid behavior in every

References (34)

  • D. Bonilla et al.

    Fluid warping

    Proceedings of the IV Iberoamerican Symposium in Computer Graphics

    (2009)
  • D. Bonilla et al.

    Control methods for fluid-based image warping

    Proceedings of WTD-Workshop of Theses and Dissertations-SIBGRAPI

    (2011)
  • R. Fattal et al.

    Target-driven smoke animation, ACM Trans. Graph.

    (2004)
  • M.C. Renhe et al.

    Enhanced target driven smoke morphing

    Proceedings of the 25th SIBGRAPI Conference on Graphics, Patterns and Images (SIBGRAPI)

    (2012)
  • Y. Kim et al.

    Path-based control of smoke simulations

    Proceedings of the ACM SIGGRAPH/Eurographics symposium on Computer Animation

    (2006)
  • Z. Yuan et al.

    Pattern-guided smoke animation with lagrangian coherent structure

    (2011)
  • S. Sato et al.

    Deformation of 2d flow fields using stream functions

    SIGGRAPH Asia 2014 Technical Briefs

    (2014)
  • Cited by (0)

    View full text