Lagrangian methods and Smoothed Particle Hydrodynamics (SPH) Computation in Astrophysics Seminar (Spring 2006) L. J. Dursi

Similar documents
SPH: Why and what for?

Numerical Methods. (Additional Notes from Talks by PFH)

Realistic Animation of Fluids

Example 13 - Shock Tube

Lagrangian and Eulerian Representations of Fluid Flow: Kinematics and the Equations of Motion

Chapter 1 - Basic Equations

Particle-based Fluid Simulation

Technical Report TR

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

PiTP Summer School 2009

Fluid Simulation. [Thürey 10] [Pfaff 10] [Chentanez 11]

Thermal Coupling Method Between SPH Particles and Solid Elements in LS-DYNA

Three Dimensional Numerical Simulation of Turbulent Flow Over Spillways

Introduction to C omputational F luid Dynamics. D. Murrin

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

New formulations of the semi-lagrangian method for Vlasov-type equations

CS205b/CME306. Lecture 9

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

Acknowledgements. Prof. Dan Negrut Prof. Darryl Thelen Prof. Michael Zinn. SBEL Colleagues: Hammad Mazar, Toby Heyn, Manoj Kumar

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

PHYSICALLY BASED ANIMATION

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

Comparison between incompressible SPH solvers

Navier-Stokes & Flow Simulation

AREPO: a moving-mesh code for cosmological hydrodynamical simulations

C. A. D. Fraga Filho 1,2, D. F. Pezzin 1 & J. T. A. Chacaltana 1. Abstract

Simulation of liquid cube fracture with SPH

Realtime Water Simulation on GPU. Nuttapong Chentanez NVIDIA Research

Numerical Simulation of Coastal Wave Processes with the Use of Smoothed Particle Hydrodynamics (SPH) Method

Navier-Stokes & Flow Simulation

An explicit and conservative remapping strategy for semi-lagrangian advection

FLUENT Secondary flow in a teacup Author: John M. Cimbala, Penn State University Latest revision: 26 January 2016

Simulation of Fuel Sloshing Comparative Study

Level Set Methods and Fast Marching Methods

1.2 Numerical Solutions of Flow Problems

Characteristic Aspects of SPH Solutions

CS 231. Fluid simulation

ALE and AMR Mesh Refinement Techniques for Multi-material Hydrodynamics Problems

An explicit and conservative remapping strategy for semi-lagrangian advection

Best Practices Workshop: Overset Meshing

Vector Image Polygon (VIP) limiters in ALE Hydrodynamics

1. Mathematical Modelling

A Direct Simulation-Based Study of Radiance in a Dynamic Ocean

Simulation in Computer Graphics. Particles. Matthias Teschner. Computer Science Department University of Freiburg

Numerical Methods for (Time-Dependent) HJ PDEs

Support for Multi physics in Chrono

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

ATM 298, Spring 2013 Lecture 4 Numerical Methods: Horizontal DiscreDzaDons April 10, Paul A. Ullrich (HH 251)

ENERGY-224 Reservoir Simulation Project Report. Ala Alzayer

3D Simulation of Dam-break effect on a Solid Wall using Smoothed Particle Hydrodynamic

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

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

Development of a Maxwell Equation Solver for Application to Two Fluid Plasma Models. C. Aberle, A. Hakim, and U. Shumlak

Sliding and multi-fluid velocities in Staggered Mesh Eulerian and MMALE codes

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

CFD MODELING FOR PNEUMATIC CONVEYING


Chapter 6. Semi-Lagrangian Methods

NUMERICAL VISCOSITY. Convergent Science White Paper. COPYRIGHT 2017 CONVERGENT SCIENCE. All rights reserved.

Table of contents for: Waves and Mean Flows by Oliver Bühler Cambridge University Press 2009 Monographs on Mechanics. Contents.

A Hybrid Magnetic Field Solver Using a Combined Finite Element/Boundary Element Field Solver

Computational Astrophysics 5 Higher-order and AMR schemes

CUDA. Fluid simulation Lattice Boltzmann Models Cellular Automata

Fluent User Services Center

Spatio-temporal Feature Exploration in Combined Particle/Volume Reference Frames

A cell by cell anisotropic adaptive mesh Arbitrary Lagrangian Eulerian method for the numerical solution of the Euler equations. J. M.

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

Fluid-structure Interaction by the mixed SPH-FE Method with Application to Aircraft Ditching

Particle-based simulations in Astrophysics

arxiv: v1 [astro-ph] 11 Dec 2008 PIERNIK MHD CODE A MULTI FLUID, NON IDEAL EXTENSION OF THE RELAXING TVD SCHEME (I)

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

Tessellating the Universe: Cosmic Structure Formation on a Moving Mesh

Partial Differential Equations

