Computational Fluid Dynamics

Slides:



Advertisements
Similar presentations
Stable Fluids A paper by Jos Stam.
Advertisements

My First Fluid Project Ryan Schmidt. Outline MAC Method How far did I get? What went wrong? Future Work.
SolidWorks Flow Simulation
Chapter Four Fluid Dynamic
Simulation of Fluids using the Navier-Stokes Equations Kartik Ramakrishnan.
Lecture 15: Capillary motion
Continuity Equation. Continuity Equation Continuity Equation Net outflow in x direction.
Matthias Müller, Barbara Solenthaler, Richard Keiser, Markus Gross Eurographics/ACM SIGGRAPH Symposium on Computer Animation (2005),
Acoustic Modeling of Reverberation using Smoothed Particle Hydrodynamics Thomas Wolfe.
Fluid Mechanics –For Civil Engineers is all about SMU Storing– Moving– Using ( Incompressible fluids - water) To design and manage these systems we need.
Particle-based fluid simulation for interactive applications
Physics for Scientists and Engineers II, Summer Semester 2009 Lecture 2: May 20 th 2009 Physics for Scientists and Engineers II.
Chamber Dynamic Response Modeling Zoran Dragojlovic.
Module on Computational Astrophysics Jim Stone Department of Astrophysical Sciences 125 Peyton Hall : ph :
Modeling Fluid Phenomena -Vinay Bondhugula (25 th & 27 th April 2006)
Chapter 9 Solids and Fluids. Solids Has definite volume Has definite volume Has definite shape Has definite shape Molecules are held in specific locations.
Fluid mechanics 3.1 – key points
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Introduction to Modeling Fluid Dynamics 1.
Fluid Simulation using CUDA Thomas Wambold CS680: GPU Program Optimization August 31, 2011.
Modeling, Simulating and Rendering Fluids Thanks to Ron Fediw et al, Jos Stam, Henrik Jensen, Ryan.
Gravity and Orbits The gravitational force between two objects:
© 2011 Autodesk Freely licensed for use by educational institutions. Reuse and changes require a note indicating that content has been modified from the.
ME 231 Thermofluid Mechanics I Navier-Stokes Equations.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Fluids.
Fluid Animation CSE 3541 Matt Boggus. Procedural approximations – Heightfield fluids Mathematical background – Navier-Stokes equation Computational models.
Chemistry Chapter 10 notes Physical Characteristics of Gases.
1 Gases Chapter Properties of Gases Expand to completely fill their container Take the Shape of their container Low Density –much less than solid.
A Hybrid Particle-Mesh Method for Viscous, Incompressible, Multiphase Flows Jie LIU, Seiichi KOSHIZUKA Yoshiaki OKA The University of Tokyo,
Analysis of Disturbance P M V Subbarao Associate Professor Mechanical Engineering Department I I T Delhi Modeling of A Quasi-static Process in A Medium.
Animation of Fluids.
Chapter 9: Differential Analysis of Fluid Flow SCHOOL OF BIOPROCESS ENGINEERING, UNIVERSITI MALAYSIA PERLIS.
COMPUTATIONAL FLUID DYNAMICS IN REAL-TIME An Introduction to Simulation and Animation of Liquids and Gases.
CS559: Computer Graphics Lecture 38: Animation Li Zhang Spring 2008 Slides from Brian Curless at U of Washington.
Smoothed Particle Hydrodynamics (SPH) Fluid dynamics The fluid is represented by a particle system Some particle properties are determined by taking an.
© 2007 Pearson Prentice Hall This work is protected by United States copyright laws and is provided solely for the use of instructors in teaching their.
Energy momentum tensor of macroscopic bodies Section 35.
A Unified Lagrangian Approach to Solid-Fluid Animation Richard Keiser, Bart Adams, Dominique Gasser, Paolo Bazzi, Philip Dutré, Markus Gross.
A particle-gridless hybrid methods for incompressible flows
Wednesday, Feb. 1, 2012PHYS , Spring 2012 Dr. Jaehoon Yu 1 PHYS 1444 – Section 004 Lecture #5 Wednesday, Feb. 1, 2012 Dr. Jaehoon Yu Chapter 22.
Software for the Games Industry 9 November 2004 Fluid Gaming: Particle Methods for Fluid Mechanics and Visualisation Graham Wynn James Gray Richard West.
Yoon kichul Department of Mechanical Engineering Seoul National University Multi-scale Heat Conduction.
Reynolds Transport Theorem We need to relate time derivative of a property of a system to rate of change of that property within a certain region (C.V.)
Simplified Smoothed Particle Hydrodynamics for Interactive Applications Zakiya Tamimi Richard McDaniel Based on work done at Siemens Corporate.
Detail-Preserving Fluid Control N. Th ű rey R. Keiser M. Pauly U. R ű de SCA 2006.
Geometry Group Summer 08 Series Toon Lenaerts, Bart Adams, and Philip Dutre Presented by Michael Su May
Stable, Circulation- Preserving, Simplicial Fluids Sharif Elcott, Yiying Tong, Eva Kanso, Peter Schröder, and Mathieu Desbrun.
Measurements in Fluid Mechanics 058:180:001 (ME:5180:0001) Time & Location: 2:30P - 3:20P MWF 218 MLH Office Hours: 4:00P – 5:00P MWF 223B-5 HL Instructor:
1996 Eurographics Workshop Mathieu Desbrun, Marie-Paule Gascuel
Vectors n v What is the projection of the vector (1, 3, 2) onto the plane described by ? Louisiana Tech University Ruston, LA
The Generalized Interpolation Material Point Method.
Matthew Zhu. At each time step calculate each particle’s acceleration and use Verlet numerical integration to update its position, velocity, and grid.
FALL 2015 Esra Sorgüven Öner
A Mathematical Frame Work to Create Fluid Flow Devices…… P M V Subbarao Professor Mechanical Engineering Department I I T Delhi Development of Conservation.
Smoothed Particle Hydrodynamics Matthew Zhu CSCI 5551 — Fall 2015.
NNPC FSTP ENGINEERS Physics Course Code: Lesson 7.
1 Data Structures for Scientific Computing Orion Sky Lawlor /04/14.
Particle-based Viscoelastic Fluid Simulation Simon Clavet Philippe Beaudoin Pierre Poulin LIGUM, Université de Montréal.
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics1 Water Computational Fluid Dynamics Volumes Lagrangian vs. Eulerian modelling Navier-Stokes equations.
Modelling of Marine Systems. Shallow waters Equations.
Chapter 1: Basic Concepts
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Computational Fluid Dynamics.
1 Turbomachinery Lecture 2a - Conservation of Mass, Momentum - Bernoulli Equation - Performance Parameters.
Chapter 6: Introduction to Convection
Fluid Animation CSE 3541 By: Matt Boggus.
DIFFERENTIAL EQUATIONS FOR FLUID FLOW Vinay Chandwani (Mtech Struct.)
Chamber Dynamic Response Modeling
Chapter 9: Differential Analysis of Fluid Flow
5. Conductors and dielectrics
Introduction to Fluid Dynamics & Applications
FLUID MECHANICS - Review
Presentation transcript:

