# Notes Dispersion relation again Simulating the ocean Energy spectrum Phillips Spectrum

## Notes Dispersion relation again Simulating the ocean Energy spectrum Phillips Spectrum

Harris, Steve, Founder and Publisher has reference to this Academic Journal, PHwiki organized this Journal Notes Please read Kass in addition to Miller, Rapid, Stable Fluid Dynamics as long as Computer Graphics, SIGGRAPH90 Blank in last class: At free surface of ocean, p=0 in addition to u2 negligible, so Bernoullis equation simplifies to t=-gh Plug in the Fourier mode of the solution to this equation, get the dispersion relation 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 as long as mula Simulating the ocean Far from l in addition to , 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)

This Particular University is Related to this Particular Journal

Energy spectrum Fourier decomposition of height field: Energy in K=(i,j) is Oceanographic measurements have found models as long as expected value of S(K) (statistical description) 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=W2/g is largest size of waves due to wind velocity W in addition to gravity g Little l is the smallest length scale you want to model Fourier synthesis From the prescribed S(K), generate actual Fourier coefficients Xi is a r in addition to om number with mean 0, st in addition to ard deviation 1 (Gaussian) Uni as long as m numbers from unit circles arent terrible either Want real-valued h, so must have Or give only half the coefficients to FFT routine in addition to specify you want real output

Time evolution Dispersion relation gives us (K) At time t, want So then coefficients at time t are For j0: Others: figure out from conjugacy condition (or leave it up to real-valued FFT to fill them in) Picking parameters Need to fix grid as long as Fourier synthesis (e.g. 1024×1024 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 in addition to gravity) Amplitude A shouldnt be too large Assumed waves werent very steep 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

Tiling issues Resulting grid of waves can be tiled in x in addition to z H in addition to y, 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=1.61803 works well The sum is no longer periodic, but still can be evaluated anywhere in space in addition to time easily enough Choppy waves See Tessendorf as long as more explanation Nonlinearities cause real waves to have sharper peaks in addition to 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) Choppiness problems The distorted grid can actually tangle up (Jacobian has negative determinant – not 1-1 anymore) Can detect this, do stuff (add particles as long as foam, spray) Cant as easily use superposition of two grids to defeat periodicity (but with a big enough grid in addition to camera position chosen well, not an issue)

Shallow Water Shallow water Simplified linear analysis be as long as e had dispersion relation For shallow water, kH is small (that is, wave lengths are comparable to depth) Approximate tanh(x)=x as long as small x: Now wave speed is independent of wave number, but dependent on depth Waves slow down as they approach the beach 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

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 h in addition to le 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 Kinematic assumptions Well assume as be as long as e 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) in addition to calm (h is much smaller than H) For graphics, can be fairly as long as giving 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 as long as 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 Conservation of mass Integrate over a column of water with cross-section dA in addition to 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 as long as m (assuming constant density): Note: switched to 2D so u=(u,w) in addition to =(/x, /z)

Pressure Look at y-component of momentum equation: Assume small velocity variation – so dominant terms are pressure gradient in addition to gravity: Boundary condition at water surface is p=0 again, so can solve as long as p: 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 as long as ce due to pressure. Integrate pressure from bottom to top: 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 as long as ce there Normal at bottom is: Integrate x in addition to z components of pn over bottom (normalization of n in addition to cosine rule as long as area projection cancel each other out)

Shallow Water Equations Then conservation of momentum is: Together with conservation of mass we have the Shallow Water Equations Note on conservation as long as m 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 as long as m of equations) Corresponds to breaking waves – getting steeper in addition to steeper until heightfield assumption breaks down Simplifying Conservation of Mass Exp in addition to the derivatives: Label the depth h+H with : So water depth gets advected around by velocity, but also changes to take into account divergence

Simplifying Momentum Exp in addition to the derivatives: Subtract off conservation of mass times velocity: Divide by density in addition to depth: Note depth minus H is just h: Interpreting equations So velocity is advected around, but also accelerated by gravity pulling down on higher water For both height in addition to 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 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

Wave equation Only really care about heightfield as long as rendering Differentiate height equation in time Plug in u equation Finally, neglect nonlinear (quadratically small) terms on right to get Deja vu This is the linear wave equation, with wave speed c2=gH Which is exactly what we derived from the dispersion relation be as long as e (after linearizing the equations in a different way) But now we have it in a PDE that we have some confidence in Can h in addition to le varying H, irregular domains Caveat: to h in addition to le H going to 0 or negative, well in fact use Initial + boundary conditions We can specify initial h in addition to ht Since its a second order equation We can specify h at open boundaries Water is free to flow in in addition to 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

Mean curvature If surface is fairly flat, can approximate Plugging this pressure into momentum gives Simplifying Doing same linearization as be as long as e, but now in 1D ( as long as get z) get Should look familiar – its the bending equation from long ago Capillary (surface tension) waves important at small length scales 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 as long as the fact that Earth is rotating, not an inertial frame Add Coriolis pseudo- as long as ces Can have several shallow layers too

## Harris, Steve Founder and Publisher

Harris, Steve is from United States and they belong to Electronic Gaming Monthly and they are from  San Francisco, United States got related to this Particular Journal. and Harris, Steve deal with the subjects like Consumer Audio; Consumer Electronics; New Products; Video/Computer Games

## Journal Ratings by Georgia Military College-Valdosta Campus

This Particular Journal got reviewed and rated by Georgia Military College-Valdosta Campus and short form of this particular Institution is GA and gave this Journal an Excellent Rating.