The 3D DSC in Fluid Simulation

Similar documents
2.7 Cloth Animation. Jacobs University Visualization and Computer Graphics Lab : Advanced Graphics - Chapter 2 123

Mathematical Foundation of the Optimization-based Fluid Animation Method

Computational Fluid Dynamics - Incompressible Flows

Overview of Traditional Surface Tracking Methods

MESHLESS SOLUTION OF INCOMPRESSIBLE FLOW OVER BACKWARD-FACING STEP

1.2 Numerical Solutions of Flow Problems

The Immersed Interface Method

Numerical methods for volume preserving image registration

AMS527: Numerical Analysis II

Realistic Animation of Fluids

cuibm A GPU Accelerated Immersed Boundary Method

CGT 581 G Fluids. Overview. Some terms. Some terms

PHYSICALLY BASED ANIMATION

Gradient Free Design of Microfluidic Structures on a GPU Cluster

Optimization-based Fluid Simulation on Unstructured Meshes

CS-184: Computer Graphics Lecture #21: Fluid Simulation II

Isogeometric Analysis of Fluid-Structure Interaction

CS 231. Fluid simulation

Adarsh Krishnamurthy (cs184-bb) Bela Stepanova (cs184-bs)

Unstructured Mesh Generation for Implicit Moving Geometries and Level Set Applications

Realistic Animation of Fluids

Realtime Water Simulation on GPU. Nuttapong Chentanez NVIDIA Research

A Novel Approach to High Speed Collision

Contents. I The Basic Framework for Stationary Problems 1

A brief description of the particle finite element method (PFEM2). Extensions to free surface

Literature Report. Daniël Pols. 23 May 2018

The Development of a Navier-Stokes Flow Solver with Preconditioning Method on Unstructured Grids

FLUID SIMULATION. Kristofer Schlachter

Numerical Simulation of Coupled Fluid-Solid Systems by Fictitious Boundary and Grid Deformation Methods

Recent developments in the solution of indefinite systems Location: De Zwarte Doos (TU/e campus)

Particle finite element method applied to mould filling

Introduction to C omputational F luid Dynamics. D. Murrin

Eulerian Techniques for Fluid-Structure Interactions - Part II: Applications

An adaptive discretization of compressible flow using a multitude of moving Cartesian grids

Development of an Integrated Computational Simulation Method for Fluid Driven Structure Movement and Acoustics

Subdivision-stabilised immersed b-spline finite elements for moving boundary flows

Chapter 6. Semi-Lagrangian Methods

A High Quality, Eulerian 3D Fluid Solver in C++ A Senior Project. presented to. the Faculty of the Computer Science Department of

SELECTIVE ALGEBRAIC MULTIGRID IN FOAM-EXTEND

Moving Interface Problems: Methods & Applications Tutorial Lecture II

Integral Equation Methods for Vortex Dominated Flows, a High-order Conservative Eulerian Approach

Parallel edge-based implementation of the finite element method for shallow water equations

Particle-based Fluid Simulation

Predicting Tumour Location by Modelling the Deformation of the Breast using Nonlinear Elasticity

Navier-Stokes & Flow Simulation

Investigating The Stability of The Balance-force Continuum Surface Force Model of Surface Tension In Interfacial Flow

CUDA. Fluid simulation Lattice Boltzmann Models Cellular Automata

Solving Partial Differential Equations on Overlapping Grids

Two-Phase flows on massively parallel multi-gpu clusters

Solution of 2D Euler Equations and Application to Airfoil Design

Numerical Methods for PDEs. SSC Workgroup Meetings Juan J. Alonso October 8, SSC Working Group Meetings, JJA 1

NIA CFD Seminar, October 4, 2011 Hyperbolic Seminar, NASA Langley, October 17, 2011

FEM techniques for interfacial flows

Topology optimization of heat conduction problems

Level Set Methods for Two-Phase Flows with FEM

An added mass partitioned algorithm for rigid bodies and incompressible flows

ME964 High Performance Computing for Engineering Applications

Introduction to Computational Fluid Dynamics Mech 122 D. Fabris, K. Lynch, D. Rich

Support for Multi physics in Chrono

Finite Volume Discretization on Irregular Voronoi Grids

3-D Wind Field Simulation over Complex Terrain

Particle-Based Fluid Simulation. CSE169: Computer Animation Steve Rotenberg UCSD, Spring 2016