Computational Fluid Dynamics Real-time animation of low-Reynolds-number flow using Smoothed Particle Hydrodynamics presentation by 薛德明 Dominik Seifert B97902122

Visualization of my results http://csie.ntu.edu.tw/~b97122/archive/fluid_dynamics/capture.mp4 My code http://csie.ntu.edu.tw/~b97122/archive/fluid_dynamics/OpenTissue_backup.rar My motivation: From Dust http://www.youtube.com/watch?v=CfKQCAxizrA

The framework OpenTissue OpenTissue is an open source simulation framework with a simple, working SPH implementation I added some features to their implementation Their original implementation is described in this 88 page document: “Lagrangian Fluid Dynamics Using Smoothed Particle Hydrodynamics”

Smoothed Particle Hydrodynamics Quick review Note: SPH particles are not actual particles! They are really fluid samples of constant mass Particles are placed inside a container to represent a fluid Every particle is then assigned a set of initial properties After every time step (a few milliseconds), update the properties of all particles Use interpolation methods to solve the Navier-Stokes equation to find force contributions, then integrate to find new velocity and position

SPH Particle Properties Support Radius (constant) Minimum interaction distance between particles Mass (constant; ensures Conservation of Mass explicitly) Position (varying) Surface normal (varying) Velocity (varying) Acceleration (varying) Sum of external forces (varying) Density (varying due to constant mass and varying volume) Pressure (varying) Viscosity (constant)

Smoothed Particle Hydrodynamics Solver pseudocode

Smoothed Particle Hydrodynamics The pressure problem Fluids cannot be accurately incompressible Pressure value approximated by Ideal Gas Law: k called “gas-stiffness” Entails assumptions of gas in steady state Does not consider weight pressure Causes “pulsing” because of lagging interplay between gravity and pressure force Large gas-stiffness can reduce/eliminate the lag and the pulsing Alternatively, take density to the power of heat capacity ratio But high pressure requires a smaller time-step and thus makes the simulation more expensive

My contributions I Fluid-fluid interactions In OpenTissue, a system can be comprised of only a single fluid I changed the code to support more than one fluid at a time The math and physics are mostly the same, except for: Viscosity Kernel support radius Still missing: Surface tension interfaces between fluids of different polarity But I still spent three days on changing the framework due to heavily templated C++ code