Metafor FE Software. 2. Operator split. 4. Rezoning methods 5. Contact with friction

Semi-Lagrangian Advection. The Basic Idea. x 1.

Challenges and recent progress in developing numerical methods for multi-material ALE Hydrocodes

Calculate a solution using the pressure-based coupled solver.

Mid-Year Report. Discontinuous Galerkin Euler Equation Solver. Friday, December 14, Andrey Andreyev. Advisor: Dr.

LATTICE-BOLTZMANN METHOD FOR THE SIMULATION OF LAMINAR MIXERS

Particle Tracing Module

Streamlining Aircraft Icing Simulations. D. Snyder, M. Elmore

Tutorial: Modeling Liquid Reactions in CIJR Using the Eulerian PDF transport (DQMOM-IEM) Model

Adaptive Mesh Astrophysical Fluid Simulations on GPU. San Jose 10/2/2009 Peng Wang, NVIDIA

Tutorial Four Discretization Part 1

Smoothed Particle Hydrodynamics

Comparing Lagrangian Godunov and Pseudo-Viscosity Schemes for Multi-Dimensional Impact Simulations. Gabi Luttwak

Use 6DOF solver to calculate motion of the moving body. Create TIFF files for graphic visualization of the solution.

Simulation of Automotive Fuel Tank Sloshing using Radioss

J. Vira, M. Sofiev SILAM winter school, February 2013, FMI

Realistic Animation of Fluids

Essay 1: Dimensional Analysis of Models and Data Sets: Similarity Solutions

M.Sc. in Computational Science. Fundamentals of Atmospheric Modelling

1 Mathematical Concepts

Homogenization and numerical Upscaling. Unsaturated flow and two-phase flow

Modelling of Impact on a Fuel Tank Using Smoothed Particle Hydrodynamics

Overview of Traditional Surface Tracking Methods

Multi-Mesh CFD. Chris Roy Chip Jackson (1 st year PhD student) Aerospace and Ocean Engineering Department Virginia Tech

SPH: Towards the simulation of wave-body interactions in extreme seas

Thermal Coupling Method Between SPH Particles and Solid Elements in LS-DYNA

This tutorial illustrates how to set up and solve a problem involving solidification. This tutorial will demonstrate how to do the following:

Transcription:

Lagrangian methods and Smoothed Particle Hydrodynamics (SPH)

Eulerian Grid Methods The methods covered so far in this course use an Eulerian grid: Prescribed coordinates In `lab frame' Fluid elements flow through grid zones

Eulerian Grid Methods This is probably the standard approach to solving the equations of fluid motions in most disciplines. Many decades of research into solution techniques Extremely sophisticated, highorder accuracy methods Can accurately describe very complex phenomena.

Eulerian Grid Methods However, simplest possible dynamics fares surprisingly poorly Even high-order methods are quite diffusive when advection over a large number of grid cells is necessary

Eulerian Grid Methods This is fundamental to how Eulerian grid codes work. Can be ameliorated but not fixed. Once some of a quantity enters a grid cell its contribution is spread throughout domain through some averaging procedure. Higher order methods do this to a lesser degree than lower-order methods, but the effect remains. Occurs for any evolved quantity. ``Numerical diffusion''

Advection-Dominated Flows There are many systems in astrophysics which are dominated by large-scale advection of fluid Eulerian grid is not necessarily the most natural approach in these systems Cosmology: evolution is dominated by large scale falling of material onto local density enhancements

Advection-Dominated Flows There are many systems in astrophysics which are dominated by large-scale advection of fluid Eulerian grid is not necessarily the most natural approach in these systems Accretion disks: Flow is dominated by differential Keplarian rotation around central object

1D Lagrangian Formulation Lagrangian formulation given in lecture 4 No fluxes `through' fluid element interfaces, as no transport through interfaces * Typically implemented on a staggered grid: p,e i-1 p,e i No purely advective fluxes! v i-1 v i v i+1 * absent other physics like dissipative transport

1D Lagrangian Formulation Each lagrangian cell has a fixed mass; density is just mass over (evolved) volume element p,e i-1 p,e i Guaranteed conservation of mass; shared cell edges guarantee conservation of volume, energy v i-1 v i v i+1

1D Lagrangian Formulation Huge benefit: open boundaries mesh can expand as necessary And, of course, no numerical diffusion from purely moving fluid around

1D Lagrangian Formulation These advantages make 1d lagrangian grid methods a natural choice for applications such as stellar evolution Typically use `mass coordinates' even outside of numerical context

Multi-D Lagrangian Gridding Works extremely well in 1d. In multidimensions, more complexity possible in geometry Even differential rotation / shear can lead to disasterously tangled meshes. More complex motions almost hopeless

Multi-D Lagrangian Gridding Can deal with this problem by remeshing every so often Remeshing can be a very expensive step (choosing an optimal new mesh for a set of points is difficult) Loss of main benefit of Lagrangian method diffusive (as fluid `moves through' remeshing)

