Example #1
0
    def vandevooren(cls, tau=0.05, epsilon=0.05, numpoints=100):
        from paraBEM.airfoil.conformal_mapping import VanDeVoorenAirfoil
        airfoil = VanDeVoorenAirfoil(tau=tau, epsilon=epsilon)
        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, "VanDeVooren_tau=" + str(tau) + "_epsilon=" + str(epsilon))
        profile.normalize(numpy.where(x == min(x))[0][0])
        profile.normalize()
        profile.numpoints = numpoints
        return profile
Example #2
0
    def vandevooren(cls, tau=0.05, epsilon=0.05, numpoints=100):
        from paraBEM.airfoil.conformal_mapping import VanDeVoorenAirfoil
        airfoil = VanDeVoorenAirfoil(tau=tau, epsilon=epsilon)
        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,
            "VanDeVooren_tau=" + str(tau) + "_epsilon=" + str(epsilon))
        profile.normalize(numpy.where(x == min(x))[0][0])
        profile.normalize()
        profile.numpoints = numpoints
        return profile
from paraBEM.vtk_export import VtkWriter
from paraBEM.utils import check_path

####################################################
#      analytic solution of vandevooren-airfoils     #
####################################################

# -inputparameter for the vandevooren airfoil
alpha = np.deg2rad(10)  # alpha is the angle of attack in rad
tau = np.deg2rad(1)     # tau is the angle of the trailing edge
epsilon = 0.10          # epsilon is the thickness-parameter
num_x = 300             # number of plot-points in x-direction
num_y = 300             # number of plot-points in y-direction

# -create joukowsky object
airfoil = VanDeVoorenAirfoil(tau=tau, epsilon=epsilon)

# -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)
Example #4
0
from paraBEM.vtk_export import VtkWriter
from paraBEM.utils import check_path

####################################################
#      analytic solution of vandevooren-airfoils     #
####################################################

# -inputparameter for the vandevooren airfoil
alpha = np.deg2rad(10)  # alpha is the angle of attack in rad
tau = np.deg2rad(1)  # tau is the angle of the trailing edge
epsilon = 0.10  # epsilon is the thickness-parameter
num_x = 300  # number of plot-points in x-direction
num_y = 300  # number of plot-points in y-direction

# -create joukowsky object
airfoil = VanDeVoorenAirfoil(tau=tau, epsilon=epsilon)

# -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)