Unformatted text preview:

Intro to Computational Fluid DynamicsOverviewFoundationsTransport TheoremConservation of MassConservation of MomentumSlide 7Navier-Stokes EquationsSolving the equationsTentative Velocity FieldSlide 11Tentative Velocity FieldSlide 13Slide 14Satisfying the Continuity Eq.Explicitly Enforcing u=0Solving for pressureSlide 18Projection MethodSlide 20The Bottom LineBoundary ConditionsStaggered GridTracking the Free SurfaceMACSlide 26Front TrackingSlide 28Slide 29Particle Level Set MethodSlide 31ReferencesThe UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Intro to Computational Fluid DynamicsBrandon LloydCOMP 259April 16, 2003Image courtesy of Prof. A. Davidhazy at RIT. Used without permission. 2The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Overview•Understanding the Navier-Stokes equations Derivation (following [Griebel 1998]) Intuition•Solving the Navier-Stokes equations Basic approaches Boundary conditions•Tracking the free surface3The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Operators - gradient div - divergence2- Laplacian… - Hand waving / Lengthy math compressionFoundationsyuxuuudiv22222yuxuuyuxuu∂∂,∂∂4The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Transport Theoremxdtxufftxdtxfdtdt t),()div(),(  ),(),( tcttxu),( tcxc0),( tct5The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Conservation of Massdensity is ; ),()0,(mass0txdtxxdx0),()div(),(   xdtxutxdtxdtdt t0)div( utTransport theorem0div uIntegrand vanishes is constantfor incompressiblefluidsContinuity equation6The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Conservation of Momentumtxdtxutx),(),(momentum forces actingmomentumin changetxdtxftx),(),( :forcesbody tdsntx),( :forces surface σtttdsntxxdtxftxxdtxutxdtd),(),(),(),(),( σnormal : tensor stress : nσ7The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Conservation of Momentum0divdiv)())(()(  σguuuuudtdTransport theorem Divergencetheoremfupuud tud2 1)(Momentum equation…tttdsntxxdtxftxxdtxutxdtd),(),(),(),(),( σ8The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Navier-Stokes Equationsfupuudtudu2 1)(0convection viscosityexternalforcespressure9The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Solving the equationsBasic Approach1. Create a tentative velocity field.a. Finite differencesb. Semi-Lagrangian method (Stable Fluids [Stam 1999])2. Ensure that the velocity field is divergence free:a. Adjust pressure and update velocitiesb. Projection method10The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Tentative Velocity Field Finite differences – mechanical translation of equations.n11The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Tentative Velocity Field Limits on time step•CFL conditions – don’t move more than a single cell in one time step•Diffusion termytvxtu maxmax ,122112yxt12The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Tentative Velocity FieldStable Fluids Method1. Add forces: 2. Advection3. Diffusion)()()(~01xftxuxu13The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Tentative Velocity FieldAdvectionFinite differences is unstable for large Δt.Solution: trace velocities back in time. Guarantees that the velocities will never blow up.)),((~)(~12txpuxu 14The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Tentative Velocity FieldDiffusionDiscretizing the viscosity term spreads velocity among immediate neighbors. Unstable when time step too small, grid spacing too large, or viscosity is high.Solution: Instead of using an explicit time step use an implicit one.This leads to a large but sparse linear system.)(~)(~)(232xuxutI15The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Satisfying the Continuity Eq.The tentative velocity field is not necessarily divergence free and thus does not satisfy the continuity equation. Three methods for satisfying the continuity equation:1. Explicitly satisfy the continuity equation by iteratively adjusting the pressures and velocities in each cell.2. Find a pressure correction term that will make the velocity field divergence free.3. Project the velocities onto their divergence free part.16The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Explicitly Enforcing u=0Since we have not yet added the pressure term, we can use pressure to ensure that the velocities are divergence free.u>0 increased pressure and subsequent outfluxu<0 decreased pressure and subsequent influxRelaxation algorithm1. Correct the pressure in a cell2. Update velocities 3. Repeat for all cells until each has u<ε17The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Solving for pressureAnother approach involves solving for a pressure correction term over the whole field such that the velocities will be divergence free and then update the velocities at the end.)1()()1(1~nnnptuudtud)1()()1(~nnnptuu0~)1(2)()1( nnnptuuDiscretize in timeRearrange termsSatisfy continuity eq.18The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Solving for pressureWe end up with the Poisson equation for pressure. This is another sparse linear system. These types of equations can be solved using iterative methods. Use pressures to update final velocities.)()1(2~nnutp )1()()1(~nnnptuu19The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Projection MethodThe Helmholtz-Hodge Decomposition Theorem states that any vector field can be decomposed as:where u is divergence free and q is a scalar field defined implicitly as:We can define an operator P that projects a vector field onto its divergence free part: quw  2qw  qwwu 20The


View Full Document

UNC-Chapel Hill COMP 259 - LECTURE NOTES

Download LECTURE NOTES
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view LECTURE NOTES and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view LECTURE NOTES 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?