コード例 #1
0
def stream(z):
    stream = airfoil.potential(z, alpha)
    return stream.imag


# complex z-plane with circle
# ----------------------------------------------------------
z_range_x = np.linspace(-3, 3, num_x)
z_range_y = np.linspace(-3, 3, num_y)
z_grid = [x + 1j * y for y in z_range_y for x in z_range_x]
z_vel = list(map(z_velocity, z_grid))
z_pot = list(map(potential, z_grid))
z_stream = list(map(stream, z_grid))

circle = list(map(complex_to_3vec, airfoil.circle()))
# ----------------------------------------------------------

# complex zeta-plane with mapped circle (=joukowsky airfoil)
# ----------------------------------------------------------
zeta_range_x = np.linspace(-3, 3, num_x)
zeta_range_y = np.linspace(-3, 3, num_y)
zeta_grid = [x + 1j * y for y in zeta_range_y for x in zeta_range_x]
zeta_to_z = list(map(airfoil.z, zeta_grid))
zeta_vel = list(map(zeta_velocity, zeta_to_z))
zeta_pot = list(map(potential, zeta_to_z))
zeta_stream = list(map(stream, zeta_to_z))

airfoil = list(map(complex_to_3vec, airfoil.coordinates()))
# ----------------------------------------------------------