Computer Aided Design Lecture 5 Finite Difference
Total Page:16
File Type:pdf, Size:1020Kb
Computer Aided Design Lecture 5 Finite Difference Dr./ Ahmed Nagib Elmekawy Leonhard Euler (1707-1783) • In 1768, Leonhard Euler introduced the finite difference technique based on Taylor series expansion. 2 Lewis Fry Richardson (1881-1953) • In 1922, Lewis Fry Richardson developed the first numerical weather prediction system. • Division of space into grid cells and the finite difference approximations of Bjerknes's "primitive differential equations.” • His own attempt to calculate weather for a single eight-hour period took six weeks and ended in failure. • His model's enormous calculation requirements led Richardson to propose a solution he called the “forecast-factory.” • The "factory" would have filled a vast stadium with 64,000 people. • Each one, armed with a mechanical calculator, would perform part of the calculation. • A leader in the center, using colored signal lights and telegraph communication, would coordinate the forecast. 3 1930s to 1950s • Earliest numerical solution: for flow past a cylinder (1933). • A.Thom, ‘The Flow Past Circular Cylinders at Low Speeds’, Proc. Royal Society, A141, pp. 651-666, London, 1933 • Kawaguti obtained a solution for flow around a cylinder, in 1953 by using a mechanical desk calculator, working 20 hours per week for 18 months, citing: “a considerable amount of labour and endurance.” • M. Kawaguti, ‘Numerical Solution of the NS Equations for the Flow Around a Circular Cylinder at Reynolds Number 40’, Journal of Phy. Soc. Japan, vol. 8, pp. 747-757, 1953. 4 1960s and 1970s • During the 1960s the theoretical division at Los Alamos contributed many numerical methods that are still in use today, such as the following methods: • Particle-In-Cell (PIC). • Marker-and-Cell (MAC). • Vorticity-Streamfunction Methods. • Arbitrary Lagrangian-Eulerian (ALE). • k- turbulence model. • During the 1970s a group working under D. Brian Spalding, at Imperial College, London, develop: • Parabolic flow codes (GENMIX). • Vorticity-Streamfunction based codes. • The SIMPLE algorithm and the TEACH code. • The form of the k- equations that are used today. • Upwind differencing. • ‘Eddy break-up’ and ‘presumed pdf’ combustion models. • In 1980 Suhas V. Patankar publishes Numerical Heat Transfer and Fluid Flow, probably the most influential book on CFD to date. 5 1980s and 1990s • Previously, CFD was performed using academic, research and in-house codes. When one wanted to perform a CFD calculation, one had to write a program. • This is the period during which most commercial CFD codes originated that are available today: • Fluent (UK and US). • CFX (UK and Canada). • Fidap (US). • Polyflow (Belgium). • Phoenix (UK). • Star CD (UK). • Flow 3d (US). • ESI/CFDRC (US). • SCRYU (Japan). • and more, see www.cfdreview.com. 6 Navier-Stokes Equation Derivation • Refer to • Ch. 3 and Appendix A of • Jiyuan Tu, Computational Fluid Dynamics -A Practical Approach, Second Edition, 2013. • Ch. 2 • Wendt, Anderson, Computational Fluid Dynamics - An Introduction, 3rd edition 2009. 7 LAGRANGIAN AND EULERIAN DESCRIPTIONS Kinematics: The study of motion. Fluid kinematics: The study of how fluids flow and how to describe fluidmotion. There are two distinct ways to describe motion: Lagrangian and Eulerian Lagrangian description: To follow the path of individual objects. This method requires us to track the position and velocity of each individual fluid parcel (fluid particle) and take to be a parcel of fixedidentity. With a small number of objects, such In the Lagrangian description, one as billiard balls on a pool table, must keep track of the position and individual objects can be tracked. velocity of individual particles. 4 8 • A more common method is Eulerian description of fluid motion. • In the Eulerian description of fluid flow, a finite volume called a flow domain or control volume is defined, through which fluid flows in and out. • Instead of tracking individual fluid particles, we define field variables, functions of space and time, within the control volume. • The field variable at a particular location at a particular time is the value of the variable for whichever fluid particle happens to occupy that location at that time. • For example, the pressure field is a scalar field variable. We define the velocity field as a vector field variable. Collectively, these (and other) field variables define the flow field. The velocity field can be expanded in Cartesian coordinates as 9 9 • In the Eulerian description we don’t really care what happens to individual fluid particles; rather we are concerned with the pressure, velocity, acceleration, etc., of whichever fluid particle happens to be at the location of interest at the time of interest. • While there are many occasions in which the Lagrangian description is useful, the Eulerian description In the Eulerian description, one is often more convenient for fluid defines field variables, such as mechanics applications. the pressure field and the velocity field, at any location • Experimental measurements are and instant in time. generally more suited to the Eulerian description. 1 0 10 CONSERVATION OF MASS—THE CONTINUITY EQUATION The net rate of change of mass withinthe control volume is equal to the rate at which mass flows into the control volume minus the rate at which mass flows out of the control volume. To derive a differential conservation equation, we imagine shrinking a control volume to infinitesimal size. 1 1 11 12 13 Conservation of Mass: Alternative forms • Use product rule on divergence term V = u i + v j + w k = i + j + k x y z Conservation of Mass: Cylindrical coordinates • There are many problems which are simpler to solve if the equations are written in cylindrical-polar coordinates • Easiest way to convert from Cartesian is to use vector form and definition of divergence operator in cylindrical coordinates Conservation of Mass: Cylindrical coordinates Conservation of Mass: Special Cases • Steady compressible flow (u) (v) (w) + + = 0 Cartesian x y z Cylindrical Conservation of Mass: Special Cases • Incompressible flow = constant, and hence u v w + + = 0 Cartesian x y z V = u i + v j + w k Cylindrical = i + j + k x y z Conservation of Mass • In general, continuity equation cannot be used by itself to solve for flow field, however it can be used to 1. Determine if a velocity field represents a flow. 2.ExampleFind missing velocity component For an incompressible flow u = x2 + y 2 + z 2 v = xy + yz + z w = ? Determine : w , required to satisfy the continuity equation. z 2 Solution : w = −3xz − + c(x, y) 2 Conservation of Momentum Types of forces: 1. Surface forces: include all forces acting on the boundaries of a medium though direct contact such as pressure, friction,…etc. 2. Body forces are developed without physical contact and distributed over the volume of the fluid such as gravitational and electromagnetic. • The force F acting on A may be resolved into two components, one normal and the other tangential to the area. 2 4 If the differential fluid element is a material element, it moves with the flow and Newton’s second law applies directly. Body Forces Positive components of the stress tensor in Cartesian coordinates on the positive (right, top, and front) faces of an infinitesimal rectangular control volume. The blue dots indicate the center of each face. Positive components on the negative (left, bottom, and back) faces are in the opposite direction of those shown here. 25 Stresses (forces per unit area) Surface of Surface of constant x constant -x Double subscript notation for stresses. • First subscript refers to the surface • Second subscript refers to the direction • Use for normal stresses and for tangential stresses 27 28 29 30 31 32 33 Complete Navier–Stokes equations 34 3 5 Newtonian versus Non-Newtonian Fluids Rheology: The study of the deformation of flowing fluids. Newtonian fluids: Fluids for which the shear stress is linearly proportional to the shear strain rate. Non-Newtonian fluids: Fluids for which the shear stress is not linearly related to the shear strain rate. Viscoelastic: A fluid that returns (either fully or partially) to its original shape after the applied stress is released. Rheological behavior of fluids—shear stress as a function of shear strain rate. Some non-Newtonian fluids are called shear thinning fluids or pseudoplastic fluids, because the In some fluids a finite stress called the more the fluid is sheared, the less yield stress is required before the viscous it becomes. fluid begins to flow at all; such fluids Plastic fluids are those in whichthe are called Bingham plastic fluids. shear thinning effect is extreme. 36 3 7 Derivation of the Navier–Stokes Equation for Incompressible, Isothermal Flow The incompressible flow approximation implies constant density, and the isothermal approximation implies constant viscosity. 38 Navier-Stokes Equations u u u u p u 2 ( + u + v + w ) = g − + [(2 − .V )] t x y z x x x x 3 x- v u w u + [( + )]+ [( + )] (a) momentum y x y z x z v v v v p v u ( + u + v + w ) = g y − + [( + )] t x y z y x x y y- v 2 v w momentum + [(2 − .V )]+ [( + )] (b) y y 3 z z y w w w w p w u ( + u + v + w ) = g z − + [( + )] t x y z z x x z z- v w w 2 momentum + [( + )]+ [(2 − .V )] (c) y z y z z 3 Navier-Stokes Equations • For incompressible fluids, constant µ: • Continuity equation: .V = 0 u 2 v u w u [(2 − .V )]+ [( + )]+ [( + )] = x x 3 y x y z x z u v u w u { [(2 )]+ [( + )]+ [( + )]} = x x y x y z x z 2u 2u 2u 2u 2v 2w ( + + ) + ( + + ) = x2