Simulation and Animation

Slides:



Advertisements
Similar presentations
Navier-Stokes.
Advertisements

Particle Acceleration Particle t t+dt. Physical Interpretation Total acceleration of a particle Local acceleration Convective acceleration time velocity.
Continuity Equation. Continuity Equation Continuity Equation Net outflow in x direction.
Convection.
Equations of Continuity
Introduction to numerical simulation of fluid flows
1 MECH 221 FLUID MECHANICS (Fall 06/07) Tutorial 7.
Chapter 2 Reynolds Transport Theorem (RTT) 2.1 The Reynolds Transport Theorem 2.2 Continuity Equation 2.3 The Linear Momentum Equation 2.4 Conservation.
Fluid Kinematics Fluid Dynamics . Fluid Flow Concepts and Reynolds Transport Theorem ä Descriptions of: ä fluid motion ä fluid flows ä temporal and spatial.
1 MECH 221 FLUID MECHANICS (Fall 06/07) Tutorial 6 FLUID KINETMATICS.
Momentum flux across the sea surface
An Introduction to Stress and Strain
2-1 Problem Solving 1. Physics  2. Approach methods
Lecture 7 Exact solutions
Introduction to Convection: Flow and Thermal Considerations
Numerical Hydraulics Wolfgang Kinzelbach with Marc Wolf and Cornel Beffa Lecture 1: The equations.
LAMINAR PLANE COUETTE AND OPEN CHANNEL FLOW
Instructor: André Bakker
Flow and Thermal Considerations
Paul Drosinis UBC Phys 420. Introduction Short history on fluid dynamics Why bother studying fluid flow? Difference between Newtonian and Non-Newtonian.
FUNDAMENTAL EQUATIONS, CONCEPTS AND IMPLEMENTATION
ME 231 Thermofluid Mechanics I Navier-Stokes Equations.
Conservation Laws for Continua
Introduction to Convection: Flow and Thermal Considerations
Chapter 9: Differential Analysis of Fluid Flow
CEE 262A H YDRODYNAMICS Lecture 5 Conservation Laws Part I 1.
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)
Louisiana Tech University Ruston, LA Momentum Balance Steven A. Jones BIEN 501/CMEN 513 Monday, March 19, 2007.
CHAPTER (III) KINEMATICS OF FLUID FLOW 3.1: Types of Fluid Flow : Real - or - Ideal fluid : Laminar - or - Turbulent Flows : Steady -
Fluid Dynamics and the Applications of Differential Equations By Shi-Jeisun Xie, Summer 2011.
A conservative FE-discretisation of the Navier-Stokes equation JASS 2005, St. Petersburg Thomas Satzger.
A particle-gridless hybrid methods for incompressible flows
KINEMATICS Kinematics describes fluid flow without analyzing the forces responsibly for flow generation. Thereby it doesn’t matter what kind of liquid.
1 LES of Turbulent Flows: Lecture 6 (ME EN ) Prof. Rob Stoll Department of Mechanical Engineering University of Utah Spring 2011.

