1cs533d-winter-2005 Notes  Please read Kass and Miller, “Rapid, Stable Fluid Dynamics for Computer Graphics”, SIGGRAPH’90  Blank in last class: At free.

Slides:



Advertisements
Similar presentations
Lecture 15: Capillary motion
Advertisements

Lecture III of VI (Claudio Piani) Rotation, vorticity, geostrophic adjustment, inertial oscillations, gravity waves with rotation.
Specialization in Ocean Energy MODELLING OF WAVE ENERGY CONVERSION António F.O. Falcão Instituto Superior Técnico, Universidade de Lisboa 2014.
Notes Assignment questions… cs533d-winter-2005.
1cs533d-term Notes  Assignment 2 is up. 2cs533d-term Modern FEM  Galerkin framework (the most common)  Find vector space of functions that.
1 MECH 221 FLUID MECHANICS (Fall 06/07) Tutorial 7.
1cs533d-winter-2005 Shallow water equations  From last time, using eta for depth=h+H:  We’ll discretize this using “splitting” Handle the material derivative.
1cs533d-term Notes  Thursday: class will begin late, 11:30am.
1cs533d-term Notes. 2 Shallow water  Simplified linear analysis before had dispersion relation For shallow water, kH is small (that is, wave lengths.
Waves W. Kinzelbach M. Wolf C. Beffa Numerical Hydraulics.
1 MECH 221 FLUID MECHANICS (Fall 06/07) Tutorial 6 FLUID KINETMATICS.
Momentum flux across the sea surface
Static Surface Forces hinge water ? 8 m 4 m . Static Surface Forces ä Forces on plane areas ä Forces on curved surfaces ä Buoyant force ä Stability submerged.
1cs533d-winter-2005 Notes  More reading on web site Baraff & Witkin’s classic cloth paper Grinspun et al. on bending Optional: Teran et al. on FVM in.
1cs533d-winter-2005 Notes  Some example values for common materials: (VERY approximate) Aluminum: E=70 GPa =0.34 Concrete:E=23 GPa =0.2 Diamond:E=950.
AOSS 321, Winter 2009 Earth System Dynamics Lecture 9 2/5/2009 Christiane Jablonowski Eric Hetland
Circular Motion and Other Applications of Newton’s Laws
Modeling Fluid Phenomena -Vinay Bondhugula (25 th & 27 th April 2006)
1cs533d-term Notes. 2 Poisson Ratio  Real materials are essentially incompressible (for large deformation - neglecting foams and other weird composites…)
Physics 218, Lecture XVII1 Physics 218 Lecture 17 Dr. David Toback.
2. Solving Schrödinger’s Equation Superposition Given a few solutions of Schrödinger’s equation, we can make more of them Let  1 and  2 be two solutions.
Lectures 11-12: Gravity waves Linear equations Plane waves on deep water Waves at an interface Waves on shallower water.
Fluid mechanics 3.1 – key points
The Equations of Motion
Chapter 5 Solutions for Interacting Waves Using A MCM 5.1 Governing Equations and Hierarchy Eq.s 5.2 An Example of Applying A Mode Coupling Method (MCM)
Juan Carlos Ortiz Royero Ph.D.
Warning! In this unit, we switch from thinking in 1-D to 3-D on a rotating sphere Intuition from daily life doesn’t work nearly as well for this material!
Gravity and Orbits The gravitational force between two objects:
PHY131H1S - Class 17 Today: Review for Test 2!.
Hydraulic Routing in Rivers
Simple and basic dynamical ideas…..  Newton’s Laws  Pressure and hydrostatic balance  The Coriolis effect  Geostrophic balance  Lagrangian-Eulerian.
CEE 262A H YDRODYNAMICS Lecture 5 Conservation Laws Part I 1.
Basic dynamics  The equations of motion and continuity Scaling Hydrostatic relation Boussinesq approximation  Geostrophic balance in ocean’s interior.
CEE 262A H YDRODYNAMICS Lecture 18 Surface Ekman layer.
Applied NWP [1.2] “Once the initialization problem was resolved in the 1960s, models based on the primitive equations gradually supplanted those based.
A conservative FE-discretisation of the Navier-Stokes equation JASS 2005, St. Petersburg Thomas Satzger.
Using the “Clicker” If you have a clicker now, and did not do this last time, please enter your ID in your clicker. First, turn on your clicker by sliding.
Chapter 6 Circular Motion and Other Applications of Newton’s Laws.
Chapter 6 Circular Motion and Other Applications of Newton’s Laws.
Chapter 24 Gauss’s Law. Let’s return to the field lines and consider the flux through a surface. The number of lines per unit area is proportional to.
Mass Transfer Coefficient
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.)
CEE 262A H YDRODYNAMICS Lecture 15 Unsteady solutions to the Navier-Stokes equation.
For a rotating solid object, the vorticity is two times of its angular velocity Vorticity In physical oceanography, we deal mostly with the vertical component.
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.
FLUID ROTATION Circulation and Vorticity. Arbitrary blob of fluid rotating in a horizontal plane Circulation: A measure of the rotation within a finite.
Electromagnetic Waves and Their Propagation Through the Atmosphere
For a rotating solid object, the vorticity is two times of its angular velocity Vorticity In physical oceanography, we deal mostly with the vertical component.
Dynamics: Newton’s Laws of Motion
Gravity waves derivation ATM Fall, Introduction Gravity waves describe how environment responds to disturbances, such as by oscillating parcels.
General Relativity Physics Honours 2008 A/Prof. Geraint F. Lewis Rm 560, A29 Lecture Notes 10.
Hydraulic Routing in Rivers Reference: HEC-RAS Hydraulic Reference Manual, Version 4.1, Chapters 1 and 2 Reading: HEC-RAS Manual pp. 2-1 to 2-12 Applied.
Lecture 6: Open Boundaries Solid wall Open boundary Let us first consider the ocean is incompressible, which satisfies (6.1) H  Integrating (6.1) from.
ChE 452 Lecture 25 Non-linear Collisions 1. Background: Collision Theory Key equation Method Use molecular dynamics to simulate the collisions Integrate.
CEE 262A H YDRODYNAMICS Lecture 13 Wind-driven flow in a lake.
AOSS 401, Fall 2007 Lecture 21 October 31, 2007 Richard B. Rood (Room 2525, SRB) Derek Posselt (Room 2517D, SRB)
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.
The simplifed momentum equations Height coordinatesPressure coordinates.
Seismology Part V: Surface Waves: Rayleigh John William Strutt (Lord Rayleigh)
H. SAIBI November 25, Outline Generalities Superposition of waves Superposition of the wave equation Interference of harmonic waves.
Basic dynamics ●The equations of motion and continuity Scaling Hydrostatic relation Boussinesq approximation ●Geostrophic balance in ocean’s interior.
Basic dynamics The equation of motion Scale Analysis
Fick’s Law The exact interpretation of neutron transport in heterogeneous domains is so complex. Assumptions and approximations. Simplified approaches.
Lecture Guidelines for GEOF110 Chapter 7 Until Re-averaging + movie = 2 h scaling/ hydrostatic equation = 2 h Ilker Fer Guiding for blackboard presentation.
Physical Oceanography Surface Gravity Waves Properties Dispersion Refraction & Diffraction Group velocity Generation Assignment: Read Chapter 16 of Stewart:
Lecture 4: Numerical Stability
Dynamics: Newton’s Laws of Motion
Distributed Flow Routing
2. Solving Schrödinger’s Equation
Presentation transcript:

