Articulo Final Gabriel Heredia
Total Page:16
File Type:pdf, Size:1020Kb
Inviscid, Incompressible CFD Solver with Coordinate Transformation for Aerodynamic Applications Gabriel A. Heredia Acevedo Master of Engineering in Mechanical Engineering Prof. José A. Pertierra Mechanical Engineering Department Polytechnic University of Puerto Rico Abstract Fluid mechanics is a complex field of purpose, a software tool was created using Matlab study with many modern design applications. that analyzes flow patterns over basic airfoils. Mechanical and aerospace engineers frequently The main idea behind this program is that if the have the need to analyze fluid flow patterns for flow speed distribution is obtained some distance practical design purposes ranging from a complete from the airfoil and afterwards, the pressure design to a validation of results. Physical concepts, distribution around the airfoil’s surface may also be such as conservation of mass, conservation of obtained. An incompressible, inviscid flow is used momentum, and conservation of energy are required to analyze the fluid flow patterns. A coordinate to fully describe any arbitrary flow pattern’s transformation technique is also employed to ensure characteristics. These concepts are required to that properties obtained at the airfoil’s body is compute pressure distribution, typically used in the obtained, given that this is the main area of interest design of airfoils and other arbitrary shapes, which for aerodynamic applications. are of main interest in the aerospace and naval industries. A tool was created that employs GOVERNING THEORY computational fluid dynamics techniques to provide The model used for the flow pattern analysis in solution for flow patterns over NACA four digit question is that of an incompressible, inviscid flow. airfoils. The tool uses a coordinate transformation This flow is unaffected by viscous effects and its method to analyze flow properties at desired points density remains constant throughout the field. without the need of interpolation, which can affect To be more precise, an incompressible flow is accuracy of results. Additionally, the tool considers any flow in which the particles’ density remains flows whose velocity potential conforms to Laplace’s constant. The density is the mass of the particle per linear partial differential equation on a plane. unit volume, where ρ (rho) is the density, m is the Key Terms Computational Fluid Dynamics, mass, and V is the volume. If the mass of a particle Coordinate Transformation, Inviscid- was fixed and it would be moved through an Incompressible Flow, Laplace PDE. incompressible flow, then this particle must also have a constant volume (that is ∫ δV is equal to V, INTRODUCTION where V is constant) is to comply with the constant The aerospace and naval industries require density condition. Mathematically, this is, professionals who master fluid mechanics so that m dV (1) these may find solutions to their design problems in fluid dynamics. These professionals employ tools Now, as defined by Anderson Jr. [1], if the and solution methods that aid in the analysis and volume of the flow is to remain constant and the design process. Designing for aerospace and naval volume under question is sufficiently small so that it applications constantly call for the need to analyze only contains one particle (that is, Vparticle = δV), aerodynamic properties of airfoils. This type of then it follows that the time rate of change of volume analysis is of a complex nature and many times of a fluid element per unit volume should be as provides for unreliable results. To serve this follows, 1 DV in cylindrical coordinates. 0 (2) V Dt Note that the first equation only shows compliance with the irrotational condition and the It then follows that the divergence of velocity second equation, which shows the incompressibility must be equal to the time rate of change of volume condition, is also Laplace’s differential equation [2]. of a fluid element per unit volume. We define u and Anderson also defined that the streamlines (denoted v as the velocity vector components in the x axis and as ψ) for any flow pattern under these conditions y axis, respectively. Now remember that the must also satisfy Laplace’s equation. That is, divergence of velocity is the derivative of all the 2 velocity components with respect to their own 0 (8) direction. In an x-y plane this is, Boundary Conditions in the Physical Plane u v 1 DV V 0 (3) After solving Laplace’s equation, the required x y V Dt boundary conditions are the following. The first The second condition requires that the flow condition is applied on the surface of the body being should be irrotational. This condition is given by analyzed. This requires that the Kutta condition computing the curl of the velocity vector field. For must be applied at the trailing edge [3]. This requires this case, the flow’s curl should be equal to zero. The that the stream function values on the trailing edge curl for the flow’s velocity vector field is given by of a finite airfoil are such that the trailing edge yields the alternate form of its derivative. This is, a stagnation point, or a point of zero velocity. The Kutta condition also requires that, at a given speed u v and angle of attack, the value of the circulation V 0 (4) y x around the airfoil is such that the streamline leaves the airfoil smoothly, or ensure that the airfoil is a If we were to define a function in so that its streamline of the flow. Given that the airfoil is a gradient defines the velocity of a flow field, we may streamline of the flow, it also follows that the expand our definition for any particle moving streamline value on the surface of the airfoil must be through an incompressible and irrotational flow. As a constant value. Refer to Figure 1 for application of Anderson1 named it, the velocity potential is the Kutta condition on a finite airfoil. The second denoted with the Greek letter ϕ (phi) and shall serve boundary condition applies to the values at the this purpose. If we were to combine this with the curl “borders” of the flow field. These conditions, and the divergence of a vector field, we obtain the known as the infinity boundary conditions, require following, that the stream values be such that the derivatives at a discrete point should yield the freestream speed at 0 (5) the prescribed angle of attack. These conditions will y x x y be reviewed later from the coordinate transformation and, point of view. The equations that represent these conditions in the physical coordinate system are the 2 2 2 following, 0 , (6) 2 2 x y dy u = (9) in cartesian coordinates dy 2 1 dy r 0 , (7) u = - (10) r r r dx Figure 1 Figure 2 Application of the Kutta Condition Contour Map of Coordinate Transformation Variables in Physical Plane Coordinate Transformation into Computational Plane An arbitrary grid is created in such a way that it encloses the body being analyzed. Figure 3 shows To capture the physics when computing the an example on the physical plane with the intention fluid flow patterns, it is necessary to perform a of clarifying concept. The airfoil contour follows coordinate transformation from the physical plane to line racegpr, which represents the inner boundary a convenient computational plane. This requires that for our grid generation method, represented by the the Cartesian plane be transformed into a plane constant value line, η1. Line sbdfhqs represents the where the x axis and y axis are represented by two outer boundary, represented by the constant value new variables. line, η2. Lines pq and rs are coincident for when Although the definition of the new variables is applying the model, but separated in Figure 3 for arbitrary by convenience, observation of the field illustrative purposes. Figure 4 demonstrates the calls for an imposed relation between the Cartesian computational plane and the respective locations of coordinates and the computational coordinates. The points a, b, c, d, e, f, g, h, p, q, r, and s. The lower imposed relationship arises from the desire to horizontal line in the grid represents the body represent the airfoil “contour” with some constant contour, whereas the upper horizontal line represents value and the outer boundary “contour” with another the outer boundary. representative value. The imposed relationship is The simplest possible elliptic relationship called a boundary-fitted coordinate system, between the physical coordinate variables and the subjected to an elliptic relationship between the computational variables is Laplace’s linear partial variables. Refer to Figure 2 for more details on differential equation [4]. Since we are interested in coordinate transformation relationship. computing a grid with constant lower and upper Observe that the blue contours that surround the boundaries, the appropriate applied conditions are airfoil will represent the variable eta, η, and the blue Dirichlet boundary conditions. Notice that this only contours that expand in a transverse direction to that describes the upper and lower limits. Since this of the airfoil will be represented by the variable zeta, system envelops an entire physical grid, recall lines ζ. pq and rs in Figure 3, the values for Γ3 and Γ4 must be such that the physical coordinates along both contours be equal to each other, thus closing the physical plane and representing re-entrant boundary conditions [5]. The elliptic system relationship is analogous to ζ (x, y) and η (x, y) being harmonic in the physical plane. The following coupled system of equations is posed as the solution to the coordinate transformation, 2 2 0 (11) 2 2 x y 2 2 0 (12) 2 2 x y subjected to the Dirichlet boundary conditions, Figure 4 Physical Plane Concept for Arbitrary Body Shape Limits 1x, y , x, y (13) 1 Notice that the solution to this system yields the 1 distribution of the computational variables in the physical plane.