IGERT: SPH and Free Surface Flows Robert A. Dalrymple Civil Engineering.

Slides:



Advertisements
Similar presentations
Lakshmi Sankar Module 3.3 Panel Methods Lakshmi Sankar
Advertisements

Christopher Batty and Robert Bridson University of British Columbia
Compatible Spatial Discretizations for Partial Differential Equations May 14, 2004 Compatible Reconstruction of Vectors Blair Perot Dept. of Mechanical.
Christopher McCabe, Derek Causon and Clive Mingham Centre for Mathematical Modelling & Flow Analysis Manchester Metropolitan University MANCHESTER M1 5GD.
Lecture 15: Capillary motion
Navier-Stokes.
Interpolation Methods
Turbulent Models.  DNS – Direct Numerical Simulation ◦ Solve the equations exactly ◦ Possible with today’s supercomputers ◦ Upside – very accurate if.
Boundary Layer Flow Describes the transport phenomena near the surface for the case of fluid flowing past a solid object.
2L 2aL s h T Introduction Zach Frye, University of Wisconsin-Eau Claire Faculty Advisors: Mohamed Elgindi, and John Drost, Department of Mathematics Funded.
Session: Computational Wave Propagation: Basic Theory Igel H., Fichtner A., Käser M., Virieux J., Seriani G., Capdeville Y., Moczo P.  The finite-difference.
Data mining and statistical learning - lecture 6
ES 240: Scientific and Engineering Computation. InterpolationPolynomial  Definition –a function f(x) that can be written as a finite series of power functions.
Notes Assignment questions… cs533d-winter-2005.
1cs533d-term Notes  Assignment 2 is up. 2cs533d-term Modern FEM  Galerkin framework (the most common)  Find vector space of functions that.
1cs542g-term Notes  Added required reading to web (numerical disasters)
12/21/2001Numerical methods in continuum mechanics1 Continuum Mechanics On the scale of the object to be studied the density and other fluid properties.
Particle-based fluid simulation for interactive applications
University of North Carolina - Chapel Hill Fluid & Rigid Body Interaction Comp Physical Modeling Craig Bennetts April 25, 2006 Comp Physical.
1 MECH 221 FLUID MECHANICS (Fall 06/07) Tutorial 6 FLUID KINETMATICS.
Modeling Fluid Phenomena -Vinay Bondhugula (25 th & 27 th April 2006)
Lectures 11-12: Gravity waves Linear equations Plane waves on deep water Waves at an interface Waves on shallower water.
Numerical Hydraulics Wolfgang Kinzelbach with Marc Wolf and Cornel Beffa Lecture 1: The equations.
Juan Carlos Ortiz Royero Ph.D.
FUNDAMENTAL EQUATIONS, CONCEPTS AND IMPLEMENTATION
Conservation Laws for Continua
CpE- 310B Engineering Computation and Simulation Dr. Manal Al-Bzoor
Finite Differences Finite Difference Approximations  Simple geophysical partial differential equations  Finite differences - definitions  Finite-difference.
Section 2: Finite Element Analysis Theory
A Hybrid Particle-Mesh Method for Viscous, Incompressible, Multiphase Flows Jie LIU, Seiichi KOSHIZUKA Yoshiaki OKA The University of Tokyo,
Basic dynamics  The equations of motion and continuity Scaling Hydrostatic relation Boussinesq approximation  Geostrophic balance in ocean’s interior.
Chapter 9: Differential Analysis of Fluid Flow SCHOOL OF BIOPROCESS ENGINEERING, UNIVERSITI MALAYSIA PERLIS.
Introduction to Fluid Mechanics
PTT 204/3 APPLIED FLUID MECHANICS SEM 2 (2012/2013)
Effects of Compressibility, Turbulent Viscosity and Mass-Transfer-Rate on Accretion Discs in Close Binaries: Timescales of Outburst Events G. Lanzafame.
V. Space Curves Types of curves Explicit Implicit Parametric.
Smoothed Particle Hydrodynamics (SPH) Fluid dynamics The fluid is represented by a particle system Some particle properties are determined by taking an.
Extrapolation Models for Convergence Acceleration and Function ’ s Extension David Levin Tel-Aviv University MAIA Erice 2013.
A particle-gridless hybrid methods for incompressible flows
Natural Elements Method for Shallow Water Equations
Modelling Tsunami Waves using Smoothed Particle Hydrodynamics (SPH) R.A. DALRYMPLE and B.D. ROGERS Department of Civil Engineering, Johns Hopkins University.
Governing equations: Navier-Stokes equations, Two-dimensional shallow-water equations, Saint-Venant equations, compressible water hammer flow equations.
Curve-Fitting Regression
Software for the Games Industry 9 November 2004 Fluid Gaming: Particle Methods for Fluid Mechanics and Visualisation Graham Wynn James Gray Richard West.
CEE 262A H YDRODYNAMICS Lecture 15 Unsteady solutions to the Navier-Stokes equation.
A Numerical Model for Multiphase Flow, I: The Interface Tracking Algorithm Frank Bierbrauer.
Chapter 03: Macroscopic interface dynamics Xiangyu Hu Technical University of Munich Part A: physical and mathematical modeling of interface.
Simulating complex surface flow by Smoothed Particle Hydrodynamics & Moving Particle Semi-implicit methods Benlong Wang Kai Gong Hua Liu
Vv Abstract In order to study the flow of highly deformable yet heterogeneous material, we investigate the application of the Smoothed Particle Hydrodynamics.
CIS/ME 794Y A Case Study in Computational Science & Engineering 2-D Conservation of Mass uu dx dy vv (x,y)
HEAT TRANSFER FINITE ELEMENT FORMULATION
Numerical study of flow instability between two cylinders in 2D case V. V. Denisenko Institute for Aided Design RAS.
CHAP 3 WEIGHTED RESIDUAL AND ENERGY METHOD FOR 1D PROBLEMS
Discretization Methods Chapter 2. Training Manual May 15, 2001 Inventory # Discretization Methods Topics Equations and The Goal Brief overview.
Basic dynamics ●The equations of motion and continuity Scaling Hydrostatic relation Boussinesq approximation ●Geostrophic balance in ocean’s interior.
Smoothed Particle Hydrodynamics Matthew Zhu CSCI 5551 — Fall 2015.
Lecture Objectives: Define 1) Reynolds stresses and
CAD and Finite Element Analysis Most ME CAD applications require a FEA in one or more areas: –Stress Analysis –Thermal Analysis –Structural Dynamics –Computational.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 6 - Chapters 22 and 23.
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics1 Water Computational Fluid Dynamics Volumes Lagrangian vs. Eulerian modelling Navier-Stokes equations.
X1X1 X2X2  Basic Kinematics Real Applications Simple Shear Trivial geometry Proscribed homogenous deformations Linear constitutive.
Model Anything. Quantity Conserved c  advect  diffuse S ConservationConstitutiveGoverning Mass, M  q -- M Momentum fluid, Mv -- F Momentum fluid.
1 CHAP 3 WEIGHTED RESIDUAL AND ENERGY METHOD FOR 1D PROBLEMS FINITE ELEMENT ANALYSIS AND DESIGN Nam-Ho Kim.
Chapter 4 Fluid Mechanics Frank White
Ship Hydrodynamics - Resistance
Chapter 9: Differential Analysis of Fluid Flow
Guido Ala, Elisa Francomano, Antonino Spagnuolo
Objective Review Reynolds Navier Stokes Equations (RANS)
Lecture 1: Introduction
Generalized Finite Element Methods
Presentation transcript:

