I am currently a software engineer at Google. I received my Ph.D. in Computer Science from Stanford University in 2011 under the guidance of Dr. Ron Fedkiw. My research interests include physics based simulation with particular interest in computational fluid dynamics. I completed my Masters from the College of Computing at Georgia Tech in 2006. Earlier I received my B.Tech degree in Computer Science and Engineering from Indian Institute of Technology (IIT), Delhi in 2004.



Practical Methods for Simulation of Compressible Flow and Structure Interactions

Kwatra, N. (Stanford University Department of Computer Science Thesis 2011.). PDF

This thesis presents a semi-implicit method for simulating inviscid compressible flow and its extensions for strong implicit coupling of compressible flow with Lagrangian solids, and artificial transition of fluid from compressible flow to incompressible flow regime for graphics applications. We present a novel semi-implicit method for alleviating the stringent CFL condition imposed by the sound speed in simulating inviscid compressible flow with shocks, contacts and rarefactions. The method splits the compressible flow flux into two parts -- an advection part and an acoustic part. The advection part is solved using an explicit scheme, while the acoustic part is solved using an implicit method allowing us to avoid the sound speed imposed CFL restriction. Our method leads to a standard Poisson equation similar to what one would solve for incompressible flow, but has an identity term more similar to a diffusion equation. In the limit as the sound speed goes to infinity, one obtains the Poisson equation for incompressible flow.

Practical Animation of Compressible Flow for Shock Waves and Related Phenomena

Kwatra, N., Gretarsson, J. and Fedkiw, R., (ACM SIGGRAPH/Eurographics Symp. on Comp. Anim., pp. 207-215, 2010.). Project Page Full Video PDF

We propose a practical approach to integrating shock wave dynamics into traditional smoke simulations. Previous methods either simplify away the compressible component of the flow and are unable to capture shock fronts or use a prohibitively expensive explicit method that limits the time step of the simulation long after the relevant shock waves and rarefactions have left the domain. Instead, we employ a semi-implicit formulation of Euler's equations, which allows us to take time steps on the order of the fluid velocity (ignoring the more stringent acoustic wave-speed restrictions) and avoids the expensive characteristic decomposition typically required of compressible flow solvers. We also propose an extension to Euler's equations to model combustion of fuel in explosions. The flow is two-way coupled with rigid and deformable solid bodies, treating the solid-fluid interface effects implicitly in a projection step by enforcing a velocity boundary condition on the fluid and integrating pressure forces along the solid surface. As we handle the acoustic fluid effects implicitly, we can artificially drive the sound speed c of the fluid to infinity without going unstable or driving the time step to zero. This permits the fluid to transition from compressible flow to the far more tractable incompressible flow regime once the interesting compressible flow phenomena (such as shocks) have left the domain of interest, and allows the use of state-of-the-art smoke simulation techniques.

Numerically Stable Fluid-Structure Interactions Between Compressible Flow and Solid Structures

Gretarsson, J., Kwatra, N. and Fedkiw, R., (J. Comput. Phys. Accepted).

We propose a novel method to implicitly two-way couple Eulerian compressible flow to volumetric Lagrangian solids. The method works for both deformable and rigid solids and for arbitrary equations of state. The method exploits the formulation of [11] which solves compressible fluid in a semi-implicit manner, solving for the advection part explicitly and then correcting the intermediate state to time tn+1 using an implicit pressure, obtained by solving a modified Poisson system. Similar to previous fluid-structure interaction methods, we apply pressure forces to the solid and enforce a velocity boundary condition on the fluid in order to satisfy a no-slip constraint. Unlike previous methods, however, we apply these coupled interactions implicitly by adding the constraint to the pressure system and combining it with any implicit solid forces in order to obtain a strongly coupled, symmetric indefinite system (similar to [17], which only handles incompressible flow). We also show that, under a few reasonable assumptions, this system can be made symmetric positive-definite by following the methodology of [16]. Because our method handles the fluid-structure interactions implicitly, we avoid introducing any new time step restrictions and obtain stable results even for high density-to-mass ratios, where explicit methods struggle or fail. We exactly conserve momentum and kinetic energy (thermal fluid-structure interactions are not considered) at the fluid-structure interface, and hence naturally handle highly non-linear phenomenon such as shocks, contacts and rarefactions.

Fluid Simulation with Articulated Bodies

Kwatra, N., Wojtan, C., Carlson, M., Essa, I., Mucha, P.J., Turk, G. (IEEE TVCG, 10 Jun. 2009).

We present an algorithm for creating realistic animations of characters that are swimming through fluids. Our approach combines dynamic simulation with data-driven kinematic motions (motion capture data) to produce realistic animation in a fluid. The interaction of the articulated body with the fluid is performed by incorporating joint constraints with rigid animation and by extending a solid/fluid coupling method to handle articulated chains. Our solver takes as input the current state of the simulation and calculates the angular and linear accelerations of the connected bodies needed to match a particular motion sequence for the articulated body. These accelerations are used to estimate the forces and torques that are then applied to each joint. Based on this approach, we demonstrate simulated swimming results for a variety of different strokes, including crawl, backstroke, breaststroke and butterfly. The ability to have articulated bodies interact with fluids also allows us to generate simulations of simple water creatures that are driven by simple controllers.

