12222021 ODE 1 Computational Fluid Dynamics AEME 339

  • Slides: 47
Download presentation
12/22/2021 ODE 1

12/22/2021 ODE 1

Computational Fluid Dynamics (AE/ME 339) Course Outline 1 K. M. Isaac MAEEM Dept. ,

Computational Fluid Dynamics (AE/ME 339) Course Outline 1 K. M. Isaac MAEEM Dept. , UMR Please email me ( isaac@umr. edu ) the following Information: 1. 2. 3. 4. Mailing address Phone number Fax number Any other information you want me to know 12/22/2021 ODE 2

Computational Fluid Dynamics (AE/ME 339) Course Outline 1 K. M. Isaac MAEEM Dept. ,

Computational Fluid Dynamics (AE/ME 339) Course Outline 1 K. M. Isaac MAEEM Dept. , UMR Password to access files: will be emailed to you Course Information 12/22/2021 ODE 3

Computational Fluid Dynamics (AE/ME 339) Course Outline 1 K. M. Isaac MAEEM Dept. ,

Computational Fluid Dynamics (AE/ME 339) Course Outline 1 K. M. Isaac MAEEM Dept. , UMR Course Outline • Ordinary differential equations (ODE) • Numerical techniques for solving ODEs • Example: Flow in constant area pipe with heat addition and friction • Partial differential equations, classification • Discretization of derivatives • Errors and analysis of stability • Example: Unsteady heat conduction in a rod • Example: Natural convection at a heated vertical plate • Discretization techniques 12/22/2021 ODE 4

Computational Fluid Dynamics (AE/ME 339) Course Outline 2 K. M. Isaac MAEEM Dept. ,

Computational Fluid Dynamics (AE/ME 339) Course Outline 2 K. M. Isaac MAEEM Dept. , UMR Course Outline (continued) • Couette flow • The shock tube problem • Introduction to packaged codes: Grid generation Problem setup Solution • Turbulence modeling 12/22/2021 ODE 5

Computational Fluid Dynamics (AE/ME 339) Introduction 1 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) Introduction 1 K. M. Isaac MAEEM Dept. , UMR ODEs and PDEs may be discretized-approximatedas a set of algebraic equations and solved Discretization methods for ODEs are well known e. g. , Runge-Kutta methods for initial value problems and shooting methods for BV problems PDEs involve more than 1 independent variable e. g. , x, y, z, t in Cartesian coordinates for time-dependent Problems PDEs can be discretized using finite difference Methods 12/22/2021 ODE 6

Computational Fluid Dynamics (AE/ME 339) Introduction 2 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) Introduction 2 K. M. Isaac MAEEM Dept. , UMR PDEs can also be discretized in integral form, known as finite volume methods Sometimes coordinate transformation is necessary before discretization 12/22/2021 ODE 7

Computational Fluid Dynamics (AE/ME 339) ODEs 0 a K. M. Isaac MAEEM Dept. ,

Computational Fluid Dynamics (AE/ME 339) ODEs 0 a K. M. Isaac MAEEM Dept. , UMR Flow with heat addition and friction Ref: Hill & Peterson, Mechanics and Thermodynamics of Propulsion, Addison-Wesley 12/22/2021 ODE 8

Computational Fluid Dynamics (AE/ME 339) ODEs 0 b K. M. Isaac MAEEM Dept. ,

Computational Fluid Dynamics (AE/ME 339) ODEs 0 b K. M. Isaac MAEEM Dept. , UMR Flow with heat addition and friction Ref: Hill & Peterson, Mechanics and Thermodynamics of Propulsion, Addison-Wesley 12/22/2021 ODE 9

Computational Fluid Dynamics (AE/ME 339) ODEs 0 c K. M. Isaac MAEEM Dept. ,

Computational Fluid Dynamics (AE/ME 339) ODEs 0 c K. M. Isaac MAEEM Dept. , UMR Flow with heat addition and friction Ref: Hill & Peterson, Mechanics and Thermodynamics of Propulsion, Addison-Wesley 12/22/2021 ODE 10

Computational Fluid Dynamics (AE/ME 339) ODEs 1 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 1 K. M. Isaac MAEEM Dept. , UMR Flow with heat addition and friction Ref: Hill & Peterson, Mechanics and Thermodynamics of Propulsion, Addison-Wesley CV 12/22/2021 ODE 11

Computational Fluid Dynamics (AE/ME 339) ODEs 2 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 2 K. M. Isaac MAEEM Dept. , UMR Flow with heat addition and friction CV Perfect gas flows from left to right in a constant area duct Heat addition and/or friction may be present Flow properties will change during the process Equations can be solved analytically when either heat addition or friction is present, but not both 12/22/2021 ODE 12