IGERT: SPH and Free Surface Flows Robert A. Dalrymple Civil Engineering

Wave Theories Flat Bottom Theories Small Amplitude (Airy Theory, 1845) Shallow Water (Boussinesq, 1871, KdV, 1895) Intermediate and Deep Depths (Stokes, 1856, Stokes V)

Wave Modeling Numerical modeling began in the 1960’s Numerically assisted analytical methods Finite difference modeling (marker and cell)Numerical modeling began in the 1960’s Numerically assisted analytical methods Finite difference modeling (marker and cell)

Stream Function on the Web

Finite Difference and Finite Elements in the 70’s 2-D to 3-D Multiple numbers of waves Shoaling, refraction, diffraction

Parabolic Modeling (REF/DIF) Scripps Canyon--NCEX

Boussinesq Model Empirical breaking Wave-induced currents! Much more computing time

Perturbation Theory O( /ε n ) Direct Wavefield Simulation O(100 ) DNS/LES O( ) ~ O(10) Wave Theory & Modeling Laboratory Experiments O(10 ) / Field Measurements O(100 ) Kinematic and dynamic boundary conditions on interface Mud energy dissipation for wavefield simulation Cross validation Shear instability characteristics Parameter for simulations Cross validation Interfacial boundary conditions Parameters for simulations Dissipation model development HOS/SNOW (MIT, JHU)

