Presentation is loading. Please wait.

Presentation is loading. Please wait.

David Marshburn Comp 259 April 17, 2002

Similar presentations


Presentation on theme: "David Marshburn Comp 259 April 17, 2002"— Presentation transcript:

1 David Marshburn Comp 259 April 17, 2002
Fluid Dynamics David Marshburn Comp 259 April 17, 2002

2 Fluid properties Imagine a volume of fluid…
position, velocity, acceleration viscosity μ density ρ

3 Fluid velocity Velocity is the physical property simulated for fluids…
Why? We’re usually interested in what the fluid’s carrying. Advection. Velocity is denoted by u in fluid dynamics literature (even in graphics). fluid dynamicists already used a vee-like symbol for viscosity (the Greek letter nu). Thimk of smoke in air for an example of advection.

4 Taxonomy of Fluids Compressible vs. incompressible
constancy of density Rotational vs. irrotational whether small volumes have angular velocity Viscous vs. inviscid whether shear forces are present Newtonian vs. non-Newtonian model for viscous force We will derive a model for incompressible, Newtonian, irrotational, viscous fluids.

5 Fluid dynamics In the beginning, there was Newton… F = ma
So what forces are there on a fluid?

6 Forces on a Fluid Imagine a small volume of fluid… (so we get forces per unit volume) external or “body” forces (e.g., gravity) relative pressure “viscous friction” from other bits of fluid sliding by inertia (not really a force, but needs some special treatment)

7 Getting rid of volume… We want Newton’s 2nd in terms of forces per unit volume, so… F/V = m/V a but, m/V is just the density ρ, so… f/ρ = a We’ll talk about forces per unit volume hereafter.

8 Body forces… Gravity… Rigid objects…
Other forces external to the fluid… Denote the conglomeration of these forces by g, a force per unit mass. Remember, we’re writing forces per unit volume. Yes, this formulation is tailored for applying gravitational forces.

9 Pressure Pressure (denoted p, a force per unit volume) in one tiny bit of fluid is relative to the pressure in neighboring tiny bits. If neighbors are at lower relative pressure, the fluid in our tiny volume is pulled out. Likewise, for neighbors with higher pressure, out fluid is pushed in.

10 Viscosity “Friction” from other bits of fluid sliding by.
From Chorin & Marsden. B and B’ are two blobs of fluid

11 Viscosity For instance, we want the difference in z-velocity as we look in the x direction. This generalizes in all dimensions to the Laplacian. Note that this is the Laplacian for a vector-valued field, not a scalar-valued field and is. del squared A = del ( del dot A ) - del cross ( del cross A ). Note that this is the Laplacian for a vector-valued field, not a scalar-valued field.

12 Acceleration Our little bit of fluid is moving along at some velocity u. Two components of acceleration: temporal change in velocity motion of the bit of fluid the motion of the blob of fluid carries the velocity-bearing bit of fluid onward.

13 Acceleration Temporal change in velocity
Movement of the bit of fluid (inertia) use the chain rule of u[x(t),y(t),z(t),t] Where the ui are the velocities in the x, y and z directions

14 Navier-Stokes equation #1
Putting this all together: Inertia Viscosity Acceleration Pressure External forces ν is μ/ρ and is called the kinematic viscosity. This is conservation of energy.

15 Navier-Stokes equation #2
We’re talking about incompressible fluids.. So, the velocity into our little bit of fluid must be the same as the velocity out… remember, the density is constant. if velocities were not balanced, material would accumulate in a fixed volume. This is conservation of mass. That the divergence is 0 states incompressibility.

16 “No-slip” condition At the rigid, stationary boundaries of a fluid, velocity is zero. (experimentally and mathematically) At non-stationary boundaries, the fluid velocity must be the same as that of the boundary.

17 Questions? Any questions about how we got to the Navier-Stokes equations?

18 Solving these… So, we have some differential equations…
We have four equations and four unknowns What’s the problem? Second order Non-linear navier-stokes eqn 1 expands to 3 equations, one for each dimension, plus matter conservation is 4 equations. the 4 unknowns are the 3 components of velocity plus pressure.

19 Foster/Metaxas 1996 “Realistic Animation of Liquids”
A finite differencing approximation with correction. Regular, rectilinear discretization

20 Foster/Metaxas 1996 Finite differencing approximation (1 dimension shown) Yes, it’s a mess… The point is that is the energy-conservation equation with all the differentials replaced by finite differences.

21 Foster/Metaxas 1996 Conservation of mass isn’t assured.
Correction: Relax pressure and velocity until all cells satisfy both Navier-Stokes equations (to within some tolerance). means unconserved mass

22 Foster/Metaxas 1996 Each cell looks at its neighbors…
So, stuff shouldn’t move more than one cell in a time step. Two possibilities: The largest velocity anywhere in the system determines an adaptive time step For some fixed time step, the simulation eventually blows up. This is the root of the instability. Pick a time step, and something will eventually go faster. This causes instability.

23 Stam 1999 “Stable Fluids” Important features:
Semi-Lagrangian advection. Implicit solvers Projection

24 Stam 1999 Semi-Lagrangian advection (called the method of characteristics). Resolves the non-linearity To find the velocity as some point, trace the velocity field backwards in time from that point along the path p. rather than “move this stuff there”, this asks, “what moved here?”

25 Stam 1999 Method of Characteristics:
A characteristic is a curve through a vector field on which a constant field element propagates. Given the equation: Turn the PDE into some ODEs by taking u=u(x(s),t(s)) and using the chain rule to find du/ds=0 Integrate with your favorite scheme.

26 Stam 1999 Implicit solver for: In implicit form, this is:
Write this down as a finite difference equation and solve with the POIS3D linear solver from FISHPACK.

27 Stam 1999 Projection – to ensure that the mass conservation condition is met. The Helmholtz-Hodge Decompostion (a result from vector algebra): any vector field1 can be uniquely decomposed as: w and u are vector fields, u is divergence-free, and q is a scalar field. Solve for q and subtract if from the result. in this, q is any component of the velocity constraints: e.g., the gradient and curl go to zero at infinity. 1There are some “well-behaved” constraints on the field.

28 Stam 1999 These methods are chained together to solve the Navier-Stokes equations. Stability: stable for any time step In the advection step, the largest velocity generated is bounded by the maximum velocity in the earlier field. Each of these tools solves a different term from the Navier-Stokes equations, and projection ensures mass conservation.

29 References Chorin, Alexandre J. and Jerrold E. Marsden, A Mathematical Introduction to Fluid Mechanics. 3rd ed. Springer: Acheson, D.J. Elementary Fluid Dynamics. Oxford University Press: Foster, Nick, and Dimitri Metaxas. “Realistic Animation of Liquids.” Graphics Models and Image Processing. 58(5): , 1996. Stam, Joe, “Stable Fluids.” SIGGRAPH 1999.


Download ppt "David Marshburn Comp 259 April 17, 2002"

Similar presentations


Ads by Google