Aerodynamics (MIT 16.100) 2022 Lecture 15: Boundary Layer Separation and High Lift Airfoils

preview_player
Показать описание
For course notes, homework problems, etc:

Code used in class:

from pylab import *
from numpy import *

class BoundaryLayer:
def __init__(self):
self.y = linspace(0, 10, 101)
self.u = ones_like(self.y)
self.u[0] = 0

def plot(self):
clf()
legends = []
def addLegend(nu_x, cp, thick):
delta99, deltaStar, theta, H = thick
s = r'$\nu\,x = {:.2f}, c_p={:.2f}, \delta_{{99}}={:.1f}, \delta^*={:.1f}, \theta={:.1f}, H={:.1f}$'
plot(u, y, ':k', lw=1)
addLegend(nu_x, cp, thick)
plot(u, y, '--k', lw=2)
addLegend(nu_x, cp, thick)
plot(self.u, self.y, 'k', lw=3)
xlabel('u')
ylabel('y')
xlim([-0.2, 1.5])
ylim([0, 10])
grid()
legend(legends, loc='upper left')

def evolve(self, nu_dx, dpOverRho=0, nIter=10000):
for iIter in range(nIter):
self.u[0] = 0
dy = self.y[1:] - self.y[:-1]
du = self.u[1:] - self.u[:-1]
shear = du / dy
dtPerX = 1. / nIter / self.u[1:]
uAvg = (self.u[1:] + self.u[:-1]) / 2
self.u[1:] -= dtPerX * dpOverRho
self.u[1:-1] += (shear[1:] - shear[:-1]) * dtPerX[:-1] * nu_dx
print('Boundary Layer Separated!')
break
uAvgNew = (self.u[1:] + self.u[:-1]) / 2
dy *= uAvg / uAvgNew
self.y = hstack([0, cumsum(dy)])

def thickness(self):
ue = self.u[-1]
delta99 = self.y[max((self.u < ue * 0.99).nonzero()[0])]
dy = self.y[1:] - self.y[:-1]
uAvg = (self.u[1:] + self.u[:-1]) / 2
deltaStar = sum((ue - uAvg) * dy) / ue
theta = sum((ue - uAvg) * uAvg * dy) / ue**2
H = deltaStar / theta
return delta99, deltaStar, theta, H

bl = BoundaryLayer()
Рекомендации по теме