136 A PML-Based Nonreflective Boundary for Free Surface Fluid Animation ANDREAS S ¨ ODERSTR ¨ OM and MATTS KARLSSON Link ¨ oping University and KEN MUSETH DreamWorks Animation and Link ¨ oping University This article presents a novel nonreflective boundary condition for the free surface incompressible Euler and Navier-Stokes equations. Boundaries of this type are very useful when, for example, simulating water flow around a ship moving over a wide ocean. Normally waves generated by the ship will reflect off of the boundaries of the simulation domain and as these reflected waves return towards the ship they will cause undesired interference patterns. By employing a Perfectly Matched Layer (PML) approach we have derived a boundary condition that absorbs incoming waves and thus efficiently prevents these undesired wave reflections. To solve the resulting boundary equations we present a fast and stable algorithm based on the stable fluids approach. Through numerical experiments we then show that our boundaries are significantly more effective than simpler reflection preventing techniques. We also provide a thorough analysis of the parameters involved in our boundary formulation and show how they effect wave absorption efficiency. Categories and Subject Descriptors: G.1.7 [Numerical Analysis]: Ordinary Differential Equations; I.6.4 [Simulation and Modeling]: Model Validation and Analysis; I.6.5 [Simulation and Modeling]: Model Development; I.3.7 [Computer Graphics]: Three-Dimensional Graphics and Realism; J.2 [Physical Sciences and Engineering]: Physics General Terms: Algorithms, Design, Theory Additional Key Words and Phrases: Computational fluid dynamics, free surface, stable fluids, Euler equations, Navier-Stokes equations, nonreflecting boundary condition, perfectly matched layer ACM Reference Format: S¨ oderstr¨ om, A., Karlsson, M., and Museth, K. 2010. A PML-based nonreflective boundary for free surface fluid animation. ACM Trans. Graph. 29, 5, Article 136 (October 2010), 17 pages. DOI = 10.1145/1857907.1857912 http://doi.acm.org/10.1145/1857907.1857912 1. INTRODUCTION In recent years there has been an increase in movie visual effects based on Computational Fluid Dynamics (CFD). The most common CFD effects are computer generated fire and smoke but high-quality water animations have also appeared in several blockbuster movies. At the core of these effects are typically the incompressible Navier- Stokes equations. However, for some phenomena, like water, the effect of viscosity is sometimes ignored and the Euler equations are solved instead. Though many methods exists for solving the Navier- Stokes equations [Monaghan 1988; He and Luo 1997; Zhu and Brid- son 2005] among others, grid-based Eulerian solvers tend to be very popular when high quality results are desired. CFD calculations in general, and Eulerian solvers in particular are, however, very com- putationally expensive. Consequently it is desirable to limit the vol- ume in which the simulation takes place, that is, the simulation do- main. Using a small domain can, however, cause its own problems. One of these, undesired wave reflection, is the focus of this article. Authors’ addresses: A. S¨ oderstr¨ om (corresponding author), M. Karlsson, K. Museth, Link¨ oping University, SE-581 83 Link¨ oping, Sweden; email: andreas.soderstrom@bredband.net. Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies show this notice on the first page or initial screen of a display along with the full citation. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, to republish, to post on servers, to redistribute to lists, or to use any component of this work in other works requires prior specific permission and/or a fee. Permissions may be requested from Publications Dept., ACM, Inc., 2 Penn Plaza, Suite 701, New York, NY 10121-0701 USA, fax +1 (212) 869-0481, or permissions@acm.org. c 2010 ACM 0730-0301/2010/10-ART136 $10.00 DOI 10.1145/1857907.1857912 http://doi.acm.org/10.1145/1857907.1857912 Consider as an example a ship moving over a wide ocean; the ship will generate waves as it pushes through the water and these waves will travel outwards away from the ship. Close to the vessel we want a realistic fluid simulation that accurately captures the physics of this scenario: the waves breaking around the bow, for example. This requires a fairly accurate and thus typically slow simulation method. In order to complete the simulation within a reasonable timeframe we need to limit our simulation domain to the close surroundings of the ship. However, the waves generated by the ship will eventually reach and reflect off of the simulation domain boundaries. These reflected waves can easily return to the region of interest close to the ship causing wave patterns (i.e., interference) that should not exist for a lone vessel on an open ocean. An example of such a scenario is depicted in Figure 1. Note the distinctly different behavior of the fluid along the boundaries of the “walled in” reference simulation (left) and the “true” open ocean simulation (right). In physics this type of problem is often encountered for com- pressible fluid simulations, for example, when simulating airflow ACM Transactions on Graphics, Vol. 29, No. 5, Article 136, Publication date: October 2010.