Performance of Implicit Solver Strategies on GPUs

High Order Nédélec Elements with local complete sequence properties

Navier-Stokes & Flow Simulation

A NURBS-BASED APPROACH FOR SHAPE AND TOPOLOGY OPTIMIZATION OF FLOW DOMAINS

Application of Finite Volume Method for Structural Analysis

Navier-Stokes & Flow Simulation

Verification and Validation in CFD and Heat Transfer: ANSYS Practice and the New ASME Standard

Three Dimensional Numerical Simulation of Turbulent Flow Over Spillways

Geometric Modeling Assignment 3: Discrete Differential Quantities

Possibility of Implicit LES for Two-Dimensional Incompressible Lid-Driven Cavity Flow Based on COMSOL Multiphysics

Lecture 11: Randomized Least-squares Approximation in Practice. 11 Randomized Least-squares Approximation in Practice

Meshless Modeling, Animating, and Simulating Point-Based Geometry

Level set methods Formulation of Interface Propagation Boundary Value PDE Initial Value PDE Motion in an externally generated velocity field

Shape of Things to Come: Next-Gen Physics Deep Dive

A COUPLED FINITE VOLUME SOLVER FOR THE SOLUTION OF LAMINAR TURBULENT INCOMPRESSIBLE AND COMPRESSIBLE FLOWS

Cloth Simulation. COMP 768 Presentation Zhen Wei

Divergence-Free Smoothed Particle Hydrodynamics

A NEW MIXED PRECONDITIONING METHOD BASED ON THE CLUSTERED ELEMENT -BY -ELEMENT PRECONDITIONERS

Drop Impact Simulation with a Velocity-Dependent Contact Angle

Driven Cavity Example

Parallel High-Order Geometric Multigrid Methods on Adaptive Meshes for Highly Heterogeneous Nonlinear Stokes Flow Simulations of Earth s Mantle

Second International Workshop on Scientific Computing and Applications. Kananaskis, Canada, May 28 - June 1, 2000

Numerical Simulations of Fluid-Structure Interaction Problems using MpCCI

arxiv: v1 [math.na] 20 Sep 2016

Finite Element Methods

Smoke Simulation using Smoothed Particle Hydrodynamics (SPH) Shruti Jain MSc Computer Animation and Visual Eects Bournemouth University

SPH: Why and what for?

Free Surface Flow Simulations

Surface Tension Approximation in Semi-Lagrangian Level Set Based Fluid Simulations for Computer Graphics

Water. Notes. Free surface. Boundary conditions. This week: extend our 3D flow solver to full 3D water We need to add two things:

Fluid Structure Interaction Evaluation of two coupling techniques

Implicit schemes for wave models

Fluid Simulation Quality with Violated CFL Condition

Revision of the SolidWorks Variable Pressure Simulation Tutorial J.E. Akin, Rice University, Mechanical Engineering. Introduction

Why Use the GPU? How to Exploit? New Hardware Features. Sparse Matrix Solvers on the GPU: Conjugate Gradients and Multigrid. Semiconductor trends

Interaction of Fluid Simulation Based on PhysX Physics Engine. Huibai Wang, Jianfei Wan, Fengquan Zhang

High-Order Navier-Stokes Simulations using a Sparse Line-Based Discontinuous Galerkin Method

Continued Investigation of Small-Scale Air-Sea Coupled Dynamics Using CBLAST Data

Transcription:

The 3D DSC in Fluid Simulation Marek K. Misztal Informatics and Mathematical Modelling, Technical University of Denmark mkm@imm.dtu.dk DSC 2011 Workshop Kgs. Lyngby, 26th August 2011

Governing Equations The general equation governing fluid dynamics is the Navier-Stokes equation: ( ) u ρ + (u )u = p + T + f. t

Governing Equations The general equation governing fluid dynamics is the Navier-Stokes equation: ( ) u ρ + (u )u = p + T + f. t In many cases we are only interested in incompressible flow. Assumption that u = 0 leads to simpler equation: ( ) u ρ + (u )u = p + µ 2 u + f. t

Governing Equations The general equation governing fluid dynamics is the Navier-Stokes equation: ( ) u ρ + (u )u = p + T + f. t In many cases we are only interested in incompressible flow. Assumption that u = 0 leads to simpler equation: ( ) u ρ + (u )u = p + µ 2 u + f. t Dropping viscosity term simplifies the equation even further, leading to Euler equation: ( ) u ρ + (u )u = p + f. t

