OpenFOAM Baby Steps - Calculating Lift and Drag (Episode 3)
This is the second in a series. You can start the series here. Building on the previous episode of 3D airflow over a wing section, this episode calculates the lift and drag.
Using the results from Episode 2, extract the surface elements that make up the wing section with an ExtractSurface filter. Then use a GenerateSurfaceNormals filter to obtain the normals of each cell along the surface. Attaching an arrow glyph to this filter displays the surface normals. To get the arrows to orient outward, which seems more intuitive, I needed to invert the normals. Remove that inversion before calculating lift and drag, or those values will also be inverted.
Using a calculator filter, I calculated lift and drag at each cell by multiplying the pressure at that cell with the appropriate normal component. For me, lift acts in the +Z-direction and drag in the +X-direction. Adding an Integration filter summed all the cells and came up with an overall value for lift and drag. The actual values of each are probably not valid; I didn't pay attention to units. The value of lift was approximately 10x that of drag, so I think they are in the ballpark. Next episode, I'll try to come up with numbers that match theory and reality!
When you subscribe to the blog, we will send you an e-mail when there are new updates on the site so you wouldn't miss them.