AE/ME 339 Computational Fluid Dynamics (CFD) 1...in the phrase computational fluid dynamics the word computational is simply an adjective to fluid dynamics.... -John D. Anderson 2 1
Equations of Fluid Dynamics, Physical Meaning of the terms, Forms suitable for CFD Equations are based on the following physical principles: Mass is conserved Newton s Second Law: F = ma The First Law of thermodynamics: e = δq -δw, for a system. 3 The form of the equation is immaterial in a mathematical sense. But in CFD applications, success or failure often depends on what form the equations are formulated in. This is a result of the CFD techniques not having firm theoretical foundation regarding stability and convergence, von Neumann s stability analysis notwithstanding. Recall that von Neumann stability analysis is applicable only for linear PDEs. The Navier-Stokes equations are non-linear. 4 2
An important associated topic is the treatment of the boundary conditions. This would depend on the CFD technique used for the numerical solution of the equations. Hence the term, numerical boundary condition. Control olume Analysis The governing equations can be obtained in the integral form by choosing a control volume (C) in the flow field and applying the principles of the conservation of mass, momentum and energy to the C. 5 The resulting PDE and the original integral form are in the conservation form. If the equations in the conservation form are transformed by mathematical manipulations, they are said to be in the non-conservation form. see Figure (next slide) 6 3
7 Consider a differential volume element d in the flow field. d is small enough to be considered infinitesimal but large enough to contain a large number of molecules for continuum approach to be valid. d may be: fixed in space with fluid flowing in and out of its surface or, moving so as to contain the same fluid particles all the time. In this case the boundaries may distort and the volume may change. 8 4
Substantial derivative (time rate of change following a moving fluid element) Insert Figure 2.3 9 The velocity vector can be written in terms of its Cartesian components as: = iutxyz ˆ (,,, ) + ˆjvtxyz (,,, ) + kwtxyz ˆ (,,, ) where u = u(t, x, y, z) v = v(t, x, y, z) w = w(t, x, y, z) 10 5
@ time t 1 : @ time t 2 : ρ = ρ( t, x, y, z ) 1 1 1 1 1 ρ = ρ( t, x, y, z ) 2 2 2 2 2 Using Taylor series ρ ρ ρ ρ ρ = ρ + ( t t ) + ( x x ) + ( y y ) + ( z z ) 2 1 2 1 2 1 2 1 2 1 t 1 x 1 y z 1 1 + ( higher order terms) 11 The time derivative can be written as shown on the RHS in the following equation. This way of writing helps explain the meaning of total derivative. ρ2 ρ1 ρ ρ x2 x1 ρ y2 y1 ρ z2 z1 = + + +...(2.1) t t t x t t y t t z t t 2 1 1 1 2 1 1 2 1 1 2 1 12 6
We can also write ρ2 ρ1 Dρ lim t t Dt t2 t1 x lim t t2 t1 2 1 x t 2 1 2 1 u y lim t t2 t1 y t 2 1 2 1 v z lim t t2 t1 z t 2 1 2 1 w 13 Substitution of the above in equation (2.1) yields D ρ ρ u ρ v ρ = + + + w ρ...(2.2) Dt t x y z D where the operator Dt the following manner. can now be seen to be defined in D + u + v + w...(2.3) Dt t x y z 14 7
The operator in vector calculus is defined as ˆ ˆ i j kˆ + +...(2.4) x y z which can be used to write the total derivative as D Dt + ( )...(2.5) t 15 Example: derivative of temperature, T DT T T T T T + ( ) T + u + v + w...(2.6) Dt t t x y z local derivative convective derivative 16 8
A simpler way of writing the total derivative is as follows: ρ ρ ρ ρ dρ = dt+ dx+ dy+ dz...(2.7) t x y z d ρ ρ ρ dx ρ dy dz = + + + ρ...(2.8) dt t x dt y dt z dt d ρ ρ u ρ v ρ = + + + w ρ...(2.9) dt t x y z 17 The above equation shows that dρ Dρ and have the same meaning, dt Dt and the latter form is used simply to emphasize the physical meaning that it consists of the local derivative and the convective derivatives. Divergence of elocity (What does it mean?) ( Section 2.4) Consider a control volume moving with the fluid. Its mass is fixed with respect to time. Its volume and surface change with time as it moves from one location to another. 18 9
Insert Figure 2.4 19 The volume swept by the elemental area ds during time interval t can be written as ( ) ( ) = t nˆ ds = t ds...(2.10) Note that, depending on the orientation of the surface element, v could be positive or negative. Dividing by t and letting 0 gives the following expression. D Dt = 1 t ds = ds...(2.11) lim ( ) t t 0 S S 20 10
The LHS term is written as a total time derivative because the fluid element is moving with the flow and it would undergo both the local acceleration and the convective acceleration. The divergence theorem from vector calculus can now be used to transform the surface integral into a volume integral. D Dt ( ) =. d...(2.12) 21 If we now shrink the moving control volume to an infinitesimal volume, δ,, the above equation becomes D ( ) = ( ) d...(2.13) Dt δ When δ 0 the volume integral can be replaced by on the RHS to get the following. 1 D ( ) =...(2.14) δ Dt δ The divergence of is the rate of change of volume per unit volume. 22 11
23 Continuity Equation (2.5) Consider the C fixed in space. Unlike the earlier case the shape and size of the C are the same at all times. The conservation of mass can be stated as: Net rate of outflow of mass from C through surface S = time rate of decrease of mass inside the C 24 12
The net outflow of mass from the C can be written as ρ s ds...(2.16) Note that ds by convention is always pointing outward. Therefore can be (+) or (-) depending on the directions of the velocity and the surface element. ds 25 Total mass inside C Mass = ρ d...(2.20) Time rate of increase of mass inside C t ρd...(2.18) Conservation of mass can now be used to write the following equation t ρd + ρ ds = 0...(2.19) S See text for other ways of obtaining the same equation. 26 13
Use divergence theorem for the second term ρd + = 0...(2.19) t ρ ds = d S t ρ ds S ( ρ ) ( ρ ) ρd + d = 0 ρ + ρ d = 0 t d is arbitrary. ρ + ρ = 0 t This is the divergence form of the conservation of mass equation 27 28 14
An infinitesimally small element fixed in space 29 Net outflow in x-direction ( ρu) ( ρu) ρu + dx dydz ( ρu) dydz = dxdydz x x Net outflow in y-direction ( ρv) ( ρv) ρv + dy dxdz ( ρv) dxdz = dxdydz y y Net outflow in z-direction ( ρw) ( ρw) ρw + dz dxdy ( ρw) dxdy = dxdydz z z ( ρu) ( ρv) ( ρw) Net mass flow = + + dxdydz...(2.22) x y z 30 15
volume of the element = dx dy dz mass of the element = ρ(dx dy dz) ρ Time rate of mass increase = ( dxdydz)...(2.23) t Net rate of outflow from C = time rate of decrease of mass within C ( ) ( ) ( ) ρu ρv ρw ρ + + dxdydz = dxdydz x y z t or ( ρu) ( ρv) ( ρw) ρ + + + = 0...(2.24) t x y z ( ) 31 Which becomes ρ + = t ( ρ ) 0...(2.25) The above is the continuity equation valid for unsteady flow Note that for steady flow and unsteady incompressible flow the first term is zero. Note that Eq. 2.21 is wrong (also shown in Fig. 2.6 Read Section 2.5.4 for alternate form of derivation Figure 2.6 (next slide) shows conservation and non-conservation forms of the continuity equation. Note an error in Figure 2.6: Dp/Dt should be replace with Dρ/Dt. Read Section 2.5.5 32 16
33 17