http://www.nd.edu/~gtryggva/cfd-course/ http://www.nd.edu/~gtryggva/cfd-course/ Computational Fluid Dynamics Lecture 4 January 30, 2017 The Equations Governing Fluid Motion Grétar Tryggvason Outline Derivation of the equations governing fluid flow in integral form Conservation of Momentum Conservation of Energy Summary Incompressible flows Inviscid compressible flows Conservation of Mass In general, mass can be added or removed: Rate of Net influx increase of = of mass mass time t The conservation law must be stated as: Final Mass = Original Mass + time t+ t Mass Mass - Added Removed We now apply this statement to an arbitrary control volume in an arbitrary flow field
volume volume The rate of change of total mass in the control volume is given by: Rate of change ρdv Total mass surface S To find the mass flux through the control surface, let s examine a small part of the surface where the velocity is normal to the surface surface S Density ρ elocity U x Select a small rectangle outside the boundary such that during time t it flows into the C: A U t time t time t+ t Mass flow through the boundary A during t is: ρu x ΔtΔA where U x = -u n The sign of the normal component of the velocity determines whether the fluid flows in or out of the control volume. We will take the outflow to be positive: The net in-flow through the boundary of the control volume is therefore: Negative since this is net inflow Integral over the boundary u n < 0 S ρu n ds Inflow Mass flow normal to boundary Equation in Integral Form ρdv = ρu nds S Rate of change of mass Net inflow of mass Conservation of momentum
Conservation of momentum Rate of change of momentum Momentum per volume: ρu Momentum in control volume: ρu dv Rate of increase of = Net influx of Body momentum + momentum forces + Surface forces The rate of change of momentum in the control volume is given by: Rate of change ρu dv Total momentum volume surface S Density ρ elocity u In/out flow of momentum Select a small rectangle outside the boundary such that during time t it flows into the C: A U x U x t time t time t+ t U x = -u n so the net influx of momentum per unit time (divided by t ) is: Momentum flow through the boundary A during t is: ( ρu)u x ΔtΔA ρuu nds Body forces, such as gravity act on the fluid in the control volume. Body force dv f ρ f dv volume Total body force iscous force iscous flux of momentum The viscous force is given by the dot product of the normal with the stress tensor T ds T n T nds S volume surface S Stress Tensor T = ( p + λ u)i + 2µD Deformation Tensor ( ) D = 1 u + ut 2 Whose components are: D ij = 1 u i + u j 2 x j x i For incompressible flows u = 0 And the stress tensor is T = pi + 2µD Total stress force
The pressure produces a normal force on the control surface. The total force is: Pressure force ds pn pnds S volume surface S Total pressure force Conservation of Momentum Gathering the terms ρudv = ρuu nds Tnds + ρ f dv Substitute for the stress tensor ρudv = ρuu nds pnds + 2µD nds + ρ f dv Rate of change of momentum Net inflow of momentum Total pressure T = pi + 2µD Total viscous force Total body force Conservation of energy Conservation of energy The energy equation in integral form Rate of change of kinetic+internal energy ρ e + 1 2 u2 dv = ρ e + 1 2 u2 u nds + u f dv + Work done by body forces Net inflow of kinetic+internal energy n (ut)ds n qds Net work done by the stress tensor Net heat flow Differential Form of the Governing Equations The Divergence or Gauss Theorem can be used to convert surface integrals to volume integrals a dv = a n ds S
Start with the integral form of the mass conservation equation ρdv = ρu nds S Using Gauss s theorem ρu nds = (ρu)dv S The mass conservation equations becomes ρdv = (ρu)dv Rearranging ρdv + (ρu)dv = 0 Since the control volume is fixed, the derivative can be moved under the integral sign ρ dv + (ρu)dv = 0 Rearranging ρ + (ρu) dv = 0 ρ + (ρu) dv = 0 This equation must hold for ANY control volume, no matte what shape and size. Therefore the integrand must be equal to zero ρ + (ρu) = 0 Expanding the divergence term: (ρu) = u ρ + ρ u The mass conservation equation becomes: or where ρ ρ + (ρu) = + u ρ + ρ u Dρ Dt + ρ u = 0 D() Dt = () + u () Convective derivative The differential form of the momentum equation is derived in the same way: Start with ρu dv = ρ f dv + (nt ρu(u n))ds Rewrite as: ρu dv = ρ f dv + ( T ρuu )dv To get: ρu = ρ f + (T ρuu) Using the mass conservation equation the advection part can be rewritten: ρu + ρuu = u ρ u + u uρ + ρ + ρu u = u ρ + uρ + ρ Du Dt = ρ Du Dt =0, by mass conservation
The momentum equation equation ρu = ρ f + (T ρuu) Can therefore be rewritten as ρ Du Dt = ρ f + T The energy equation equation can be converted to a differential form in the same way. It is usually simplified by subtracting the mechanical energy where ρ Du Dt = ρ u + u u The mechanical energy equation is obtained by taking the dot product of the momentum equation and the velocity: u ρ u + ρu u = ρ f + T The result is: ρ u 2 = ρu u 2 + ρu f 2 2 b + u T The mechanical energy equation ( ) The final result is Subtract the mechanical energy equation from the energy equation ρ De T u + q = 0 Dt Using the constitutive relation presented earlier for the stress tensor and Fourie s law for the heat conduction: T = ( p + λ u)i + 2µD q = k T The final result is where ρ De Dt + p u = Φ + k T Φ = λ( u) 2 + 2µD D is the dissipation function and is the rate at which work is converted into heat. Generally we also need: p = p(e, ρ); T = T(e, ρ); and equations for µ, λ, k Summary of governing equations
Integral Form ρ dv = ρu nds S ρudv = ρ f dv + (nt ρu(u n))ds ρ(e + 1 2 u2 )dv = u ρ f dv + n (ut ρ(e + 1 2 u2 ) q)ds Conservative Form ρ + (ρu) = 0 ρu = ρ f + (T ρuu) ρ(e + 1 2 u2 ) = ρ(e + 1 2 u2 )u ut +q Convective Form Dρ Dt + ρ u = 0 ρ Du Dt = ρ f + T ρ De = T u q Dt Special Cases Compressible inviscid flows Incompressible flows Stokes flow Not in this course! Potential flows Inviscid compressible flows U = U + E x + F y + G z = 0 ρ ρu ρv ρw ρe E = ρu ρu 2 + p ρuv ρuw ( ρe + p)u F = Where we have taken ρv ρuv ρv 2 + p ρvw ( ρe + p)v T = pi ρu ρuw G = ρvw ρw 2 + p ( ρe + p)u Incompressible flow p = ρrt; e = c v T; h = c p T; γ = c p /c v c v = R (γ 1)e ; p = (γ 1)ρe; T = ; γ 1 R Assuming Ideal Gas
Incompressible flows: Dρ Dt = 0 Dρ Dt + ρ u = 0 u = 0 Navier-Stokes equations (conservation of momentum) ρu = ρuu- P + ρ f + µ u + b T u For constant viscosity ρ u + ρu u = - P + ρ f b + µ 2 u ( ) Objectives: The 2D Navier-Stokes Equations for incompressible, homogeneous flow: u + u u x + v u y = 1 P ρ x + u x + v y = 0 µ 2 u ρ x + 2 u 2 y 2 v + u v x + v v y = 1 P ρ y + µ 2 v ρ x + 2 v 2 y 2 u nds = 0 S ud vd Incompressibility (conservation of mass) Navier-Stokes equations (conservation of momentum) = uu nds +ν u nds 1 ρ pn x ds S S = vu nds +ν v n S ds 1 S ρ pn S y ds S Advection: The role of pressure: Pressure and Advection Newton s law of motion: In the absence of forces, a fluid particle will move in a straight line Needed to accelerate/decelerate a fluid particle: Easy to use if viscous forces are small Needed to prevent accumulation/depletion of fluid particles: Use if there are strong viscous forces Pressure Pressure The pressure opposes local accumulation of fluid. For compressible flow, the pressure increases if the density increases. For incompressible flows, the pressure takes on whatever value necessary to prevent local accumulation: Increasing pressure slows the fluid down and decreasing pressure accelerates it Pressure increases Pressure decreases High Pressure Low Pressure u < 0 u > 0 Slowing down Speeding up
iscosity Diffusion of fluid momentum is the result of friction between fluid particles moving at uneven speed. The velocity of fluid particles initially moving with different velocities will gradually become the same. Due to friction, more and more of the fluid next to a solid wall will move with the wall velocity. Instability and unsteadyness For all but the lowest Reynolds numbers, the fluid flow is unstable and unsteady, forming transient whorls and vortices that greatly increase the transfer of momentum over what viscosity alone can do. The Kelvin Helmholtz instability of a slip line between flows in different directions is one of the fundamental ways in which steady flow becomes unstable. Time Nondimensional Numbers the Reynolds number U 2 Nondimensional Numbers u + u u x + v u y = 1 P ρ x + u, v = u,v U ; x, y = x, y L ; µ 2 u + 2 u ρ x 2 y 2 t = Ut L u L t + u u x + v u y = 1 P Lρ x + U µ 2 u L 2 ρ x + 2 u 2 y 2 u t + u u x + v u y = L 1 U 2 P Lρ x + L U µ 2 u U 2 L 2 ρ x + 2 u 2 y 2 u t + Nondimensional Numbers u u x + v u y = L 1 U 2 P Lρ x + L 1 P U 2 Lρ x = 1 P ρu 2 x = P x L U µ 2 u U 2 L 2 ρ x + 2 u 2 y 2 where P = P ρu 2 Nondimensional Numbers The momentum equations are: u t + u u x + v u y = P x + 1 2 u Re x + 2 u 2 y 2 v t + u v x + v v y = P y + 1 2 v Re x + 2 v 2 y 2 L U µ U 2 L 2 ρ = µ ULρ = 1 Re where Re = ρul µ The continuity equation is unchanged u x + v y = 0
Outline Derivation of the equations governing fluid flow in integral form Conservation of Momentum Conservation of Energy Summary Incompressible flows Inviscid compressible flows Integral versus differential form of the governing equations When using FINITE OLUME approximations, we work directly with the integral form of the conservation principles. The average values of f in a small volume are stored f 1 +1 x j-1 x j x j+1 x j-1/2 x j+1/2 x To derive an equation that governs the evolution of the average value in each cell, consider: d dt f + F x = 0 Integrating the equation over a small control volume of size h= Δx=x j+1 -x j yields: f dx + F dx = 0 x Δx Δx f dx + F j +1/ 2 F j 1/ 2 = 0 Δx The volume is fixed in space or: d dt (h ) = F j 1/2 F j +1/2 Notation: Average value of f in cell j where the average in each cell is defined by: = 1 h Δx f dx F j 1/ 2 Flow of f into cell j x x j j-1/2 x j+1/2 F j +1/ 2 Flow of f out of cell j F j-1/2 is the flow of f into cell j F j+1/2 is the flow of f out off cell j F is usually called the flux function Left boundary of cell j Right boundary of cell j Center of cell j
The exact form of F depends on the problem: F = Uf F = D f x F = Uf D f x Advection Diffusion Advection/Diffusion The statement d dt (h) = F j 1/2 F j +1/2 Is exactly the original conservation law The rate of increase of the average value of f is equal to the inflow into the control volume minus the outflow from the control volume Rate of increase in f = inflow of f -outflow of f Example: advection/diffusion equation Rewrite: were f + U f 2 x = D f x 2 f + F x = 0 F = Uf D f x Assume here that U is a constant For each cell Average value of f in cell j x x j j-1/2 d dt (h) = F j 1/2 F j +1/2 x j+1/2 F j +1/ 2 = 1 h Δx f dx F j +1/2 = U +1/2 D f x j +1/2 x x j j-1/2 x j+1/2 Average value of f in cell j Approximate: F j +1/ 2 +1 / 2 1 2 ( +1 + ) f at a cell boundary Need to find F j +1/2 = U +1/2 D f x j +1/2 and f +1 x j +1 / 2 h gradient of f at a cell boundary Approximate: F j +1/2 = U +1/2 D f 1 x j +1/2 2 U( f + f ) D f +1 j j +1 j h F j 1/2 =U 1/2 D f 1 x j 1/2 2 U( f + f ) D 1 j j 1 h and d dt 1 Δt ( f n+1 j f n j ) time derivative of f
Substituting: h Δt ( f n+1 j f n j ) = U( 1 ( f + f ) 2 j +1 j 1 ( f 2 j + 1 )) + D f +1 j h Or, rearranging the terms: n +1 n 1 h + U 2h ( f f ) = D j +1 j 1 ( f h 2 j +1 2 + 1 ) Δt Which is exactly the same as the finite difference equation if we take the average value to be the same as the value in the center of the cell Example: U=1; D=0.05; k=1 N=21 Δt=0.05 Exact Numerical The finite volume point of view has two main advantages over the finite difference point of view 1. Working directly with the conservation principle (no implicit assumption of smoothness and differentiability) Most physical laws are based on CONSERATION principles: In the absence of explicit sources or sinks, f is neither created nor destroyed. For a control volume fixed in space, we can state the conservation of f as: 2. Easier visualization of how the solution is updated (the fluxes have a physical meaning) Analysis of accuracy and stability is, however, usually easier using the finite difference point of view Amount of f in a control volume after a given time interval Δt Amount of f in the control volume at the beginning of the time interval Δt Amount of f that flows into the control volume during Δt = + - Amount of f that flows out of the control volume during Δt Rate of increase of f in a control volume during a given time interval Δt This can be restated in rate form as: = Net rate of flow of f into the control volume during the time interval Δt The mathematical equivalent of this statement is: d dt C f dv =! CS fu nds While we can derive a partial differential expression from this equation, often it is better to work directly with the conservation principle in integral form