Eulerian Approach The free surface of the fluid is being tracked using level set method.

Eulerian Approach The free surface of the fluid is being tracked using level set method. N-S equation is usually solved using fractional step method.

Eulerian Approach This approach suffers from numerous drawbacks:

Eulerian Approach This approach suffers from numerous drawbacks: rapid volume loss due to the numerical diffusion,

Eulerian Approach This approach suffers from numerous drawbacks: rapid volume loss due to the numerical diffusion, difficulty in handling solid boundaries which are not aligned with the grid,

Eulerian Approach This approach suffers from numerous drawbacks: rapid volume loss due to the numerical diffusion, difficulty in handling solid boundaries which are not aligned with the grid, numerical errors introduce significant viscosity,

Eulerian Approach This approach suffers from numerous drawbacks: rapid volume loss due to the numerical diffusion, difficulty in handling solid boundaries which are not aligned with the grid, numerical errors introduce significant viscosity, lack of explicit free surface representantion (and hence, difficulty to include the surface energy),

Eulerian Approach This approach suffers from numerous drawbacks: rapid volume loss due to the numerical diffusion, difficulty in handling solid boundaries which are not aligned with the grid, numerical errors introduce significant viscosity, lack of explicit free surface representantion (and hence, difficulty to include the surface energy), lack of support of multiple phases.

Eulerian Approach This approach suffers from numerous drawbacks: rapid volume loss due to the numerical diffusion, difficulty in handling solid boundaries which are not aligned with the grid, numerical errors introduce significant viscosity, lack of explicit free surface representantion (and hence, difficulty to include the surface energy), lack of support of multiple phases. Most of these drawbacks have been addressed in recent years, at the expense of simplicity of the original method.

Lagrangian Approach

Our Method Our finite element-based fluid solver is built upon an original, Lagrangian method for deformable interface tracking, the deformable simplicial complex (DSC).

Our Method Our finite element-based fluid solver is built upon an original, Lagrangian method for deformable interface tracking, the deformable simplicial complex (DSC). Unlike in other fluid solvers using unstructured grid, the computational grid is not fixed or rebuilt at every time step, but it evolves over time, maintaining the fluid interface as a subcomplex (triangle mesh embedded in the grid).

Our Method Our finite element-based fluid solver is built upon an original, Lagrangian method for deformable interface tracking, the deformable simplicial complex (DSC). Unlike in other fluid solvers using unstructured grid, the computational grid is not fixed or rebuilt at every time step, but it evolves over time, maintaining the fluid interface as a subcomplex (triangle mesh embedded in the grid). We are going to show that our solver is intrinsically free of the shortcomings of the regular grid-based methods.

Setup

Method We treat the mesh triangles/tetrahedra as conforming, linear elements. Hence, the velocity field is defined as: u(x) = N V i=1 u i φ i (x), where N V is the number of vertices and φ i is the linear interpolant (hat function).

Method We treat the mesh triangles/tetrahedra as conforming, linear elements. Hence, the velocity field is defined as: u(x) = N V i=1 u i φ i (x), where N V is the number of vertices and φ i is the linear interpolant (hat function). Our solver resembles fractional step method in the sense that we separate advection from the other terms.

Method We treat the mesh triangles/tetrahedra as conforming, linear elements. Hence, the velocity field is defined as: u(x) = N V i=1 u i φ i (x), where N V is the number of vertices and φ i is the linear interpolant (hat function). Our solver resembles fractional step method in the sense that we separate advection from the other terms. Advection is performed in purely Lagrangian way: velocity values travel together with the vertices.

Incompressibility We aim at keeping the velocity field divergence-free in each element: u = N V i=1 φ i is constant over every element. u i φ i (x) = 0.

Incompressibility We aim at keeping the velocity field divergence-free in each element: u = N V i=1 φ i is constant over every element. u i φ i (x) = 0. By putting together incompressibility conditions for all tetrahedra we obtain a system of linear equations: Pu = 0, where P is a discrete divergence operator (matrix).

Incompressibility Since the velocity field ũ after the advection step might not be divergence-free, we introduce pressure field p, such that: u = ũ + M 1 P T p, where u is divergece-free and M is the lumped mass matrix.

