CFD_Notes_1-1.pptx

26
Introduction to Computational Fluid Dynamics Course Notes Venkatesh Ramakrishnan, M.E, Assistant Professor-Thermal, Fluids & Energy Science Stream, Department of Mechanical Engineering Sandwich, PSG College Of Technology,Peelamedu,Coimbatore- 641004. Tamilnadu, India.

description

CFD

Transcript of CFD_Notes_1-1.pptx

Slide 1

Introduction to Computational Fluid Dynamics Course NotesVenkatesh Ramakrishnan, M.E,Assistant Professor-Thermal, Fluids & Energy Science Stream,Department of Mechanical Engineering Sandwich,PSG College Of Technology,Peelamedu,Coimbatore-641004.Tamilnadu, India.1What is CFD/FD ?CFD is a branch of Fluid dynamicsSo what really is Engineering Fluid Dynamics in the first place? Lets look at some examples: We are interested in the forces (pressure , viscous stress etc.) acting on surfaces (Example: In an airplane, we are interested in the lift, drag, power, pressure distribution etc) We would like to determine the velocity field (Example: In a race car, we are interested in the local flow streamlines, so that we can design for less drag) We are interested in knowing the temperature distribution (Example: Heat transfer in the vicinity of a computer chip)Roughly put, in Engineering fluid dynamics, we would like to determine certain flow properties in a certain region of interest, so that the information can be used to predict the behaviour of systems, to design more efficient systems etc..

2Fluid DynamicsTheoretical Most important branch of fluid dynamics. Crucial in understanding concepts (Example: L = U), Usually good in predicting trends (Example: ~ Re-1/2) Can obtain a lot of information using simplifying assumptions, sometimes enough for detailed design (Example: the SR-71 Blackbird was designed completely using theoretical ideas) However, doesnt always provide sufficient informationExperimental Only way to obtain reliable data in many situations. However, costly, difficult to achieve exact conditions, difficult to isolate effects, sometimes difficult to assess error, sometimes not repeatableComputational (CFD) Becoming important as computers are getting faster and cheaper. Potential to provide tremendous amount of data at a fraction of the cost of experiments. But sometimes unreliable because of numerical/modeling/human errors. Sometimes more expensive than experiments Very important to validate with theory/experiments 3Sample Application 1 [Simulation to understand physics]

Flow over F-16 at 45o angle of attackSurface Pressure contours and streamtraces

Courtesy: Kyle Squires, ASU4Sample Application -2[Validation with Experiment] ExperimentComputation

Flow over fixed wing Expt. vs CFD of velocity contours5Sample Application -3[Simulation to aid theoretical understanding]

Merger of co-rotating vortices due toElliptical instability(Movie)Courtesy: CERFACS6Procedures in CFDIdentification of right approximation (Viscous/Inviscid, Laminar/Turbulent, Incompressible / compressible, Single-phase/multi-phase)Identification of right solution method (Finite Element / Difference/Volume, Structured/Unstructured mesh, Order of accuracy)Pre-processing (Generate computational grid, assign boundary conditions, set initial conditions, compile code, prepare input parameters)Solution (Run the code, monitor the solution)Post-processing (Collect and organize data, analyze results)Verification (Do the results make sense? Are the trends right? Does it agree with previous calculations on similar configurations?)Validation (Does the result (or an aspect of the result)) agree with theory/experiment?)At every step, good understanding of theoretical fluid dynamics is essential!!! 7Example: Flow over a pitching airfoilProblem: Predict the loads acting on an airfoil pitching in a wind tunnel under the following conditions: =10o + 10o sin(w t), Re = 3.8x106, M = 0.3, w = 0.06

Identification of right approximation : Viscous, Turbulent, compressible, Single-phaseIdentification of right solution method (Finite Volume, Structured mesh, second order accurate)

8Governing Equations of fluid dynamicsAssumptions: Continuum flow, Newtonian fluidLets restrict ourselves to single phase, single species, perfect gases (this way, incompressible flow is a special case)Ignore body forcesUnknowns: Density (), Velocity (u,v,w), Pressure (p)Dynamics of fluids is then given by Conservation of Mass (Continuity equation) [Law of common sense] Conservation of Momentum (Navier-Stokes equations) [Newtons second law] Conservation of Energy (Energy equation) [First law of thermodynamics]5 equations to determine 5 unknowns.All of fluid dynamics is contained in these equations

9All of fluid dynamics is contained in these three equationsGoverning equationsHow to derive these equations? Integral form Differential formReynolds transport theorem:Rate of change of stuff inside a control volume = Net flux of stuff entering/leaving the boundaries + generation of stuff destruction of stuffIn addition, need some more info (such as stress-strain relation, temperature-heat flux relation etc.)