1cs533d-winter-2005 Notes  Please read Kass and Miller, “Rapid, Stable Fluid Dynamics for Computer Graphics”, SIGGRAPH’90  Blank in last class: At free surface of ocean, p=0 and u 2 negligible, so Bernoulli’s equation simplifies to  t =-gh Plug in the Fourier mode of the solution to this equation, get the dispersion relation

2cs533d-winter-2005 Dispersion relation again  Ocean wave has wave vector K K gives the direction, k=|K| is the wave number E.g. the wavelength is 2  /k  Then the wave speed in deep water is  Frequency in time is For use in formula

3cs533d-winter-2005 Simulating the ocean  Far from land, a reasonable thing to do is Do Fourier decomposition of initial surface height Evolve each wave according to given wave speed (dispersion relation)  Update phase, use FFT to evaluate  How do we get the initial spectrum? Measure it! (oceanography)

4cs533d-winter-2005 Energy spectrum  Fourier decomposition of height field:  “Energy” in K=(i,j) is  Oceanographic measurements have found models for expected value of S(K) (statistical description)

5cs533d-winter-2005 Phillips Spectrum  For a “fully developed” sea wind has been blowing a long time over a large area, statistical distribution of spectrum has stabilized  The Phillips spectrum is: [Tessendorf…] A is an arbitrary amplitude L=|W| 2 /g is largest size of waves due to wind velocity W and gravity g Little l is the smallest length scale you want to model