Meshfree Lagrangian Numerical Method for Wave Breaking Water Particles 2h r Boundary Particles Radius of Kernel function, W Fluid is described by quantities at discrete nodes Approximated by a summation interpolant; other options: MLS

Topics Meshfree methods Interpolation methods SPH modeling Results GPU : the future

Mesh-Free Methods Smoothed particle hydrodynamics (SPH) (1977) Diffuse element method (DEM) (1992) Element-free Galerkin method (EFG / EFGM) (1994) Reproducing kernel particle method (RKPM) (1995) hp-clouds Natural element method (NEM) Material point method (MPM) Meshless local Petrov Galerkin (MLPG) Generalized finite difference method (GFDM) Particle-in-cell (PIC) Moving particle finite element method (MPFEM) Finite cloud method (FCM) Boundary node method (BNM) Boundary cloud method (BCM) Method of finite spheres (MFS) Radial Basis Functions (RBF)

Particle Methods Discrete Element Method Molecular Dynamics SPH Vortex Methods

Why Interpolation? For discrete models of continuous systems, we need the ability to interpolate values in between discrete points. Half of the SPH technique involves interpolation of values known at particles (or nodes).

Interpolation To find the value of a function between known values. Consider the two pairs of values (x,y): (0.0, 1.0), (1.0, 2.0) What is y at x = 0.5? That is, what’s (0.5, y)?

Linear Interpolation Given two points, (x 1,y 1 ), (x 2,y 2 ): Fit a straight line between the points. y(x) = a x +b y 1 = a x 1 + b y 2 = a x 2 + b a=(y 2 -y 1 )/(x 2 -x 1 ), b= (y 1 x 2 -y 2 x 1 )/(x 2 -x 1 ), Use this equation to find y values for any x 1 < x < x 2 x 1 x 2 y1y1 y2y2

Polynomial Interpolants Given N (=4) data points, Find the interpolating function that goes through the points: If there were N+1 data points, the function would be with N+1 unknown values, a i, of the N th order polynomial

Polynomial Interpolant Force the interpolant through the four points to get four equations: Rewriting: The solution for a is found by inverting p

Example Data are: (0,2), (1,0.3975), (2, ), (3, ). Fitting a cubic polynomial through the four points gives:

Matlab code for polynomial fitting % the data to be interpolated (in 1D) x=[ ]; y=[ ]; plot(x,y,'bo') n=size(x,2) % CUBIC FIT p=[ones(1,n) x x.*x x.*(x.*x)]' a=p\y' %same as a=inv(p)*y' yp=p*a hold on; plot(x,yp,'k*') Note: linear and quadratic fit: redefine p

Polynomial Fit to Example Exact: red Polynomial fit: blue

Beware of Extrapolation An N th order polynomial has N roots! Exact: red

Least Squares Interpolant For N points, we will use a lower order fitting polynomial of order m < (N-1). The least squares fitting polynomial is similar to the exact fit form: Now p is N x m matrix. Since we have fewer unknown coefficients as data points, the interpolant cannot go through each point. Define the error as the amount of “miss” Sum of the (errors) 2 :

Least Squares Interpolant Minimizing the sum with respect to the coefficients a: Solving, This can be rewritten in this form, which introduces a pseudo-inverse. Reminder: for cubic fit

Question Show that the equation above leads to the following expression for the best fit straight line:

Matlab: Least-Squares Fit %the data to be interpolated (1d) x=[ ]; y=[ ]; plot(x,y,'bo') n=size(x,2) % CUBIC FIT p=[ones(1,n) x x.*x x.*(x.*x)]' pinverse=inv(p'*p)*p' a=pinverse*y' yp=p*a plot(x,yp,'k*')