Incompressibility Since the velocity field ũ after the advection step might not be divergence-free, we introduce pressure field p, such that: u = ũ + M 1 P T p, where u is divergece-free and M is the lumped mass matrix. Incompressibility condition Pu = 0 yields that: (PM 1 P T )p = Pũ.

Surface Tension In order to make our fluid simulation more plausible we include surface tension. Surface tension is derived from surface energy U defined as: U = γa, where γ is the surface energy density (material constant) and A is the free surface area.

Surface Tension In order to make our fluid simulation more plausible we include surface tension. Surface tension is derived from surface energy U defined as: U = γa, where γ is the surface energy density (material constant) and A is the free surface area. Surface tension forces alone yield a highly divergent velocity field and our experiments have shown that integrating them before enforcing incompressibility step can give very poor results.

Optimization-based Approach In order to correctly incorporate surface tension forces we fully couple them with incompressibility by solving the optimization problem: minimize 1 2 (u ũ)t M(u ũ) + U(x + u t), subject to Pu = 0, where U is the surface energy.

Optimization-based Approach In order to correctly incorporate surface tension forces we fully couple them with incompressibility by solving the optimization problem: minimize 1 2 (u ũ)t M(u ũ) + U(x + u t), subject to Pu = 0, where U is the surface energy. The optimization problem is consistent, as the 1st order KKT condition is the backward Euler step: u = ũ + tm 1 U(u) + M 1 P T p, where the pressure p plays the role of Lagrange multipliers.

Optimization-based Approach contd. By using the second order approximation of surface energy: U(x + u t) U(x) + t U u + t2 2 ut 2 Uu we can further simplify the optimization problem to the form: minimize 1 2 ut (M + t 2 2 U)u + ( ũ T M + t U)u, subject to Pu = 0,

Optimization-based Approach contd. By using the second order approximation of surface energy: U(x + u t) U(x) + t U u + t2 2 ut 2 Uu we can further simplify the optimization problem to the form: minimize 1 2 ut (M + t 2 2 U)u + ( ũ T M + t U)u, subject to Pu = 0, Now we can write the 1st order KKT condition as: (M + t 2 2 U)u + P T p = Mũ t( U) T.

KKT system Let us denote: A = M + t 2 2 U, b = Mũ t( U) T.

KKT system Let us denote: A = M + t 2 2 U, b = Mũ t( U) T. The KKT conditions for our quadratic optimization problem form a linear equation: [ A P T P 0 ][ u p ] [ b = 0 ].

KKT system Let us denote: A = M + t 2 2 U, b = Mũ t( U) T. The KKT conditions for our quadratic optimization problem form a linear equation: [ A P T P 0 ][ u p ] [ b = 0 Note that the KKT matrix is indefinite. ].

Locking Locking means inability of a given finite element space to offer good approximate solutions, due to the fact that volume constraint on each tetrahedron may leave us with a solution space of very low dimension.