My contributions II Fluid-solid interactions In OpenTissue only supports static (immovable) objects I wanted to add the ability to add objects that interact with the fluid, objects that can float, sink etc. Solid dynamics are very complicated! What are… Tensile Strength? Compressive Strength? Young’s modulus? I came up with an intuitive but not quite correct approach

My contributions II Restoring force Place an invisible spring between every two particles that are close to each other initially Store the initial distance between every two “neighboring” particles Add a new spring force component that contributes: k * abs(current_distance – original_distance) Works for very few particles, but not for many

My contributions III Control Volumes - Overview Control volumes are used in the analysis of fluid flow phenomena They are used to represent the conservation laws in integral form Conservation of mass over a given (control) volume c.v. with surface area c.s.: 𝜌 = density; u = velocity; n = surface normal

My contributions III Control Volumes in SPH Volume integrators are easy: Simply accumulate all contributions of all particles in volume Area integrators are trickier Time derivative can be obtained via difference quotients: for any property Fluid properties at some point in the field can be obtained by interpolation

My contributions III Field evaluator function This required me to change the spatial partioning grid to support queries at arbitrary locations After that, I only had to implement the famous SPH field evaluation template for some property A: Translates to: ValueType evaluate(vector pos, real radius, ParticleProperty A): ParticleContainer particles; search(pos, radius, particles); ValueType res = ValueType(0); foreach particle p in particles: real W = DefaultKernel.evaluate(pos - p.position); res += (p.*A)() * p.mass/p.density * W; return res;

My contributions III Area Integrator Goal: Find average of property at discretely sampled points I went for an evenly distributing sampler Aliasing is not an issue, don’t need random sampling # of samples ns should be proportional to # of particles that can fit into the surface: So we get:

My contributions III Disk Integrator In this approach, every kind of surface needs their own integrator I only have to consider disks in my pipe flow example The disk integrator iterates over the cells of an imaginary grid that we lay over the disk to find the average of fluid property f real integrateDiskXZ(real ns, vector2 p_center, real r, field_evalutor f): real q_total = 0 real ds = sqrt(PI / ns) * r // int samples_in_diameter = sqrt(ns * 4/PI) // vector2 min = p_center – r for (int i = 0; i < samples_in_diameter; i++) for (int j = 0; j < samples_in_diameter; j++) vector2 pos = (min.x + i * ds, min.z + j * ds) if (length(pos - p_center) > r) continue q_total += f(pos) return q_total / ns

My contributions III Area Integrator - Considerations No need to sample over an already sampled set Can use spatial selection instead: Find all particles in distance d from the surface Use scaled smoothing kernel to add up contributions I was not quite sure how to mathematically scale the kernel, so I went for the sampling approach I also used the integrator to place the cylindrically-shaped fluid inside the pipe

My contributions III Conservation of mass The integral form: Becomes: The first term is the time derivative of Mass inside the c.v. The second term is the mass flux through the c.v.’s surface area

Particle boundary deficiency, Holes in the fluid and Control Volume - Correctness Since atmosphere and structure are not represented in this model, computations have to cope with a pseudo-vacuum (真空) Governing equations are adjusted to cope with the deficiency e.g. Level set function for surface tension considers: Inside fluid = 1 Outside fluid = 0 C.v.’s must always be completely filled! Fluid volume is never correct which causes “holes” in the fluid Think: What is the space between the particles/samples? C.v. computations can also never be 100% correct!

Bibliography [1] OpenTissue @ http://www.opentissue.org/ “OpenTissue is a collection of generic algorithms and data structures for rapid development of interactive modeling and simulation.” [2] Smoothed Particle Hydrodynamics – A Meshfree Particle Method (book) [3] Lagrangian Fluid Dynamics Using Smoothed Particle Hydrodynamics [4] Particle-Based Fluid-Fluid Interaction

Summary Given high enough gas stiffness, SPH model is OK to simulate visually appealing real-time flow but is quite inaccurate OpenTissue SPH implementation is not very mature, lacks a lot of features I really miss: Accurate pressure values Correct fluid-solid interaction Arbitrary geometry I still cannot create real-time interactive applications involving fluid flow but it was still an insightful endeavour.

What’s next? Surface rendering until next week Then choose one from the list… Improve SPH implementation Add generic surfaces (currently only supports implicit primitives) Make it adaptive (choose sample size dynamically) Learn solid dynamics and work on Fluid-Structure interaction More work on surface rendering Optimized OpenGL/DX/XNA implementation that runs on the GPU Work on Computational Galactic Dynamics (計算星系動力學) with professor 闕志鴻 from the Institute of Astronomy (天文所) Simulation of dark matter & fluid during galaxy formation Work on level sets and the level set method in CFD with professor Yi-Ju 周 from the Institute of Applied Mechanics (應力所)