A method for avoiding the acoustic time step restriction in compressible flow

Kwatra, N., Su, J., Gretarsson, J. and Fedkiw, R., (J. Comput. Phys. 228, 4146-4161, 2009.).

We propose a novel method for alleviating the stringent CFL condition imposed by the sound speed in simulating inviscid compressible flow with shocks, contacts and rarefactions. Our method is based on the pressure evolution equation, so it works for arbitrary equations of state, chemical species etc, and is derived in a straight-forward manner. Similar methods have been proposed in the literature, but the equations they are based on and the details of the methods differ significantly. Notably our method leads to a standard Poisson equation similar to what one would solve for incompressible flow, but has an identity term more similar to a diffusion equation. In the limit as the sound speed goes to infinity, one obtains the Poisson equation for incompressible flow. This makes the method suitable for two-way coupling between compressible and incompressible flows and fully implicit solid-fluid coupling, although both of these applications are left to future work. We present a number of examples to illustrate the quality and behavior of the method in both one and two spatial dimensions, and show that for a low Mach number test case we can use a CFL number of 300 (whereas previous work was only able to use a CFL number of 3 on the same example).

Two way coupled SPH and particle level set fluid simulation

Losasso, F., Talton, J., Kwatra, N. and Fedkiw, R., "IEEE TVCG, Vol. 14, No. 4, 2008".

Grid-based methods have difficulty resolving features on or below the scale of the underlying grid. Although adaptive methods (e.g. RLE, octrees) can alleviate this to some degree, separate techniques are still required for simulating small-scale phenomena such as spray and foam, especially since these more diffuse materials typically behave quite differently than their denser counterparts. In this paper, we propose a two-way coupled simulation framework that uses the particle level set method to efficiently model dense liquid volumes and a smoothed particle hydrodynamics (SPH) method to simulate diffuse regions such as sprays. Our novel SPH method allows us to simulate both dense and diffuse water volumes, fully incorporates the particles that are automatically generated by the particle level set method in under-resolved regions, and allows for two way mixing between dense SPH volumes and grid-based liquid representations.

Texturing Fluids

Kwatra, V., Adalsteinsson, D., Kim, T., Kwatra, N., Carlson, M. and Lin, M., "IEEE TVCG 2007".

We present a novel technique for synthesizing textures over dynamically changing fluid surfaces. We use both image textures as well as bump maps as example inputs. Image textures can enhance rendering of the fluid by imparting novel realistic appearance to it, whereas bump maps enable the generation of complex micro-structures on the surface of the fluid that may be very difficult to synthesize using simulation. To generate temporally coherent textures over a fluid sequence, we transport texture information, i.e. color and local orientation, between fluid free surfaces from one time step to the next. This is accomplished by extending the texture information from the first fluid surface to the 3D fluid domain, advecting this information within the fluid domain along the fluid velocity field for one time step, and interpolating it back onto the second surface -- this operation, in part, uses a novel vector advection technique for transporting orientation vectors. We then refine the transported texture by performing texture synthesis over the second surface using our `surface texture optimization algorithm, which keeps the synthesized texture visually similar to the input texture and temporally coherent with the transported one. We demonstrate our novel algorithm for texture synthesis on dynamically evolving fluid surfaces in several challenging scenarios.

textured volcano

Texture Optimization for Example-based Synthesis

Kwatra, V., Essa, I., Bobick, A. and Kwatra, N., "Proc. ACM Transactions on Graphics, SIGGRAPH 2005".

We present a novel technique for texture synthesis using optimization. We define a Markov Random Field (MRF)-based similarity metric for measuring the quality of synthesized texture with respect to a given input sample. This allows us to formulate the synthesis problem as minimization of an energy function, which is optimized using an Expectation Maximization (EM)-like algorithm. In contrast to most example-based techniques that do region-growing, ours is a joint optimization approach that progressively refines the entire texture. Additionally, our approach is ideally suited to allow for controllable synthesis of textures. Specifically, we demonstrate controllability by animating image textures using flow fields. We allow for general two-dimensional flow fields that may dynamically change over time. Applications of this technique include dynamic texturing of fluid animations and texture-based flow visualization.

A Framework for Activity Recognition and Detection of Unusual Activities

Mahajan, D., Kwatra, N., Jain S., "Proc. Indian Conference on Computer Vision, Graphics and Image Processing, ICVGIP 2004".

In this paper we present a simple framework for activity recognition based on a model of multi-layered finite state machines, built on top of a low level image processing module for spatio-temporal detections and limited object identification. The finite state machine network learns, in an unsupervised mode, usual patterns of activities in a scene over long periods of time. Then, in the recognition phase, usual activities are accepted as normal and deviant activity patterns are flagged as abnormal. Results, on real image sequences, demonstrate the robustness of the framework.

lastname AT graphics.stanford.edu

Computer Science Department
353 Serra Mall
Gates Computer Science Bldg., Office 210
Stanford University
Stanford, CA 94305-9020