Pressure Stabilization To prevent it, we add a pressure stabilization term S to the equation: [ ][ ] [ ] A P T u b =. (1) P S p 0 such that: { δ aij if i j S ij = δ k i a ik if i = j, (2) where δ is a positive stabilization parameter and a ij is the area of the face shared by tetrahedra i and j.

Pressure Stabilization To prevent it, we add a pressure stabilization term S to the equation: [ ][ ] [ ] A P T u b =. (1) P S p 0 such that: { δ aij if i j S ij = δ k i a ik if i = j, (2) where δ is a positive stabilization parameter and a ij is the area of the face shared by tetrahedra i and j. Such stabilization term smoothens the pressure field in exchange for slight violation of incompressibility constraint, while globally preserving volume.

Pressure Stabilization To prevent it, we add a pressure stabilization term S to the equation: [ ][ ] [ ] A P T u b =. (1) P S p 0 such that: { δ aij if i j S ij = δ k i a ik if i = j, (2) where δ is a positive stabilization parameter and a ij is the area of the face shared by tetrahedra i and j. Such stabilization term smoothens the pressure field in exchange for slight violation of incompressibility constraint, while globally preserving volume. In our simulations δ = t k 2, where k is the speed of sound in the medium.

Solid boundaries Solid boundaries put extra constraints on vertex velocity values. If the vertex v i is in contact with the solid, we force its normal coordinate to match the normal coordinate of the solid velocity at the point of collision.

Viscosity More rigorous derivation of our finite element scheme can be found in: K. Erleben, M. K. Misztal and J. A. Bærentzen. Mathematical Foundation of the Optimization-based Fluid Animation Method. SCA 2011.

Viscosity More rigorous derivation of our finite element scheme can be found in: K. Erleben, M. K. Misztal and J. A. Bærentzen. Mathematical Foundation of the Optimization-based Fluid Animation Method. SCA 2011. Applying Galerkin method to the Navier-Stokes equation allows us to introduce viscosity into our scheme.

Viscosity More rigorous derivation of our finite element scheme can be found in: K. Erleben, M. K. Misztal and J. A. Bærentzen. Mathematical Foundation of the Optimization-based Fluid Animation Method. SCA 2011. Applying Galerkin method to the Navier-Stokes equation allows us to introduce viscosity into our scheme. This can be done by adding a td term to the A matrix, where: D ij = µ( φi T φ j I + φ i φj T )dv. V fluid

Examples

Examples

Examples

Examples

Examples

Performance

Implementation In the previous version of our fluid solver we had been using CHOLMOD (a Cholesky solver) in order to solve the KKT system.

Implementation In the previous version of our fluid solver we had been using CHOLMOD (a Cholesky solver) in order to solve the KKT system. Unfortunatelly, the complexity of Cholesky decomposition for sparse matrices is at best O(n 3/2 ), where n is the size of the matrix. This way, solving the KKT system quickly becomes the bottleneck.

Implementation In the previous version of our fluid solver we had been using CHOLMOD (a Cholesky solver) in order to solve the KKT system. Unfortunatelly, the complexity of Cholesky decomposition for sparse matrices is at best O(n 3/2 ), where n is the size of the matrix. This way, solving the KKT system quickly becomes the bottleneck. In order to avoid that we have recently switched the method to an iterative one: generalized minimal residual (GMRES) method.

Implementation In the previous version of our fluid solver we had been using CHOLMOD (a Cholesky solver) in order to solve the KKT system. Unfortunatelly, the complexity of Cholesky decomposition for sparse matrices is at best O(n 3/2 ), where n is the size of the matrix. This way, solving the KKT system quickly becomes the bottleneck. In order to avoid that we have recently switched the method to an iterative one: generalized minimal residual (GMRES) method. We are using CUDA-based implementation of GMRES, available in CUSP library.

Implementation In the previous version of our fluid solver we had been using CHOLMOD (a Cholesky solver) in order to solve the KKT system. Unfortunatelly, the complexity of Cholesky decomposition for sparse matrices is at best O(n 3/2 ), where n is the size of the matrix. This way, solving the KKT system quickly becomes the bottleneck. In order to avoid that we have recently switched the method to an iterative one: generalized minimal residual (GMRES) method. We are using CUDA-based implementation of GMRES, available in CUSP library. In order to improve the conditioning of the system, we multiply A and b by: 2 P M.

Preconditioning Let us consider a linear system Kx = c

Preconditioning Let us consider a linear system Kx = c The convergence rate of many iterative solvers depends on the condition number κ of the matrix K: λ max (K) κ = λ min (K), where λ max and λ min are the maximum and minimum (by moduli) eigenvalues of K.

Preconditioning Let us consider a linear system Kx = c The convergence rate of many iterative solvers depends on the condition number κ of the matrix K: λ max (K) κ = λ min (K), where λ max and λ min are the maximum and minimum (by moduli) eigenvalues of K. We can improve the condition number of the system by applying a preconditioner T: TKx = Tc.

Preconditioning Let us consider a linear system Kx = c The convergence rate of many iterative solvers depends on the condition number κ of the matrix K: λ max (K) κ = λ min (K), where λ max and λ min are the maximum and minimum (by moduli) eigenvalues of K. We can improve the condition number of the system by applying a preconditioner T: TKx = Tc. For our KKT system we are using the diagonal approximation of Murphy s block preconditioner (based on the Schur complement method): [ ] T 1 diag(m) 0 = 0 diag(p T M 1 P + S)

Future work Finishing implementation of viscosity.

Future work Finishing implementation of viscosity. More aggressive mesh quality improvement.

Future work Finishing implementation of viscosity. More aggressive mesh quality improvement. Parameter studies, in particular experimental evaluation of the time-step restrictions.