Computational Fluid Dynamics (AE/ME 339) ODEs 3 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 3 K. M. Isaac MAEEM Dept. , UMR Flow with heat addition Stagnation enthalpy change (Conservation of Energy/First Law) (1) Conservation of mass (2) 12/22/2021 ODE 13

Computational Fluid Dynamics (AE/ME 339) ODEs 4 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 4 K. M. Isaac MAEEM Dept. , UMR Flow with heat addition Momentum (3) Stagnation Enthalpy (4) 12/22/2021 ODE 14

Computational Fluid Dynamics (AE/ME 339) ODEs 5 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 5 K. M. Isaac MAEEM Dept. , UMR Flow with heat addition Integration yields (5) Equation of state Speed of sound 12/22/2021 ODE 15

Computational Fluid Dynamics (AE/ME 339) ODEs 6 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 6 K. M. Isaac MAEEM Dept. , UMR Flow with heat addition Above equations can be combined to yield the following 12/22/2021 ODE 16

Computational Fluid Dynamics (AE/ME 339) ODEs 7 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 7 K. M. Isaac MAEEM Dept. , UMR Flow with heat addition The above equation + the following adiabatic flow relation can be used to get stagnation temperature ratio 12/22/2021 ODE 17

Computational Fluid Dynamics (AE/ME 339) ODEs 8 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 8 K. M. Isaac MAEEM Dept. , UMR Flow with heat addition Note: Final Mach number depends on initial Mach number and final stagnation temperature. 12/22/2021 ODE 18

Computational Fluid Dynamics (AE/ME 339) ODEs 9 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 9 K. M. Isaac MAEEM Dept. , UMR Flow with heat addition Reference conditions Note that the stagnation conditions change due to heat addition For given initial conditions, Mach 1 conditions, denoted by (*) can be used for reference Thus 12/22/2021 ODE 19

Computational Fluid Dynamics (AE/ME 339) ODEs 10 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 10 K. M. Isaac MAEEM Dept. , UMR Flow with heat addition The above equation shows that, for given initial conditions, fluid properties are only a function of the local Mach number 12/22/2021 ODE 20

Computational Fluid Dynamics (AE/ME 339) ODEs 11 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 11 K. M. Isaac MAEEM Dept. , UMR Flow with heat addition 12/22/2021 ODE 21

Computational Fluid Dynamics (AE/ME 339) ODEs 12 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 12 K. M. Isaac MAEEM Dept. , UMR Flow with heat addition Calculation procedure, given p 01, T 01, M 1, and q Determine T 0* using T 01 and M 1 Determine T 02/T 0* using Calculate M 2, p 02 Flow with heat addition Observe in figure, for subsonic and supersonic cases Heat addition drives M towards 1. Results in “thermal 12/22/2021 ODE choking. ” There is a loss of stagnation pressure. 22

Computational Fluid Dynamics (AE/ME 339) ODEs 13 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 13 K. M. Isaac MAEEM Dept. , UMR Flow with heat addition and friction 12/22/2021 ODE 23

Computational Fluid Dynamics (AE/ME 339) ODEs 14 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 14 K. M. Isaac MAEEM Dept. , UMR Flow with heat addition and friction 12/22/2021 ODE 24

Computational Fluid Dynamics (AE/ME 339) ODEs 15 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 15 K. M. Isaac MAEEM Dept. , UMR Flow with friction Momentum equation where c is the circumference and A is the cross-section area. cdx is the curved surface area of the tube of length dx. t 0 is the wall shear stress (N/m 2) 12/22/2021 ODE 25

Computational Fluid Dynamics (AE/ME 339) ODEs 16 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 16 K. M. Isaac MAEEM Dept. , UMR Flow with friction The energy equation in this case is or h 0 = h + u 2/2 = constant dh + udu = 0 Shear stress correlation for fully developed pipe flow 12/22/2021 ODE 26

Computational Fluid Dynamics (AE/ME 339) ODEs 17 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 17 K. M. Isaac MAEEM Dept. , UMR Flow with friction where e is the rms roughness of the pipe wall cf is the skin coefficient The equations of continuity, momentum and energy can now be combined with the perfect gas equation of state to get the equations for flow with friction 12/22/2021 ODE 27

Computational Fluid Dynamics (AE/ME 339) ODEs 18 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 18 K. M. Isaac MAEEM Dept. , UMR Flow with friction See Hill & Peterson for detailed derivation of the following equation Note the behavior of the flow for subsonic and supersonic cases. In both cases, Mach number tends towards 1. Condition is called friction choking 12/22/2021 ODE 28

Computational Fluid Dynamics (AE/ME 339) ODEs 19 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 19 K. M. Isaac MAEEM Dept. , UMR Flow with friction Integrating and applying the limit between M = M and M = 1 yields the following result for “length to choke, ” L* 12/22/2021 ODE 29