1 MAE 5130: VISCOUS FLOWS Conservation of Mass September 2, 2010 Mechanical and Aerospace Engineering Department Florida Institute of Technology D. R.
1 MAE 5130: VISCOUS FLOWS Momentum Equation: The Navier-Stokes Equations, Part 2 September 9, 2010 Mechanical and Aerospace Engineering Department Florida.
Mass Transfer Coefficient
Dr. Wang Xingbo Fall , 2005 Mathematical & Mechanical Method in Mechanical Engineering.
Distributed Flow Routing Surface Water Hydrology, Spring 2005 Reading: 9.1, 9.2, 10.1, 10.2 Venkatesh Merwade, Center for Research in Water Resources.
Chapter 6 Introduction to Forced Convection:
FLUID PROPERTIES Independent variables SCALARS VECTORS TENSORS.
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:
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
Vectors n v What is the projection of the vector (1, 3, 2) onto the plane described by ? Louisiana Tech University Ruston, LA
1 Chapter 6 Flow Analysis Using Differential Methods ( Differential Analysis of Fluid Flow)
Ch 4 Fluids in Motion.
Convection in Flat Plate Boundary Layers P M V Subbarao Associate Professor Mechanical Engineering Department IIT Delhi A Universal Similarity Law ……
Conservation of Salt: Conservation of Heat: Equation of State: Conservation of Mass or Continuity: Equations that allow a quantitative look at the OCEAN.
Discretization Methods Chapter 2. Training Manual May 15, 2001 Inventory # Discretization Methods Topics Equations and The Goal Brief overview.
Differential Analysis of Fluid Flow. Navier-Stokes equations Example: incompressible Navier-Stokes equations.
1 CONSTITUTIVE RELATION FOR NEWTONIAN FLUID The Cauchy equation for momentum balance of a continuous, deformable medium combined with the condition of.
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics1 Water Computational Fluid Dynamics Volumes Lagrangian vs. Eulerian modelling Navier-Stokes equations.
Chapter 1: Basic Concepts
CE 3305 Engineering FLUID MECHANICS
Chapter 4 Fluid Mechanics Frank White
CE 3305 Engineering FLUID MECHANICS
DIFFERENTIAL EQUATIONS FOR FLUID FLOW Vinay Chandwani (Mtech Struct.)
Ship Hydrodynamics - Resistance
Chapter 9: Differential Analysis of Fluid Flow
AE/ME 339 Computational Fluid Dynamics (CFD) K. M. Isaac 11/15/2018
Topic 6 FluidFlowEquations_Introduction
AE/ME 339 Computational Fluid Dynamics (CFD) K. M. Isaac 12/3/2018
Fluid Kinematics Fluid Dynamics.
Introduction to Fluid Dynamics & Applications
Topic 5 NavierStokes Equations
Topic 6 NavierStokes Equations
Presentation transcript:

Simulation and Animation Fluids

Fluid simulation Content Fluid simulation basics Terminology Navier-Stokes equations Derivation and physical interpretation Computational fluid dynamics Discretization Solution methods

Fluid simulation Simulation of the behavior of fluid flow Interaction and forces between fluid particles and solid bodies Result of physical properties of fluids Viscosity generates frictional forces External forces Gravitation and other forces Flow models Laminar flow Fluid consists of individual layers sliding over each other Turbulent flow Particles in different layers become mixed due to low friction

Fluid simulation Flow models Laminar flow: no fluid exchange between layers Turbulent flow: no distinct layers, fluid exchange free

Fluid simulation Flow movement depends on Viscous force Inertial force (Trägheitskraft) Described by Reynolds number, which depends on Velocity of the fluid, viscosity  and density , characteristic length D of the flow region Reynolds number (Re) The tendency of flow to be laminar (Re is very small) or turbulent (Re is very large) laminar if Re < 2300 transient for 2300 < Re < 4000 turbulent if Re > 4000 Re =  D V / 

Fluid simulation Approaches to describe flow fields Eulerian Focus is on particular points in the flow occupied by the fluid Record state of a finite control volume around that point Dye injection for visualizing flows Lagrangian Consider particles and follow their path through the flow Record state of the particle along the path Particle tracing for visualizing flows

Fluid simulation Basic equations of fluid dynamics Rely on Physical principles Conservation of mass F=ma Conservation of energy Applied to a model of the flow Finite control volume approach Infinitesimal particle approach Derivation of mathematical equations Continuity equation Navier-Stokes equations

Fluid simulation Models of the flow Finite control volume Control surface S Control volume V V Fixed volume, fluid moves through it

Fluid simulation Models of the flow Infinitesimal fluid element Volume dV dV Fixed fluid element, fluid moves through it Element moving along the streamlines

Flow simulation Governing equations of fluid flow Finite control volume approach Apply physical principals to fluid in control volume and passing through control surface Yields equations in integral form Distinguish between conservation (fixed volume) and nonconservation (moving volume) form Infinitesimal fluid element Apply physical principals to infinitesimal fluid particle Yiels equations in partial differential form Distinguish between conservation (fixed particle) and nonconservation (moving particle) form

