original_docstring:  Create set of points along the chord befitting for Xfoil. The x
      output is conviniently ordered from TE to LE.
  
      :param c: float value for the chord.
      :param n: number of points
      :param distribution: linear or polar. linear uses a given delta x to
             find the values of x. Polar uses a delta theta to find values
             of theta that are then used in a circle equation to find the
             x points. Usuallly good for airfoils.
      
      :rtype: x: numpy.array of values of x
      
      Because Xfoil it is not efficient or sometimes possible to create a
      uniform distribution of points because the front part of the
      airfoil requires a big amount of points to create a smooth surface
      representing the round leading edge. However there is a maximum of
      points that Xfoil will accept, therefore there is a need to
      overcome this obstacle. This was done by dividing the airfoil in
      to 3 parts.
  
      - tip: correpondent to 0 to .3% of the chord length, it is the
        most densily populated part of the airfoil to compensate the
        wide variation of slopes
  
      - middle: correpondent to .3% to 30% of the chord length (
        Shortly above a quarter of the chord length). The second most
        densily populated and the segment with the most amount of
        points. Represents the round section of the airfoil except
        for the tip. Such an amount of points is necessary because it
        is where most of the lift is generated.
  
      - endbody: correspondent to 30% to 100% of the chord length.
        The less densily populated section. Such unrefined mesh is
        possible because of the simplistic geometry of endbody's
        airfoil, just straight lines.
  
      >>> print create_x(1.0)
          array([  1.00000000e+00,   9.82051282e-01,   9.64102564e-01,
          ...
          6.66666667e-04,   3.33333333e-04,   0.00000000e+00])
  
      Created on Thu Feb 27 2014
      @author: Pedro Leal
      
docstring: Create set of points along the chord befitting for Xfoil. The x
  output is conviniently ordered from TE to LE.
docstring_tokens: Create set of points along the chord befitting for Xfoil . The x output is conviniently ordered from TE to LE .
code: def create_x(c, n = 230, distribution = 'linear'):
      """ Create set of points along the chord befitting for Xfoil. The x
      output is conviniently ordered from TE to LE.
  
      :param c: float value for the chord.
      :param n: number of points
      :param distribution: linear or polar. linear uses a given delta x to
             find the values of x. Polar uses a delta theta to find values
             of theta that are then used in a circle equation to find the
             x points. Usuallly good for airfoils.
      
      :rtype: x: numpy.array of values of x
      
      Because Xfoil it is not efficient or sometimes possible to create a
      uniform distribution of points because the front part of the
      airfoil requires a big amount of points to create a smooth surface
      representing the round leading edge. However there is a maximum of
      points that Xfoil will accept, therefore there is a need to
      overcome this obstacle. This was done by dividing the airfoil in
      to 3 parts.
  
      - tip: correpondent to 0 to .3% of the chord length, it is the
        most densily populated part of the airfoil to compensate the
        wide variation of slopes
  
      - middle: correpondent to .3% to 30% of the chord length (
        Shortly above a quarter of the chord length). The second most
        densily populated and the segment with the most amount of
        points. Represents the round section of the airfoil except
        for the tip. Such an amount of points is necessary because it
        is where most of the lift is generated.
  
      - endbody: correspondent to 30% to 100% of the chord length.
        The less densily populated section. Such unrefined mesh is
        possible because of the simplistic geometry of endbody's
        airfoil, just straight lines.
  
      >>> print create_x(1.0)
          array([  1.00000000e+00,   9.82051282e-01,   9.64102564e-01,
          ...
          6.66666667e-04,   3.33333333e-04,   0.00000000e+00])
  
      Created on Thu Feb 27 2014
      @author: Pedro Leal
      """
  
      if distribution == 'linear':
          max_point = c/4.
          limit = max_point + 0.05*c
          nose_tip = 0.003*c
      
          # Amount of points for each part (this distribution is empirical)
          N_tip = 10*n/230
          N_middle = 180*n/230
          N_endbody = 40*n/230
      
          x_endbody = np.linspace(c, limit, N_endbody)
          x_middle = np.linspace(limit, nose_tip, N_middle)
          x_tip = np.linspace(nose_tip, 0, N_tip)
      
          # Organizing the x lists in a unique list without repeating any
          # numbers
          x2 = np.append(x_middle, np.delete(x_tip, 0))
          x = np.append(x_endbody, np.delete(x2, 0))
          
      elif distribution == 'polar':
          r = c/2.
          x0 = r
          theta = np.linspace(0, math.pi,n)
          
          x = x0 + r*np.cos(theta)
      return x
code_tokens: def create_x ( c , n = 230 , distribution = 'linear' ) : if distribution == 'linear' : max_point = c / 4. limit = max_point + 0.05 * c nose_tip = 0.003 * c N_tip = 10 * n / 230 N_middle = 180 * n / 230 N_endbody = 40 * n / 230 x_endbody = np . linspace ( c , limit , N_endbody ) x_middle = np . linspace ( limit , nose_tip , N_middle ) x_tip = np . linspace ( nose_tip , 0 , N_tip ) x2 = np . append ( x_middle , np . delete ( x_tip , 0 ) ) x = np . append ( x_endbody , np . delete ( x2 , 0 ) ) elif distribution == 'polar' : r = c / 2. x0 = r theta = np . linspace ( 0 , math . pi , n ) x = x0 + r * np . cos ( theta ) return x
short_docstring: Create set of points along the chord befitting for Xfoil.
short_docstring_tokens: Create set of points along the chord befitting for Xfoil .
comment: """ Create set of points along the chord befitting for Xfoil. The x
      output is conviniently ordered from TE to LE.
  
      :param c: float value for the chord.
      :param n: number of points
      :param distribution: linear or polar. linear uses a given delta x to
             find the values of x. Polar uses a delta theta to find values
             of theta that are then used in a circle equation to find the
             x points. Usuallly good for airfoils.
      
      :rtype: x: numpy.array of values of x
      
      Because Xfoil it is not efficient or sometimes possible to create a
      uniform distribution of points because the front part of the
      airfoil requires a big amount of points to create a smooth surface
      representing the round leading edge. However there is a maximum of
      points that Xfoil will accept, therefore there is a need to
      overcome this obstacle. This was done by dividing the airfoil in
      to 3 parts.
  
      - tip: correpondent to 0 to .3% of the chord length, it is the
        most densily populated part of the airfoil to compensate the
        wide variation of slopes
  
      - middle: correpondent to .3% to 30% of the chord length (
        Shortly above a quarter of the chord length). The second most
        densily populated and the segment with the most amount of
        points. Represents the round section of the airfoil except
        for the tip. Such an amount of points is necessary because it
        is where most of the lift is generated.
  
      - endbody: correspondent to 30% to 100% of the chord length.
        The less densily populated section. Such unrefined mesh is
        possible because of the simplistic geometry of endbody's
        airfoil, just straight lines.
  
      >>> print create_x(1.0)
          array([  1.00000000e+00,   9.82051282e-01,   9.64102564e-01,
          ...
          6.66666667e-04,   3.33333333e-04,   0.00000000e+00])
  
      Created on Thu Feb 27 2014
      @author: Pedro Leal
      """$SEP$# Amount of points for each part (this distribution is empirical)$SEP$# Organizing the x lists in a unique list without repeating any$SEP$# numbers