The stuff U is nothing but mass, momentum and energy10Derive continuity equation here.AerospaceAutomobile and Engine ApplicationsAppliancesBoatsComputersApplications

5/14/201411CFD codes are structured around the numerical algorithms that can tackle fluid flow problems

Three main elements:Pre ProcessorSolverPost Processor How Does a CFD Code Work?5/14/201412Consists of the input of a flow problem to CFDUser Activities:define geometry & generate grid (50% time)selection of phenomena to be modeleddefinition of fluid propertiesspecification of boundary and initial conditions 1) Pre-Processor

5/14/201413Three primary numerical solution techniquesfinite difference, finite element, finite control volumeThe numerical method performs the following:Approximates the unknown variables by simple functionsDiscretization by substitution of the approx-imations into the governing flow equations and subsequent mathematical manipulationsSolution of the algebraic equations2) Solver5/14/201414Finite difference methods describe the unknowns f of the flow problems by means of point samples at the node points of a grid co-ordinate linesSolver - Finite Difference Method

Truncated Taylor series expan-sions are used to generate finite difference approximations of the derivatives of f in terms of point samples of f at each grid point and its immediate neighbors

5/14/201415Based on control volume formulation of analytical fluidsThe domain is divided into a number of control volumes (aka cells, elements) - the variable of interest is located at the centroid of the control volume. The differential form of the governing equations are integrated over each control volume. Finite difference approximations are substituted for the terms in the integrated equations (discretization) converts the integral equations into a system of algebraic equations.Set of algebraic equations are solved by an iterative method.

Solver - Finite Volume Method5/14/201416Provides a user friendly (??) way to look at the results of a simulationDomain geometry and grid displayVector PlotsContour PlotsParticle Tracking

3) Post Processor

5/14/201417Results of CFD are at best as good as the physics embedded in it as at worst as good a its operatorTHESE PROBLEMS ARE COMPLEXPrior to running a simulation there is a stage of identification and formulation of the flow problem in terms of the physical and chemical phenomena that need to be considered.A successful simulation hasconverged solutiongrid independenceProblem Solving With CFD5/14/201418Applications of CFD

Applications of CFD are numerous! Flow and heat transfer in industrial processes (boilers, heatexchangers, combustion equipment, pumps, blowers, piping, etc.). Aerodynamics of ground vehicles, aircraft, missiles. Film coating, thermoforming in material processing applications. Flow and heat transfer in propulsion and power generation systems. Ventilation, heating, and cooling flows in buildings. Chemical vapor deposition (CVD) for integrated circuitmanufacturing. Heat transfer for electronics packaging applications. And many, many more!Relatively low cost. Using physical experiments and tests to get essential engineeringdata for design can be expensive. CFD simulations are relatively inexpensive, and costs are likely todecrease as computers become more powerful.

Advantages of CFD

Advantages of CFDSpeed. CFD simulations can be executed in a short period of time. Quick turnaround means engineering data can be introduced early inthe design process.Ability to simulate real conditions. Many flow and heat transfer processes can not be (easily) tested,e.g. hypersonic flow. CFD provides the ability to theoretically simulate any physical condition.

Advantages of CFDAbility to simulate ideal conditions. CFD allows great control over the physical process, and provides theability to isolate specific phenomena for study. Example: a heat transfer process can be idealized with adiabatic,constant heat flux, or constant temperature boundaries. region of interest, and yields a comprehensive set of flow parameters for examination.Advantages of CFDComprehensive information. Experiments only permit data to be extracted at a limited number oflocations in the system (e.g. pressure and temperature probes, heatflux gauges, LDV, etc.). CFD allows the analyst to examine a large number of locations in the

Limitations of CFDPhysical models. CFD solutions rely upon physical models of real world processes(e.g. turbulence, compressibility, chemistry, multiphase flow, etc.). The CFD solutions can only be as accurate as the physical modelson which they are based.Numerical errors. Solving equations on a computer invariably introduces numericalLimitations of CFDERRORS. Round-off error: due to finite word size available on the computer.Round-off errors will always exist (though they can be small in most cases). Truncation error: due to approximations in the numerical models.Truncation errors will go to zero as the grid is refined. Meshrefinement is one way to deal with truncation error.

Limitations of CFDBoundary conditions. As with physical models, the accuracy of the CFD solution is only asgood as the initial/boundary conditions provided to the numerical model. Example: flow in a duct with sudden expansion. If flow is supplied todomain by a pipe, you should use a fully-developed profile forvelocity rather than assume uniform conditions.