Navier-Stokes equations A moving fluid element y V=ui+vj+wk V1 t = 1 x V2 t = 2 z

Fluid simulation The time rate of change of density Particle moves from 1 to 2 Assume density (x,y,z,t) to be continuous and ... Thus, Taylor series expansion can be performed Dividing by (t2-t1) ignoring higher order terms and taking the limit:

Fluid simulation The substantial derivative Time rate of change of density when moving from 1 to 2 Physically and numerically different to the time rate of change of density at fixed point (/t) (local derivative) With

Fluid simulation The substantial derivative V: convective derivative Time rate of change due to movement to position with different properties D/Dt applied to any variable yields change due to local fluctuations and time and spatial fluctuations Can be applied to any flow field variable Pressure (p), temperatur (T), velocity (V) etc.

Navier-Stokes equations The continuity equation Physical principal: conservation of mass Finite fixed control volume: Infinitesimal fluid particle Net mass flow out of control volume through surface Time rate of decrease of mass inside control volume = Net mass flow out of element Time rate of mass decrease inside element =

Navier-Stokes equations The continuity equation The model: infinitesimal element fixed in space Consider mass flux through element dy dz dx

Navier-Stokes equations The continuity equation Infinitesimal element fixed in space Net outflow in x-direction (equal for y/z-direction): Net mass flow: Time rate of mass increase:

Navier-Stokes equations The continuity equation Time rate of mass increase inside element Net mass flow out of element + The partial differential form of the continuity equation Other models yield other forms of the continuity equation, which can be obtained from each other

Navier-Stokes equations The momentum equation (Impulsgleichung) Physical principal: Newton´s second law F=ma Consider an infinitesimal moving element Sketch sources of the forces acting on it Consider x/y/z components separately Fx = max First consider left side of F=ma F = FB + FS Sum of body forces and surface forces acting on element

Navier-Stokes equations The momentum equation F = FB + FS (body forces and surface forces) Body forces Act at a distance (Gravitational, electric, magnetic forces) FB = fx (dxdydz) Surface forces act Act on surface of element Can be split into pressure and viscous forces FS = FPress + FVis Pressure force: imposed by outside fluid, acting inward and normal to surface Viscous force: imposed by friction due to viscosity, result in shear and normal stress imposed by outside fluid

Navier-Stokes equations Sketch of forces (x-direction only) Convention: positive increases of V along positive x/y/z Y 6 2 Sy (shear stress) sz‘ 7 3 P (pressure force) p‘ nx (normal stress) nx‘ sz 4 X sy‘ 1 5 Z

Navier-Stokes equations Surface forces Shear stress Normal stress Y Y yx xx X X Time rate of change of shear deformation Time rate of change of shear volume

Navier-Stokes equations Surface forces On face 0145: On face 2367: Equivalent on faces 0246 and 1357 for zx On face 0123: On face 4567: X 1 2 3 4 5 6 7 P (pressure force) p‘ Sy (shear stress) sy‘ nx (normal stress) nx‘ sz sz‘

Navier-Stokes equations Total force on fluid element =

Navier-Stokes equations Consider right side of F=ma Mass of fluid element Acceleration is time rate of change of velocity (Du/Dt) Thus (equivalent for v/w): The Navier-Stokes equations

Navier-Stokes equations What you typically see in the literature is is the only „strange“ term here : molecular viscosity In Newtonian fluids, shear stress is proportional to velocity gradient [shear stress] =  [strain rate] Described by Navier-Stokes equations Non-Newtonian fluids obey different property, e.g. blood, motor oil Viscosity is not a constant Depends on temperature and pressure

Navier-Stokes equations From Stokes we know (let‘s just believe it here)  : molecular viscosity  : second or bulk viscosity

Navier-Stokes equations Incompressible fluids  = constant  = constant  can be taken outside of partial derivatives in NSE Divergence free (all -terms on previous page vanish)

Navier-Stokes equations With We obtain Sketch of derivation: Write div(V)=0 and resolve for u/x Partially differentiate both sides with respect to x Add 2u/x2 on both sides

