def joukowsky(cls, m=-0.1+0.1j, numpoints=100): from paraBEM.airfoil.conformal_mapping import JoukowskyAirfoil airfoil = JoukowskyAirfoil(m) profile = [[c.real, c.imag] for c in airfoil.coordinates(numpoints)] # find the smallest xvalue to reset the nose x = numpy.array([i[0] for i in profile]) profile = cls(profile, "joukowsky_" + str(m)) profile.normalize(numpy.where(x == min(x))[0][0]) profile.normalize() profile.numpoints = numpoints return profile
def joukowsky(cls, m=-0.1 + 0.1j, numpoints=100): from paraBEM.airfoil.conformal_mapping import JoukowskyAirfoil airfoil = JoukowskyAirfoil(m) profile = [[c.real, c.imag] for c in airfoil.coordinates(numpoints)] # find the smallest xvalue to reset the nose x = numpy.array([i[0] for i in profile]) profile = cls(profile, "joukowsky_" + str(m)) profile.normalize(numpy.where(x == min(x))[0][0]) profile.normalize() profile.numpoints = numpoints return profile
from paraBEM.airfoil.conformal_mapping import JoukowskyAirfoil from paraBEM.vtk_export import VtkWriter from paraBEM.utils import check_path #################################################### # analytic solution of joukowsky-airfoils # #################################################### # -inputparameter for the joukowsky airfoil midpoint = -0.2 + 0.0j # m is the complex mid point of a circle passing (1 + 0j) alpha = np.deg2rad(10) # alpha is the angle of attack in rad num_x = 300 # number of plot-points in x-direction num_y = 300 # number of plot-points in y-direction # -create joukowsky object airfoil = JoukowskyAirfoil(midpoint) # -helper functions def complex_to_3vec(z): return [z.real, z.imag, 0] def zeta_velocity(z): vel = airfoil.velocity(z, alpha) return [vel.real, -vel.imag, 0.] def z_velocity(z): vel = airfoil.z_velocity(z, alpha)