One concept that may not be generally known among the general masses is the concept of airfoils. What are those, really? Are those related to airplane? Yes!
To understand the picture above, you need to imagine cutting an airplane wing and look at it from the side, which is called the cross-section of the wing.
Many modern airplanes are using proprietary airfoil designs, but there is a great source of open-source airfoils that we can use to create our simulation. There's a website called Airfoil Tools that we can use to download many airfoil data.
To start with this project, I'm going to also go over about the basic ideas of computational fluid dynamics: what is it, and how does it work with airfoils?
First, an initial question: What does it mean by "simulating" an airfoil? Simulation usually involves creating a digital representation of something to make it easier to understand or demonstrate. That means, in the case of airfoils, we will simulate real airfoils in a virtual environment.
Let us start with a simple tool to visualize an airfoil from a series of points. I hand-picked the available airfoil list from airfoiltools.
No data loaded
Point # | X Coordinate | Y Coordinate |
---|---|---|
Select an airfoil to view data |
Simulating airfoil actually means simulating the airflow around the airfoil shape. That means, we need to, somehow, express all of the empty points outside of the airfoil in the computational domain.
The Computational Domain
To express the computational domain, we use something called a grid or a mesh. Both terms sometimes used interchangeable, and they refer to a same principle: dividing the space (computational domain) into a small pieces
Let's improve our tools by implementing a grid system for our airfoil visualizer. Airfoil looks very complex though, maybe we can start with a simple square shape with a square grids around it.
The image above, while not perfect, represent a rough estimation on how the computational domain works. We basically need to simulate anything that we need for each of the smaller squares above. This usually involves calculating something for each square. This "something" depends on our goal. Since our goal is an airfoil, and airfoil simulation usually focuses when it's flying, the calculation involves some properties when the airfoil interact with airflow.
Square is easy though, maybe let's try circle shape next. Circle is harder because square grids cannot be easily placed around it, especially is the outer canvas is a square shape as we have above. But let's try anyway.
Well, that is horrendous! Let's see if we can improve it by using a different system. One of the most obvious system we can try is the Polar Coordinate System, let's see how far we can go with this.
Polar Coordinates (r-θ)
Cartesian Coordinates (x-y)
Let's redraw our simple grids with polar coordinates.
I'd say this looks pretty good!
I also added axis lines for both polar and Cartesian coordinates to help visualize the grid system. The x, y, and r axis is a straight line, but the 𝜃 axis goes around the circle.
I want to change something, though. Instead of saying it as a polar coordinates, let's say it something else, to make it more general: Curvilinear Coordinates. Curvilinear Coordinates is a generalization of polar coordinates that allows for more flexibility in representing points in a curved space.
Why do I have to use Curvilinear instead of polar? Because airfoil shapes are not circular, and it will be almost impossible to represent them accurately using polar coordinates. Maybe you have a question: "okay, then what?"