Cubic Least Squares Example x: y: Data irregularly spaced

Least Squares Interpolant Cubic Least Squares Fit: * is the fitting polynomial o is the given data Exact

Piecewise Interpolation Piecewise polynomials: fit all points Linear: continuity in y +, y - (fit pairs of points) Quadratic: +continuity in slope Cubic splines: +continuity in second derivative RBF All of the above, but smoother

Moving Least Squares Interpolant are monomials in x for 1D (1, x, x 2, x 3 ) x,y in 2D, e.g. (1, x, y, x 2, xy, y 2 ….) Note a j are functions of x

Moving Least Squares Interpolant Define a weighted mean-squared error: where W(x-x i ) is a weighting function that decays with increasing x-x i. Same as previous least squares approach, except for W(x-x i )

Weighting Function q=x/h

Moving Least Squares Interpolant Minimizing the weighted squared errors for the coefficients:,,,

Moving Least Squares Interpolant Solving The final locally valid interpolant is:

Moving Least Squares (1) % generate the data to be interpolated (1d) x=[ ]; y=[ ]; plot(x,y,'bo') n=size(x,2) % QUADRATIC FIT p=[ones(1,n) x x.*x]' xfit=0.30; sum=0.0 % compute msq error for it=1:18, % fiting at 18 points xfit=xfit+0.25; d=abs(xfit-x) for ic=1:n q=d(1,ic)/.51; % note 0.3 works for linear fit; 0.51 for quadratic if q <= 1. Wd(1,ic)=0.66*(1-1.5*q*q+0.75*q^3); elseif q <= 2. Wd(1,ic)=0.66*0.25*(2-q)^3; else Wd(1,ic)=0.0; end end

MLS (2) Warray=diag(Wd); A=p'*(Warray*p) B=p'*Warray acoef=(inv(A)*B)*y' % QUADRATIC FIT yfit=acoef'*[1 xfit xfit*xfit]' hold on; plot(xfit, yfit,'k*') sum=sum+(3.*cos(2.*pi*xfit/3.0)-yfit)^2; end

MLS Fit to (Same) Irregular Data Given data: circles; MLS: *; exact: line h=0.51

Varying h Values

Basis for Smoothed Particle Hydrodynamics SPH From astrophysics (Lucy,1977; Gingold and Monaghan, 1977)) An integral interpolant (an approximation to a Dirac delta function): kernel

The Kernel (or Weighting Function) Compact support: 2D-circle of radius h 3D-sphere of radius h 1D-line of length 2h h

Fundamental Equation of SPH where W(s-x,h) is a kernel, which behaves like Dirac  function.

Delta Function (1 D)

Consistency Consistency is the ability of the method to reproduce polynomials. The kernel is known as a reproducing kernel. For constant consistency: let Then is a requirement for kernels. Sometimes this is referred to as the partition of unity.

Kernel Requirements (Monaghan) Monotonically decreasing with distance |s-x| Symmetric with distance

Numerical Approximations of the Integrals The incremental volume: m j /  j, where the mass is constant. which is an interpolant! Partition of unity

Kernels Gaussian: Not compactly supported -- extends to infinity.

Kernels Moving Particle Semi-implicit (MPS): Quadratic: (discontinuous slope at q=1)

Spline Kernel Same kernel as used in MLS interpolant.

Kernels Infinite variety of kernels possible, just have to follow the rules: monotonic decreasing, symmetric, and compact support.

Gradients Given SPH interpolant: Find the gradient directly and analytically: O.K., but when u j is a constant, there is a problem.

Gradients (2) To fix problem, recall partition of unity equation: The gradient of this equation is zero: So we can multiply by u i = u(x) and subtract from Eq.(A) (A)

Consistency Taylor series expansion of u(x,t) about point s (1-D): Consistency conditions are then: Integrals of all higher moments must be zero.

Numerical Consistency Shepard Interpolant for Constant h for constant consistency Solve for

MLS and Shepard Interpolant

Governing Equations Kinematics Conservation of Mass Conservation of Momentum Equation of State: Pressure = f(  )

Kinematic Equation for i=1, n p Mass Conservation

Conservation of Mass Integrate both sides by the kernel and integrate over the domain: Next use Gauss theorem:

