1 / 27

My First Fluid Project

My First Fluid Project. Ryan Schmidt. Outline. MAC Method How far did I get? What went wrong? Future Work. The MAC Method. Marker-and-Cell – Harlow&Welch 1965 Standard technique for simulating incompressible fluids w/Navier-Stokes fluid equations

tasha
Download Presentation

My First Fluid Project

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. My First Fluid Project Ryan Schmidt

  2. Outline • MAC Method • How far did I get? • What went wrong? • Future Work

  3. The MAC Method • Marker-and-Cell – Harlow&Welch 1965 • Standard technique for simulating incompressible fluids w/Navier-Stokes fluid equations • LANL Technical Report (access restricted!!!)

  4. Navier-Stokes Fluid Dynamics • Velocity field u, Pressure field p • Viscosity v, density d (constants) • External force f • Navier-Stokes Equation: • Mass Conservation Condition:

  5. Navier-Stokes Equation • Derived from momentum conservation condition • 4 Components: • Advection/Convection • Diffusion (damping) • Pressure • External force (gravity, etc) • System of Nonlinear partial differential equations

  6. Incompressibility Condition • We want incompressible fluids* • Velocity field u has zero divergence • Mass conservation over any subregion • Flow in == flow out • Incompressible fluid • Comes from continuum assumption *gasses assumed to be locally incompressible

  7. Spatial Discretization • Staggered grid for u • Centered grid for p • (Cells)

  8. Equation Discretization • Central differences for spatial derivatives • Forward difference for time derivative • u component:

  9. Mathematical Trickery • Advection form different in literature: • These two are equivalent if the fluid is incompressible. Proof:

  10. Markers • Cell resolution very coarse (20-150) • Want higher resolution surface • Also need to track which cells contain fluid • Solution: ‘Marker’ particles • Massless particles that flow freely in u field • Do not contribute to computation • Very fast to process

  11. MAC Algorithm • Initialize u,p grids (easier said than done) • Forward-difference u to get new velocities • Enforce zero-divergence condition • Rinse and repeat

  12. Enforcing Zero Divergence • 2 possibilities: • Iterative procedure • Projection method of Stam99 • Iterative Procedure – Pressure Iteration • Individually set each cell divergence to 0 • Calculate pressure change and modify velocities • Repeat over entire grid until maximum cell divergence < predefined tolerance

  13. Pressure Iteration • For each cell calculate change in pressure • Now update cell:

  14. Bad Formatting? • Does this: • Mean this?: • Inverse dependence on • But set to • If << , Di,j will be small? • If not, system explodes!

  15. How far did I get?

  16. Well…

  17. It’s not pretty…

  18. Symmetry? • Tried to reproduce experiments in literature • Correct Physical Constants! • d=1, v=0.01, g=981 for breaking dam • Inflow supposed to be symmetric…

  19. What went wrong?

  20. Initial Conditions ?!? • System becomes unstable as soon as there is any large amount of divergence • How do we specify initial conditions that will give us motion w/o immediately causing unstable divergence? • (I don’t know…) • Inflow is simple case, but it still doesn’t work…

  21. Boundary Conditions • Many, many cases • Too many to have special cases of finite difference equation • Solution: construct velocities & pressures in boundary cells so that standard finite difference equation comes out right • I may have them wrong… • Not sure when to apply them • Unclear how order of application affects velocties…

  22. Wall Boundaries • Normal velocity is 0 • Prevents flow into boundary cell • Also have to set internal pressure • No-slip • zero tangential velocity • Free-slip • free tangential velocity

  23. Wall Boundary Problem • Assumption is made that there is only one adjacent fluid cell • What if there is morethan one? • Cannot do both…

  24. Free-Surface Boundaries • Have to make sure that divergence in surface cells is 0 • Lots of cases • I think this is where my problem is • 28 cases and counting… • Asymmetry?

  25. Outer Tangential Velocities • Interpolation in surface cells reaches out into empty cells • Finite difference equations may as well • Need to have same velocity set there

  26. Future Work • Go back and check boundary conditions • Harass Nick Foster • Finish report and put it on the web, hope that someone reads it and has some insight

  27. Thanks! Questions?

More Related