Computational Fluid Dynamics (AE/ME 339) ODEs 20 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 20 K. M. Isaac MAEEM Dept. , UMR Flow with friction 12/22/2021 ODE 30

Computational Fluid Dynamics (AE/ME 339) ODEs 21 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 21 K. M. Isaac MAEEM Dept. , UMR Flow with heat addition and friction The continuity equation is the same as before. The momentum equation has the shear stress term. The energy equation has the heat addition (q) term. These equations can now be combined with the perfect gas equation to get the differential equation which does not have a closed-form solution. Solution can be obtained by numerical integration. 12/22/2021 ODE 31

Computational Fluid Dynamics (AE/ME 339) ODEs 22 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 22 K. M. Isaac MAEEM Dept. , UMR (1) (2) (3) 12/22/2021 ODE 32

Computational Fluid Dynamics (AE/ME 339) ODEs 23 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 23 K. M. Isaac MAEEM Dept. , UMR (4) (5) Momentum (6) 12/22/2021 ODE 33

Computational Fluid Dynamics (AE/ME 339) ODEs 24 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 24 K. M. Isaac MAEEM Dept. , UMR From (1) (7) Substitute in ( 4 ) (8) 12/22/2021 ODE 34

Computational Fluid Dynamics (AE/ME 339) ODEs 25 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 25 K. M. Isaac MAEEM Dept. , UMR Combine (3) and (6) (9) 12/22/2021 ODE 35

Computational Fluid Dynamics (AE/ME 339) ODEs 26 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 26 K. M. Isaac MAEEM Dept. , UMR (10) 12/22/2021 ODE 36

Computational Fluid Dynamics (AE/ME 339) ODEs 27 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 27 K. M. Isaac MAEEM Dept. , UMR (11) 12/22/2021 ODE 37

Computational Fluid Dynamics (AE/ME 339) ODEs 28 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 28 K. M. Isaac MAEEM Dept. , UMR Substitute (10) and (11) in (9) 2 nd RHS term: 12/22/2021 ODE 38

Computational Fluid Dynamics (AE/ME 339) ODEs 29 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 29 K. M. Isaac MAEEM Dept. , UMR (12) 12/22/2021 ODE 39

Computational Fluid Dynamics (AE/ME 339) ODEs 30 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 30 K. M. Isaac MAEEM Dept. , UMR (11) Substitute in (8) using (10) and (11) 12/22/2021 ODE 40

Computational Fluid Dynamics (AE/ME 339) ODEs 31 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 31 K. M. Isaac MAEEM Dept. , UMR LHS factor: 12/22/2021 ODE 41

Computational Fluid Dynamics (AE/ME 339) ODEs 32 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 32 K. M. Isaac MAEEM Dept. , UMR or 12/22/2021 ODE 42

Computational Fluid Dynamics (AE/ME 339) ODEs 33 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 33 K. M. Isaac MAEEM Dept. , UMR Flow with heat addition and friction The final form of the equation is as follows (see handout for details). 12/22/2021 ODE 43

Computational Fluid Dynamics (AE/ME 339) ODEs 34 K. M. Isaac MAEEM Dept. , UMR

Computational Fluid Dynamics (AE/ME 339) ODEs 34 K. M. Isaac MAEEM Dept. , UMR Flow with heat addition and friction The above ODE can be integrated by using methods such as Runge-Kutta or using software packages such as Matlab which has routines for solving ODEs 12/22/2021 ODE 44

Computational Fluid Dynamics (AE/ME 339) Runge-Kutta K. M. Isaac MAEEM Dept. , UMR Runge-Kutta

Computational Fluid Dynamics (AE/ME 339) Runge-Kutta K. M. Isaac MAEEM Dept. , UMR Runge-Kutta Method See hand out for theory. 4 th order method: Let the first order ODE be represented as 12/22/2021 ODE 45

Computational Fluid Dynamics (AE/ME 339) Runge-Kutta K. M. Isaac MAEEM Dept. , UMR The

Computational Fluid Dynamics (AE/ME 339) Runge-Kutta K. M. Isaac MAEEM Dept. , UMR The 4 th order RK-Gill algorithm is then given by 12/22/2021 ODE 46

Computational Fluid Dynamics (AE/ME 339) Runge-Kutta K. M. Isaac MAEEM Dept. , UMR The

Computational Fluid Dynamics (AE/ME 339) Runge-Kutta K. M. Isaac MAEEM Dept. , UMR The method can be used for several simultaneous first-order equations as well as a single higher-order equation. See Carnahan, Luther and Wilkes for details. 12/22/2021 ODE 47