Grid is a way of assigning neighbors to structure local interactions. Gridless methods If can determine local neighbors without discretizing on a grid can avoid the issues with tangling/remapping Astrophysics has a long (>60 yr) history with one gridless method gravitational N-body calculations

N-body calculation It is clearly true that one can write the density field in a domain as integral over infinite number of point particles: N-body calculation approximates this by using a finite number of particles http://www.physics.drexel.edu/~steve/n-body.html

Smoothed Particle Hydrodynamics For hydrodynamics, interactions need to be local Quantities stored at N `free' particles If infinite number of particles, any hydrodynamic quantity A could be defined as Finite number of particles quantities must be smoothed over some finite smoothing length h

Properties of smoothing function W(r,h) In small h limit, goes to delta function (usually) symmetric about r=0 Compact support W is exactly zero outside of some finite radius around the particle Cubic spline is typical choice

SPH `Discretization' Error Even in this limit, smoothed quantity has error O(h 2 ) [Why?] Very difficult (likely impossible) to have robust, stable smoothing with higher order accuracy. With finite number of particles,

SPH `Discretization' Error Taylor expand this around particle `a's position, and define W ab = W(r a r b,h) Even for constant function (say, A = 1), not guaranteed exact; must divide by first term, eg do SPH interpolation of A / SPH interpolation of 1.

SPH `Discretization' Error Error comes from discretization finite number of particles No guarantee that there will be enough particles well enough distributed so that although corrections can be made This problem is much worse for derivatives; numerical derivatives of `noisy' data known hard problem.

Equation of Continuity Mass conservation is already guaranteed; each particle has its own mass, which doesn't change Density has particularly simple form in SPH summation interpolant Taking lagrangian time derivative results in

Lagrangian Formulation Can now express other equations in terms of Lagrangian, Hamiltonian dynamics Lagrangian for Hydrodynamics is from Euler-Lagrange equations, get eqn of motion

Momentum Equation Note symmetry; contribution to momentum of particle a from b equal and opposite to b from a Conserves momentum exactly This form of gradient of pressure has some discreteness inaccuracies, but the symmetry is much more important

Energy Equation Similarly, Hamiltonian can be written implying a specific energy equation again, note symmetry. Because of troubles with internal energy evolution in high-speed flows, some SPH practitioners evolve entropy rather than energy; applies to grid codes too.

Setting Initial Conditions in an SPH code Unlike grid code (ICs are set everywhere in domain), have to sample (typically randomly) the density profile and put particles there If under-resolving the density profile is a problem, some caution is necessary; fluctuations caused by particle placement can be a problem. May have to relax initial conditions. Cosmology: extreme care needed --- any initial fluctuations in density become large scale structure! Specialized techniques.

Time Evolution Many approaches possible, typically some variant on `leapfrog' predictor-corrector step taken (2 nd order in time, very efficient): At old timestep, calculate forces, rate of change of energy Half timestep: update velocities, energies; update positions with half-timestep velocities. Re-calculate forces, rate of change of energy with new values Full timestep: update with new forces, energies, velocities.

Time Evolution

Visualization/Analysis Grid code: output is a complete description of hydrodynamic states throughout domain. Easy to visualize, analyze many instantaneous quantities much harder to examine histories of fluid elements. SPH: Opposite problem; can see what happens to any one fluid parcel immediately, but need some analysis tools even just to make a picture of what the domain looks like

Visualization/Analysis Create a grid, use SPH interpolation to find quantities at each point on grid

Complications (Things I really should talk about but don't have time) Need artificial viscosity to handle shocks Real world necessities variable timesteps and smoothing lengths complicate or break some of SPHs nice qualities There are a variety of techniques for finding neighbors within some distance h ; one common technique, using tree searches, integrates very nicely with using the same tree for gravitational N-body solving, making SPH + treecode gravity a very natural match.

Handes open, free boundaries much better Much less diffusion for bulk motion Automatically resolves high density region No need to waste computation on empty space Couples naturally to N- body gravity Very robust SPH vs Grid Codes Poor at dealing with shocks Low-order spatial accuracy Derivatives harder, making some physics (MHD) harder More caution required with initial conditions Hard to follow interesting dynamics in low-density regions Too robust?

References: SPH resources Price (2005) astro-ph/0507472: Thesis chapter, very good review Codes GADGET-2: Robust, widely-used SPH code http://www.mpa-garching.mpg.de/gadget/ StarCrash: http://www.astro.northwestern.edu/starcrash/ SuperSPHplot: visualization tool http://www.astro.ex.ac.uk/people/dprice/supersphplot/