Conservation of Mass (2) 0 Put in discrete form: j

Conservation of Mass (3) From before (consistency condition): The derivative of this expression is Multiplying by u i and adding to previous conservation equation:

Conservation of Mass (4) To determine the density at a given point s: A more accurate approach is: During computations, the density can be regularly redetermined through this expression, due to Randles and Liberski.

Conservation of Momentum Equations of motion: Multiply by  and the kernel and integrate as before: Subtract the zero sum:

Conservation of Momentum Equations of motion: Multiply by and the kernel and integrate as before:

Conservation of Momentum (2) Another formulation (used in JHU SPH):

Equation of State: Weak Compressibility which implies a speed of sound, C S: where  is usually 7 and B is a constant No need to solve PDE for pressure

Closure Submodels Viscosity generally accounted for by an artificial empirical term (Monaghan 1992):

Sub-Particle Scale (SPS) Turbulence Model Spatial-filter over the governing equations (compressible): (Favre-averaging) = SPS stress tensor with elements : Eddy viscosity: Smagorinsky constant: C s  0.12 See Lo & Shao (2002), Gotoh et al. (2002) for incompressible SPS S ij = strain tensor *

Neighbor Lists Which particles within 2h of particle i? In principle, each particle interacts with every other particle in the domain: N x N calculations (“all pair search”) Linked List: “Cells”: Examine particles in neighboring cells; only 9 cells to examine. Tree Search Develop a tree. Search geometrically.

Neighbor List Link list is reconstructed each time step. Cells are 2h x 2h in size. from SPHysics Users Manual

Time Stepping Discretize time: Take an Euler step (first order derivative expression): Use this to get a value of Then make a corrector step: Monaghan; more accurate than Euler step

Time Stepping (Verlet-Newmark) Taylor Series: Add these equations: where Extremely accurate equation to advance particle position. va

Verlet Subtracting the two Taylor series for x: The Velocity Verlet equation is:

Operational Velocity Verlet To avoid three time levels, the half-step Verlet method:

Beeman’s Method Better velocity estimate (but more storage, and needs a n+1 ) Predictor-corrector version (for velocity):

Boundary conditions are problematic in SPH due to: the boundary is not well defined kernel sum deficiencies at boundaries, e.g. density Ghost (or virtual) particles (Takeda et al. 1994) Leonard-Jones forces (Monaghan 1994) Boundary particles with repulsive forces (Monaghan 1999) Rows of fixed particles that masquerade as interior flow particles (Dalrymple & Knio 2001) (Can use kernel normalization techniques to reduce interpolation errors at the boundaries, Bonet and Lok 2001) Boundary Conditions (slip BC)

Ghost Particles Fluid domain Boundary Ghosts are white Virtual boundaries; slip boundary condition

Leonard-Jones Boundary Forces Monaghan, 1994 Physically derived BC: Bumpy!

Monaghan Repulsive Boundary x n y n u

Fixed Boundary Particles Two layers of fixed particle are sufficient to contain particles. Slip or non-slip. Boundary particles do everything but move. Numbering of particles: 1 to n b (fixed), n b+1 to n p (moving) Dalrymple & Knio (2001)

DEVELOPED JOINTLY BY RESEARCHERS AT: Universita di Roma “La Sapienza” (Italy) Universidade de Vigo (Spain) Johns Hopkins University (USA) University of Manchester (U.K.) SPHYSICS

Model Validation – hydrodynamics model – Star points are experiment data

Model Validation – hydrodynamics model – Star points are experiment data

Model Validation – hydrodynamics model – Star points are experiment data

Bore in a Box Tsunami represented by a dam break

Bore in a Box: 2004

3D Weak Plunger

Coherent Structures The rate of strain tensor and the rotation tensor are Q criterion Second invariant of the velocity gradient tensor Positive values of Q imply vorticity greater than strain, velocity gradient tensor

Coherent Structures: Q Criterion

Paradigm Shift: GPU Models

CPU vs GPU Floating point operations per second: GPU vs CPU Nvidia CUDA Programming Guide, 1.1

CPU/GPU Architectures

Bore in a Box Real time: CPU vs GPU on a laptop

Bore in a Box 677,360 particles

Nvidia Tesla Computing Card 4 Gb/240 = 16 Mb/ core