6cs533d-winter-2005 Fourier synthesis  From the prescribed S(K), generate actual Fourier coefficients X i is a random number with mean 0, standard deviation 1 (Gaussian) Uniform numbers from unit circles aren’t terrible either  Want real-valued h, so must have Or give only half the coefficients to FFT routine and specify you want real output

7cs533d-winter-2005 Time evolution  Dispersion relation gives us  (K)  At time t, want  So then coefficients at time t are For j≥0: Others: figure out from conjugacy condition (or leave it up to real-valued FFT to fill them in)

8cs533d-winter-2005 Picking parameters  Need to fix grid for Fourier synthesis (e.g. 1024x1024 height field grid)  Grid spacing shouldn’t be less than e.g. 2cm (smaller than that - surface tension, nonlinear wave terms, etc. take over) Take little l (cut-off) a few times larger  Total grid size should be greater than but still comparable to L in Phillips spectrum (depends on wind speed and gravity)  Amplitude A shouldn’t be too large Assumed waves weren’t very steep

9cs533d-winter-2005 Note on FFT output  FFT takes grid of coefficients, outputs grid of heights  It’s up to you to map that grid (0…n-1, 0…n-1) to world-space coordinates  In practice: scale by something like L/n Adjust scale factor, amplitude, etc. until it looks nice  Alternatively: look up exactly what your FFT routines computes, figure out the “true” scale factor to get world-space coordinates

10cs533d-winter-2005 Tiling issues  Resulting grid of waves can be tiled in x and z  Handy, except people will notice if they can see more than a couple of tiles  Simple trick: add a second grid with a non- rational multiple of the size Golden mean (1+sqrt(5))/2= … works well The sum is no longer periodic, but still can be evaluated anywhere in space and time easily enough

11cs533d-winter-2005 Choppy waves  See Tessendorf for more explanation  Nonlinearities cause real waves to have sharper peaks and flatter troughs than linear Fourier synthesis gives  Can manipulate height field to give this effect Distort grid with (x,z) -> (x,z)+ D(x,z,t)

12cs533d-winter-2005 Choppiness problems  The distorted grid can actually tangle up (Jacobian has negative determinant - not 1-1 anymore) Can detect this, do stuff (add particles for foam, spray?)  Can’t as easily use superposition of two grids to defeat periodicity… (but with a big enough grid and camera position chosen well, not an issue)

13cs533d-winter-2005 Shallow Water

14cs533d-winter-2005 Shallow water  Simplified linear analysis before had dispersion relation For shallow water, kH is small (that is, wave lengths are comparable to depth) Approximate tanh(x)=x for small x:  Now wave speed is independent of wave number, but dependent on depth Waves slow down as they approach the beach

15cs533d-winter-2005 What does this mean?  We see the effect of the bottom Submerged objects (H decreased) show up as places where surface waves pile up on each other Waves pile up on each other (eventually should break) at the beach Waves refract to be parallel to the beach  We can’t use Fourier analysis

16cs533d-winter-2005 PDE’s  Saving grace: wave speed independent of k means we can solve as a 2D PDE  We’ll derive these “shallow water equations” When we linearize, we’ll get same wave speed  Going to PDE’s also let’s us handle non-square domains, changing boundaries The beach, puddles, … Objects sticking out of the water (piers, walls, …) with the right reflections, diffraction, … Dropping objects in the water

17cs533d-winter-2005 Kinematic assumptions  We’ll assume as before water surface is a height field y=h(x,z,t)  Water bottom is y=-H(x,z,t)  Assume water is shallow (H is smaller than wave lengths) and calm (h is much smaller than H) For graphics, can be fairly forgiving about violating this…  On top of this, assume velocity field doesn’t vary much in the y direction u=u(x,z,t), w=w(x,z,t) Good approximation since there isn’t room for velocity to vary much in y(otherwise would see disturbances in small length- scale features on surface)  Also assume pressure gradient is essentially vertical Good approximation since p=0 on surface, domain is very thin

18cs533d-winter-2005 Conservation of mass  Integrate over a column of water with cross- section dA and height h+H Total mass is  (h+H)dA Mass flux around cross-section is  (h+H)(u,w)  Write down the conservation law  In differential form (assuming constant density): Note: switched to 2D so u=(u,w) and  =(∂/∂x, ∂/∂z)

19cs533d-winter-2005 Pressure  Look at y-component of momentum equation:  Assume small velocity variation - so dominant terms are pressure gradient and gravity:  Boundary condition at water surface is p=0 again, so can solve for p:

20cs533d-winter-2005 Conservation of momentum  Total momentum in a column:  Momentum flux is due to two things: Transport of material at velocity u with its own momentum: And applied force due to pressure. Integrate pressure from bottom to top:

21cs533d-winter-2005 Pressure on bottom  Not quite done… If the bottom isn’t flat, there’s pressure exerted partly in the horizontal plane Note p=0 at free surface, so no net force there  Normal at bottom is:  Integrate x and z components of pn over bottom (normalization of n and cosine rule for area projection cancel each other out)

22cs533d-winter-2005 Shallow Water Equations  Then conservation of momentum is:  Together with conservation of mass we have the Shallow Water Equations

23cs533d-winter-2005 Note on conservation form  At least if H=constant, this is a system of conservation laws  Without viscosity, “shocks” may develop Discontinuities in solution (need to go to weak integral form of equations) Corresponds to breaking waves - getting steeper and steeper until heightfield assumption breaks down

24cs533d-winter-2005 Simplifying Conservation of Mass  Expand the derivatives:  Label the depth h+H with  :  So water depth gets advected around by velocity, but also changes to take into account divergence

25cs533d-winter-2005 Simplifying Momentum  Expand the derivatives:  Subtract off conservation of mass times velocity:  Divide by density and depth:  Note depth minus H is just h:

26cs533d-winter-2005 Interpreting equations  So velocity is advected around, but also accelerated by gravity pulling down on higher water  For both height and velocity, we have two operations: Advect quantity around (just move it) Change it according to some spatial derivatives  Our numerical scheme will treat these separately: “splitting”

27cs533d-winter-2005 Linearization  Again assume not too much velocity variation (i.e. waves move, but water basically doesn’t) No currents, just small waves Alternatively: inertia not important compared to gravity Or: numerical method treats the advection separately (see next week!)  Then drop the nonlinear advection terms  Also assume H doesn’t vary in time

28cs533d-winter-2005 Wave equation  Only really care about heightfield for rendering  Differentiate height equation in time  Plug in u equation  Finally, neglect nonlinear (quadratically small) terms on right to get

29cs533d-winter-2005 Deja vu  This is the linear wave equation, with wave speed c 2 =gH  Which is exactly what we derived from the dispersion relation before (after linearizing the equations in a different way)  But now we have it in a PDE that we have some confidence in Can handle varying H, irregular domains…  Caveat: to handle H going to 0 or negative, we’ll in fact use

30cs533d-winter-2005 Initial + boundary conditions  We can specify initial h and h t Since it’s a second order equation  We can specify h at “open” boundaries Water is free to flow in and out  Specify ∂h/∂n=0 at “closed” boundaries Water does not pass through boundary Equivalent to reflection symmetry Waves reflect off these boundaries  Note: dry beaches etc. don’t have to be treated as boundaries -- instead just have h=-H initially

31cs533d-winter-2005 Example conditions  Start with quiet water h=0, beach on one side of domain  On far side, specify h by 1D Fourier synthesis (e.g. see last lecture)  On lateral sides, specify ∂h/∂n=0 (reflect solution)  Keep beach side dry h=-H  Start integrating

32cs533d-winter-2005 Space Discretization  In space, let’s use finite-differences on a regular grid  Need to discretize  2 h=h xx +h zz  Standard 5-point approximation good:  At boundaries where h is specified, plug in those values instead of grid unknowns  At boundaries where normal derivative is specifed, use finite difference too Example h i+1j -h ij =0 which gives h i+1j =h ij

33cs533d-winter-2005 Surface tension  Let’s go back to nonlinear shallow water equations for a moment  If we include surface tension, then there’s an extra normal traction (i.e. pressure) on surface Proportional to the mean curvature The more curved the surface, the more it wants to get flat again Actually arises out of different molecular attractions between water-water, water-air, air-air  We can model this by changing pressure BC to p=  from p=0 at surface y=h

34cs533d-winter-2005 Mean curvature  If surface is fairly flat, can approximate  Plugging this pressure into momentum gives

35cs533d-winter-2005 Simplifying  Doing same linearization as before, but now in 1D (forget z) get  Should look familiar - it’s the bending equation from long ago  Capillary (surface tension) waves important at small length scales

36cs533d-winter-2005 Other shallow water eq’s  General idea of ignoring variation (except linear pressure) in one dimension applicable elsewhere  Especially geophysical flows: the weather  Need to account for the fact that Earth is rotating, not an inertial frame Add Coriolis pseudo-forces  Can have several shallow layers too