Rich Text Editor File2

  • Upload
    fraben1

  • View
    226

  • Download
    0

Embed Size (px)

Citation preview

  • 8/14/2019 Rich Text Editor File2

    1/6

    CFD 1 1 David Apsley1. INTRODUCTION TO CFD SPRING 20091.1 What is computational fluid dynamics?1.2 Principles of fluid mechanics1.3 Different ways of expressing the fluid-flow equations1.4 Basic principles of CFD1.5 The main discretisation methodsExamples

    1.1 What is Computational Fluid Dynamics?Computational fluid dynamics (CFD) is the use of computers and numerical techniques tosolve problems involving fluid flow.CFD has been successfully applied in a huge number of areas, including many of interest incivil engineering (highlighted in the list below): aerodynamics (aircraft; automobiles); hydrodynamics (ships; submersibles); engine flows (internal-combustion and jet engines); turbomachinery; heat transfer;

    combustion; process engineering (chemical industry); wind and wave power; wind loading (forces and dynamic response of structures); ventilation; fire and explosion hazards; environmental engineering (transport of pollutants and effluent); coastal and offshore engineering (wave and current loading); hydraulics (pipe networks and channels; hydraulics structures); sediment transport (sediment load; scour; morphology); hydrology (flow in rivers and aquifers);

    oceanography (tidal flows; ocean currents); meteorology (numerical weather forecasting); high-energy physics (plasmas; magnetohydrodynamics); biomedical engineering (heart and blood vessels; lungs and air passages); electronics (heat dissipation).This range of applications is broad and encompasses many different fluid phenomena andCFD techniques. In particular, CFD for high-speed aerodynamics (where compressibility issignificant but viscous effects are often unimportant) is very different from that used to solvelow-speed, frictional flows typical of mechanical and civil engineering.

    Although many elements of this course are generally applicable, the focus will be onsimulating viscous, incompressible flow by the finite-volume method.

    CFD 1 2 David Apsley1.2 Principles of Fluid Mechanics1.2.1 Definitions

    A fluid is a substance that continuously deforms under a shearing force, no matter how small.Fluids may be liquids (have a definite volume and free surface) or gases (expand to fill anycontainer).Hydrostatics is the study of fluids at rest; hydrodynamics is the study of fluids in motion.Hydraulics is the study of the flow of liquids (usually water); aerodynamics is the study ofthe flow of gases (usually air).

    All fluids are compressible to some extent, but their flow can be approximated asincompressible if flow-induced pressure changes dont cause significant density changes.

    This is usually the case for velocities much less than the speed of sound (1480 m s1 in water,340 m s1 in air).

    An ideal fluid is one with no viscosity; it doesnt exist, but it can be a good approximation. Areal fluid is one where viscous effects are assumed to be present.Real flows may be laminar (adjacent layers slide smoothly over each other) or turbulent

  • 8/14/2019 Rich Text Editor File2

    2/6

    (subject to random fluctuations about a mean flow). Turbulence is the natural state at highReynolds number. The majority of engineering and environmental flows are fully turbulent.1.2.2 NotationPosition/time:x (x, y, z) or (x1, x2, x3) position; (z is usually vertical)t timeField variables:u (u, v, w) or (u1, u2, u3) velocity

    p pressure(p patm is the gauge pressure; p* = p + gz is the piezometric pressure.)T temperaturef concentration (amount per unit mass or per unit volume)Fluid properties:densitydynamic viscosity( / is the kinematic viscosity)K bulk modulussurface tensiondiffusivity

    c speed of soundCFD 1 3 David Apsley1.2.3 Mechanical PrinciplesHydrostatics

    At rest, pressure forces balance weight. This can be written mathematically asp = - g z or gzpdd = - (1)The same equation also holds in a moving fluid if there is no vertical acceleration, or, as anapproximation, if vertical acceleration is much smaller than g.If density is constant, (1) can be writtenp* p + gz = constant (2)p* is called the piezometric pressure, combining the effects of pressure and weight. For aconstant-density flow without a free surface, gravitational forces can be eliminated entirelyfrom the equations by working with the piezometric pressure.Equation of StatePressure, density and temperature are connected by an equation of state. The most importantexample is the ideal gas law:p RT , R R /m 0 = = (3)

    where R0 is the universal gas constant, m is the molar mass and T is the absolute temperature.DynamicsThe most important equations are those governing fluid motion. They represent the followingfundamental principles: mass: change of mass = 0 momentum: (rate of) change of momentum = force energy: change of energy = work + heatand for non-homogeneous fluids: conservation of individual constituents.There are different ways of expressing these physical principles mathematically (Section 2).Note that the role of energy is different in compressible and incompressible flows. For CFD

    of incompressible flow there is no need to solve a separate energy equation because themechanical energy principle (change of kinetic energy = work done) is formallyequivalent to the momentum equation.CFD 1 4 David Apsley1.3 Different Ways of Expressing the Fluid-Flow Equations

  • 8/14/2019 Rich Text Editor File2

    3/6

    1.3.1 Control-Volume (Integral) ApproachContinuum (as opposed to particle) mechanics considerschanges to the total amount of some physical quantity (mass,momentum, energy, ) within specified regions of space(control volumes).For an arbitrary control volume the balance of a physical quantity over an interval of time ischange = amount in - amount out + amount createdIn fluid mechanics this is usually expressed in rate form by dividing by the time interval (and

    transferring the net amount passing through the boundary to the LHS of the equation):

    =

    +

    inside V out of boundary inside VRATE OF CHANGE NET FLUX SOURCE (4)The flux (i.e. rate of transport across a surface) is due to:advection movement with the fluid flow;diffusion net transport by random (molecular or turbulent) motion.

    =

    +

    +inside V through boundary inside VRATE OF CHANGE ADVECTION DIFFUSION SOURCE (5)

    The important point is that there is a single generic scalar-transport equation of the form(5), regardless of whether the physical quantity is mass, momentum, chemical content etc.Thus, instead of dealing with lots of different equations we can consider the numericalsolution of a general scalar-transport equation (Section 4).The finite-volume method, which is the subject of this course, is based on approximatingthese control-volume equations.1.3.2 Differential EquationsIn regions without shocks, interfaces or other discontinuities, the fluid-flow equations canalso be written in equivalent differential forms. These describe what is going on at a pointrather than over a whole control volume. Mathematically, they can be derived by making thecontrol volumes infinitesimally small. This will be demonstrated in Section 2, where it will

    also be shown that there are several different ways of writing these differential equations.The finite-difference method is based on the direct approximation of a differential form of thegoverning equations.VCFD 1 5 David Apsley

  • 8/14/2019 Rich Text Editor File2

    4/6

    1.4 Basic Principles of CFDThe approximation of a continuously-varyingquantity in terms of values at a finite number ofpoints is called discretisation.The fundamental elements of any CFD simulation are:(1) The flow field is discretised; i.e. field variables ( , u, v, w, p, ) are approximatedby their values at a finite number of nodes.(2) The equations of motion are discretised (approximated in terms of values at nodes):

    control-volume or differential equations algebraic equations(continuous) (discrete)(3) The resulting system of algebraic equations is solved to give values at the nodes.The main stages in a CFD simulation are:Pre-processing:

    problem formulation (governing equations; boundary conditions); construction of a computational mesh.Solving:

    discretisation of the governing equations; numerical solution of the governing equations.Post-processing:

    visualisation; analysis of results.continuouscurvediscreteapproximationCFD 1 6 David Apsley1.5 The Main Discretisation Methods(i) Finite-Difference MethodDiscretise the governing differential equations directly; e.g.yv vxu uyvxu i j i j i j i jD-+

    D-+ = + - + -2 20 1, 1, , 1 , 1(ii) Finite-Volume MethodDiscretise the governing control-volume equations directly; e.g.

    = ( ) - ( ) + ( ) - ( ) = 0 e w n s net mass outflow uA uA vA vA(iii) Finite-Element MethodExpress the solution as a weighted sum of shape functions S (x), substitute into some formofthe governing equations and solve for the coefficients (aka degrees of freedom or weights).

  • 8/14/2019 Rich Text Editor File2

    5/6

    e.g., for velocity,( ) = ( ) u x u S xFinite-difference and finite-element methods are covered in more detail in the ComputationalMechanics course. This course will focus on the finite-volume method.The finite-element method is popular in solid mechanics (geotechnics, structures) because: it has considerable geometric flexibility; general-purpose codes can be used for a wide variety of physical problems.The finite-volume method is popular in fluid mechanics because:

    it enforces conservation; it is flexible in terms of both geometry and the variety of fluid phenomena; it is directly relatable to physical quantities (mass flux, etc.).In the finite-volume method ...(1) A flow geometry is defined.(2) The flow domain is decomposed into a set of control volumes orcells called a computational mesh or grid.(3) The control-volume equations are discretised i.e. approximated interms of values at nodes to form a set of algebraic equations.(4) The discretised equations are solved numerically.i,j

    i,j+1i,j-1i-1,j i+1,jvuevnuwsCFD 1 7 David ApsleyExamplesThe following simple examples develop the notation and control-volume framework to beused in the rest of the course.Q1.Water (density 1000 kg m3) flows at2 m s1 through a circular pipe ofdiameter 10 cm. What is the massflux across the surfaces S1 and S2?Q2.

    A water jet strikes normal to a fixed plate (see left).Neglect gravity and friction, and compute the force Frequired to hold the plate fixed.

    Q3.A fire in the hydraulics laboratory released 2 kg of a toxic gas into a room of dimensions30 m 8 m 5 m. Assuming the laboratory air to be well-mixed and to be vented at a speedof 0.5 m s1 through an aperture of 6 m2, calculate: (a) the initial concentration of gas in ppmby mass; (b) the time taken to reach a safe concentration of 1 ppm.(For air, density = 1.20 kg m3.)Q4.

    A burst pipe at a factory causes a chemical to seep into a river at a rate of 2.5 kg hr1. Theriver is 5 m wide, 2 m deep and flows at 0.3 m s1. What is the average concentration of thechemical (in kg m3) downstream of the spill?2 m/s

    10 cmS1 S245oFu=8 m/s

  • 8/14/2019 Rich Text Editor File2

    6/6

    D=10 cm