1 / 1 Computational Fluid Dnamics (CFD, CHD)* PDE (Shocks 1st); Part I: Basics, Part II: Vorticit Fields Rubin H Landau Sall Haerer, Producer-Director Based on A Surve of Computational Phsics b Landau, Páez, & Bordeianu with Support from the National Science Foundation Course: Computational Phsics II
Problem: Placement of Boulders for Migrating Salmon Wake Block Force of River? River surface River surface L L H bottom bottom Deep, wide, fast-flowing streams Boulder = long rectangular beam, plates Objects not disturb surface/bottom flow Problem: large enough wake for 1m salmon 2 / 1
3 / 1 Theor: Hdrodnamics Assumptions; Continuit Equation River surface River surface L L H bottom bottom ρ(, t) t + j = 0 (1) j def = ρ v(, t) (2) (1): Continuit equation 1st eqtn hdrodnamics Incompressible fluid ρ = constant Friction (viscosit) Stead state, v v(t)
4 / 1 Navier Stokes: 2nd Hdrodnamic Equation Hdrodnamic Time Derivative Dv Dt def = (v )v + v t (1) For quantit within moving fluid Rate of change wrt stationar frame Velocit of material in fluid element Change due to motion + eplicit t dependence Dv/Dt: 2nd O v nonlinearities Fictitious (inertial) forces Fluid s rest frame accelerates
5 / 1 Now Reall the Navier Stokes Equation Transport Fluid Momentum Due to Forces & Flow Dv Dt = ν 2 v 1 ρ P(ρ, T, ) (Vector Form) (1) v t + z j= v j v j = ν z j= 2 v 2 j 1 ρ P ( component) (2) ν = viscosit, P = pressure Recall dp/dt = F Dv/Dt def = (v )v + v/ t v v: transport via flow v v: advection P :change due to P ν 2 v: due to viscosit P(ρ, T, ): equation state Assume = P() Stead-state tv i = 0 Incompressible tρ = 0
Resulting Hdrodnamic Equations Assumed: Stead State, Incompressible, P = P() v i v i i = 0 (Continuit) (1) (v )v =ν 2 v 1 ρ P (Navier Stokes) (2) (1) Continuit equation: Incompressibilit, in = out Stream width beam z dimension z v 0 v + v = 0 (3) ( ) 2 v ν + 2 v 2 2 ( ) 2 v ν + 2 v 2 2 v = v + v v + 1 P ρ v = v + v v + 1 P ρ (4) (5) 6 / 1
7 / 1 Boundar Conditions for Parallel Plates Phsics Determines BC Unique Solution H L Constant stream velocit + Low V 0, high viscosit Laminar: smooth, no cross streamlines of motion Thin plates laminar flow Upstream unaffected Solve rectangular region L, H R stream uniform down Far top, bot smmetr
Analtic Solution for Parallel Plates (See Tet) Bernoulli Effect: Pressure Drop Through Plates River surface River surface L L H bottom bottom v () = 1 P 2ρν ( 2 H) (1) P = known constant (2) V 0 = 1 m/s, ρ = 1 kg/m 3, ν = 1 m 2 /s, H = 1 m (3) (4) P = 12, v() = 6(1 ) 8 / 1
9 / 1 Finite-Difference Navier Stokes Algorithm + SOR Rectangular grid = ih, = jh 3 Simultaneous equations 2 (v 0) v i+1,j v i 1,j + v i,j+1 v i,j 1 = 0 (1) v i+1,j + v i 1,j + v i,j+1 + v i,j 1 4v i,j (2) = h 2 v i,j [ v i+1,j vi 1,j ] h + 2 v [ i,j v i,j+1 vi,j 1 ] h + 2 [P i+1,j P i 1,j ] Rearrange as algorithm for Successive Over Relaation 4v i,j = vi+1,j + vi 1,j + vi,j+1 + vi,j 1 h 2 v i,j [ v i+1,j vi 1,j ] h 2 v [ i,j v i,j+1 vi,j 1 ] h 2 [P i+1,j P i 1,j ] (3) Accelerate convergence + SOR; ω > 2 unstable
10 / 1 End Part I: Basics River surface River surface L L H bottom bottom
Part II: Vorticit Form of Navier Stokes Equation 2 HD Equations in Terms of Stream Function u() v = 0 Continuit (1) (v )v = 1 ρ P + ν 2 v Navier Stokes (2) Like EM, simpler via (scalar & vector) potentials Irrotational Flow: no turbulence, scalar potential Rotational Flow: 2 vector potentials; 1st stream function v def = u() (3) ( ) ( ) uz = ˆɛ u u + ˆɛ z z uz (4) ( u) 0 automatic continuit equation 11 / 1
2 HD Equations in Terms of Stream Function (cont) 2-D flow: u = Constant Contour Lines = Streamlines v def = u() (1) ( ) ( ) uz = ˆɛ u u + ˆɛ z z uz (2) v z = 0 u() = u ˆɛ z (3) v = u, u v = (4) 12 / 1
13 / 1 Introduce Vorticit w() ω Vorte: Spinning, Often Turbulent Fluid Flow w def = v() (1) w z = ( ) v v (2) Measure of v s rotation RH rule fluid element w = 0 irrotational w = 0 uniform Moving field lines Relate to stream function:
14 / 1 Introduce Vorticit w() ω Poisson s equation 2 φ = 4πρ w(,) 12 0-1 6 0 w 40 80 0 def = v() (1) 50 0 20 w = v = ( u) = ( u) 2 u (2) et u = u(, ) ˆɛ z u = 0 (3) 2 u = w (4) Like Poisson with ea w component = source
15 / 1 Vorticit Form of Navier Stokes Equation Take Curl of Velocit Form [ (v )v = ν 2 v 1 ] P ρ (Navier Stokes) (1) ν 2 w = [( u) ]w (2) In 2-D + onl z components: 2 u + 2 u = w (3) 2 2 ( ) 2 w ν + 2 w 2 2 = u w u w Simultaneous, nonlinear, elliptic PDEs for u & w Poisson s + wave equation + friction + variable ρ (4)
Relaation Algorithm (SOR) for Vorticit Equations = ih, = jh CD Laplacians, 1st derivatives u i,j = 1 ) (u i+1,j + u i 1,j + u i,j+1 + u i,j 1 + h 2 w i,j 4 (1) w i,j = 1 4 (w i+1,j + w i 1,j + w i,j+1 + w i,j 1 ) R 16 {[u i,j+1 u i,j 1 ] [w i+1,j w i 1,j ] [u i+1,j u i 1,j ] [w i,j+1 w i,j 1 ]} (2) R = 1 ν = V 0h ν (in normal units) (3) R = grid Renolds number (h R pipe ); measure nonlinear Small R: smooth flow, friction damps fluctuations Large R ( 2000): laminar turbulent flow Onset of turbulence: hard to simulate (need kick) 16 / 1
H Boundar Conditions for Beam Surface G v =du/d=v 0 w = 0 F Inlet v = -du/d = 0 v =du/d=v 0 w = 0 v = -du/d = 0 u = 0 C Half Beam u = 0 du/d = 0 dw/d = 0 w = u = 0 D B w = u = 0 E A center line Well-defined solution of elliptic PDEs requires u, w BC Assume inlet, outlet, surface far from beam Freeflow: No beam NB w = 0 no rotation Smmetr: identical flow above, below centerline, not thru Outlet 17 / 1
Boundar Conditions for Beam (cont) See Tet for More Eplanations Centerline: = streamline, u = const =0 (no v No flow in, out beam to it u = 0 all beam surfaces Smmetr vorticit w = 0 along centerline Inlet: horizontal fluid flow, v = v = V 0 : Surface: Undisturbed free-flow conditions: Outlet: Matters little; convenient choice: u = w Beamsides: v = u = 0; viscous v = 0 Yet, over specif BC onl no-slip vorticit w: Viscosit v = u = 0 (beam top) Smooth flow on beam top v = 0 + no variation: v = 0 w = v = 2 u 2 (1) 18 / 1
19 / 1 Implementation & Assessment:SOR on a Grid Basic soltn vorticit form Navier Stokes: Beam.p NB relaation = simple, BC simple Separate relaation of stream function & vorticit Eplore convergence of up & downstream u Determine number iterations for 3 place with ω = 0, 0.3 Change beam s horizontal position so see wave develop Make surface plots of u, w, v with contours; eplain Is there a resting place for salmon?
20 / 1 Results w(,) 12 6 0-1 20 0 40 80 0 50 0