Studies in CFD – Summer 2012 - Homework 1 1.- Consider a volume element inside a flowing fluid and write down an expression representing the mass conservation principle inside the volume (i.e. rate of mass in = rate of mass out + rate of mass accumulation). Then, use Gauss’ theorem to convert the surface integral representing the net mass inflow into a volume integral and obtain the continuity equation. The conservation law relates the rate of change of an amount to that property in a given control mass. For mass, the conservation equation can be written: ππ =0 ππ‘ If φ is a conserved intensive property; i.e. mass conservation φ = 1, then the corresponding extensive property Φ can be expressed as: Φ = ∫πΊπΆπ ππππΊ where ΩCM stands for the volume occupied by the CM. Using this definition, the left hand side of each conservation equation for a control volume can be written as: π π ∫ ππππΊ = ∫ ππππΊ + ∫ ππ(π£ − π£π ) · πππ ππ‘ πΊπΆπ ππ‘ πΊπΆπ ππΆπ ΩCV = Control Volume SCV = surface enclosing the Control Volume n is the unit vector orthogonal to the SCV v is the fluid velocity and vb is the velocity with which the CV surface is moving. Since mass conservation was defined as φ = 1: ππ¦ ∫ πππΊ + ∫ ππ£ · πππ ππ₯ πΊ π 0 By applying Gauss’= divergence theorem to the convection term, transforming a surface integral to a volume integral and setting the volume infinitesimally small: ππ + πππ£(ππ£ ) ππ‘ =0 Michael Wegrzyniak 1 of 16 Studies in CFD – Summer 2012 - Homework 1 Using this form in Cartesian form: π(ππ’π¦ ) ππ π(ππ’π ) ππ π(ππ’π₯ ) π(ππ’π§ ) + = + + + ππ‘ ππ’π ππ‘ ππ₯ ππ¦ ππ§ =0 Michael Wegrzyniak 2 of 16 Studies in CFD – Summer 2012 - Homework 1 2.- The stress tensor in a Newtonian fluid, representing the molecular transport of momentum consists of two parts; explain what is represented in each part and the difference(s) between them. For Newtonian fluids, the Stress tensor, T, which is the molecular rate of transport of the momentum, can be written as: T = -(π + 2 3 π πππ£ π£) I + 2μD where μ is the dynamic viscosity I is the unit tensor p is the static pressure D is the strain rate tensor Note: 1 π· = 2 [ππππ π£ + (ππππ π£)π ] The two equations can be written in Cartesian coordinates as 2 ππ’π πππ = − (π + π )δ 3 ππ₯π ππ 2ππ· 1 +ππ’ π ππππ’π π·ππ = ( + ) 2 ππ₯π ππ₯π where δij is the Kronecker symbol(δij = 1 if i = j and δij = 0 otherwise). For incompressible flows, the second term in equation 2 ππ’π π )δ 3 ππ₯π ππ is zero by virtue of the continuity equation. + 2ππ·ππ πππ = − (π + I need more here to further describe the 2 Michael Wegrzyniak 3 of 16 Studies in CFD – Summer 2012 - Homework 1 3.- Consider the slow, steady state laminar flow of a Newtonian fluid contained between two large, horizontal parallel plates driven by a constant pressure gradient dp/dx. Consider a small volume element of fluid of thickness dz in the vertical direction and length dx in the direction of the flow and write down an expression representing the momentum conservation principle in the volume. Finally, make the volume of the element go to zero and derive the momentum conservation equation for the system. ππ’π‘ππππ€ ππ ππππππ‘π’π = [πΊπ₯ π’ + π ππ₯ (πΊπ₯ π’)πΏπ₯]δy + [πΊπ¦ π’ + π ππ¦ (πΊπ¦ π’)πΏπ¦]δx ππππππ€ ππ ππππππ‘π’π = (πΊπ₯ πΏπ¦)π’ + (πΊπ¦ πΏπ₯)π’ Increase of momentum storage – 0 (steady flow) πΈπ₯π‘πππππ ππππππ = −ππ₯ πΏπ¦ − ππ¦π₯ πΏπ₯ + (ππ₯ + πππ₯ ππ₯ πΏπ₯)δy + (ππ¦π₯ + πππ¦π₯ ππ¦ πΏπ¦)δx Applying the momentum theorem with the assumption of steady flow and expanding terms yields ππΊπ¦ πππ¦π₯ ππ’ ππΊπ₯ ππ’ πππ₯ πΊπ₯ the + π’continuity + πΊequation + u using=the assumption + Applying π¦ ππ₯ ππ₯ ππ₯ ππ₯ ππ₯ ππ¦ of steady flow yields Michael Wegrzyniak 4 of 16 Studies in CFD – Summer 2012 - Homework 1 πππ¦π₯ ππ’ ππ’ πππ₯ + πΊπ¦ = + ππ₯ ππ₯ ππ₯ ππ¦ Then, applying the boundary-layer approximation to the shear stress term and the normal stress term gives us πΊπ₯ πππ₯ ππ =− ππ₯ ππ₯ πππ¦π₯ π ππ’ = (π ) ππ¦ ππ¦ ππ¦ Note that: Gx = ρu, Gy = ρv With these substitutions, we have the momentum equation of the boundary layer ππ’ ππ’ ππ π ππ’ + ππ£ =− + (π ) ππ₯ ππ¦ ππ₯ ππ¦ ππ¦ Note that this equation is valid for variable properties ρ and μ. ππ’ Michael Wegrzyniak 5 of 16 Studies in CFD – Summer 2012 - Homework 1 4.- Consider a flow in a 3D rectangular Cartesian coordinate system and write down all the terms represented by the operator expression (v · ∇) that appears in the inertia term of the non-conservative form of the momentum equation (Eqn 1.20 in text). π»·π = Michael Wegrzyniak πππ¦ πππ₯ πππ§ + + ππ₯ ππ¦ ππ§ 6 of 16 Studies in CFD – Summer 2012 - Homework 1 5.- Consider a flow in a 3D cylindrical polar system of coordinates and write down the component form expressions of the continuity and momentum conservation equations for the flow. Michael Wegrzyniak 7 of 16 Studies in CFD – Summer 2012 - Homework 1 6.- Dimensionless numbers are always ratios of two distinct quantities, both with the same physical units. Describe the two quantities involved in the following dimensionless numbers used in CFD: St, Re, Fr and Ra. Stanton Number: St is the ratio of heat transfer to thermal capacity. β St = ππΆ ππ Reynolds Number: Re is the ratio of inertial force to viscous force. π π = πππΏ π Froude Number: FR is the ratio of inertial force to gravitational force. π2 πΉπ = ππΏ Rayleigh Number: Ra is the ration of buoyancy force to viscous force ππ½|π₯π|πΏ3 π2 πΆπ π π = ππ Michael Wegrzyniak 8 of 16 Studies in CFD – Summer 2012 - Homework 1 7.- Explain briefly the assumptions involved in creating the following simplified models: a) Incompressible Flow In many applications the fluid density may be assumed constant. If the Mach number is below 0.3 compressibility may indeed be neglected If the flow is also isothermal, the viscosity is also constant. b) Inviscid Flow In flows far from solid surfaces, the effects of viscosity are usually very small. If viscous effects are neglected altogether, i.e. if we assume that the stress tensor reduces to T = -pl, the Navier-Stokcs equations reduce to the Euler equations. c) Potential Flow The fluid is assumed to be inviscid (as in the Euler equations); however, an additional condition is imposed on the flow - the velocity field must be irrotational. d) Creeping Flow When the flow velocity is very small, the fluid is very viscous, or the geometric dimensions are very small, the convective (inertial) terms in the Navier-Stokes equations play a minor role and can be neglected. The flow is then dominated by the viscous, pressure, and body forces and is called creeping flow. If the fluid properties can be considered constant, the momentum equations become linear; they are usually called Stokes equations. Due to the low velocities the unsteady term can also be neglected, a substantial e) Boussinesq Approximation In flows accompanied by heat transfer, the fluid properties are normally functions of temperature. The variations may be small and yet be the cause of the fluid motion. If the density variation is not large, one may treat the density as constant in the unsteady and convection terms, and treat it as variable only in the gravitational term. f) Boundary Layer Approximation When the flow has a predominant direction and the variation of the geometry is gradual, the flow is mainly influenced by what happened upstream. Examples are Michael Wegrzyniak 9 of 16 Studies in CFD – Summer 2012 - Homework 1 flows in channels and pipes and flows over plane or mildly curved solid walls. Such flows are called thin shear layer or boundary layer flows. The Navier-Stokes equations can be simplified for such flows as follows: ο· diffusive transport of momentum in the principal flow direction is much smaller than convection and can be neglected; ο· the velocity component in the main flow direction is much larger than the components in other directions; ο· the pressure gradient across the flow is much smaller than in the principal flow direction. The simplified equations can be solved by using marching techniques similar to those used to solve ordinary differential equations with initial conditions. These techniques see considerable use in aerodynamics. Michael Wegrzyniak 10 of 16 Studies in CFD – Summer 2012 - Homework 1 8.- Explain briefly the key characteristics of the following mathematical types of flows: a) Hyperbolic Flows In the hyperbolic case, the characteristics are real and distinct. This means that information propagates at finite speeds in two sets of directions. In general, the information propagation is in a particular direction so that one datum needs to be given at an initial point on each characteristic; the two sets of characteristics therefore demand two initial conditions. If there are lateral boundaries, usually only one condition is required at each point because one characteristic is carrying information out of the domain and one is carrying information in. b) Parabolic Flows In parabolic equations the characteristics degenerate to a single real set. Consequently, only one initial condition is normally required. At lateral boundaries one condition is needed at each point. c) Elliptic Flows In the elliptic case, the characteristics are imaginary or complex so there are no special directions of information propagation. Indeed, information travels essentially equally well in all directions. Generally, one boundary condition is required at each point on the boundary and the domain of solution is usually closed although part of the domain may extend to infinity. d) Mixed Flows Steady, transonic flows contain both supersonic and subsonic regions. The supersonic regions are hyperbolic in character while the subsonic regions are elliptic. Michael Wegrzyniak 11 of 16 Studies in CFD – Summer 2012 - Homework 1 9.- Write down a brief explanation/description of the various types of numerical grids used in CFD. Structured (regular) grid -- Regular or structured grids consist of families of grid lines with the property that members of a single family do not cross each other and cross each member of the other families only once. This allows the lines of a given set to be numbered consecutively. The position of any grid point (or control volume) within the domain is uniquely identified by a set of two (in 2D) or three (in 3D) indices, e.g. (i,j, k). This is the simplest grid structure, since it is logically equivalent to Block-structured grid -- In a block structured grid, there is a two (or more) level subdivision of solution domain. On the coarse level, there are blocks which are relatively large segments of the domain; their structure may be irregular and they may or may not overlap. On the fine level (within each block) a structured grid is defined. Special treatment is necessary at block interfaces. Unstructured grids -- For very complex geometries, the most flexible type of grid is one which can fit an arbitrary solution domain boundary. In principle, such grids could be used with any discretization scheme, but they are best adapted to the finite volume and finite element approaches. The elements or control volumes may have any shape; nor is there a restriction on the number of neighbor elements or nodes. In practice, grids made of triangles or quadrilaterals in 2D, and tetrahedra or hexahedra in 3D are most often used. Michael Wegrzyniak 12 of 16 Studies in CFD – Summer 2012 - Homework 1 10.- Explain briefly the meaning of each of the following properties of numerical solution methods; highlight the differences among them and explain why all of them must be considered in CFD studies. a) Consistency For a method to be consistent, the truncation error must become zero when the mesh spacing Δt ο 0 and/or Δxi ο 0. Truncation error is usually proportional to a power of the grid spacing Δxi and/or the time step Δt. Some discretization methods lead to truncation errors which are functions of the ratio of Δxi to Δt. In such a case the consistency requirement is only conditionally fulfilled: Δxi and Δt must be reduced in a way that allows the appropriate ratio to go to zero. Even if the approximations are consistent, it does not necessarily mean that the solution of the discretized equation system will become the exact solution of the differential equation in the limit of small step size. For this to happen, the solution method has to be stable. b) Stability A numerical solution method is said to be stable if it does not magnify the errors that appear in the course of numerical solution process. For temporal problems, stability guarantees that the method produces a bounded solution whenever the solution of the exact equation is bounded. For iterative methods, a stable method is one that does not diverge. c) Convergence A numerical method is said to be convergent if the solution of the discretized equations tends to the exact solution of the differential equation as the grid spacing tends to zero. For linear initial value problems, the Lax equivalence theorem states that "given a properly posed linear initial value problem and a finite difference approximation to it that satisfies the consistency condition, stability is the necessary and sufficient condition for convergence. For non-linear problems the stability and convergence of a method are difficult to demonstrate. Therefore convergence is usually checked using numerical experiments. If the method is stable and if all approximations used in the discretization process are consistent, we usually find that the solution does converge to a grid-independent solution. d) Conservation Michael Wegrzyniak 13 of 16 Studies in CFD – Summer 2012 - Homework 1 Since the equations to be solved are conservation laws, the numerical scheme should also - on both a local and a global basis - respect these laws. This means that, at steady state and in the absence of sources, the amount of a conserved quantity leaving a closed volume is equal to the amount entering that volume. If the strong conservation form of equations and a finite volume method are used, this is guaranteed for each individual control volume and for the solution domain as a whole. This is an important property of the solution method, since it imposes a constraint on the solution error. If the conservation of mass, momentum and energy are insured, the error can only improperly distribute these quantities over the solution domain. e) Boundedness Numerical solutions should lie within proper bounds. Physically non-negative quantities (like density, kinetic energy of turbulence) must always be positive; other quantities, such as concentration, must lie between 0% and 100%. In the absence of sources, some equations (e.g. the heat equation for the temperature when no heat sources are present) require that the minimum and maximum values of the variable be found on the boundaries of the domain. f) Realizability Models of phenomena which are too complex to treat directly (for example, turbulence, combustion, or multiphase flow) should be designed to guarantee physically realistic solutions. g) Accuracy Numerical solutions of fluid flow and heat transfer problems are only approximate solutions. In addition to the errors that might be introduced in the course of the development of the solution algorithm, in programming or setting up the boundary conditions, numerical solutions always include three kinds of systematic errors: ο· Modeling errors, which are defined as the difference between the actual flow and the exact solution of the mathematical model; ο· Discretization errors, defined as the difference between the exact solution of the conservation equations and the exact solution of the algebraic system of equations obtained by discretizing these equations, and ο· Iteration errors, defined as the difference between the iterative and exact solutions of the algebraic equations systems. The ultimate goal is to obtain desired accuracy with least effort, or the maximum Michael Wegrzyniak 14 of 16 Studies in CFD – Summer 2012 - Homework 1 accuracy with the available resources. Michael Wegrzyniak 15 of 16