Navier-Stokes equations Euler equations Inviscid flow – no viscosity Only continuity and momentum equation

CFD – Computational Fluid Dynamics Solution methods for governing equations Governing equations have been derived independent of flow situation, e.g. flow around a car or inside a tube Boundary (and initial) conditions determine specific flow case Determine geometry of boundaries and behavior of flow at boundaries Different kinds of boundary conditions exist Hold at any time during simulation Lead to different solutions of the governing equations Exact solution exists for specific conditions Initial conditions specify state to start with

CFD – Computational Fluid Dynamics Boundary and initial conditions Initial conditions should satisfy properties of underlying flow model E.g. if div(V) = 0 then u=u0(x,y,z), v=v0(x,y,z), w=w0(x,y,z) should satisfy Boundary conditions specify flow properties at points along the fixed boundary See below

CFD – Computational Fluid Dynamics Solution methods of partial differential equations Analytical solutions Lead to closed-form epressions of dependent variables Continuously describe their variation Numerical solutions Based on discretization of the domain Replace PDEs and closed form expression by approximate algebraic expressions Partial derivatives become difference quotients Involves only values at finite number of discrete points in the domain Solve for values at given grid points

CFD – Computational Fluid Dynamics Discretization Layout of grid points on a grid Location of discrete points across the domain Arbitrary grids can be employed Structured or unstructured grids Implicit or explicit representation of topology (adjacency information) Uniform grids: uniform spacing of grid points in x and y y Pi-1j+1 Pij+1 Pi+1j+1 y Pi-1j Pij Pi+1j y = x Pi-1j-1 Pij-1 Pi+1j-1 x x

CFD – Computational Fluid Dynamics Finite differences Approximate partial derivatives by finite differences between points Derived by considering the Taylor expansion

CFD – Computational Fluid Dynamics Derived by considering the Taylor expansion

CFD – Computational Fluid Dynamics Finite differences for higher order and mixed partial derivatives

CFD – Computational Fluid Dynamics Difference equations - example The 2D wave equation Partial Differential Equation Discretization on a 2D Cartesian grids yields Difference Equation

CFD – Computational Fluid Dynamics Explicit approach Marching solution with marching variable t Values at time t+1 are computed from known values at time t and t-1 Step through all interior points of domain and update ut+1

CFD – Computational Fluid Dynamics Explicit vs. Implicit approach Explicit approach Difference equation contains one unknown Can be solved explicitely for it Implicit approach Difference equation contains more than one unknown Solution by simultaneously solving for all unknown System of algebraic equations to be solved e.g. Crank-Nicolson

CFD – Computational Fluid Dynamics Implicit Crank-Nicholson scheme

Computational Fluid Dynamics Implicit approach – example Poisson equation: Discretization:

The Equations Solution of the Navier-Stokes equations Advection Describes in what direction a “neighboring” region of fluid pushes fluid at u Diffusion Describes how quickly variations in velocity are damped-out; depends on fluid viscosity Pressure Describes in which direction fluid at u is pushed to reach a lower pressure area External Forces Zero Divergence

NSE Discretization

Navier-Stokes Equations (cont.) Rewrite the Navier-Stokes Equations where now F and G can be computed

Navier-Stokes Equations (cont.) Problem: Pressure is still unknown! From derive: and end up with this Poisson Equation after discretization:

Computational Fluid Dynamics The algorithm Step 1: compute Ft and Gt Use veocities ut and vt and difference equations for partial derivatives Step 2: solve equations for pressure pt+1 Discretize second order partial derivatives Use Jacobi, Gauss-Seidel, or Conjugate Gradient method Step 3: compute new velocities ut+1, vt+1

CFD – Computational Fluid Dynamics Boundary conditions (2D) No-slip condition Fluid is fixed to boundary; velocities should vanish at boundaries or have velocities of moving boundaries Free-slip condition Fluid is free to move parallel to the boundary; velocity component normal to boundary vanishes Outflow conditions Velocity into direction of boundary normal does not change Inflow conditions Velocities are given explicitely

Demo