├── requirements.txt ├── docs ├── tutorial.rst ├── _build │ ├── html │ │ ├── _sources │ │ │ ├── tutorial.txt │ │ │ ├── pyxfoil_doc.txt │ │ │ ├── airfoil_module.txt │ │ │ ├── xfoil_functions.txt │ │ │ ├── xfoil_module.txt │ │ │ ├── main_module.txt │ │ │ ├── aero_doc.txt │ │ │ ├── aero_module.txt │ │ │ └── index.txt │ │ ├── objects.inv │ │ ├── _static │ │ │ ├── down.png │ │ │ ├── file.png │ │ │ ├── logo.png │ │ │ ├── plus.png │ │ │ ├── up.png │ │ │ ├── minus.png │ │ │ ├── comment.png │ │ │ ├── ajax-loader.gif │ │ │ ├── up-pressed.png │ │ │ ├── comment-bright.png │ │ │ ├── comment-close.png │ │ │ ├── down-pressed.png │ │ │ ├── pygments.css │ │ │ ├── doctools.js │ │ │ ├── underscore.js │ │ │ └── alabaster.css │ │ ├── _images │ │ │ └── elliptical_LLT.png │ │ ├── .buildinfo │ │ ├── pyxfoil_doc.html │ │ ├── _modules │ │ │ ├── index.html │ │ │ └── AeroPy.html │ │ ├── search.html │ │ ├── tutorial.html │ │ ├── py-modindex.html │ │ ├── airfoil_module.html │ │ ├── aero_doc.html │ │ ├── searchindex.js │ │ ├── genindex.html │ │ ├── main_module.html │ │ ├── index.html │ │ └── aero_module.html │ └── doctrees │ │ ├── index.doctree │ │ ├── aero_doc.doctree │ │ ├── tutorial.doctree │ │ ├── aero_module.doctree │ │ ├── environment.pickle │ │ ├── main_module.doctree │ │ ├── pyxfoil_doc.doctree │ │ ├── airfoil_module.doctree │ │ ├── xfoil_module.doctree │ │ └── xfoil_functions.doctree ├── images │ ├── logo.png │ ├── elliptical_LLT.png │ └── logo.svg ├── _static │ └── logo.png ├── airfoil_module.rst ├── xfoil_module.rst ├── main_module.rst ├── aero_module.rst ├── index.rst ├── make.bat ├── Makefile └── conf.py ├── pplot.exe ├── pxplot.exe ├── xfoil.exe ├── README.md ├── CST_aerodynamic_performance.py ├── LICENSE ├── plotting.py ├── test_inflections.py ├── .gitignore ├── sampled_airfoil_data.csv ├── shape_study.p └── AeroPy.py /requirements.txt: -------------------------------------------------------------------------------- 1 | numpy 2 | -------------------------------------------------------------------------------- /docs/tutorial.rst: -------------------------------------------------------------------------------- 1 | Tutorial 2 | ======== 3 | -------------------------------------------------------------------------------- /docs/_build/html/_sources/tutorial.txt: -------------------------------------------------------------------------------- 1 | Tutorial 2 | ======== 3 | -------------------------------------------------------------------------------- /docs/_build/html/_sources/pyxfoil_doc.txt: -------------------------------------------------------------------------------- 1 | pyxfoil_doc 2 | ======== 3 | -------------------------------------------------------------------------------- /pplot.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AeroPython/AeroPy-1/master/pplot.exe -------------------------------------------------------------------------------- /pxplot.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AeroPython/AeroPy-1/master/pxplot.exe -------------------------------------------------------------------------------- /xfoil.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AeroPython/AeroPy-1/master/xfoil.exe -------------------------------------------------------------------------------- /docs/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AeroPython/AeroPy-1/master/docs/images/logo.png -------------------------------------------------------------------------------- /docs/_static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AeroPython/AeroPy-1/master/docs/_static/logo.png -------------------------------------------------------------------------------- /docs/_build/html/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AeroPython/AeroPy-1/master/docs/_build/html/objects.inv -------------------------------------------------------------------------------- /docs/images/elliptical_LLT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AeroPython/AeroPy-1/master/docs/images/elliptical_LLT.png -------------------------------------------------------------------------------- /docs/_build/html/_static/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AeroPython/AeroPy-1/master/docs/_build/html/_static/down.png -------------------------------------------------------------------------------- /docs/_build/html/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AeroPython/AeroPy-1/master/docs/_build/html/_static/file.png -------------------------------------------------------------------------------- /docs/_build/html/_static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AeroPython/AeroPy-1/master/docs/_build/html/_static/logo.png -------------------------------------------------------------------------------- /docs/_build/html/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AeroPython/AeroPy-1/master/docs/_build/html/_static/plus.png -------------------------------------------------------------------------------- /docs/_build/html/_static/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AeroPython/AeroPy-1/master/docs/_build/html/_static/up.png -------------------------------------------------------------------------------- /docs/_build/doctrees/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AeroPython/AeroPy-1/master/docs/_build/doctrees/index.doctree -------------------------------------------------------------------------------- /docs/_build/html/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AeroPython/AeroPy-1/master/docs/_build/html/_static/minus.png -------------------------------------------------------------------------------- /docs/_build/doctrees/aero_doc.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AeroPython/AeroPy-1/master/docs/_build/doctrees/aero_doc.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/tutorial.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AeroPython/AeroPy-1/master/docs/_build/doctrees/tutorial.doctree -------------------------------------------------------------------------------- /docs/_build/html/_static/comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AeroPython/AeroPy-1/master/docs/_build/html/_static/comment.png -------------------------------------------------------------------------------- /docs/_build/doctrees/aero_module.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AeroPython/AeroPy-1/master/docs/_build/doctrees/aero_module.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/environment.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AeroPython/AeroPy-1/master/docs/_build/doctrees/environment.pickle -------------------------------------------------------------------------------- /docs/_build/doctrees/main_module.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AeroPython/AeroPy-1/master/docs/_build/doctrees/main_module.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/pyxfoil_doc.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AeroPython/AeroPy-1/master/docs/_build/doctrees/pyxfoil_doc.doctree -------------------------------------------------------------------------------- /docs/_build/html/_static/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AeroPython/AeroPy-1/master/docs/_build/html/_static/ajax-loader.gif -------------------------------------------------------------------------------- /docs/_build/html/_static/up-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AeroPython/AeroPy-1/master/docs/_build/html/_static/up-pressed.png -------------------------------------------------------------------------------- /docs/_build/doctrees/airfoil_module.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AeroPython/AeroPy-1/master/docs/_build/doctrees/airfoil_module.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/xfoil_module.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AeroPython/AeroPy-1/master/docs/_build/doctrees/xfoil_module.doctree -------------------------------------------------------------------------------- /docs/_build/html/_images/elliptical_LLT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AeroPython/AeroPy-1/master/docs/_build/html/_images/elliptical_LLT.png -------------------------------------------------------------------------------- /docs/_build/html/_static/comment-bright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AeroPython/AeroPy-1/master/docs/_build/html/_static/comment-bright.png -------------------------------------------------------------------------------- /docs/_build/html/_static/comment-close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AeroPython/AeroPy-1/master/docs/_build/html/_static/comment-close.png -------------------------------------------------------------------------------- /docs/_build/html/_static/down-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AeroPython/AeroPy-1/master/docs/_build/html/_static/down-pressed.png -------------------------------------------------------------------------------- /docs/_build/doctrees/xfoil_functions.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AeroPython/AeroPy-1/master/docs/_build/doctrees/xfoil_functions.doctree -------------------------------------------------------------------------------- /docs/_build/html/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: 43ce4afafbc7b21ca51f3e159561c44c 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs/airfoil_module.rst: -------------------------------------------------------------------------------- 1 | Airfoil Module Documentation 2 | ********************************* 3 | 4 | The functions herein defined are purposely made for generating NACA airfoils, flapped airfoils and CST airfoils. 5 | 6 | Core Function 7 | =========================== 8 | 9 | Auxiliary Functions 10 | =========================== 11 | 12 | Utility Functions 13 | ==================== 14 | -------------------------------------------------------------------------------- /docs/_build/html/_sources/airfoil_module.txt: -------------------------------------------------------------------------------- 1 | Airfoil Module Documentation 2 | ********************************* 3 | 4 | The functions herein defined are purposely made for generating NACA airfoils, flapped airfoils and CST airfoils. 5 | 6 | Core Function 7 | =========================== 8 | 9 | Auxiliary Functions 10 | =========================== 11 | 12 | Utility Functions 13 | ==================== 14 | -------------------------------------------------------------------------------- /docs/xfoil_module.rst: -------------------------------------------------------------------------------- 1 | Xfoil Module Documentation 2 | ********************************* 3 | 4 | The functions herein defined are purposely made for use with Xfoil. 5 | 6 | Core Function 7 | =========================== 8 | .. autofunction:: xfoil_module.call 9 | 10 | Auxiliary Functions 11 | =========================== 12 | .. automodule:: xfoil_module 13 | :members: 14 | :exclude-members: call, find_alpha_L_0, M_crit, find_coefficients 15 | 16 | Utility Functions 17 | ==================== 18 | .. autofunction:: xfoil_module.find_coefficients 19 | .. autofunction:: xfoil_module.find_alpha_L_0 20 | .. autofunction:: xfoil_module.M_crit 21 | -------------------------------------------------------------------------------- /docs/_build/html/_sources/xfoil_functions.txt: -------------------------------------------------------------------------------- 1 | Documentation for Xfoil Functions 2 | ********************************* 3 | 4 | The functions herein defined are purposely made for use with Xfoil. 5 | 6 | Core Function 7 | =========================== 8 | .. autofunction:: xfoil_tools.call 9 | 10 | Auxiliary Functions 11 | =========================== 12 | .. automodule:: xfoil_tools 13 | :members: 14 | :exclude-members: call, find_alpha_L_0, M_crit, find_coefficients 15 | 16 | Utility Functions 17 | ==================== 18 | .. autofunction:: xfoil_tools.find_coefficients 19 | .. autofunction:: xfoil_tools.find_alpha_L_0 20 | .. autofunction:: xfoil_tools.M_crit -------------------------------------------------------------------------------- /docs/_build/html/_sources/xfoil_module.txt: -------------------------------------------------------------------------------- 1 | Xfoil Module Documentation 2 | ********************************* 3 | 4 | The functions herein defined are purposely made for use with Xfoil. 5 | 6 | Core Function 7 | =========================== 8 | .. autofunction:: xfoil_module.call 9 | 10 | Auxiliary Functions 11 | =========================== 12 | .. automodule:: xfoil_module 13 | :members: 14 | :exclude-members: call, find_alpha_L_0, M_crit, find_coefficients 15 | 16 | Utility Functions 17 | ==================== 18 | .. autofunction:: xfoil_module.find_coefficients 19 | .. autofunction:: xfoil_module.find_alpha_L_0 20 | .. autofunction:: xfoil_module.M_crit 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![DOI](https://zenodo.org/badge/20401/leal26/AeroPy.svg)](https://zenodo.org/badge/latestdoi/20401/leal26/AeroPy) 2 | 3 | # AeroPy 4 | AeroPy is an library for calculating aerodynamic properties. The main feature of this library is the Python interface with XFOIL. The main objective of this library is to be able to use XFOIL via Python iteratively in a total of 4 lines total (one line for most uses). Through this interface coupling with other softwares (Abaqus, Ansys, etc) is possible and iterative processes (optimization, design sensitivity) are possible. For a thorough explanation please check the documentation and the tutorials. For thorough documentation and tutorials please check the [AeroPy website](http://aeropy.readthedocs.org/) 5 | -------------------------------------------------------------------------------- /CST_aerodynamic_performance.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | 4 | import xfoil_module as xf 5 | from CST_module import * 6 | from aero_module import Reynolds 7 | from airfoil_module import CST, create_x 8 | 9 | Au = [0.23993240191629417, 0.34468227138908186, 0.18125405377549103, 10 | 0.35371349126072665, 0.2440815012119143, 0.25724974995738387] 11 | Al = [0.18889012559339036, -0.24686758992053115, 0.077569769493868401, 12 | -0.547827192265256, -0.0047342206759065641, -0.23994805474814629] 13 | c_avian = 0.36 #m 14 | deltaz = 0.0093943568219451313*c_avian 15 | 16 | airfoil = 'avian' 17 | x = create_x(1., distribution = 'linear') 18 | y = CST(x, 1., [deltaz/2., deltaz/2.], Au = Au, Al= Al) 19 | # Create file for Xfoil to read coordinates 20 | xf.create_input(x, y['u'], y['l'], airfoil, different_x_upper_lower = False) 21 | print 'Reynolds: ', Reynolds(10000, 30, c_avian) 22 | Data = xf.find_coefficients(airfoil, 2., Reynolds=Reynolds(10000, 30, c_avian), iteration=100, NACA=False) 23 | print Data -------------------------------------------------------------------------------- /docs/main_module.rst: -------------------------------------------------------------------------------- 1 | AeroPy Documentation 2 | ********************* 3 | 4 | This project was elaborated because of the need of optimizing an airfoil 5 | according to its aerodynamic and structural performance (conference paper). 6 | Contrary to available options such as XFLR5, AeroPy aims to be an open source 7 | Python code. It is a quick and easy way to find the aerodynamic pressure and the 8 | drag and lift coefficients through the use of MIT's XFOIL embedded in Python. 9 | Contrary to the other libraries, AeroPy does not have a GUI and is intended 10 | to be used in Python codes for optimizations or any other process that requires 11 | several aerodynamic analysis. 12 | 13 | AeroPy is separated in three modules: (it is programmed in such a way that a new 14 | module can be easily inserted) 15 | 16 | - xfoil: contains all the functions relating to XFOIL. 17 | - aero: contains all functions related to aerodynamics, but not related to XFOIL. 18 | - AeroPy: imports all functions and acts as the intersection of all different 19 | modules 20 | 21 | Code 22 | ==== 23 | 24 | .. automodule:: AeroPy 25 | :members: 26 | -------------------------------------------------------------------------------- /docs/_build/html/_sources/main_module.txt: -------------------------------------------------------------------------------- 1 | AeroPy Documentation 2 | ********************* 3 | 4 | This project was elaborated because of the need of optimizing an airfoil 5 | according to its aerodynamic and structural performance (conference paper). 6 | Contrary to available options such as XFLR5, AeroPy aims to be an open source 7 | Python code. It is a quick and easy way to find the aerodynamic pressure and the 8 | drag and lift coefficients through the use of MIT's XFOIL embedded in Python. 9 | Contrary to the other libraries, AeroPy does not have a GUI and is intended 10 | to be used in Python codes for optimizations or any other process that requires 11 | several aerodynamic analysis. 12 | 13 | AeroPy is separated in three modules: (it is programmed in such a way that a new 14 | module can be easily inserted) 15 | 16 | - xfoil: contains all the functions relating to XFOIL. 17 | - aero: contains all functions related to aerodynamics, but not related to XFOIL. 18 | - AeroPy: imports all functions and acts as the intersection of all different 19 | modules 20 | 21 | Code 22 | ==== 23 | 24 | .. automodule:: AeroPy 25 | :members: 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 leal26 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /docs/_build/html/_sources/aero_doc.txt: -------------------------------------------------------------------------------- 1 | Documentation for Aerodynamic Functions 2 | *************************************** 3 | 4 | Lifting Line Theory 5 | =================== 6 | If :math:`\theta_0` is an arbitrary span-wise location: 7 | 8 | .. math:: 9 | \alpha (\theta_o)=\frac{2b}{\pi c(\theta_o)} \sum_1^N A_n sin(n \theta_o) + \alpha_{L=0}(\theta_o) + \sum_1^N n A_n \frac{sin(n\theta_o)}{sin(\theta_o)} 10 | :label: LLT_full 11 | 12 | Each equation has :math:`N` unknowns (:math:`A_n`), so if there are N :math:`\theta_o`, we have NxN system, which in Einstein notation can be written as: 13 | 14 | .. math:: 15 | C_{ij}A_{i}=D_{i} 16 | :label: LLT_simple 17 | 18 | where, :math:`i=0,...,N`, :math:`j=0,...,N` and : 19 | 20 | .. math:: 21 | C_{ij}= \left( \frac{2b}{\pi c(j)} + \frac{n}{sin \theta(i)} \right) sin(n \theta(i)) 22 | :label: C 23 | 24 | .. math:: 25 | A_i=A(i) 26 | :label: A 27 | 28 | .. math:: 29 | D_i=\alpha(i)-\alpha_{L=0}(i) 30 | :label: D 31 | 32 | where :math:`n=1,3,5,...,N-1`. Since we are considering a symmetric wing, all of the even terms would cancel each other 33 | 34 | .. figure:: images/elliptical_LLT.png 35 | :align: center 36 | -------------------------------------------------------------------------------- /docs/aero_module.rst: -------------------------------------------------------------------------------- 1 | Aerodynamic Module Documentation 2 | *************************************** 3 | 4 | Lifting Line Theory 5 | =================== 6 | If :math:`\theta_0` is an arbitrary span-wise location: 7 | 8 | .. math:: 9 | \alpha (\theta_o)=\frac{2b}{\pi c(\theta_o)} \sum_1^N A_n sin(n \theta_o) + \alpha_{L=0}(\theta_o) + \sum_1^N n A_n \frac{sin(n\theta_o)}{sin(\theta_o)} 10 | :label: LLT_full 11 | 12 | Each equation has :math:`N` unknowns (:math:`A_n`), so if there are N :math:`\theta_o`, we have NxN system, which in Einstein notation can be written as: 13 | 14 | .. math:: 15 | C_{ij}A_{i}=D_{i} 16 | :label: LLT_simple 17 | 18 | where, :math:`i=0,...,N`, :math:`j=0,...,N` and : 19 | 20 | .. math:: 21 | C_{ij}= \left( \frac{2b}{\pi c(j)} + \frac{n}{sin \theta(i)} \right) sin(n \theta(i)) 22 | :label: C 23 | 24 | .. math:: 25 | A_i=A(i) 26 | :label: A 27 | 28 | .. math:: 29 | D_i=\alpha(i)-\alpha_{L=0}(i) 30 | :label: D 31 | 32 | where :math:`n=1,3,5,...,N-1`. Since we are considering a symmetric wing, all of the even terms would cancel each other 33 | 34 | .. figure:: images/elliptical_LLT.png 35 | :align: center 36 | 37 | The code 38 | ======== 39 | .. automodule:: aero_module 40 | :members: 41 | -------------------------------------------------------------------------------- /docs/_build/html/_sources/aero_module.txt: -------------------------------------------------------------------------------- 1 | Aerodynamic Module Documentation 2 | *************************************** 3 | 4 | Lifting Line Theory 5 | =================== 6 | If :math:`\theta_0` is an arbitrary span-wise location: 7 | 8 | .. math:: 9 | \alpha (\theta_o)=\frac{2b}{\pi c(\theta_o)} \sum_1^N A_n sin(n \theta_o) + \alpha_{L=0}(\theta_o) + \sum_1^N n A_n \frac{sin(n\theta_o)}{sin(\theta_o)} 10 | :label: LLT_full 11 | 12 | Each equation has :math:`N` unknowns (:math:`A_n`), so if there are N :math:`\theta_o`, we have NxN system, which in Einstein notation can be written as: 13 | 14 | .. math:: 15 | C_{ij}A_{i}=D_{i} 16 | :label: LLT_simple 17 | 18 | where, :math:`i=0,...,N`, :math:`j=0,...,N` and : 19 | 20 | .. math:: 21 | C_{ij}= \left( \frac{2b}{\pi c(j)} + \frac{n}{sin \theta(i)} \right) sin(n \theta(i)) 22 | :label: C 23 | 24 | .. math:: 25 | A_i=A(i) 26 | :label: A 27 | 28 | .. math:: 29 | D_i=\alpha(i)-\alpha_{L=0}(i) 30 | :label: D 31 | 32 | where :math:`n=1,3,5,...,N-1`. Since we are considering a symmetric wing, all of the even terms would cancel each other 33 | 34 | .. figure:: images/elliptical_LLT.png 35 | :align: center 36 | 37 | The code 38 | ======== 39 | .. automodule:: aero_module 40 | :members: 41 | -------------------------------------------------------------------------------- /plotting.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pickle 3 | import math 4 | import matplotlib.pyplot as plt 5 | 6 | from airfoil_module import CST 7 | from xfoil_module import output_reader 8 | 9 | data = pickle.load(open('shape_study.p','rb')) 10 | 11 | n=5 12 | print 'For n=', n, ': ' 13 | print '\t error: ', data['error'][n-1] 14 | print '\t deltaz: ', data['deltaz'][n-1] 15 | print '\t Au: ', data['Au'][n-1] 16 | print '\t Al: ', data['Al'][n-1] 17 | 18 | filename = 'sampled_airfoil_data.csv' 19 | raw_data = output_reader(filename, separator = ', ', header = ['x', 'y']) 20 | 21 | # Rotating airfoil 22 | x_TE = (raw_data['x'][0] + raw_data['x'][-1])/2. 23 | y_TE = (raw_data['y'][0] + raw_data['y'][-1])/2. 24 | 25 | theta_TE = math.atan(-y_TE/x_TE) 26 | 27 | # position trailing edge at the x-axis 28 | processed_data = {'x':[], 'y':[]} 29 | for i in range(len(raw_data['x'])): 30 | x = raw_data['x'][i] 31 | y = raw_data['y'][i] 32 | c_theta = math.cos(theta_TE) 33 | s_theta = math.sin(theta_TE) 34 | x_rotated = c_theta*x - s_theta*y 35 | y_rotated = s_theta*x + c_theta*y 36 | processed_data['x'].append(x_rotated) 37 | processed_data['y'].append(y_rotated) 38 | raw_data = processed_data 39 | 40 | # determine what is the leading edge and the rotation angle beta 41 | processed_data = {'x':[], 'y':[]} 42 | min_x_list = [] 43 | min_y_list = [] 44 | 45 | min_x = min(raw_data['x']) 46 | min_index = raw_data['x'].index(min_x) 47 | min_y = raw_data['y'][min_index] 48 | 49 | chord = max(raw_data['x']) - min(raw_data['x']) 50 | beta = math.atan((y_TE - min_y)/(x_TE - min_x)) 51 | 52 | for i in range(len(raw_data['x'])): 53 | processed_data['x'].append((raw_data['x'][i] - min_x)/chord) 54 | processed_data['y'].append(raw_data['y'][i]/chord) 55 | raw_data = processed_data 56 | 57 | psi = np.linspace(0,1,200) 58 | xi = CST(psi, 1., [data['deltaz'][n-1]/2., data['deltaz'][n-1]/2.], Au = data['Au'][n-1], Al= data['Al'][n-1]) 59 | plt.figure() 60 | plt.plot(psi, xi['u'], psi, xi['l']) 61 | plt.scatter(raw_data['x'], raw_data['y']) 62 | n = 8 63 | plt.xlim(0,1) 64 | x = np.linspace(2,2*n,n) 65 | plt.gca().set_aspect('equal', adjustable='box') 66 | plt.show() 67 | 68 | plt.figure() 69 | plt.plot(x, data['error']) 70 | plt.scatter(x, data['error']) 71 | plt.xlabel('Number of shape functions') 72 | plt.ylabel('Hausdorff distance (adimensional)') 73 | plt.grid() 74 | plt.show() -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | .. AeroPy Documentation 2 | 3 | .. include xfoil_functions.rsf 4 | 5 | Welcome to AeroPy's, an easy to use aerodynamic tool 6 | ================================================================== 7 | AeroPy is an library for calculating aerodynamic properties. The main feature of 8 | this library is the Python interface with XFOIL. The main objective of this library is to be able 9 | to use XFOIL via Python iteratively in a total of 4 lines total (one line for most uses). 10 | Through this interface coupling with other softwares (Abaqus, Ansys, etc) is possible 11 | and iterative processes (optimization, design sensitivity) are possible. 12 | For a thorough explanation please check the documentation and the tutorials. 13 | 14 | Contents: 15 | 16 | .. toctree:: 17 | :numbered: 18 | :titlesonly: 19 | :maxdepth: 2 20 | 21 | main_module 22 | xfoil_module 23 | aero_module 24 | airfoil_module 25 | tutorial 26 | 27 | To Do 28 | ====== 29 | 30 | - Include asymmetric wing 31 | - Create airfoil and wing classes 32 | 33 | Recommended Collaborations 34 | ========================== 35 | 36 | Please use and adapt this library to your needs. There are several 37 | functionalities I wished to implement, but did not have the time. Hence 38 | I am *strongly* recommending the following collaborations: 39 | 40 | - Airfoil generator with a GUI 41 | - Atmospheric module (use the library already available in aero_module) 42 | - Extend aero_module for wings with non-constant cross sections 43 | 44 | Indices and tables 45 | ================== 46 | 47 | * :ref:`genindex` 48 | * :ref:`modindex` 49 | * :ref:`search` 50 | 51 | Examples 52 | ================== 53 | 54 | A simple example demonstrating how to use AeroPy to calculate lift, drag and 55 | moment coefficients for a NACA0012 airfoil at angle of attack of 12 degrees. 56 | 57 | .. code-block:: python 58 | 59 | from AeroPy import find_coefficients 60 | find_coefficients(airfoil='naca0012'alpha=12.) 61 | >>> {'CM': 0.0134, 'CL': 1.2453, 'Top_Xtr': 0.0194, 'CD': 0.01934, 'CDp': 0.01379, 'alpha': 12.0, 'Bot_Xtr': 1.0} 62 | 63 | Another example showing how to use AeroPy to calculate pressure coefficients for a 64 | NACA0012 in viscous flow at Reynolds = 10000000 and angle of attack of 12 degrees 65 | 66 | .. code-block:: python 67 | 68 | from AeroPy import find_pressure_coefficients 69 | find_pressure_coefficients(airfoil='naca0012', Reynolds = 1e6, alpha=12.,NACA=True) 70 | >>> 'y': [0.00126, ..., -0.00126], 'x': [1.0, ..., 1.0], 'Cp': [0.41501, ..., 0.41501]} -------------------------------------------------------------------------------- /docs/_build/html/_sources/index.txt: -------------------------------------------------------------------------------- 1 | .. AeroPy Documentation 2 | 3 | .. include xfoil_functions.rsf 4 | 5 | Welcome to AeroPy's, an easy to use aerodynamic tool 6 | ================================================================== 7 | AeroPy is an library for calculating aerodynamic properties. The main feature of 8 | this library is the Python interface with XFOIL. The main objective of this library is to be able 9 | to use XFOIL via Python iteratively in a total of 4 lines total (one line for most uses). 10 | Through this interface coupling with other softwares (Abaqus, Ansys, etc) is possible 11 | and iterative processes (optimization, design sensitivity) are possible. 12 | For a thorough explanation please check the documentation and the tutorials. 13 | 14 | Contents: 15 | 16 | .. toctree:: 17 | :numbered: 18 | :titlesonly: 19 | :maxdepth: 2 20 | 21 | main_module 22 | xfoil_module 23 | aero_module 24 | airfoil_module 25 | tutorial 26 | 27 | To Do 28 | ====== 29 | 30 | - Include asymmetric wing 31 | - Create airfoil and wing classes 32 | 33 | Recommended Collaborations 34 | ========================== 35 | 36 | Please use and adapt this library to your needs. There are several 37 | functionalities I wished to implement, but did not have the time. Hence 38 | I am *strongly* recommending the following collaborations: 39 | 40 | - Airfoil generator with a GUI 41 | - Atmospheric module (use the library already available in aero_module) 42 | - Extend aero_module for wings with non-constant cross sections 43 | 44 | Indices and tables 45 | ================== 46 | 47 | * :ref:`genindex` 48 | * :ref:`modindex` 49 | * :ref:`search` 50 | 51 | Examples 52 | ================== 53 | 54 | A simple example demonstrating how to use AeroPy to calculate lift, drag and 55 | moment coefficients for a NACA0012 airfoil at angle of attack of 12 degrees. 56 | 57 | .. code-block:: python 58 | 59 | from AeroPy import find_coefficients 60 | find_coefficients(airfoil='naca0012'alpha=12.) 61 | >>> {'CM': 0.0134, 'CL': 1.2453, 'Top_Xtr': 0.0194, 'CD': 0.01934, 'CDp': 0.01379, 'alpha': 12.0, 'Bot_Xtr': 1.0} 62 | 63 | Another example showing how to use AeroPy to calculate pressure coefficients for a 64 | NACA0012 in viscous flow at Reynolds = 10000000 and angle of attack of 12 degrees 65 | 66 | .. code-block:: python 67 | 68 | from AeroPy import find_pressure_coefficients 69 | find_pressure_coefficients(airfoil='naca0012', Reynolds = 1e6, alpha=12.,NACA=True) 70 | >>> 'y': [0.00126, ..., -0.00126], 'x': [1.0, ..., 1.0], 'Cp': [0.41501, ..., 0.41501]} -------------------------------------------------------------------------------- /test_inflections.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | 4 | import xfoil_module as xf 5 | from CST_module import * 6 | from aero_module import Reynolds 7 | from airfoil_module import CST, create_x 8 | 9 | Au = [0.23993240191629417, 0.34468227138908186, 0.18125405377549103, 10 | 0.35371349126072665, 0.2440815012119143, 0.25724974995738387] 11 | Al = [0.18889012559339036, -0.24686758992053115, 0.077569769493868401, 12 | -0.547827192265256, -0.0047342206759065641, -0.23994805474814629] 13 | c_avian = .36 #m 14 | deltaz = 0.0093943568219451313*c_avian 15 | 16 | airfoil = 'avian' 17 | x = create_x(c_avian, distribution = 'linear') 18 | y = CST(x, c_avian, [deltaz/2., deltaz/2.], Au = Au, Al= Al) 19 | # Create file for Xfoil to read coordinates 20 | xf.create_input(x, y['u'], y['l'], airfoil, different_x_upper_lower = False) 21 | 22 | Data = xf.find_coefficients(airfoil, 2., Reynolds=Reynolds(10000, 30, c_avian), iteration=100, NACA=False) 23 | print Data 24 | 25 | 26 | psi_u_inflection, psi_l_inflection = find_inflection_points(Au, Al) 27 | print 'upper: ', psi_u_inflection 28 | print 'lower: ', psi_l_inflection 29 | psi = np.linspace(0.001,0.999,100) 30 | xi = CST(psi, 1, [deltaz/2., deltaz/2.], Au, Al) 31 | plt.plot(psi, xi['u'], 'b', label = 'Upper outer mold line') 32 | plt.plot(psi, xi['l'],'b--', label = 'Lower outer mold line') 33 | 34 | xi_u_inflection = CST(psi_u_inflection, 1, [deltaz/2., deltaz/2.], Au, Al) 35 | plt.scatter(psi_u_inflection, xi_u_inflection['u']) 36 | 37 | xi_l_inflection = CST(psi_l_inflection, 1, [deltaz/2., deltaz/2.], Au, Al) 38 | plt.scatter(psi_l_inflection, xi_l_inflection['l']) 39 | plt.xlabel('$\psi$', fontsize = 40) 40 | plt.ylabel(r'$\xi$', fontsize = 40) 41 | plt.grid() 42 | # plt.show() 43 | 44 | # plt.figure() 45 | # plt.plot(psi,dxi_u(psi,Au, deltaz), 'g', label = r'$d\xi_u$') 46 | # plt.plot(psi,dxi_l(psi,Al,deltaz), 'g--', label = r'$d\xi_l$') 47 | 48 | plt.plot(psi,ddxi_u(psi,Au), 'r', label = 'Upper second derivative') 49 | plt.plot(psi,ddxi_l(psi,Al), 'r--', label = 'Lower second derivative') 50 | 51 | # Plot camber 52 | camber = calculate_camber(psi, Au, Al, deltaz/c_avian) 53 | plt.plot(psi,camber, 'k', label = 'camber') 54 | psi_camber, xi_camber = calculate_max_camber(Au, Al, deltaz/c_avian) 55 | print psi_camber, xi_camber, type(psi_camber), type(xi_camber) 56 | print 'average camber: ', calculate_average_camber( Au, Al, deltaz/c_avian) 57 | plt.scatter(psi_camber, xi_camber, label = 'Inflection points') 58 | plt.ylim([-0.1,0.1]) 59 | plt.legend(loc='best') 60 | plt.show() 61 | -------------------------------------------------------------------------------- /docs/_build/html/pyxfoil_doc.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 3. pyxfoil_doc — pyXFOIL 0.0.1 documentation 10 | 11 | 12 | 13 | 14 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 |
37 |
38 |
39 |
40 | 41 |
42 |

3. pyxfoil_doc

43 |
44 | 45 | 46 |
47 |
48 |
49 |
50 |
51 |

Related Topics

52 | 57 |
58 |

This Page

59 | 63 | 75 | 76 |
77 |
78 |
79 |
80 | 91 | 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /docs/_build/html/_modules/index.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Overview: module code — AeroPy 0.0.2 documentation 10 | 11 | 12 | 13 | 14 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 |
36 |
37 |
38 |
39 | 40 |

All modules for which code is available

41 | 45 | 46 |
47 |
48 |
49 | 75 |
76 |
77 | 85 | 86 | 87 | 88 | Fork me on GitHub 89 | 90 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Eclipse 3 | ################# 4 | 5 | *.pydevproject 6 | .project 7 | .metadata 8 | bin/ 9 | tmp/ 10 | *.tmp 11 | *.bak 12 | *.swp 13 | *~.nib 14 | local.properties 15 | .classpath 16 | .settings/ 17 | .loadpath 18 | 19 | # External tool builders 20 | .externalToolBuilders/ 21 | 22 | # Locally stored "Eclipse launch configurations" 23 | *.launch 24 | 25 | # CDT-specific 26 | .cproject 27 | 28 | # PDT-specific 29 | .buildpath 30 | 31 | 32 | ################# 33 | ## Visual Studio 34 | ################# 35 | 36 | ## Ignore Visual Studio temporary files, build results, and 37 | ## files generated by popular Visual Studio add-ons. 38 | 39 | # User-specific files 40 | *.suo 41 | *.user 42 | *.sln.docstates 43 | 44 | # Build results 45 | 46 | [Dd]ebug/ 47 | [Rr]elease/ 48 | x64/ 49 | build/ 50 | [Bb]in/ 51 | [Oo]bj/ 52 | 53 | # MSTest test Results 54 | [Tt]est[Rr]esult*/ 55 | [Bb]uild[Ll]og.* 56 | 57 | *_i.c 58 | *_p.c 59 | *.ilk 60 | *.meta 61 | *.obj 62 | *.pch 63 | *.pdb 64 | *.pgc 65 | *.pgd 66 | *.rsp 67 | *.sbr 68 | *.tlb 69 | *.tli 70 | *.tlh 71 | *.tmp 72 | *.tmp_proj 73 | *.log 74 | *.vspscc 75 | *.vssscc 76 | .builds 77 | *.pidb 78 | *.log 79 | *.scc 80 | 81 | # Visual C++ cache files 82 | ipch/ 83 | *.aps 84 | *.ncb 85 | *.opensdf 86 | *.sdf 87 | *.cachefile 88 | 89 | # Visual Studio profiler 90 | *.psess 91 | *.vsp 92 | *.vspx 93 | 94 | # Guidance Automation Toolkit 95 | *.gpState 96 | 97 | # ReSharper is a .NET coding add-in 98 | _ReSharper*/ 99 | *.[Rr]e[Ss]harper 100 | 101 | # TeamCity is a build add-in 102 | _TeamCity* 103 | 104 | # DotCover is a Code Coverage Tool 105 | *.dotCover 106 | 107 | # NCrunch 108 | *.ncrunch* 109 | .*crunch*.local.xml 110 | 111 | # Installshield output folder 112 | [Ee]xpress/ 113 | 114 | # DocProject is a documentation generator add-in 115 | DocProject/buildhelp/ 116 | DocProject/Help/*.HxT 117 | DocProject/Help/*.HxC 118 | DocProject/Help/*.hhc 119 | DocProject/Help/*.hhk 120 | DocProject/Help/*.hhp 121 | DocProject/Help/Html2 122 | DocProject/Help/html 123 | 124 | # Click-Once directory 125 | publish/ 126 | 127 | # Publish Web Output 128 | *.Publish.xml 129 | *.pubxml 130 | *.publishproj 131 | 132 | # NuGet Packages Directory 133 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 134 | #packages/ 135 | 136 | # Windows Azure Build Output 137 | csx 138 | *.build.csdef 139 | 140 | # Windows Store app package directory 141 | AppPackages/ 142 | 143 | # Others 144 | sql/ 145 | *.Cache 146 | ClientBin/ 147 | [Ss]tyle[Cc]op.* 148 | ~$* 149 | *~ 150 | *.dbmdl 151 | *.[Pp]ublish.xml 152 | *.pfx 153 | *.publishsettings 154 | 155 | # RIA/Silverlight projects 156 | Generated_Code/ 157 | 158 | # Backup & report files from converting an old project file to a newer 159 | # Visual Studio version. Backup files are not needed, because we have git ;-) 160 | _UpgradeReport_Files/ 161 | Backup*/ 162 | UpgradeLog*.XML 163 | UpgradeLog*.htm 164 | 165 | # SQL Server files 166 | App_Data/*.mdf 167 | App_Data/*.ldf 168 | 169 | ############# 170 | ## Windows detritus 171 | ############# 172 | 173 | # Windows image file caches 174 | Thumbs.db 175 | ehthumbs.db 176 | 177 | # Folder config file 178 | Desktop.ini 179 | 180 | # Recycle Bin used on file shares 181 | $RECYCLE.BIN/ 182 | 183 | # Mac crap 184 | .DS_Store 185 | 186 | 187 | ############# 188 | ## Python 189 | ############# 190 | 191 | *.py[cod] 192 | *.pyc 193 | 194 | # Packages 195 | *.egg 196 | *.egg-info 197 | dist/ 198 | build/ 199 | eggs/ 200 | parts/ 201 | var/ 202 | sdist/ 203 | develop-eggs/ 204 | .installed.cfg 205 | 206 | # Installer logs 207 | pip-log.txt 208 | 209 | # Unit test / coverage reports 210 | .coverage 211 | .tox 212 | 213 | #Translations 214 | *.mo 215 | 216 | #Mr Developer 217 | .mr.developer.cfg 218 | Cp_* 219 | Polar_* 220 | Coordinates* 221 | naca* 222 | flapped 223 | flapped 224 | -------------------------------------------------------------------------------- /docs/_build/html/search.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Search — AeroPy 0.0.2 documentation 10 | 11 | 12 | 13 | 14 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 |
44 |
45 |
46 |
47 | 48 |

Search

49 |
50 | 51 |

52 | Please activate JavaScript to enable the search 53 | functionality. 54 |

55 |
56 |

57 | From here you can search these documents. Enter your search 58 | words into the box below and click "search". Note that the search 59 | function will automatically search for all of the words. Pages 60 | containing fewer words won't appear in the result list. 61 |

62 |
63 | 64 | 65 | 66 |
67 | 68 |
69 | 70 |
71 | 72 |
73 |
74 |
75 | 88 |
89 |
90 | 98 | 99 | 100 | 101 | Fork me on GitHub 102 | 103 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /docs/_build/html/tutorial.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 5. Tutorial — AeroPy 0.0.2 documentation 10 | 11 | 12 | 13 | 14 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 |
37 |
38 |
39 |
40 | 41 |
42 |

5. Tutorial

43 |
44 | 45 | 46 |
47 |
48 |
49 | 83 |
84 |
85 | 96 | 97 | 98 | 99 | Fork me on GitHub 100 | 101 | 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /docs/_build/html/_static/pygments.css: -------------------------------------------------------------------------------- 1 | .highlight .hll { background-color: #ffffcc } 2 | .highlight { background: #eeffcc; } 3 | .highlight .c { color: #408090; font-style: italic } /* Comment */ 4 | .highlight .err { border: 1px solid #FF0000 } /* Error */ 5 | .highlight .k { color: #007020; font-weight: bold } /* Keyword */ 6 | .highlight .o { color: #666666 } /* Operator */ 7 | .highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ 8 | .highlight .cp { color: #007020 } /* Comment.Preproc */ 9 | .highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ 10 | .highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ 11 | .highlight .gd { color: #A00000 } /* Generic.Deleted */ 12 | .highlight .ge { font-style: italic } /* Generic.Emph */ 13 | .highlight .gr { color: #FF0000 } /* Generic.Error */ 14 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 15 | .highlight .gi { color: #00A000 } /* Generic.Inserted */ 16 | .highlight .go { color: #333333 } /* Generic.Output */ 17 | .highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ 18 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 19 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 20 | .highlight .gt { color: #0044DD } /* Generic.Traceback */ 21 | .highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ 22 | .highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ 23 | .highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ 24 | .highlight .kp { color: #007020 } /* Keyword.Pseudo */ 25 | .highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ 26 | .highlight .kt { color: #902000 } /* Keyword.Type */ 27 | .highlight .m { color: #208050 } /* Literal.Number */ 28 | .highlight .s { color: #4070a0 } /* Literal.String */ 29 | .highlight .na { color: #4070a0 } /* Name.Attribute */ 30 | .highlight .nb { color: #007020 } /* Name.Builtin */ 31 | .highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ 32 | .highlight .no { color: #60add5 } /* Name.Constant */ 33 | .highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ 34 | .highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ 35 | .highlight .ne { color: #007020 } /* Name.Exception */ 36 | .highlight .nf { color: #06287e } /* Name.Function */ 37 | .highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ 38 | .highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ 39 | .highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ 40 | .highlight .nv { color: #bb60d5 } /* Name.Variable */ 41 | .highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ 42 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 43 | .highlight .mb { color: #208050 } /* Literal.Number.Bin */ 44 | .highlight .mf { color: #208050 } /* Literal.Number.Float */ 45 | .highlight .mh { color: #208050 } /* Literal.Number.Hex */ 46 | .highlight .mi { color: #208050 } /* Literal.Number.Integer */ 47 | .highlight .mo { color: #208050 } /* Literal.Number.Oct */ 48 | .highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ 49 | .highlight .sc { color: #4070a0 } /* Literal.String.Char */ 50 | .highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ 51 | .highlight .s2 { color: #4070a0 } /* Literal.String.Double */ 52 | .highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ 53 | .highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ 54 | .highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ 55 | .highlight .sx { color: #c65d09 } /* Literal.String.Other */ 56 | .highlight .sr { color: #235388 } /* Literal.String.Regex */ 57 | .highlight .s1 { color: #4070a0 } /* Literal.String.Single */ 58 | .highlight .ss { color: #517918 } /* Literal.String.Symbol */ 59 | .highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ 60 | .highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ 61 | .highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ 62 | .highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ 63 | .highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /docs/_build/html/py-modindex.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Python Module Index — AeroPy 0.0.2 documentation 10 | 11 | 12 | 13 | 14 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 37 | 38 | 39 | 40 | 41 | 42 |
43 |
44 |
45 |
46 | 47 | 48 |

Python Module Index

49 | 50 |
51 | a | 52 | x 53 |
54 | 55 | 56 | 57 | 59 | 60 | 61 | 64 | 65 | 66 | 69 | 70 | 72 | 73 | 74 | 77 |
 
58 | a
62 | aero_module 63 |
67 | AeroPy 68 |
 
71 | x
75 | xfoil_module 76 |
78 | 79 | 80 |
81 |
82 |
83 | 109 |
110 |
111 | 119 | 120 | 121 | 122 | Fork me on GitHub 123 | 124 | 125 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /docs/_build/html/airfoil_module.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 4. Airfoil Module Documentation — AeroPy 0.0.2 documentation 10 | 11 | 12 | 13 | 14 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |
38 |
39 |
40 |
41 | 42 |
43 |

4. Airfoil Module Documentation

44 |

The functions herein defined are purposely made for generating NACA airfoils, flapped airfoils and CST airfoils.

45 |
46 |

4.1. Core Function

47 |
48 |
49 |

4.2. Auxiliary Functions

50 |
51 |
52 |

4.3. Utility Functions

53 |
54 |
55 | 56 | 57 |
58 |
59 |
60 | 105 |
106 |
107 | 118 | 119 | 120 | 121 | Fork me on GitHub 122 | 123 | 124 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /docs/_build/html/aero_doc.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 2. Documentation for Aerodynamic Functions — pyXFOIL 0.0.1 documentation 10 | 11 | 12 | 13 | 14 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |
38 |
39 |
40 |
41 | 42 |
43 |

2. Documentation for Aerodynamic Functions

44 |
45 |

2.1. Lifting Line Theory

46 |

If \(\theta_0\) is an arbitrary span-wise location:

47 |
48 | (1)\[\alpha (\theta_o)=\frac{2b}{\pi c(\theta_o)} \sum_1^N A_n sin(n \theta_o) + \alpha_{L=0}(\theta_o) + \sum_1^N n A_n \frac{sin(n\theta_o)}{sin(\theta_o)}\]
49 |

Each equation has \(N\) unknowns (\(A_n\)), so if there are N \(\theta_o\), we have NxN system, which in Einstein notation can be written as:

50 |
51 | (2)\[C_{ij}A_{i}=D_{i}\]
52 |

where, \(i=0,...,N\), \(j=0,...,N\) and :

53 |
54 | (3)\[C_{ij}= \left( \frac{2b}{\pi c(j)} + \frac{n}{sin \theta(i)} \right) sin(n \theta(i))\]
55 |
56 | (4)\[A_i=A(i)\]
57 |
58 | (5)\[D_i=\alpha(i)-\alpha_{L=0}(i)\]
59 |

where \(n=1,3,5,...,N-1\). Since we are considering a symmetric wing, all of the even terms would cancel each other

60 |
61 | _images/elliptical_LLT.png 62 |
63 |
64 |
65 | 66 | 67 |
68 |
69 |
70 |
71 |
72 |

Table Of Contents

73 | 79 |
80 |

Related Topics

81 | 87 |
88 |

This Page

89 | 93 | 105 | 106 |
107 |
108 |
109 |
110 | 121 | 122 | 123 | 124 | 125 | 126 | -------------------------------------------------------------------------------- /docs/_build/html/searchindex.js: -------------------------------------------------------------------------------- 1 | Search.setIndex({envversion:46,filenames:["aero_module","airfoil_module","index","main_module","tutorial","xfoil_module"],objects:{"":{AeroPy:[3,0,0,"-"],aero_module:[0,0,0,"-"],xfoil_module:[5,0,0,"-"]},AeroPy:{find_3D_coefficients:[3,1,1,""]},aero_module:{LLT_calculator:[0,1,1,""],Reynolds:[0,1,1,""],air_properties:[0,1,1,""],calculate_moment_coefficient:[0,1,1,""],pressure_shell_2D:[0,1,1,""]},xfoil_module:{M_crit:[5,1,1,""],alfa_for_file:[5,1,1,""],call:[5,1,1,""],create_input:[5,1,1,""],create_x:[5,1,1,""],file_name:[5,1,1,""],find_alpha_L_0:[5,1,1,""],find_coefficients:[5,1,1,""],find_pressure_coefficients:[5,1,1,""],output_reader:[5,1,1,""],prepare_xfoil:[5,1,1,""]}},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:function"},terms:{"00000000e":5,"1e6":2,"33333333e":5,"64102564e":5,"66666667e":5,"82051282e":5,"boolean":[3,5],"case":[0,3,5],"class":2,"default":[3,5],"final":5,"float":[3,5],"function":[],"import":[2,3,5],"int":[3,5],"new":3,"return":5,"true":[2,3,5],"try":[3,5],abaqu:[0,2],abl:[2,5],about:5,abov:5,accept:5,accord:3,account:5,act:[3,5],adapt:2,aero:3,aero_modul:[0,2,3],aerojet:0,aeropi:[],aim:3,air:0,air_properti:0,airfoil:[],alfa:5,alfa_for_fil:5,alfa_l_0:5,all:[0,3,5],along:5,alpha:[0,2,3,5],alpha_l_0:5,alpha_l_0_airfoil:5,alpha_l_0_naca2244:5,alpha_l_0_root:0,alpha_root:[0,3],alreadi:2,also:5,altitud:0,amount:5,analysi:3,angl:[2,3,5],ani:[3,5],anoth:2,ansi:2,arbitrari:0,arrai:[3,5],assum:[3,5],asymmetr:2,atmospher:2,attack:[2,3,5],aug:3,author:[0,3,5],avail:[2,3],base:5,becaus:[3,5],befit:5,between:5,big:5,block:[],bot_xtr:[2,5],bottom:5,c_d_xfoil:0,cadd:5,calcul:[0,2,3,5],calculate_moment_coeffici:0,call:5,can:[0,3,5],cancel:0,caution:5,cdp:[2,5],chang:[3,5],check:[0,2],choic:5,chord:[0,3,5],chord_root:[0,3],chosen:5,coeffcient:0,coeffici:[0,2,3,5],compens:5,compon:5,compress:5,confer:3,consid:0,constant:2,contain:3,content:2,contrari:3,converg:[3,5],convini:5,coordin:[0,5],coordinates_low:5,coordinates_upp:5,correct:5,correl:5,correpond:5,correspond:5,counterclockwis:0,coupl:2,cp_naca2244_0200:5,creat:[0,2,3,5],create_input:[0,5],create_x:5,critic:5,cross:[2,3],cst:1,current:0,data:0,deactiv:5,defin:[1,3,5],deflect:5,degre:[2,3],delta:5,demonstr:2,densili:5,density_of_air:0,design:2,desir:5,determin:5,dictionari:[0,5],did:2,differ:[3,5],distribut:[3,5],divid:5,doe:3,done:5,drag:[2,3,5],dump:5,each:[0,5],easi:[],easili:3,edg:[0,5],edu:0,effect:5,effici:5,efici:5,einstein:0,elabor:3,elimin:5,ellipt:0,els:0,embed:3,end:5,endbodi:5,engr:0,ensur:5,equal:5,equat:0,etc:[2,5],even:0,exactli:5,except:5,expect:5,explan:2,extend:2,extra:5,fals:[0,3,5],fashion:5,featur:2,feb:5,feet:0,field:0,file:[3,5],file_nam:5,filenam:5,filewher:[3,5],find:3,find_3d_coeffici:3,find_alpha_l_0:5,find_coeffici:[2,5],find_pressure_coeffici:[2,5],first:5,flap:[1,5],flow:[2,3,5],fluenthelp:0,follow:[2,5],form:5,format:[0,5],found:5,four:5,friction:5,from:[0,2,3,5],front:5,fsi:5,funcionatil:0,gde:5,gener:[0,1,2,3,5],geometri:[3,5],given:0,glauert:5,good:5,gui:[2,3],hakan:5,half_span:0,have:[0,2,3],head:[],header:5,height:0,henc:2,herein:[1,5],how:[2,3,5],howev:5,htm:0,html:0,http:0,implement:2,improv:5,includ:[0,2],index:2,inform:[3,5],initi:5,initiali:5,input:[0,5],insert:3,intend:3,interfac:2,intersect:3,inviscid:[3,5],iter:[2,3,5],jul:[0,5],just:5,kei:[0,5],kind:5,label:5,last:5,lead:5,leal:[0,5],length:5,less:5,librari:[2,3],list:[0,3,5],llt_calcul:0,locat:0,logic:5,lower:[0,5],m_crit:5,mach:5,made:[1,5],mai:0,main:[2,5],mainli:5,make:[3,5],mani:[3,5],manual:5,mar:5,master:[],maximum:5,mesh:5,meter:3,middl:5,mit:3,moment:[0,2,5],mon:0,more:5,most:[2,5],much:5,multipl:5,must:5,naca0012:2,naca2244:[3,5],naca:[1,2,3,5],name:[3,5],nan:0,necessari:[0,5],need:[2,3,5],node337:0,non:[0,2],none:5,normal:5,notat:0,note:5,number:[3,5],numpi:5,nxn:0,object:2,obstacl:5,onli:5,open:[3,5],oper:3,optim:[2,3],option:[3,5],order:5,org:0,origin:[],other:[0,2,3,5],output:5,output_airfoil_alfa:5,output_read:5,overcom:5,page:2,paper:3,paramet:[3,5],part:5,pedro:[0,3,5],perform:3,pho:5,plain:[3,5],pleas:[2,5],plot:5,point:5,polar:5,polar_airfoil_alfa_i_alfa_f:5,polar_naca2244_n0200_0200:5,popul:5,possibl:[2,5],posssibl:5,prandtl:5,prepare_xfoil:5,pressur:[0,2,3,5],pressure_shell_2d:0,print:5,process:[2,3,5],program:3,project:3,properti:[0,2],provid:5,purpos:[1,5],pyfoil:[],python:[2,3,5],pyxfoil:[],quarter:5,quick:3,rather:5,read:5,reason:5,rectangular:0,relat:3,relev:5,replac:5,reposit:5,repres:5,requir:[3,5],result:[3,5],reynold:[0,2,3,5],right:5,root:3,round:5,row:5,rows_to_skip:5,run:5,save:5,search:2,second:5,section:[2,3,5],segment:5,select:5,sensit:2,separ:[3,5],seri:[3,5],set:5,sever:[2,3,5],shape:5,shell:0,shortli:5,show:2,side:5,simpl:[0,2],simplist:5,simul:[3,5],sinc:0,singl:5,skip:5,slope:5,smooth:5,softwar:[0,2],someth:0,sometim:5,sourc:[0,3,5],span:[0,3],speciali:3,speciallt:5,specif:5,specifi:5,speed_sound:5,standard:5,star:5,start:[0,5],still:3,store:[3,5],straight:5,strongli:2,structur:3,sun:[3,5],surfac:5,symmetr:0,system:0,take:5,taper:[0,3],term:0,than:5,therefor:5,theta:5,thi:[2,3,5],thick:0,thorough:2,three:[3,5],through:[2,3,5],thu:[0,5],tiftikci:5,time:[2,3,5],tip:5,todo:0,tool:[],top_xtr:[2,5],total:2,trail:[0,5],trough:5,tutori:[],txt:0,type:5,ucdavi:0,unidimendion:3,uniform:5,unit:0,unknown:0,unrefin:5,updat:5,upper:[0,5],user:5,valid:5,valu:[3,5],variabl:[3,5],variant:5,variat:5,veloc:[0,3,5],via:2,viscou:[2,3,5],wai:[3,5],welcom:[],what:5,when:0,where:[0,5],which:0,whole:5,wide:5,wiki:0,wikipedia:0,wing:[0,2,3],wise:0,wish:2,work:5,would:0,written:0,x_hing:5,x_ref:0,xflr5:3,xfoil:[],xfoil_modul:[0,5],y_hing:5,y_l:5,y_ref:0,y_u:5,your:2,zero:[0,5]},titles:["3. Aerodynamic Module Documentation","4. Airfoil Module Documentation","Welcome to AeroPy’s, an easy to use aerodynamic tool","1. AeroPy Documentation","5. Tutorial","2. Xfoil Module Documentation"],titleterms:{"function":[1,5],aerodynam:[0,2],aeropi:[2,3],airfoil:1,auxiliari:[1,5],code:[0,3],collabor:2,core:[1,5],document:[0,1,3,5],easi:2,exampl:2,indic:2,lift:0,line:0,modul:[0,1,5],recommend:2,tabl:2,theori:0,tool:2,tutori:4,util:[1,5],welcom:2,xfoil:5}}) -------------------------------------------------------------------------------- /docs/images/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 21 | 23 | 27 | 31 | 35 | 36 | 46 | 56 | 59 | 65 | 66 | 67 | 85 | 87 | 88 | 90 | image/svg+xml 91 | 93 | 94 | 95 | 96 | 97 | 101 | 107 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | REM Command file for Sphinx documentation 4 | 5 | if "%SPHINXBUILD%" == "" ( 6 | set SPHINXBUILD=sphinx-build 7 | ) 8 | set BUILDDIR=_build 9 | set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . 10 | set I18NSPHINXOPTS=%SPHINXOPTS% . 11 | if NOT "%PAPER%" == "" ( 12 | set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% 13 | set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% 14 | ) 15 | 16 | if "%1" == "" goto help 17 | 18 | if "%1" == "help" ( 19 | :help 20 | echo.Please use `make ^` where ^ is one of 21 | echo. html to make standalone HTML files 22 | echo. dirhtml to make HTML files named index.html in directories 23 | echo. singlehtml to make a single large HTML file 24 | echo. pickle to make pickle files 25 | echo. json to make JSON files 26 | echo. htmlhelp to make HTML files and a HTML help project 27 | echo. qthelp to make HTML files and a qthelp project 28 | echo. devhelp to make HTML files and a Devhelp project 29 | echo. epub to make an epub 30 | echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter 31 | echo. text to make text files 32 | echo. man to make manual pages 33 | echo. texinfo to make Texinfo files 34 | echo. gettext to make PO message catalogs 35 | echo. changes to make an overview over all changed/added/deprecated items 36 | echo. xml to make Docutils-native XML files 37 | echo. pseudoxml to make pseudoxml-XML files for display purposes 38 | echo. linkcheck to check all external links for integrity 39 | echo. doctest to run all doctests embedded in the documentation if enabled 40 | echo. coverage to run coverage check of the documentation if enabled 41 | goto end 42 | ) 43 | 44 | if "%1" == "clean" ( 45 | for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i 46 | del /q /s %BUILDDIR%\* 47 | goto end 48 | ) 49 | 50 | 51 | REM Check if sphinx-build is available and fallback to Python version if any 52 | %SPHINXBUILD% 2> nul 53 | if errorlevel 9009 goto sphinx_python 54 | goto sphinx_ok 55 | 56 | :sphinx_python 57 | 58 | set SPHINXBUILD=python -m sphinx.__init__ 59 | %SPHINXBUILD% 2> nul 60 | if errorlevel 9009 ( 61 | echo. 62 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 63 | echo.installed, then set the SPHINXBUILD environment variable to point 64 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 65 | echo.may add the Sphinx directory to PATH. 66 | echo. 67 | echo.If you don't have Sphinx installed, grab it from 68 | echo.http://sphinx-doc.org/ 69 | exit /b 1 70 | ) 71 | 72 | :sphinx_ok 73 | 74 | 75 | if "%1" == "html" ( 76 | %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html 77 | if errorlevel 1 exit /b 1 78 | echo. 79 | echo.Build finished. The HTML pages are in %BUILDDIR%/html. 80 | goto end 81 | ) 82 | 83 | if "%1" == "dirhtml" ( 84 | %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml 85 | if errorlevel 1 exit /b 1 86 | echo. 87 | echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. 88 | goto end 89 | ) 90 | 91 | if "%1" == "singlehtml" ( 92 | %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml 93 | if errorlevel 1 exit /b 1 94 | echo. 95 | echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. 96 | goto end 97 | ) 98 | 99 | if "%1" == "pickle" ( 100 | %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle 101 | if errorlevel 1 exit /b 1 102 | echo. 103 | echo.Build finished; now you can process the pickle files. 104 | goto end 105 | ) 106 | 107 | if "%1" == "json" ( 108 | %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json 109 | if errorlevel 1 exit /b 1 110 | echo. 111 | echo.Build finished; now you can process the JSON files. 112 | goto end 113 | ) 114 | 115 | if "%1" == "htmlhelp" ( 116 | %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp 117 | if errorlevel 1 exit /b 1 118 | echo. 119 | echo.Build finished; now you can run HTML Help Workshop with the ^ 120 | .hhp project file in %BUILDDIR%/htmlhelp. 121 | goto end 122 | ) 123 | 124 | if "%1" == "qthelp" ( 125 | %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp 126 | if errorlevel 1 exit /b 1 127 | echo. 128 | echo.Build finished; now you can run "qcollectiongenerator" with the ^ 129 | .qhcp project file in %BUILDDIR%/qthelp, like this: 130 | echo.^> qcollectiongenerator %BUILDDIR%\qthelp\pyXFOIL.qhcp 131 | echo.To view the help file: 132 | echo.^> assistant -collectionFile %BUILDDIR%\qthelp\pyXFOIL.ghc 133 | goto end 134 | ) 135 | 136 | if "%1" == "devhelp" ( 137 | %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp 138 | if errorlevel 1 exit /b 1 139 | echo. 140 | echo.Build finished. 141 | goto end 142 | ) 143 | 144 | if "%1" == "epub" ( 145 | %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub 146 | if errorlevel 1 exit /b 1 147 | echo. 148 | echo.Build finished. The epub file is in %BUILDDIR%/epub. 149 | goto end 150 | ) 151 | 152 | if "%1" == "latex" ( 153 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 154 | if errorlevel 1 exit /b 1 155 | echo. 156 | echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. 157 | goto end 158 | ) 159 | 160 | if "%1" == "latexpdf" ( 161 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 162 | cd %BUILDDIR%/latex 163 | make all-pdf 164 | cd %~dp0 165 | echo. 166 | echo.Build finished; the PDF files are in %BUILDDIR%/latex. 167 | goto end 168 | ) 169 | 170 | if "%1" == "latexpdfja" ( 171 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 172 | cd %BUILDDIR%/latex 173 | make all-pdf-ja 174 | cd %~dp0 175 | echo. 176 | echo.Build finished; the PDF files are in %BUILDDIR%/latex. 177 | goto end 178 | ) 179 | 180 | if "%1" == "text" ( 181 | %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text 182 | if errorlevel 1 exit /b 1 183 | echo. 184 | echo.Build finished. The text files are in %BUILDDIR%/text. 185 | goto end 186 | ) 187 | 188 | if "%1" == "man" ( 189 | %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man 190 | if errorlevel 1 exit /b 1 191 | echo. 192 | echo.Build finished. The manual pages are in %BUILDDIR%/man. 193 | goto end 194 | ) 195 | 196 | if "%1" == "texinfo" ( 197 | %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo 198 | if errorlevel 1 exit /b 1 199 | echo. 200 | echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. 201 | goto end 202 | ) 203 | 204 | if "%1" == "gettext" ( 205 | %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale 206 | if errorlevel 1 exit /b 1 207 | echo. 208 | echo.Build finished. The message catalogs are in %BUILDDIR%/locale. 209 | goto end 210 | ) 211 | 212 | if "%1" == "changes" ( 213 | %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes 214 | if errorlevel 1 exit /b 1 215 | echo. 216 | echo.The overview file is in %BUILDDIR%/changes. 217 | goto end 218 | ) 219 | 220 | if "%1" == "linkcheck" ( 221 | %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck 222 | if errorlevel 1 exit /b 1 223 | echo. 224 | echo.Link check complete; look for any errors in the above output ^ 225 | or in %BUILDDIR%/linkcheck/output.txt. 226 | goto end 227 | ) 228 | 229 | if "%1" == "doctest" ( 230 | %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest 231 | if errorlevel 1 exit /b 1 232 | echo. 233 | echo.Testing of doctests in the sources finished, look at the ^ 234 | results in %BUILDDIR%/doctest/output.txt. 235 | goto end 236 | ) 237 | 238 | if "%1" == "coverage" ( 239 | %SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage 240 | if errorlevel 1 exit /b 1 241 | echo. 242 | echo.Testing of coverage in the sources finished, look at the ^ 243 | results in %BUILDDIR%/coverage/python.txt. 244 | goto end 245 | ) 246 | 247 | if "%1" == "xml" ( 248 | %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml 249 | if errorlevel 1 exit /b 1 250 | echo. 251 | echo.Build finished. The XML files are in %BUILDDIR%/xml. 252 | goto end 253 | ) 254 | 255 | if "%1" == "pseudoxml" ( 256 | %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml 257 | if errorlevel 1 exit /b 1 258 | echo. 259 | echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. 260 | goto end 261 | ) 262 | 263 | :end 264 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | PAPER = 8 | BUILDDIR = _build 9 | 10 | # User-friendly check for sphinx-build 11 | ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) 12 | $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) 13 | endif 14 | 15 | # Internal variables. 16 | PAPEROPT_a4 = -D latex_paper_size=a4 17 | PAPEROPT_letter = -D latex_paper_size=letter 18 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 19 | # the i18n builder cannot share the environment and doctrees with the others 20 | I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 21 | 22 | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext 23 | 24 | help: 25 | @echo "Please use \`make ' where is one of" 26 | @echo " html to make standalone HTML files" 27 | @echo " dirhtml to make HTML files named index.html in directories" 28 | @echo " singlehtml to make a single large HTML file" 29 | @echo " pickle to make pickle files" 30 | @echo " json to make JSON files" 31 | @echo " htmlhelp to make HTML files and a HTML help project" 32 | @echo " qthelp to make HTML files and a qthelp project" 33 | @echo " applehelp to make an Apple Help Book" 34 | @echo " devhelp to make HTML files and a Devhelp project" 35 | @echo " epub to make an epub" 36 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 37 | @echo " latexpdf to make LaTeX files and run them through pdflatex" 38 | @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" 39 | @echo " text to make text files" 40 | @echo " man to make manual pages" 41 | @echo " texinfo to make Texinfo files" 42 | @echo " info to make Texinfo files and run them through makeinfo" 43 | @echo " gettext to make PO message catalogs" 44 | @echo " changes to make an overview of all changed/added/deprecated items" 45 | @echo " xml to make Docutils-native XML files" 46 | @echo " pseudoxml to make pseudoxml-XML files for display purposes" 47 | @echo " linkcheck to check all external links for integrity" 48 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" 49 | @echo " coverage to run coverage check of the documentation (if enabled)" 50 | 51 | clean: 52 | rm -rf $(BUILDDIR)/* 53 | 54 | html: 55 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 56 | @echo 57 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 58 | 59 | dirhtml: 60 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 61 | @echo 62 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 63 | 64 | singlehtml: 65 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 66 | @echo 67 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 68 | 69 | pickle: 70 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 71 | @echo 72 | @echo "Build finished; now you can process the pickle files." 73 | 74 | json: 75 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 76 | @echo 77 | @echo "Build finished; now you can process the JSON files." 78 | 79 | htmlhelp: 80 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 81 | @echo 82 | @echo "Build finished; now you can run HTML Help Workshop with the" \ 83 | ".hhp project file in $(BUILDDIR)/htmlhelp." 84 | 85 | qthelp: 86 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 87 | @echo 88 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 89 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 90 | @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/pyXFOIL.qhcp" 91 | @echo "To view the help file:" 92 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/pyXFOIL.qhc" 93 | 94 | applehelp: 95 | $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp 96 | @echo 97 | @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." 98 | @echo "N.B. You won't be able to view it unless you put it in" \ 99 | "~/Library/Documentation/Help or install it in your application" \ 100 | "bundle." 101 | 102 | devhelp: 103 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 104 | @echo 105 | @echo "Build finished." 106 | @echo "To view the help file:" 107 | @echo "# mkdir -p $$HOME/.local/share/devhelp/pyXFOIL" 108 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/pyXFOIL" 109 | @echo "# devhelp" 110 | 111 | epub: 112 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 113 | @echo 114 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 115 | 116 | latex: 117 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 118 | @echo 119 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 120 | @echo "Run \`make' in that directory to run these through (pdf)latex" \ 121 | "(use \`make latexpdf' here to do that automatically)." 122 | 123 | latexpdf: 124 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 125 | @echo "Running LaTeX files through pdflatex..." 126 | $(MAKE) -C $(BUILDDIR)/latex all-pdf 127 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 128 | 129 | latexpdfja: 130 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 131 | @echo "Running LaTeX files through platex and dvipdfmx..." 132 | $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja 133 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 134 | 135 | text: 136 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 137 | @echo 138 | @echo "Build finished. The text files are in $(BUILDDIR)/text." 139 | 140 | man: 141 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 142 | @echo 143 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 144 | 145 | texinfo: 146 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 147 | @echo 148 | @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." 149 | @echo "Run \`make' in that directory to run these through makeinfo" \ 150 | "(use \`make info' here to do that automatically)." 151 | 152 | info: 153 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 154 | @echo "Running Texinfo files through makeinfo..." 155 | make -C $(BUILDDIR)/texinfo info 156 | @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." 157 | 158 | gettext: 159 | $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale 160 | @echo 161 | @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." 162 | 163 | changes: 164 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 165 | @echo 166 | @echo "The overview file is in $(BUILDDIR)/changes." 167 | 168 | linkcheck: 169 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 170 | @echo 171 | @echo "Link check complete; look for any errors in the above output " \ 172 | "or in $(BUILDDIR)/linkcheck/output.txt." 173 | 174 | doctest: 175 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 176 | @echo "Testing of doctests in the sources finished, look at the " \ 177 | "results in $(BUILDDIR)/doctest/output.txt." 178 | 179 | coverage: 180 | $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage 181 | @echo "Testing of coverage in the sources finished, look at the " \ 182 | "results in $(BUILDDIR)/coverage/python.txt." 183 | 184 | xml: 185 | $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml 186 | @echo 187 | @echo "Build finished. The XML files are in $(BUILDDIR)/xml." 188 | 189 | pseudoxml: 190 | $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml 191 | @echo 192 | @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." 193 | -------------------------------------------------------------------------------- /docs/_build/html/genindex.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Index — AeroPy 0.0.2 documentation 11 | 12 | 13 | 14 | 15 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 |
37 |
38 |
39 |
40 | 41 | 42 |

Index

43 | 44 |
45 | A 46 | | C 47 | | F 48 | | L 49 | | M 50 | | O 51 | | P 52 | | R 53 | | X 54 | 55 |
56 |

A

57 | 58 | 68 | 78 |
59 | 60 |
aero_module (module) 61 |
62 | 63 | 64 |
AeroPy (module) 65 |
66 | 67 |
69 | 70 |
air_properties() (in module aero_module) 71 |
72 | 73 | 74 |
alfa_for_file() (in module xfoil_module) 75 |
76 | 77 |
79 | 80 |

C

81 | 82 | 92 | 102 |
83 | 84 |
calculate_moment_coefficient() (in module aero_module) 85 |
86 | 87 | 88 |
call() (in module xfoil_module) 89 |
90 | 91 |
93 | 94 |
create_input() (in module xfoil_module) 95 |
96 | 97 | 98 |
create_x() (in module xfoil_module) 99 |
100 | 101 |
103 | 104 |

F

105 | 106 | 120 | 130 |
107 | 108 |
file_name() (in module xfoil_module) 109 |
110 | 111 | 112 |
find_3D_coefficients() (in module AeroPy) 113 |
114 | 115 | 116 |
find_alpha_L_0() (in module xfoil_module) 117 |
118 | 119 |
121 | 122 |
find_coefficients() (in module xfoil_module) 123 |
124 | 125 | 126 |
find_pressure_coefficients() (in module xfoil_module) 127 |
128 | 129 |
131 | 132 |

L

133 | 134 | 140 |
135 | 136 |
LLT_calculator() (in module aero_module) 137 |
138 | 139 |
141 | 142 |

M

143 | 144 | 150 |
145 | 146 |
M_crit() (in module xfoil_module) 147 |
148 | 149 |
151 | 152 |

O

153 | 154 | 160 |
155 | 156 |
output_reader() (in module xfoil_module) 157 |
158 | 159 |
161 | 162 |

P

163 | 164 | 170 | 176 |
165 | 166 |
prepare_xfoil() (in module xfoil_module) 167 |
168 | 169 |
171 | 172 |
pressure_shell_2D() (in module aero_module) 173 |
174 | 175 |
177 | 178 |

R

179 | 180 | 186 |
181 | 182 |
Reynolds() (in module aero_module) 183 |
184 | 185 |
187 | 188 |

X

189 | 190 | 196 |
191 | 192 |
xfoil_module (module) 193 |
194 | 195 |
197 | 198 | 199 | 200 |
201 |
202 |
203 | 232 |
233 |
234 | 242 | 243 | 244 | 245 | Fork me on GitHub 246 | 247 | 248 | 249 | 250 | 251 | -------------------------------------------------------------------------------- /docs/_build/html/main_module.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 1. AeroPy Documentation — AeroPy 0.0.2 documentation 10 | 11 | 12 | 13 | 14 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |
38 |
39 |
40 |
41 | 42 |
43 |

1. AeroPy Documentation

44 |

This project was elaborated because of the need of optimizing an airfoil 45 | according to its aerodynamic and structural performance (conference paper). 46 | Contrary to available options such as XFLR5, AeroPy aims to be an open source 47 | Python code. It is a quick and easy way to find the aerodynamic pressure and the 48 | drag and lift coefficients through the use of MIT’s XFOIL embedded in Python. 49 | Contrary to the other libraries, AeroPy does not have a GUI and is intended 50 | to be used in Python codes for optimizations or any other process that requires 51 | several aerodynamic analysis.

52 |

AeroPy is separated in three modules: (it is programmed in such a way that a new 53 | module can be easily inserted)

54 |
    55 |
  • xfoil: contains all the functions relating to XFOIL.

    56 |
  • 57 |
  • aero: contains all functions related to aerodynamics, but not related to XFOIL.

    58 |
  • 59 |
  • 60 |
    AeroPy: imports all functions and acts as the intersection of all different
    61 |

    modules

    62 |
    63 |
    64 |
  • 65 |
66 |
67 |

1.1. Code

68 |

Created on Sun Aug 16 20:59:22 2015

69 |

@author: Pedro

70 |
71 |
72 | AeroPy.find_3D_coefficients(airfoil, alpha, Reynolds=0, iteration=10, NACA=True, N=10, span=10.0, taper=1.0, chord_root=1, alpha_root=1.0, velocity=1.0)[source]
73 |

Calculate the 3D distribution using the Lifting Line Theory.

74 | 75 | 76 | 77 | 78 | 100 | 101 | 102 |
Parameters:
    79 |
  • airfoil – if NACA is false, airfoil is the name of the plain 80 | filewhere the airfoil geometry is stored (variable airfoil). 81 | If NACA is True, airfoil is the naca series of the airfoil 82 | (i.e.: naca2244). By default NACA is False.
  • 83 |
  • Reynolds – Reynolds number in case the simulation is for a 84 | viscous flow. In case not informed, the code will assume 85 | inviscid. (Use the aero_module function to calculate reynolds)
  • 86 |
  • alpha – list/array/float/int of angles of attack.
  • 87 |
  • iteration – changes how many times XFOIL will try to make the 88 | results converge. Specialy important for viscous flows
  • 89 |
  • NACA – Boolean variable that defines if the code imports an 90 | airfoil from a file or generates a NACA airfoil.
  • 91 |
  • N – number of cross sections on the wing
  • 92 |
  • span – span in meters
  • 93 |
  • taper – unidimendional taper (This options is still not 100% 94 | operational)
  • 95 |
  • chord_root – value of the chord at the the root
  • 96 |
  • alpha_root – angle of attack of the chord at the root (degrees)
  • 97 |
  • velocity – velocity in m/s
  • 98 |
99 |
103 |
104 | 105 |
106 |
107 | 108 | 109 |
110 |
111 |
112 | 155 |
156 |
157 | 168 | 169 | 170 | 171 | Fork me on GitHub 172 | 173 | 174 | 175 | 176 | 177 | -------------------------------------------------------------------------------- /docs/_build/html/_static/doctools.js: -------------------------------------------------------------------------------- 1 | /* 2 | * doctools.js 3 | * ~~~~~~~~~~~ 4 | * 5 | * Sphinx JavaScript utilities for all documentation. 6 | * 7 | * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | 12 | /** 13 | * select a different prefix for underscore 14 | */ 15 | $u = _.noConflict(); 16 | 17 | /** 18 | * make the code below compatible with browsers without 19 | * an installed firebug like debugger 20 | if (!window.console || !console.firebug) { 21 | var names = ["log", "debug", "info", "warn", "error", "assert", "dir", 22 | "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", 23 | "profile", "profileEnd"]; 24 | window.console = {}; 25 | for (var i = 0; i < names.length; ++i) 26 | window.console[names[i]] = function() {}; 27 | } 28 | */ 29 | 30 | /** 31 | * small helper function to urldecode strings 32 | */ 33 | jQuery.urldecode = function(x) { 34 | return decodeURIComponent(x).replace(/\+/g, ' '); 35 | }; 36 | 37 | /** 38 | * small helper function to urlencode strings 39 | */ 40 | jQuery.urlencode = encodeURIComponent; 41 | 42 | /** 43 | * This function returns the parsed url parameters of the 44 | * current request. Multiple values per key are supported, 45 | * it will always return arrays of strings for the value parts. 46 | */ 47 | jQuery.getQueryParameters = function(s) { 48 | if (typeof s == 'undefined') 49 | s = document.location.search; 50 | var parts = s.substr(s.indexOf('?') + 1).split('&'); 51 | var result = {}; 52 | for (var i = 0; i < parts.length; i++) { 53 | var tmp = parts[i].split('=', 2); 54 | var key = jQuery.urldecode(tmp[0]); 55 | var value = jQuery.urldecode(tmp[1]); 56 | if (key in result) 57 | result[key].push(value); 58 | else 59 | result[key] = [value]; 60 | } 61 | return result; 62 | }; 63 | 64 | /** 65 | * highlight a given string on a jquery object by wrapping it in 66 | * span elements with the given class name. 67 | */ 68 | jQuery.fn.highlightText = function(text, className) { 69 | function highlight(node) { 70 | if (node.nodeType == 3) { 71 | var val = node.nodeValue; 72 | var pos = val.toLowerCase().indexOf(text); 73 | if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) { 74 | var span = document.createElement("span"); 75 | span.className = className; 76 | span.appendChild(document.createTextNode(val.substr(pos, text.length))); 77 | node.parentNode.insertBefore(span, node.parentNode.insertBefore( 78 | document.createTextNode(val.substr(pos + text.length)), 79 | node.nextSibling)); 80 | node.nodeValue = val.substr(0, pos); 81 | } 82 | } 83 | else if (!jQuery(node).is("button, select, textarea")) { 84 | jQuery.each(node.childNodes, function() { 85 | highlight(this); 86 | }); 87 | } 88 | } 89 | return this.each(function() { 90 | highlight(this); 91 | }); 92 | }; 93 | 94 | /* 95 | * backward compatibility for jQuery.browser 96 | * This will be supported until firefox bug is fixed. 97 | */ 98 | if (!jQuery.browser) { 99 | jQuery.uaMatch = function(ua) { 100 | ua = ua.toLowerCase(); 101 | 102 | var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || 103 | /(webkit)[ \/]([\w.]+)/.exec(ua) || 104 | /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || 105 | /(msie) ([\w.]+)/.exec(ua) || 106 | ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || 107 | []; 108 | 109 | return { 110 | browser: match[ 1 ] || "", 111 | version: match[ 2 ] || "0" 112 | }; 113 | }; 114 | jQuery.browser = {}; 115 | jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; 116 | } 117 | 118 | /** 119 | * Small JavaScript module for the documentation. 120 | */ 121 | var Documentation = { 122 | 123 | init : function() { 124 | this.fixFirefoxAnchorBug(); 125 | this.highlightSearchWords(); 126 | this.initIndexTable(); 127 | }, 128 | 129 | /** 130 | * i18n support 131 | */ 132 | TRANSLATIONS : {}, 133 | PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; }, 134 | LOCALE : 'unknown', 135 | 136 | // gettext and ngettext don't access this so that the functions 137 | // can safely bound to a different name (_ = Documentation.gettext) 138 | gettext : function(string) { 139 | var translated = Documentation.TRANSLATIONS[string]; 140 | if (typeof translated == 'undefined') 141 | return string; 142 | return (typeof translated == 'string') ? translated : translated[0]; 143 | }, 144 | 145 | ngettext : function(singular, plural, n) { 146 | var translated = Documentation.TRANSLATIONS[singular]; 147 | if (typeof translated == 'undefined') 148 | return (n == 1) ? singular : plural; 149 | return translated[Documentation.PLURALEXPR(n)]; 150 | }, 151 | 152 | addTranslations : function(catalog) { 153 | for (var key in catalog.messages) 154 | this.TRANSLATIONS[key] = catalog.messages[key]; 155 | this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); 156 | this.LOCALE = catalog.locale; 157 | }, 158 | 159 | /** 160 | * add context elements like header anchor links 161 | */ 162 | addContextElements : function() { 163 | $('div[id] > :header:first').each(function() { 164 | $('\u00B6'). 165 | attr('href', '#' + this.id). 166 | attr('title', _('Permalink to this headline')). 167 | appendTo(this); 168 | }); 169 | $('dt[id]').each(function() { 170 | $('\u00B6'). 171 | attr('href', '#' + this.id). 172 | attr('title', _('Permalink to this definition')). 173 | appendTo(this); 174 | }); 175 | }, 176 | 177 | /** 178 | * workaround a firefox stupidity 179 | * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 180 | */ 181 | fixFirefoxAnchorBug : function() { 182 | if (document.location.hash) 183 | window.setTimeout(function() { 184 | document.location.href += ''; 185 | }, 10); 186 | }, 187 | 188 | /** 189 | * highlight the search words provided in the url in the text 190 | */ 191 | highlightSearchWords : function() { 192 | var params = $.getQueryParameters(); 193 | var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; 194 | if (terms.length) { 195 | var body = $('div.body'); 196 | if (!body.length) { 197 | body = $('body'); 198 | } 199 | window.setTimeout(function() { 200 | $.each(terms, function() { 201 | body.highlightText(this.toLowerCase(), 'highlighted'); 202 | }); 203 | }, 10); 204 | $('') 206 | .appendTo($('#searchbox')); 207 | } 208 | }, 209 | 210 | /** 211 | * init the domain index toggle buttons 212 | */ 213 | initIndexTable : function() { 214 | var togglers = $('img.toggler').click(function() { 215 | var src = $(this).attr('src'); 216 | var idnum = $(this).attr('id').substr(7); 217 | $('tr.cg-' + idnum).toggle(); 218 | if (src.substr(-9) == 'minus.png') 219 | $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); 220 | else 221 | $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); 222 | }).css('display', ''); 223 | if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { 224 | togglers.click(); 225 | } 226 | }, 227 | 228 | /** 229 | * helper function to hide the search marks again 230 | */ 231 | hideSearchWords : function() { 232 | $('#searchbox .highlight-link').fadeOut(300); 233 | $('span.highlighted').removeClass('highlighted'); 234 | }, 235 | 236 | /** 237 | * make the url absolute 238 | */ 239 | makeURL : function(relativeURL) { 240 | return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; 241 | }, 242 | 243 | /** 244 | * get the current relative url 245 | */ 246 | getCurrentURL : function() { 247 | var path = document.location.pathname; 248 | var parts = path.split(/\//); 249 | $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { 250 | if (this == '..') 251 | parts.pop(); 252 | }); 253 | var url = parts.join('/'); 254 | return path.substring(url.lastIndexOf('/') + 1, path.length - 1); 255 | } 256 | }; 257 | 258 | // quick alias for translations 259 | _ = Documentation.gettext; 260 | 261 | $(document).ready(function() { 262 | Documentation.init(); 263 | }); 264 | -------------------------------------------------------------------------------- /sampled_airfoil_data.csv: -------------------------------------------------------------------------------- 1 | 0.9988986784140971, -0.025548487131926728 2 | 0.9962555066079296, -0.025547038024576835 3 | 0.9936123348017621, -0.024558746811963794 4 | 0.9896475770925112, -0.023569731045675835 5 | 0.98568281938326, -0.022251767910966808 6 | 0.9784140969162997, -0.020274098655228334 7 | 0.9718061674008812, -0.018296791676327362 8 | 0.9665198237885463, -0.016978103987943416 9 | 0.9612334801762116, -0.015659416299559442 10 | 0.9566079295154185, -0.01434109088801297 11 | 0.9519823788546257, -0.012364870739624362 12 | 0.945704845814978, -0.010716692267563166 13 | 0.9400881057268723, -0.009068876072339416 14 | 0.9301762114537445, -0.007089757709251077 15 | 0.9222466960352423, -0.0044538314398330225 16 | 0.9129955947136564, -0.0018171806167400495 17 | 0.9050660792951543, 0.00016085091583586952 18 | 0.8958149779735683, 0.0027975017389288426 19 | 0.8872246696035243, 0.0051048429167633025 20 | 0.8759911894273129, 0.007742580570368668 21 | 0.8654185022026433, 0.010708903315557627 22 | 0.8574889867841411, 0.012357987479712507 23 | 0.8515418502202644, 0.014005984813354966 24 | 0.8455947136563877, 0.015325034778576413 25 | 0.8409691629955948, 0.016643360190122886 26 | 0.8330396475770926, 0.018621391722698832 27 | 0.8264317180616741, 0.019940803964757697 28 | 0.8211453744493393, 0.02191738638998378 29 | 0.8105726872246697, 0.024554761766751698 30 | 0.8006607929515419, 0.026533880129840037 31 | 0.791409691629956, 0.029170530952932983 32 | 0.7814977973568283, 0.03114964931602132 33 | 0.7709251101321587, 0.03378702469278924 34 | 0.7610132158590309, 0.03576614305587758 35 | 0.7504405286343613, 0.0384035184326455 36 | 0.7359030837004407, 0.04170096220728031 37 | 0.7240088105726873, 0.044339062137723165 38 | 0.7140969162995595, 0.046318180500811504 39 | 0.6995594713656389, 0.04961562427544633 40 | 0.681057268722467, 0.05357313644794806 41 | 0.6685022026431717, 0.05621159865522839 42 | 0.6572687224669603, 0.05819144157199166 43 | 0.6440528634361233, 0.060830266056109444 44 | 0.6328193832599118, 0.06281010897287272 45 | 0.6176211453744493, 0.06545002028750291 46 | 0.6077092511013216, 0.06742913865059125 47 | 0.5931718061674008, 0.07006868768838398 48 | 0.5806167400881057, 0.07204925515882218 49 | 0.5667400881057268, 0.07468844191977744 50 | 0.5508810572687225, 0.07667082077440299 51 | 0.5356828193832599, 0.07865283735219107 52 | 0.5185022026431718, 0.08129383549733366 53 | 0.5006607929515419, 0.08393519591931373 54 | 0.49008810572687234, 0.08459888708555531 55 | 0.4696035242290749, 0.08724169661488523 56 | 0.4497797356828195, 0.08988414386737771 57 | 0.4365638766519825, 0.09054928414096917 58 | 0.42334801762114543, 0.09187231915140275 59 | 0.40616740088105735, 0.09319752782286113 60 | 0.3896475770925111, 0.09386447948063993 61 | 0.3671806167400882, 0.09585048110364017 62 | 0.3506607929515419, 0.09618848539299792 63 | 0.32951541850220273, 0.096857972988639 64 | 0.30770925110132163, 0.0965409807558544 65 | 0.29251101321585904, 0.09654931312311617 66 | 0.2786343612334802, 0.09589902619986089 67 | 0.26674008810572686, 0.0952476524460932 68 | 0.25418502202643173, 0.09459664096916301 69 | 0.24295154185022028, 0.09460279967539997 70 | 0.2218061674008811, 0.09329860306051474 71 | 0.20792951541850224, 0.09199042140041735 72 | 0.19768722466960353, 0.09068024721771391 73 | 0.18810572687224675, 0.09002760549501508 74 | 0.1775330396475771, 0.0883886650823093 75 | 0.16563876651982382, 0.08609255448643637 76 | 0.15506607929515423, 0.08478256144215164 77 | 0.14185022026431723, 0.0828161227683747 78 | 0.13061674008810575, 0.08019070252724324 79 | 0.12004405286343617, 0.07789386737769535 80 | 0.10947136563876653, 0.07559703222814748 81 | 0.10088105726872248, 0.07362805761650824 82 | 0.09361233480176212, 0.07100046371435198 83 | 0.08568281938325992, 0.06837323208903318 84 | 0.07643171806167404, 0.06508883028054718 85 | 0.06916299559471367, 0.062461236378390905 86 | 0.05792951541850222, 0.05786213192673313 87 | 0.05000000000000003, 0.05457700556457222 88 | 0.03744493392070487, 0.04932073092974727 89 | 0.02488986784140973, 0.04143287734755391 90 | 0.015638766519823807, 0.03354321238117319 91 | 0.009030837004405295, 0.026967887781126826 92 | 0.0037444933920705026, 0.019733943890563432 93 | -0.00022026431718058515, 0.009867696498956663 94 | -0.0015418502202642903, 0.004605263157894751 95 | -0.0015418502202642903, -0.0013157894736841869 96 | -0.0008810572687224377, -0.007895099118942706 97 | 0.004405286343612355, -0.015792734175747725 98 | 0.009691629955947148, -0.019085106074657965 99 | 0.01762114537444935, -0.02106313760723391 100 | 0.02488986784140973, -0.02172501738928817 101 | 0.03281938325991192, -0.021071469974495688 102 | 0.04207048458149783, -0.021076541850220232 103 | 0.05066079295154188, -0.020423356712265223 104 | 0.06057268722466963, -0.018455106654300946 105 | 0.06784140969163, -0.017472249594249922 106 | 0.07444933920704849, -0.016489030257361453 107 | 0.08634361233480178, -0.013863972293067434 108 | 0.09757709251101324, -0.011896446788778076 109 | 0.10947136563876653, -0.009271388824484111 110 | 0.1193832599118943, -0.007303138766519807 111 | 0.1273127753303965, -0.00533380187804311 112 | 0.1352422907488987, -0.004022359726408492 113 | 0.15044052863436128, -0.00008332367261765228 114 | 0.16167400881057273, 0.002542096568513813 115 | 0.17158590308370048, 0.004510346626478118 116 | 0.18215859030837006, 0.006478234407604949 117 | 0.1966960352422908, 0.010417632738233262 118 | 0.20792951541850224, 0.012385158242522593 119 | 0.21850220264317183, 0.014353046023649424 120 | 0.23171806167400882, 0.017964221539531644 121 | 0.2455947136563877, 0.020917140041734283 122 | 0.25616740088105727, 0.022885027822861115 123 | 0.2687224669603524, 0.025180776141896594 124 | 0.2806167400881057, 0.027476886737769546 125 | 0.29251101321585904, 0.030759839438905617 126 | 0.30506607929515417, 0.03206874565267795 127 | 0.3182819383259913, 0.03469307906329702 128 | 0.33149779735682827, 0.03665951773707399 129 | 0.3407488986784142, 0.03797023533503363 130 | 0.3572687224669604, 0.04059275736146534 131 | 0.3698237885462556, 0.041901663575237655 132 | 0.3837004405286344, 0.04386773997217715 133 | 0.3962555066079296, 0.04583454092279156 134 | 0.4081497797356829, 0.04648591467655924 135 | 0.4246696035242291, 0.047134752492464654 136 | 0.4359030837004406, 0.04844438325991189 137 | 0.44845814977973575, 0.048108552631578955 138 | 0.46762114537444943, 0.049742783445397634 139 | 0.4834801762114538, 0.04907619406445629 140 | 0.5, 0.049067137143519596 141 | 0.5099118942731278, 0.04939065035937862 142 | 0.5208149779735683, 0.04905572542313934 143 | 0.5356828193832599, 0.048389679457454204 144 | 0.5495594713656388, 0.04739522953860423 145 | 0.5674008810572687, 0.04574071122188732 146 | 0.5832599118942731, 0.04474517447252492 147 | 0.5958149779735683, 0.04375144910734988 148 | 0.6070484581497797, 0.04242950092742871 149 | 0.6202643171806167, 0.04110646591699513 150 | 0.6387665198237886, 0.03846474321817761 151 | 0.6552863436123347, 0.03648200208671459 152 | 0.663215859030837, 0.035161865290980754 153 | 0.6718061674008811, 0.03384136621840947 154 | 0.6850220264317181, 0.03186043647113379 155 | 0.6995594713656389, 0.02922088743334106 156 | 0.7114537444933922, 0.027240682239740327 157 | 0.7233480176211454, 0.025260477046139596 158 | 0.7372246696035243, 0.022621290285184337 159 | 0.7471365638766521, 0.02064217192209597 160 | 0.7590308370044054, 0.01800407199165316 161 | 0.769603524229075, 0.015366696614885239 162 | 0.7801762114537446, 0.013387215974959427 163 | 0.791409691629956, 0.010749478321354061 164 | 0.8066079295154186, 0.007451672269881748 165 | 0.8125550660792953, 0.006132622304660357 166 | 0.8211453744493393, 0.004154228495246964 167 | 0.8310572687224671, 0.0015172153953164902 168 | 0.8429515418502204, -0.00046298979828424125 169 | 0.8508810572687225, -0.0024410213308601603 170 | 0.8588105726872247, -0.004419052863436107 171 | 0.8660792951541851, -0.005738827382332473 172 | 0.8733480176211454, -0.007716496638070919 173 | 0.8812775330396476, -0.009365580802225798 174 | 0.8898678414096917, -0.01101502724321815 175 | 0.8971365638766521, -0.012992696498956624 176 | 0.9057268722466961, -0.014971090308370016 177 | 0.9162995594713658, -0.01695057094829583 178 | 0.9222466960352423, -0.018269620913517248 179 | 0.9281938325991189, -0.019588670878738668 180 | 0.9341409691629957, -0.02024982610711798 181 | 0.9400881057268723, -0.0215688760723394 182 | 0.9460352422907491, -0.02223003130071874 183 | 0.9526431718061675, -0.02387839091119867 184 | 0.9579295154185022, -0.024868131231161578 185 | 0.963876651982379, -0.026187181196383025 186 | 0.9711453744493393, -0.02750695571527939 187 | 0.9770925110132159, -0.028826005680500838 188 | 0.9820484581497798, -0.029157670125202872 189 | 0.9870044052863437, -0.030147229306747042 190 | 0.990308370044053, -0.03047798805935545 191 | 0.994273127753304, -0.030151214351959194 192 | 0.9988986784140971, -0.031469539763505694 193 | -------------------------------------------------------------------------------- /shape_study.p: -------------------------------------------------------------------------------- 1 | (dp0 2 | S'deltaz' 3 | p1 4 | (lp2 5 | cnumpy.core.multiarray 6 | scalar 7 | p3 8 | (cnumpy 9 | dtype 10 | p4 11 | (S'f8' 12 | p5 13 | I0 14 | I1 15 | tp6 16 | Rp7 17 | (I3 18 | S'<' 19 | p8 20 | NNNI-1 21 | I-1 22 | I0 23 | tp9 24 | bS'\x91\xa6\x15;\xe7\xaf\x8b?' 25 | p10 26 | tp11 27 | Rp12 28 | ag3 29 | (g7 30 | S'\x89\x7f\xa2p\x14\xaeO?' 31 | p13 32 | tp14 33 | Rp15 34 | ag3 35 | (g7 36 | S',\x81\xbe\x16&\x9b\x86?' 37 | p16 38 | tp17 39 | Rp18 40 | ag3 41 | (g7 42 | S'y\xf8\xd3\xa8\xe3s^?' 43 | p19 44 | tp20 45 | Rp21 46 | ag3 47 | (g7 48 | S'\x1di\x94\xacQ\xc6\x83?' 49 | p22 50 | tp23 51 | Rp24 52 | ag3 53 | (g7 54 | S"\xdc\xfc'\xc0\xc8\xd8f?" 55 | p25 56 | tp26 57 | Rp27 58 | ag3 59 | (g7 60 | S'\xeb\xaap\x8aoKp?' 61 | p28 62 | tp29 63 | Rp30 64 | ag3 65 | (g7 66 | S'\xe7\xa2\xa2\x17\x1d\xe0\x7f?' 67 | p31 68 | tp32 69 | Rp33 70 | asS'order' 71 | p34 72 | (lp35 73 | I1 74 | aI2 75 | aI3 76 | aI4 77 | aI5 78 | aI6 79 | aI7 80 | aI8 81 | asS'Au' 82 | p36 83 | (lp37 84 | (lp38 85 | g3 86 | (g7 87 | S',\xdeq\xec\x17\xc4\xd1?' 88 | p39 89 | tp40 90 | Rp41 91 | ag3 92 | (g7 93 | S'{M\x13\xbdsW\xd0?' 94 | p42 95 | tp43 96 | Rp44 97 | aa(lp45 98 | g3 99 | (g7 100 | S'\xf0D\xfd\x06\xf3?\xcf?' 101 | p46 102 | tp47 103 | Rp48 104 | ag3 105 | (g7 106 | S'\xd0q\xa7\xd6\xdag\xd3?' 107 | p49 108 | tp50 109 | Rp51 110 | ag3 111 | (g7 112 | S'b\x01\xa5\x1b\xb4\xca\xce?' 113 | p52 114 | tp53 115 | Rp54 116 | aa(lp55 117 | g3 118 | (g7 119 | S'\t\xb4\xd8!\xad^\xd1?' 120 | p56 121 | tp57 122 | Rp58 123 | ag3 124 | (g7 125 | S'h\xd7\x9f\xf3\xbf\xe4\xce?' 126 | p59 127 | tp60 128 | Rp61 129 | ag3 130 | (g7 131 | S'K\xe0\xbcYOY\xd4?' 132 | p62 133 | tp63 134 | Rp64 135 | ag3 136 | (g7 137 | S'\xa4D\xd9e#\xea\xc8?' 138 | p65 139 | tp66 140 | Rp67 141 | aa(lp68 142 | g3 143 | (g7 144 | S'\xa7\xb9qGb\x08\xd2?' 145 | p69 146 | tp70 147 | Rp71 148 | ag3 149 | (g7 150 | S'fbr\x7f\xd7c\xd2?' 151 | p72 152 | tp73 153 | Rp74 154 | ag3 155 | (g7 156 | S'\xae%\x8d\xeakx\x85\xd0?' 243 | p119 244 | tp120 245 | Rp121 246 | ag3 247 | (g7 248 | S'\x0b\xf0s6O-\xd0?' 249 | p122 250 | tp123 251 | Rp124 252 | aa(lp125 253 | g3 254 | (g7 255 | S'h_t&\xb2\x93\xcf?' 256 | p126 257 | tp127 258 | Rp128 259 | ag3 260 | (g7 261 | S'Jz\xc6\xc8\xfd\xfe\xd5?' 262 | p129 263 | tp130 264 | Rp131 265 | ag3 266 | (g7 267 | S'\xe0\x19\xff\x9c\xaf\x12\xc2?' 268 | p132 269 | tp133 270 | Rp134 271 | ag3 272 | (g7 273 | S'\x83k\x0f\xb1\xe4\xaa\xde?' 274 | p135 275 | tp136 276 | Rp137 277 | ag3 278 | (g7 279 | S'\xc0\x18\x01a\x17\xeb\xaa?' 280 | p138 281 | tp139 282 | Rp140 283 | ag3 284 | (g7 285 | S'+y\x06A\xb0H\xd8?' 286 | p141 287 | tp142 288 | Rp143 289 | ag3 290 | (g7 291 | S'\xf7\xc6[^F\xe3\xd1?' 292 | p144 293 | tp145 294 | Rp146 295 | ag3 296 | (g7 297 | S'\xf0\x18ji\xffm\xc7?' 298 | p147 299 | tp148 300 | Rp149 301 | aa(lp150 302 | g3 303 | (g7 304 | S'!\xe8#\x11\n\x93\xd1?' 305 | p151 306 | tp152 307 | Rp153 308 | ag3 309 | (g7 310 | S'\x00\xd31\xf6\xd5\xec\xcd?' 311 | p154 312 | tp155 313 | Rp156 314 | ag3 315 | (g7 316 | S'f>\xe3(\x06Z\xd3?' 317 | p157 318 | tp158 319 | Rp159 320 | ag3 321 | (g7 322 | S'\xd0P\x9a\x1f\t\xbb\xcb?' 323 | p160 324 | tp161 325 | Rp162 326 | ag3 327 | (g7 328 | S'\xe2\xcf\x8e\x9b\xe9\x19\xdb?' 329 | p163 330 | tp164 331 | Rp165 332 | ag3 333 | (g7 334 | S"\xe0'\x1f\xdd\xc6o\xba?" 335 | p166 336 | tp167 337 | Rp168 338 | ag3 339 | (g7 340 | S'\n$\xc2\xe0\xe3\xd7\xd1?' 341 | p169 342 | tp170 343 | Rp171 344 | ag3 345 | (g7 346 | S'\xaatI54\xcf\xd6?' 347 | p172 348 | tp173 349 | Rp174 350 | ag3 351 | (g7 352 | S'\xc4\xeb\xac\xf0\xc7P\xb7?' 353 | p175 354 | tp176 355 | Rp177 356 | aasS'Al' 357 | p178 358 | (lp179 359 | (lp180 360 | g3 361 | (g7 362 | S'\x18\x17\x19\xcc/\x1c\xa8?' 363 | p181 364 | tp182 365 | Rp183 366 | ag3 367 | (g7 368 | S'Q\x93\x80{E\x97\xd7\xbf' 369 | p184 370 | tp185 371 | Rp186 372 | aa(lp187 373 | g3 374 | (g7 375 | S'\xc9\x0c]f\x12|\xc3?' 376 | p188 377 | tp189 378 | Rp190 379 | ag3 380 | (g7 381 | S'\xc2\xe6[\x114\xb3\xdb\xbf' 382 | p191 383 | tp192 384 | Rp193 385 | ag3 386 | (g7 387 | S'\xc6@\x06\xc4\xf3\xf5\xa4\xbf' 388 | p194 389 | tp195 390 | Rp196 391 | aa(lp197 392 | g3 393 | (g7 394 | S'C_m]\x84\xe7\xc4?' 395 | p198 396 | tp199 397 | Rp200 398 | ag3 399 | (g7 400 | S'\xea\xc3\x91\xf0\xdf\xce\xd3\xbf' 401 | p201 402 | tp202 403 | Rp203 404 | ag3 405 | (g7 406 | S'\xa9\x0f\xe9\xa2K\xbc\xc3\xbf' 407 | p204 408 | tp205 409 | Rp206 410 | ag3 411 | (g7 412 | S'\x89!\x94\x06h\x89\xcd\xbf' 413 | p207 414 | tp208 415 | Rp209 416 | aa(lp210 417 | g3 418 | (g7 419 | S'\xb3W\xc3y\x9e\x82\xc6?' 420 | p211 421 | tp212 422 | Rp213 423 | ag3 424 | (g7 425 | S'\xe1Ml\xcaX\x86\xd0\xbf' 426 | p214 427 | tp215 428 | Rp216 429 | ag3 430 | (g7 431 | S'\x86\xc3\xf3\xd4S\x7f\xa2\xbf' 432 | p217 433 | tp218 434 | Rp219 435 | ag3 436 | (g7 437 | S'%\xf7j\x15CY\xdc\xbf' 438 | p220 439 | tp221 440 | Rp222 441 | ag3 442 | (g7 443 | S'1U3{\xd2q\x95?' 444 | p223 445 | tp224 446 | Rp225 447 | aa(lp226 448 | g3 449 | (g7 450 | S'=\x12\xde\xd8<7\xc8?' 451 | p227 452 | tp228 453 | Rp229 454 | ag3 455 | (g7 456 | S'\x97\x89\x91\xd6Z\xc6\xcf\xbf' 457 | p230 458 | tp231 459 | Rp232 460 | ag3 461 | (g7 462 | S'$\xb1c\x1c\xb9\xb4\xb2?' 463 | p233 464 | tp234 465 | Rp235 466 | ag3 467 | (g7 468 | S'*\x98\xe6!\xd9<\xe1\xbf' 469 | p236 470 | tp237 471 | Rp238 472 | ag3 473 | (g7 474 | S"N\x88\x84\xa9']\x84\xbf" 475 | p239 476 | tp240 477 | Rp241 478 | ag3 479 | (g7 480 | S'\xa3\xd1\xd4BV\x9a\xce\xbf' 481 | p242 482 | tp243 483 | Rp244 484 | aa(lp245 485 | g3 486 | (g7 487 | S'JU`\x8bo\x83\xc9?' 488 | p246 489 | tp247 490 | Rp248 491 | ag3 492 | (g7 493 | S'\x7f7\xe1f\xb9y\xcf\xbf' 494 | p249 495 | tp250 496 | Rp251 497 | ag3 498 | (g7 499 | S'\x05\x1fX~\xb1\x95\xc7?' 500 | p252 501 | tp253 502 | Rp254 503 | ag3 504 | (g7 505 | S'\xf7\x06\x93\xbe@!\xe3\xbf' 506 | p255 507 | tp256 508 | Rp257 509 | ag3 510 | (g7 511 | S'\x9eLjw:\xf8\xa9?' 512 | p258 513 | tp259 514 | Rp260 515 | ag3 516 | (g7 517 | S'\x02\x9b\rp\x18\x9d\xd6\xbf' 518 | p261 519 | tp262 520 | Rp263 521 | ag3 522 | (g7 523 | S'\xfb\xe9"3\x14\x87\x9a\xbf' 524 | p264 525 | tp265 526 | Rp266 527 | aa(lp267 528 | g3 529 | (g7 530 | S':\x9d\x8d\xdf0]\xca?' 531 | p268 532 | tp269 533 | Rp270 534 | ag3 535 | (g7 536 | S'\x9b(\xc1\x0b-k\xcd\xbf' 537 | p271 538 | tp272 539 | Rp273 540 | ag3 541 | (g7 542 | S'J 3 | 4 | 5 | 6 | 7 | 8 | 9 | AeroPy — AeroPy 0.0.2 documentation 10 | 11 | 12 | 13 | 14 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 |
37 |
38 |
39 |
40 | 41 |

Source code for AeroPy

 42 | # -*- coding: utf-8 -*-
 43 | """
 44 | Created on Sun Aug 16 20:59:22 2015
 45 | 
 46 | @author: Pedro
 47 | """
 48 | from aero_module import *
 49 | from xfoil_module import *
 50 | 
 51 | 
[docs]def find_3D_coefficients(airfoil, alpha, Reynolds=0, iteration=10, NACA=True, 52 | N=10, span=10., taper=1., chord_root=1, alpha_root=1., 53 | velocity=1.): 54 | """ Calculate the 3D distribution using the Lifting Line Theory. 55 | 56 | :param airfoil: if NACA is false, airfoil is the name of the plain 57 | filewhere the airfoil geometry is stored (variable airfoil). 58 | If NACA is True, airfoil is the naca series of the airfoil 59 | (i.e.: naca2244). By default NACA is False. 60 | 61 | :param Reynolds: Reynolds number in case the simulation is for a 62 | viscous flow. In case not informed, the code will assume 63 | inviscid. (Use the aero_module function to calculate reynolds) 64 | 65 | :param alpha: list/array/float/int of angles of attack. 66 | 67 | :param iteration: changes how many times XFOIL will try to make the 68 | results converge. Specialy important for viscous flows 69 | 70 | :param NACA: Boolean variable that defines if the code imports an 71 | airfoil from a file or generates a NACA airfoil. 72 | 73 | :param N: number of cross sections on the wing 74 | 75 | :param span: span in meters 76 | 77 | :param taper: unidimendional taper (This options is still not 100% 78 | operational) 79 | 80 | :param chord_root: value of the chord at the the root 81 | 82 | :param alpha_root: angle of attack of the chord at the root (degrees) 83 | 84 | :param velocity: velocity in m/s 85 | 86 | """ 87 | coefficients = find_coefficients(airfoil, alpha, Reynolds, iteration, 88 | NACA) 89 | alpha_L_0_root = find_alpha_L_0(airfoil, Reynolds, iteration, NACA) 90 | return LLT_calculator(alpha_L_0_root, coefficients['CD'], N, span, taper, chord_root, 91 | alpha_root, velocity) 92 | 93 |
94 | if __name__ == '__main__': 95 | print find_3D_coefficients(airfoil='naca0012', alpha=1.) 96 |
97 | 98 |
99 |
100 |
101 | 129 |
130 |
131 | 139 | 140 | 141 | 142 | Fork me on GitHub 143 | 144 | 145 | 146 | 147 | 148 | -------------------------------------------------------------------------------- /docs/_build/html/index.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Welcome to AeroPy’s, an easy to use aerodynamic tool — AeroPy 0.0.2 documentation 10 | 11 | 12 | 13 | 14 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 |
37 |
38 |
39 |
40 | 41 |
42 |

Welcome to AeroPy’s, an easy to use aerodynamic tool

43 |

AeroPy is an library for calculating aerodynamic properties. The main feature of 44 | this library is the Python interface with XFOIL. The main objective of this library is to be able 45 | to use XFOIL via Python iteratively in a total of 4 lines total (one line for most uses). 46 | Through this interface coupling with other softwares (Abaqus, Ansys, etc) is possible 47 | and iterative processes (optimization, design sensitivity) are possible. 48 | For a thorough explanation please check the documentation and the tutorials.

49 |

Contents:

50 |
51 | 66 |
67 |
68 |
69 |

To Do

70 |
    71 |
  • Include asymmetric wing
  • 72 |
  • Create airfoil and wing classes
  • 73 |
74 |
75 | 86 |
87 |

Indices and tables

88 | 93 |
94 |
95 |

Examples

96 |

A simple example demonstrating how to use AeroPy to calculate lift, drag and 97 | moment coefficients for a NACA0012 airfoil at angle of attack of 12 degrees.

98 |
from AeroPy import find_coefficients
 99 | find_coefficients(airfoil='naca0012'alpha=12.)
100 | >>> {'CM': 0.0134, 'CL': 1.2453, 'Top_Xtr': 0.0194, 'CD': 0.01934, 'CDp': 0.01379, 'alpha': 12.0, 'Bot_Xtr': 1.0}
101 | 
102 |
103 |

Another example showing how to use AeroPy to calculate pressure coefficients for a 104 | NACA0012 in viscous flow at Reynolds = 10000000 and angle of attack of 12 degrees

105 |
from AeroPy import find_pressure_coefficients
106 | find_pressure_coefficients(airfoil='naca0012', Reynolds = 1e6, alpha=12.,NACA=True)
107 | >>> 'y': [0.00126, ..., -0.00126], 'x': [1.0, ..., 1.0], 'Cp': [0.41501, ..., 0.41501]}
108 | 
109 |
110 |
111 | 112 | 113 |
114 |
115 |
116 | 159 |
160 |
161 | 172 | 173 | 174 | 175 | Fork me on GitHub 176 | 177 | 178 | 179 | 180 | 181 | -------------------------------------------------------------------------------- /docs/_build/html/aero_module.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 3. Aerodynamic Module Documentation — AeroPy 0.0.2 documentation 10 | 11 | 12 | 13 | 14 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |
38 |
39 |
40 |
41 | 42 |
43 |

3. Aerodynamic Module Documentation

44 |
45 |

3.1. Lifting Line Theory

46 |

If \(\theta_0\) is an arbitrary span-wise location:

47 |
48 | (1)\[\alpha (\theta_o)=\frac{2b}{\pi c(\theta_o)} \sum_1^N A_n sin(n \theta_o) + \alpha_{L=0}(\theta_o) + \sum_1^N n A_n \frac{sin(n\theta_o)}{sin(\theta_o)}\]
49 |

Each equation has \(N\) unknowns (\(A_n\)), so if there are N \(\theta_o\), we have NxN system, which in Einstein notation can be written as:

50 |
51 | (2)\[C_{ij}A_{i}=D_{i}\]
52 |

where, \(i=0,...,N\), \(j=0,...,N\) and :

53 |
54 | (3)\[C_{ij}= \left( \frac{2b}{\pi c(j)} + \frac{n}{sin \theta(i)} \right) sin(n \theta(i))\]
55 |
56 | (4)\[A_i=A(i)\]
57 |
58 | (5)\[D_i=\alpha(i)-\alpha_{L=0}(i)\]
59 |

where \(n=1,3,5,...,N-1\). Since we are considering a symmetric wing, all of the even terms would cancel each other

60 |
61 | _images/elliptical_LLT.png 62 |
63 |
64 |
65 |

3.2. The code

66 |

Current funcionatilities: 67 | - Lifting line theory 68 | - generate field pressures for Abaqus or other softwares 69 | - air properties calculator 70 | - Reynolds calculator 71 | Created on Mon Jul 20 17:26:19 2015

72 |

@author: Pedro Leal

73 |
74 |
75 | aero_module.LLT_calculator(alpha_L_0_root, c_D_xfoil, N=10, b=10.0, taper=1.0, chord_root=1, alpha_root=0.0, V=1.0)[source]
76 |

Calculate the coefficients for a Wing. 77 | TODO : - Include elliptical wing

78 |
79 |
    80 |
  • When alpha_L_0_root = zero, nan!
  • 81 |
  • Include non rectangular wings
  • 82 |
  • something else?
  • 83 |
84 |
85 |
86 | 87 |
88 |
89 | aero_module.Reynolds(height, V, c)[source]
90 |

Simple function to calculate Reynolds for a given height.

91 |

@author: Pedro Leal 92 | Created in Jul 17 2015

93 |
94 | 95 |
96 |
97 | aero_module.air_properties(height, unit='feet')[source]
98 |

Function to calculate air properties for a given height (m or ft).

99 |
100 |
Sources:
101 |
105 |
106 |
107 |

Created on Thu May 15 14:59:43 2014 108 | @author: Pedro Leal

109 |
110 | 111 |
112 |
113 | aero_module.calculate_moment_coefficient(x, y, Cp, alpha, c=1.0, x_ref=0.0, y_ref=0.0)[source]
114 |

Calculate the moment coeffcient. Inputs are x and y coordinates, and 115 | pressure coefficients (Cp). Inputs can be in a list in xfoil format 116 | (counterclockwise starting from the trailing edge, in case necessary, 117 | check create_input function from xfoil_module) or dictionaries with 118 | ‘upper’ and ‘lower’ keys.

119 |
120 | 121 |
122 |
123 | aero_module.pressure_shell_2D(Data, chord, thickness, half_span, height, Velocity, N, txt=False)[source]
124 |

Calculate pressure field for a 2D Shell.

125 |
126 | 127 |
128 |
129 | 130 | 131 |
132 |
133 |
134 | 178 |
179 |
180 | 191 | 192 | 193 | 194 | Fork me on GitHub 195 | 196 | 197 | 198 | 199 | 200 | -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # pyXFOIL documentation build configuration file, created by 4 | # sphinx-quickstart on Tue Aug 11 23:35:51 2015. 5 | # 6 | # This file is execfile()d with the current directory set to its 7 | # containing dir. 8 | # 9 | # Note that not all possible configuration values are present in this 10 | # autogenerated file. 11 | # 12 | # All configuration values have a default; values that are commented out 13 | # serve to show the default. 14 | 15 | import sys 16 | import os 17 | import shlex 18 | import alabaster 19 | 20 | from mock import Mock # To include C dependent libs in ReadtheDocs 21 | 22 | # If extensions (or modules to document with autodoc) are in another directory, 23 | # add these directories to sys.path here. If the directory is relative to the 24 | # documentation root, use os.path.abspath to make it absolute, like shown here. 25 | #sys.path.insert(0, os.path.abspath('.')) 26 | sys.path.insert(0, os.path.abspath('..')) 27 | 28 | # -- General configuration ------------------------------------------------ 29 | 30 | # If your documentation needs a minimal Sphinx version, state it here. 31 | #needs_sphinx = '1.0' 32 | 33 | # Add any Sphinx extension module names here, as strings. They can be 34 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 35 | # ones. 36 | extensions = [ 37 | 'sphinx.ext.autodoc', 38 | 'sphinx.ext.intersphinx', 39 | 'sphinx.ext.todo', 40 | 'sphinx.ext.mathjax', 41 | 'sphinx.ext.viewcode', 42 | 'alabaster' 43 | ] 44 | 45 | # Add any paths that contain templates here, relative to this directory. 46 | templates_path = ['_templates'] 47 | 48 | # The suffix(es) of source filenames. 49 | # You can specify multiple suffix as a list of string: 50 | # source_suffix = ['.rst', '.md'] 51 | source_suffix = '.rst' 52 | 53 | # The encoding of source files. 54 | #source_encoding = 'utf-8-sig' 55 | 56 | # The master toctree document. 57 | master_doc = 'index' 58 | 59 | # General information about the project. 60 | project = u'AeroPy' 61 | copyright = u'2015, Pedro Leal' 62 | author = u'Pedro Leal' 63 | 64 | # The version info for the project you're documenting, acts as replacement for 65 | # |version| and |release|, also used in various other places throughout the 66 | # built documents. 67 | # 68 | # The short X.Y version. 69 | version = '0.0.2' 70 | # The full version, including alpha/beta/rc tags. 71 | release = '0.0.2' 72 | 73 | # The language for content autogenerated by Sphinx. Refer to documentation 74 | # for a list of supported languages. 75 | # 76 | # This is also used if you do content translation via gettext catalogs. 77 | # Usually you set "language" from the command line for these cases. 78 | language = None 79 | 80 | # There are two options for replacing |today|: either, you set today to some 81 | # non-false value, then it is used: 82 | #today = '' 83 | # Else, today_fmt is used as the format for a strftime call. 84 | #today_fmt = '%B %d, %Y' 85 | 86 | # List of patterns, relative to source directory, that match files and 87 | # directories to ignore when looking for source files. 88 | exclude_patterns = ['_build'] 89 | 90 | # The reST default role (used for this markup: `text`) to use for all 91 | # documents. 92 | #default_role = None 93 | 94 | # If true, '()' will be appended to :func: etc. cross-reference text. 95 | #add_function_parentheses = True 96 | 97 | # If true, the current module name will be prepended to all description 98 | # unit titles (such as .. function::). 99 | #add_module_names = True 100 | 101 | # If true, sectionauthor and moduleauthor directives will be shown in the 102 | # output. They are ignored by default. 103 | #show_authors = False 104 | 105 | # The name of the Pygments (syntax highlighting) style to use. 106 | pygments_style = 'sphinx' 107 | 108 | # A list of ignored prefixes for module index sorting. 109 | #modindex_common_prefix = [] 110 | 111 | # If true, keep warnings as "system message" paragraphs in the built documents. 112 | #keep_warnings = False 113 | 114 | # If true, `todo` and `todoList` produce output, else they produce nothing. 115 | todo_include_todos = True 116 | 117 | 118 | # -- Options for HTML output ---------------------------------------------- 119 | 120 | # The theme to use for HTML and HTML Help pages. See the documentation for 121 | # a list of builtin themes. 122 | html_theme = 'alabaster' 123 | 124 | # Theme options are theme-specific and customize the look and feel of a theme 125 | # further. For a list of options available for each theme, see the 126 | # documentation. 127 | html_theme_options = {'logo': 'logo.png', 128 | 'description': 'An easy to use aerodynamic tool', 129 | 'github_user': 'leal26', 130 | 'github_repo': 'AeroPy', 131 | 'logo_name': 'AeroPy', 132 | 'github_banner': True} 133 | 134 | # Add any paths that contain custom themes here, relative to this directory. 135 | html_theme_path = [alabaster.get_path()] 136 | 137 | # The name for this set of Sphinx documents. If None, it defaults to 138 | # " v documentation". 139 | #html_title = None 140 | 141 | # A shorter title for the navigation bar. Default is the same as html_title. 142 | #html_short_title = None 143 | 144 | # The name of an image file (relative to this directory) to place at the top 145 | # of the sidebar. 146 | html_logo = 'images/logo.png' 147 | 148 | # The name of an image file (within the static path) to use as favicon of the 149 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 150 | # pixels large. 151 | #html_favicon = None 152 | 153 | # Add any paths that contain custom static files (such as style sheets) here, 154 | # relative to this directory. They are copied after the builtin static files, 155 | # so a file named "default.css" will overwrite the builtin "default.css". 156 | html_static_path = ['_static'] 157 | 158 | # Add any extra paths that contain custom files (such as robots.txt or 159 | # .htaccess) here, relative to this directory. These files are copied 160 | # directly to the root of the documentation. 161 | #html_extra_path = [] 162 | 163 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 164 | # using the given strftime format. 165 | #html_last_updated_fmt = '%b %d, %Y' 166 | 167 | # If true, SmartyPants will be used to convert quotes and dashes to 168 | # typographically correct entities. 169 | #html_use_smartypants = True 170 | 171 | # Custom sidebar templates, maps document names to template names. 172 | #html_sidebars = {} 173 | 174 | # Additional templates that should be rendered to pages, maps page names to 175 | # template names. 176 | #html_additional_pages = {} 177 | 178 | # If false, no module index is generated. 179 | #html_domain_indices = True 180 | 181 | # If false, no index is generated. 182 | #html_use_index = True 183 | 184 | # If true, the index is split into individual pages for each letter. 185 | #html_split_index = False 186 | 187 | # If true, links to the reST sources are added to the pages. 188 | #html_show_sourcelink = True 189 | 190 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. 191 | #html_show_sphinx = True 192 | 193 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. 194 | #html_show_copyright = True 195 | 196 | # If true, an OpenSearch description file will be output, and all pages will 197 | # contain a tag referring to it. The value of this option must be the 198 | # base URL from which the finished HTML is served. 199 | #html_use_opensearch = '' 200 | 201 | # This is the file name suffix for HTML files (e.g. ".xhtml"). 202 | #html_file_suffix = None 203 | 204 | # Language to be used for generating the HTML full-text search index. 205 | # Sphinx supports the following languages: 206 | # 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' 207 | # 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr' 208 | #html_search_language = 'en' 209 | 210 | # A dictionary with options for the search language support, empty by default. 211 | # Now only 'ja' uses this config value 212 | #html_search_options = {'type': 'default'} 213 | 214 | # The name of a javascript file (relative to the configuration directory) that 215 | # implements a search results scorer. If empty, the default will be used. 216 | #html_search_scorer = 'scorer.js' 217 | 218 | # Output file base name for HTML help builder. 219 | htmlhelp_basename = 'AeroPydoc' 220 | 221 | # -- Options for LaTeX output --------------------------------------------- 222 | 223 | latex_elements = { 224 | # The paper size ('letterpaper' or 'a4paper'). 225 | #'papersize': 'letterpaper', 226 | 227 | # The font size ('10pt', '11pt' or '12pt'). 228 | #'pointsize': '10pt', 229 | 230 | # Additional stuff for the LaTeX preamble. 231 | #'preamble': '', 232 | 233 | # Latex figure (float) alignment 234 | #'figure_align': 'htbp', 235 | } 236 | 237 | # Grouping the document tree into LaTeX files. List of tuples 238 | # (source start file, target name, title, 239 | # author, documentclass [howto, manual, or own class]). 240 | latex_documents = [ 241 | (master_doc, 'AeroPy.tex', u'AeroPy Documentation', 242 | u'Pedro Leal', 'manual'), 243 | ] 244 | 245 | # The name of an image file (relative to this directory) to place at the top of 246 | # the title page. 247 | #latex_logo = None 248 | 249 | # For "manual" documents, if this is true, then toplevel headings are parts, 250 | # not chapters. 251 | #latex_use_parts = False 252 | 253 | # If true, show page references after internal links. 254 | #latex_show_pagerefs = False 255 | 256 | # If true, show URL addresses after external links. 257 | #latex_show_urls = False 258 | 259 | # Documents to append as an appendix to all manuals. 260 | #latex_appendices = [] 261 | 262 | # If false, no module index is generated. 263 | #latex_domain_indices = True 264 | 265 | 266 | # -- Options for manual page output --------------------------------------- 267 | 268 | # One entry per manual page. List of tuples 269 | # (source start file, name, description, authors, manual section). 270 | man_pages = [ 271 | (master_doc, 'aeropy', u'AeroPy Documentation', 272 | [author], 1) 273 | ] 274 | 275 | # If true, show URL addresses after external links. 276 | #man_show_urls = False 277 | 278 | 279 | # -- Options for Texinfo output ------------------------------------------- 280 | 281 | # Grouping the document tree into Texinfo files. List of tuples 282 | # (source start file, target name, title, author, 283 | # dir menu entry, description, category) 284 | texinfo_documents = [ 285 | (master_doc, 'AeroPy', u'AeroPy Documentation', 286 | author, 'AeroPy', 'One line description of project.', 287 | 'Miscellaneous'), 288 | ] 289 | 290 | # Documents to append as an appendix to all manuals. 291 | #texinfo_appendices = [] 292 | 293 | # If false, no module index is generated. 294 | #texinfo_domain_indices = True 295 | 296 | # How to display URL addresses: 'footnote', 'no', or 'inline'. 297 | #texinfo_show_urls = 'footnote' 298 | 299 | # If true, do not generate a @detailmenu in the "Top" node's menu. 300 | #texinfo_no_detailmenu = False 301 | 302 | 303 | # Example configuration for intersphinx: refer to the Python standard library. 304 | intersphinx_mapping = {'https://docs.python.org/': None} 305 | 306 | # For importing C dependent Libraries 307 | class m_Mock(Mock): 308 | @classmethod 309 | def __getattr__(cls, name): 310 | return m_Mock() 311 | 312 | MOCK_MODULES = ['numpy'] #'pygtk', 'gtk', 'gobject', 'argparse', 'numpy', 'pandas' 313 | sys.modules.update((mod_name, m_Mock()) for mod_name in MOCK_MODULES) 314 | -------------------------------------------------------------------------------- /AeroPy.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Sun Aug 16 20:59:22 2015 4 | 5 | @author: Pedro 6 | """ 7 | import aero_module as ar 8 | import xfoil_module as xf 9 | import airfoil_module as af 10 | 11 | def find_3D_coefficients(airfoil, alpha, Reynolds=0, iteration=10, NACA=True, 12 | N=10, span=10., taper=1., chord_root=1, alpha_root=1., 13 | velocity=1.): 14 | """ Calculate the 3D distribution using the Lifting Line Theory. 15 | 16 | :param airfoil: if NACA is false, airfoil is the name of the plain 17 | filewhere the airfoil geometry is stored (variable airfoil). 18 | If NACA is True, airfoil is the naca series of the airfoil 19 | (i.e.: naca2244). By default NACA is False. 20 | 21 | :param Reynolds: Reynolds number in case the simulation is for a 22 | viscous flow. In case not informed, the code will assume 23 | inviscid. (Use the aero_module function to calculate reynolds) 24 | 25 | :param alpha: list/array/float/int of angles of attack. 26 | 27 | :param iteration: changes how many times XFOIL will try to make the 28 | results converge. Specialy important for viscous flows 29 | 30 | :param NACA: Boolean variable that defines if the code imports an 31 | airfoil from a file or generates a NACA airfoil. 32 | 33 | :param N: number of cross sections on the wing 34 | 35 | :param span: span in meters 36 | 37 | :param taper: unidimendional taper (This options is still not 100% 38 | operational) 39 | 40 | :param chord_root: value of the chord at the the root 41 | 42 | :param alpha_root: angle of attack of the chord at the root (degrees) 43 | 44 | :param velocity: velocity in m/s 45 | 46 | """ 47 | coefficients = xf.find_coefficients(airfoil, alpha, Reynolds, iteration, 48 | NACA) 49 | alpha_L_0_root = xf.find_alpha_L_0(airfoil, Reynolds, iteration, NACA) 50 | return ar.LLT_calculator(alpha_L_0_root, coefficients['CD'], N, span, taper, chord_root, 51 | alpha_root, velocity) 52 | 53 | def calculate_flap_moment(x, y, alpha, x_hinge, deflection, 54 | unit_deflection = 'rad'): 55 | """For a given airfoil with coordinates x and y at angle of attack 56 | alpha (degrees), calculate the moment coefficient around the joint at x_hinge 57 | and deflection in radians (unit_deflection = 'rad') or degrees 58 | (unit_deflection = 'deg')""" 59 | 60 | # If x and y are not dictionaries with keys upper and lower, make them 61 | # be so 62 | if type(x) == list: 63 | x, y = af.separate_upper_lower(x, y) 64 | #Because parts of the program use keys 'u' and 'l', and other parts use 65 | #'upper' and 'lower' 66 | if 'u' in x.keys(): 67 | upper = {'x': x['u'], 'y': y['u']} 68 | lower = {'x': x['l'], 'y': y['l']} 69 | elif 'upper' in x.keys(): 70 | upper = {'x': x['upper'], 'y': y['upper']} 71 | lower = {'x': x['lower'], 'y': y['lower']} 72 | 73 | hinge = af.find_hinge(x_hinge, upper, lower) 74 | 75 | if deflection > 0: 76 | upper_static, upper_flap = af.find_flap(upper, hinge) 77 | lower_static, lower_flap = af.find_flap(lower, hinge, 78 | extra_points = 'lower') 79 | elif deflection < 0: 80 | upper_static, upper_flap = af.find_flap(upper, hinge, 81 | extra_points = 'upper') 82 | lower_static, lower_flap = af.find_flap(lower, hinge) 83 | else: 84 | upper_static, upper_flap = af.find_flap(upper, hinge, 85 | extra_points = None) 86 | lower_static, lower_flap = af.find_flap(lower, hinge, 87 | extra_points = None) 88 | 89 | upper_rotated, lower_rotated = af.rotate(upper_flap, lower_flap, 90 | hinge, deflection, 91 | unit_theta = unit_deflection) 92 | 93 | flapped_airfoil, i_separator = af.clean(upper_static, upper_rotated, lower_static, 94 | lower_rotated, hinge, deflection, N = None, 95 | return_flap_i = True) 96 | 97 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 98 | #Third step: get new values of pressure coefficient 99 | xf.create_input(x = flapped_airfoil['x'], y_u = flapped_airfoil['y'], 100 | filename = 'flapped', different_x_upper_lower = True) 101 | 102 | Data = xf.find_pressure_coefficients('flapped', alpha, NACA = False) 103 | 104 | 105 | x, y, Cp = af.separate_upper_lower(x = Data['x'], y = Data['y'], 106 | Cp = Data['Cp'], i_separator = i_separator) 107 | 108 | #At the hinges, the reaction moment has the opposite sign of the 109 | #actuated torque 110 | Cm = - ar.calculate_moment_coefficient(x, y, Cp, alpha = alpha, c = 1., 111 | x_ref = x_hinge, y_ref = 0., 112 | flap = True) 113 | return Cm 114 | 115 | def calculate_flap_coefficients(x, y, alpha, x_hinge, deflection, Reynolds = 0,): 116 | """For a given airfoil with coordinates x and y at angle of attack 117 | alpha, calculate the moment coefficient around the joint at x_hinge 118 | and deflection """ 119 | 120 | def separate_upper_lower(x, y, Cp = None, i_separator=None): 121 | """Return dictionaries with upper and lower keys with respective 122 | coordiantes. It is assumed the leading edge is frontmost point at 123 | alpha=0""" 124 | #TODO: when using list generated by xfoil, there are two points for 125 | #the leading edge 126 | def separate(variable_list, i_separator): 127 | if type(i_separator) == int: 128 | variable_dictionary = {'upper': variable_list[0:i_separator+1], 129 | 'lower': variable_list[i_separator+1:]} 130 | elif type(i_separator) == list: 131 | i_upper = i_separator[0] 132 | i_lower = i_separator[1] 133 | 134 | variable_dictionary = {'upper': variable_list[0:i_upper], 135 | 'lower': variable_list[i_lower:]} 136 | return variable_dictionary 137 | #If i is not defined, separate upper and lower surface from the 138 | # leading edge 139 | if i_separator == None: 140 | i_separator = x.index(min(x)) 141 | 142 | if Cp == None: 143 | x = separate(x, i_separator) 144 | y = separate(y, i_separator) 145 | return x, y 146 | else: 147 | x = separate(x, i_separator) 148 | y = separate(y, i_separator) 149 | Cp = separate(Cp, i_separator) 150 | return x, y, Cp 151 | # If x and y are not dictionaries with keys upper and lower, make them 152 | # be so 153 | if type(x) == list: 154 | x, y = separate_upper_lower(x, y) 155 | 156 | upper = {'x': x['upper'], 'y': y['upper']} 157 | lower = {'x': x['lower'], 'y': y['lower']} 158 | 159 | #Determining hinge 160 | hinge = af.find_hinge(x_hinge, upper, lower) 161 | 162 | upper_static, upper_flap = af.find_flap(upper, hinge) 163 | lower_static, lower_flap = af.find_flap(lower, hinge, lower = True) 164 | 165 | upper_rotated, lower_rotated = af.rotate(upper_flap, lower_flap, hinge, deflection) 166 | 167 | flapped_airfoil, i_separator = af.clean(upper_static, upper_rotated, lower_static, 168 | lower_rotated, hinge, deflection, N = 5, 169 | return_flap_i = True) 170 | 171 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 172 | #Third step: get new values of pressure coefficient 173 | xf.create_input(x = flapped_airfoil['x'], y_u = flapped_airfoil['y'], 174 | filename = 'flapped', different_x_upper_lower = True) 175 | Data = xf.find_coefficients('flapped', alpha, NACA = False, 176 | Reynolds = Reynolds, iteration=500) 177 | 178 | return Data 179 | 180 | 181 | if __name__ == '__main__': 182 | 183 | import numpy as np 184 | import matplotlib.pyplot as plt 185 | import math 186 | 187 | # print find_3D_coefficients(airfoil='naca0012', alpha=1.) 188 | alpha = 0. 189 | x_hinge = 0.25/0.6175 190 | deflection = -math.pi/2. #0.17453292519943295 #0.0010573527055 191 | 192 | # generate original airfoil 193 | airfoil = "naca0012" 194 | xf.call(airfoil, output='Coordinates') 195 | filename = xf.file_name(airfoil, output='Coordinates') 196 | Data = xf.output_reader(filename, output='Coordinates', header = ['x','y']) 197 | 198 | Cm = calculate_flap_moment(Data['x'], Data['y'], alpha, x_hinge, deflection) 199 | 200 | 201 | V = 10 202 | altitude = 10000 #feet 203 | 204 | Reynolds = ar.Reynolds(altitude, V, 1.0) 205 | 206 | deflection_list = list(np.linspace(5,30,4)) 207 | alpha_list = list(np.linspace(0,15,20)) 208 | 209 | # Calculate coefficients for without flap 210 | CL_list = [] 211 | CD_list = [] 212 | ratio_list = [] 213 | CM_list = [] 214 | 215 | for alpha_i in alpha_list: 216 | Data_0 = xf.find_coefficients('naca0012', alpha_i, Reynolds = Reynolds, 217 | iteration = 200) 218 | CL_list.append(Data_0['CL']) 219 | CD_list.append(Data_0['CD']) 220 | ratio_list.append(Data_0['CL']/Data_0['CD']) 221 | CM_list.append(Data_0['CM']) 222 | All_data = {0:{r'$c_m$': CM_list, r'$c_l$':CL_list, 223 | r'$c_d$': CD_list, 224 | r'$c_l/c_d$': ratio_list}}#:Data_0['CL']/Data_0['CD']}} 225 | 226 | # Calculate foeccifient when using flap 227 | for deflection_i in deflection_list: 228 | CL_list = [] 229 | CD_list = [] 230 | ratio_list = [] 231 | CM_list = [] 232 | for alpha_i in alpha_list: 233 | flap_data = calculate_flap_coefficients(Data['x'], Data['y'], alpha_i, x_hinge, 234 | deflection_i, Reynolds = Reynolds) 235 | CL_list.append(flap_data['CL']) 236 | CD_list.append(flap_data['CD']) 237 | ratio_list.append(flap_data['CL']/flap_data['CD']) 238 | CM_list.append(flap_data['CM']) 239 | All_data[deflection_i] = {r'$c_m$' : CM_list, r'$c_l$': CL_list, 240 | r'$c_d$' : CD_list, r'$c_l/c_d$': ratio_list} 241 | for key in [r'$c_m$', r'$c_l$', r'$c_d$', r'$c_l/c_d$']: 242 | plt.figure() 243 | for deflection_i in [0] + deflection_list: 244 | plt.plot(alpha_list, All_data[deflection_i][key], label = r'$\theta$ = %.0f' % deflection_i) 245 | plt.legend(loc = "best") 246 | plt.xlabel(r'$\alpha$', fontsize = 22) 247 | plt.ylabel(key, fontsize = 22) 248 | plt.grid() 249 | 250 | plt.figure() 251 | for deflection_i in [0] + deflection_list: 252 | plt.plot(All_data[deflection_i][r'$c_d$'], 253 | All_data[deflection_i][r'$c_l$'], 254 | label = r'$\theta$ = %.0f' % deflection_i) 255 | plt.legend(loc = "best") 256 | plt.xlabel(r'$c_d$', fontsize = 22) 257 | plt.ylabel(r'$c_l$', fontsize = 22) 258 | plt.grid() 259 | -------------------------------------------------------------------------------- /docs/_build/html/_static/underscore.js: -------------------------------------------------------------------------------- 1 | // Underscore.js 1.3.1 2 | // (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc. 3 | // Underscore is freely distributable under the MIT license. 4 | // Portions of Underscore are inspired or borrowed from Prototype, 5 | // Oliver Steele's Functional, and John Resig's Micro-Templating. 6 | // For all details and documentation: 7 | // http://documentcloud.github.com/underscore 8 | (function(){function q(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)return a===c;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return false;switch(e){case "[object String]":return a==String(c);case "[object Number]":return a!=+a?c!=+c:a==0?1/a==1/c:a==+c;case "[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source== 9 | c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if(typeof a!="object"||typeof c!="object")return false;for(var f=d.length;f--;)if(d[f]==a)return true;d.push(a);var f=0,g=true;if(e=="[object Array]"){if(f=a.length,g=f==c.length)for(;f--;)if(!(g=f in a==f in c&&q(a[f],c[f],d)))break}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return false;for(var h in a)if(b.has(a,h)&&(f++,!(g=b.has(c,h)&&q(a[h],c[h],d))))break;if(g){for(h in c)if(b.has(c, 10 | h)&&!f--)break;g=!f}}d.pop();return g}var r=this,G=r._,n={},k=Array.prototype,o=Object.prototype,i=k.slice,H=k.unshift,l=o.toString,I=o.hasOwnProperty,w=k.forEach,x=k.map,y=k.reduce,z=k.reduceRight,A=k.filter,B=k.every,C=k.some,p=k.indexOf,D=k.lastIndexOf,o=Array.isArray,J=Object.keys,s=Function.prototype.bind,b=function(a){return new m(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=b;exports._=b}else r._=b;b.VERSION="1.3.1";var j=b.each= 11 | b.forEach=function(a,c,d){if(a!=null)if(w&&a.forEach===w)a.forEach(c,d);else if(a.length===+a.length)for(var e=0,f=a.length;e2;a== 12 | null&&(a=[]);if(y&&a.reduce===y)return e&&(c=b.bind(c,e)),f?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){f?d=c.call(e,d,a,b,i):(d=a,f=true)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(z&&a.reduceRight===z)return e&&(c=b.bind(c,e)),f?a.reduceRight(c,d):a.reduceRight(c);var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect= 13 | function(a,c,b){var e;E(a,function(a,g,h){if(c.call(b,a,g,h))return e=a,true});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(A&&a.filter===A)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(B&&a.every===B)return a.every(c,b);j(a,function(a,g,h){if(!(e= 14 | e&&c.call(b,a,g,h)))return n});return e};var E=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(C&&a.some===C)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return n});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;return p&&a.indexOf===p?a.indexOf(c)!=-1:b=E(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck= 15 | function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;bd?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a, 17 | c,d){d||(d=b.identity);for(var e=0,f=a.length;e>1;d(a[g])=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1));return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e=0;d--)b=[a[d].apply(this,b)];return b[0]}}; 24 | b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=J||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};b.defaults=function(a){j(i.call(arguments, 25 | 1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return q(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=o||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)}; 26 | b.isArguments=function(a){return l.call(a)=="[object Arguments]"};if(!b.isArguments(arguments))b.isArguments=function(a){return!(!a||!b.has(a,"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"}; 27 | b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a,b){return I.call(a,b)};b.noConflict=function(){r._=G;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};b.mixin=function(a){j(b.functions(a), 28 | function(c){K(c,b[c]=a[c])})};var L=0;b.uniqueId=function(a){var b=L++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var t=/.^/,u=function(a){return a.replace(/\\\\/g,"\\").replace(/\\'/g,"'")};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape||t,function(a,b){return"',_.escape("+ 29 | u(b)+"),'"}).replace(d.interpolate||t,function(a,b){return"',"+u(b)+",'"}).replace(d.evaluate||t,function(a,b){return"');"+u(b).replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return c?e(c,b):function(a){return e.call(this,a,b)}};b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var v=function(a,c){return c?b(a).chain():a},K=function(a,c){m.prototype[a]= 30 | function(){var a=i.call(arguments);H.call(a,this._wrapped);return v(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete d[0];return v(d,this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return v(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain= 31 | true;return this};m.prototype.value=function(){return this._wrapped}}).call(this); 32 | -------------------------------------------------------------------------------- /docs/_build/html/_static/alabaster.css: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | @import url("basic.css"); 19 | 20 | /* -- page layout ----------------------------------------------------------- */ 21 | 22 | body { 23 | font-family: 'goudy old style', 'minion pro', 'bell mt', Georgia, 'Hiragino Mincho Pro', serif; 24 | font-size: 17px; 25 | background-color: white; 26 | color: #000; 27 | margin: 0; 28 | padding: 0; 29 | } 30 | 31 | div.document { 32 | width: 940px; 33 | margin: 30px auto 0 auto; 34 | } 35 | 36 | div.documentwrapper { 37 | float: left; 38 | width: 100%; 39 | } 40 | 41 | div.bodywrapper { 42 | margin: 0 0 0 220px; 43 | } 44 | 45 | div.sphinxsidebar { 46 | width: 220px; 47 | } 48 | 49 | hr { 50 | border: 1px solid #B1B4B6; 51 | } 52 | 53 | div.body { 54 | background-color: #ffffff; 55 | color: #3E4349; 56 | padding: 0 30px 0 30px; 57 | } 58 | 59 | div.footer { 60 | width: 940px; 61 | margin: 20px auto 30px auto; 62 | font-size: 14px; 63 | color: #888; 64 | text-align: right; 65 | } 66 | 67 | div.footer a { 68 | color: #888; 69 | } 70 | 71 | 72 | div.relations { 73 | display: none; 74 | } 75 | 76 | 77 | div.sphinxsidebar a { 78 | color: #444; 79 | text-decoration: none; 80 | border-bottom: 1px dotted #999; 81 | } 82 | 83 | div.sphinxsidebar a:hover { 84 | border-bottom: 1px solid #999; 85 | } 86 | 87 | div.sphinxsidebar { 88 | font-size: 14px; 89 | line-height: 1.5; 90 | } 91 | 92 | div.sphinxsidebarwrapper { 93 | padding: 18px 10px; 94 | } 95 | 96 | div.sphinxsidebarwrapper p.logo { 97 | padding: 0; 98 | margin: -10px 0 0 0px; 99 | text-align: center; 100 | } 101 | 102 | div.sphinxsidebarwrapper h1.logo { 103 | margin-top: -10px; 104 | text-align: center; 105 | margin-bottom: 5px; 106 | text-align: left; 107 | } 108 | 109 | div.sphinxsidebarwrapper h1.logo-name { 110 | margin-top: 0px; 111 | } 112 | 113 | div.sphinxsidebarwrapper p.blurb { 114 | margin-top: 0; 115 | font-style: normal; 116 | } 117 | 118 | div.sphinxsidebar h3, 119 | div.sphinxsidebar h4 { 120 | font-family: 'Garamond', 'Georgia', serif; 121 | color: #444; 122 | font-size: 24px; 123 | font-weight: normal; 124 | margin: 0 0 5px 0; 125 | padding: 0; 126 | } 127 | 128 | div.sphinxsidebar h4 { 129 | font-size: 20px; 130 | } 131 | 132 | div.sphinxsidebar h3 a { 133 | color: #444; 134 | } 135 | 136 | div.sphinxsidebar p.logo a, 137 | div.sphinxsidebar h3 a, 138 | div.sphinxsidebar p.logo a:hover, 139 | div.sphinxsidebar h3 a:hover { 140 | border: none; 141 | } 142 | 143 | div.sphinxsidebar p { 144 | color: #555; 145 | margin: 10px 0; 146 | } 147 | 148 | div.sphinxsidebar ul { 149 | margin: 10px 0; 150 | padding: 0; 151 | color: #000; 152 | } 153 | 154 | div.sphinxsidebar ul li.toctree-l1 > a { 155 | font-size: 120%; 156 | } 157 | 158 | div.sphinxsidebar ul li.toctree-l2 > a { 159 | font-size: 110%; 160 | } 161 | 162 | div.sphinxsidebar input { 163 | border: 1px solid #CCC; 164 | font-family: 'goudy old style', 'minion pro', 'bell mt', Georgia, 'Hiragino Mincho Pro', serif; 165 | font-size: 1em; 166 | } 167 | 168 | div.sphinxsidebar hr { 169 | border: none; 170 | height: 1px; 171 | color: #999; 172 | background: #999; 173 | 174 | text-align: left; 175 | margin-left: 0; 176 | width: 50%; 177 | } 178 | 179 | /* -- body styles ----------------------------------------------------------- */ 180 | 181 | a { 182 | color: #004B6B; 183 | text-decoration: underline; 184 | } 185 | 186 | a:hover { 187 | color: #6D4100; 188 | text-decoration: underline; 189 | } 190 | 191 | div.body h1, 192 | div.body h2, 193 | div.body h3, 194 | div.body h4, 195 | div.body h5, 196 | div.body h6 { 197 | font-family: 'Garamond', 'Georgia', serif; 198 | font-weight: normal; 199 | margin: 30px 0px 10px 0px; 200 | padding: 0; 201 | } 202 | 203 | div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; } 204 | div.body h2 { font-size: 180%; } 205 | div.body h3 { font-size: 150%; } 206 | div.body h4 { font-size: 130%; } 207 | div.body h5 { font-size: 100%; } 208 | div.body h6 { font-size: 100%; } 209 | 210 | a.headerlink { 211 | color: #DDD; 212 | padding: 0 4px; 213 | text-decoration: none; 214 | } 215 | 216 | a.headerlink:hover { 217 | color: #444; 218 | background: #EAEAEA; 219 | } 220 | 221 | div.body p, div.body dd, div.body li { 222 | line-height: 1.4em; 223 | } 224 | 225 | div.admonition { 226 | margin: 20px 0px; 227 | padding: 10px 30px; 228 | background-color: #FCC; 229 | border: 1px solid #FAA; 230 | } 231 | 232 | div.admonition tt.xref, div.admonition a tt { 233 | border-bottom: 1px solid #fafafa; 234 | } 235 | 236 | dd div.admonition { 237 | margin-left: -60px; 238 | padding-left: 60px; 239 | } 240 | 241 | div.admonition p.admonition-title { 242 | font-family: 'Garamond', 'Georgia', serif; 243 | font-weight: normal; 244 | font-size: 24px; 245 | margin: 0 0 10px 0; 246 | padding: 0; 247 | line-height: 1; 248 | } 249 | 250 | div.admonition p.last { 251 | margin-bottom: 0; 252 | } 253 | 254 | div.highlight { 255 | background-color: white; 256 | } 257 | 258 | dt:target, .highlight { 259 | background: #FAF3E8; 260 | } 261 | 262 | div.note { 263 | background-color: #EEE; 264 | border: 1px solid #CCC; 265 | } 266 | 267 | div.seealso { 268 | background-color: #EEE; 269 | border: 1px solid #CCC; 270 | } 271 | 272 | div.topic { 273 | background-color: #eee; 274 | } 275 | 276 | p.admonition-title { 277 | display: inline; 278 | } 279 | 280 | p.admonition-title:after { 281 | content: ":"; 282 | } 283 | 284 | pre, tt, code { 285 | font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; 286 | font-size: 0.9em; 287 | } 288 | 289 | .hll { 290 | background-color: #FFC; 291 | margin: 0 -12px; 292 | padding: 0 12px; 293 | display: block; 294 | } 295 | 296 | img.screenshot { 297 | } 298 | 299 | tt.descname, tt.descclassname, code.descname, code.descclassname { 300 | font-size: 0.95em; 301 | } 302 | 303 | tt.descname, code.descname { 304 | padding-right: 0.08em; 305 | } 306 | 307 | img.screenshot { 308 | -moz-box-shadow: 2px 2px 4px #eee; 309 | -webkit-box-shadow: 2px 2px 4px #eee; 310 | box-shadow: 2px 2px 4px #eee; 311 | } 312 | 313 | table.docutils { 314 | border: 1px solid #888; 315 | -moz-box-shadow: 2px 2px 4px #eee; 316 | -webkit-box-shadow: 2px 2px 4px #eee; 317 | box-shadow: 2px 2px 4px #eee; 318 | } 319 | 320 | table.docutils td, table.docutils th { 321 | border: 1px solid #888; 322 | padding: 0.25em 0.7em; 323 | } 324 | 325 | table.field-list, table.footnote { 326 | border: none; 327 | -moz-box-shadow: none; 328 | -webkit-box-shadow: none; 329 | box-shadow: none; 330 | } 331 | 332 | table.footnote { 333 | margin: 15px 0; 334 | width: 100%; 335 | border: 1px solid #EEE; 336 | background: #FDFDFD; 337 | font-size: 0.9em; 338 | } 339 | 340 | table.footnote + table.footnote { 341 | margin-top: -15px; 342 | border-top: none; 343 | } 344 | 345 | table.field-list th { 346 | padding: 0 0.8em 0 0; 347 | } 348 | 349 | table.field-list td { 350 | padding: 0; 351 | } 352 | 353 | table.footnote td.label { 354 | width: 0px; 355 | padding: 0.3em 0 0.3em 0.5em; 356 | } 357 | 358 | table.footnote td { 359 | padding: 0.3em 0.5em; 360 | } 361 | 362 | dl { 363 | margin: 0; 364 | padding: 0; 365 | } 366 | 367 | dl dd { 368 | margin-left: 30px; 369 | } 370 | 371 | blockquote { 372 | margin: 0 0 0 30px; 373 | padding: 0; 374 | } 375 | 376 | ul, ol { 377 | margin: 10px 0 10px 30px; 378 | padding: 0; 379 | } 380 | 381 | pre { 382 | background: #EEE; 383 | padding: 7px 30px; 384 | margin: 15px 0px; 385 | line-height: 1.3em; 386 | } 387 | 388 | dl pre, blockquote pre, li pre { 389 | margin-left: 0; 390 | padding-left: 30px; 391 | } 392 | 393 | dl dl pre { 394 | margin-left: -90px; 395 | padding-left: 90px; 396 | } 397 | 398 | tt, code { 399 | background-color: #ecf0f3; 400 | color: #222; 401 | /* padding: 1px 2px; */ 402 | } 403 | 404 | tt.xref, code.xref, a tt { 405 | background-color: #FBFBFB; 406 | border-bottom: 1px solid white; 407 | } 408 | 409 | a.reference { 410 | text-decoration: none; 411 | border-bottom: 1px dotted #004B6B; 412 | } 413 | 414 | a.reference:hover { 415 | border-bottom: 1px solid #6D4100; 416 | } 417 | 418 | a.footnote-reference { 419 | text-decoration: none; 420 | font-size: 0.7em; 421 | vertical-align: top; 422 | border-bottom: 1px dotted #004B6B; 423 | } 424 | 425 | a.footnote-reference:hover { 426 | border-bottom: 1px solid #6D4100; 427 | } 428 | 429 | a:hover tt, a:hover code { 430 | background: #EEE; 431 | } 432 | 433 | 434 | @media screen and (max-width: 870px) { 435 | 436 | div.sphinxsidebar { 437 | display: none; 438 | } 439 | 440 | div.document { 441 | width: 100%; 442 | 443 | } 444 | 445 | div.documentwrapper { 446 | margin-left: 0; 447 | margin-top: 0; 448 | margin-right: 0; 449 | margin-bottom: 0; 450 | } 451 | 452 | div.bodywrapper { 453 | margin-top: 0; 454 | margin-right: 0; 455 | margin-bottom: 0; 456 | margin-left: 0; 457 | } 458 | 459 | ul { 460 | margin-left: 0; 461 | } 462 | 463 | .document { 464 | width: auto; 465 | } 466 | 467 | .footer { 468 | width: auto; 469 | } 470 | 471 | .bodywrapper { 472 | margin: 0; 473 | } 474 | 475 | .footer { 476 | width: auto; 477 | } 478 | 479 | .github { 480 | display: none; 481 | } 482 | 483 | 484 | 485 | } 486 | 487 | 488 | 489 | @media screen and (max-width: 875px) { 490 | 491 | body { 492 | margin: 0; 493 | padding: 20px 30px; 494 | } 495 | 496 | div.documentwrapper { 497 | float: none; 498 | background: white; 499 | } 500 | 501 | div.sphinxsidebar { 502 | display: block; 503 | float: none; 504 | width: 102.5%; 505 | margin: 50px -30px -20px -30px; 506 | padding: 10px 20px; 507 | background: #333; 508 | color: #FFF; 509 | } 510 | 511 | div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p, 512 | div.sphinxsidebar h3 a { 513 | color: white; 514 | } 515 | 516 | div.sphinxsidebar a { 517 | color: #AAA; 518 | } 519 | 520 | div.sphinxsidebar p.logo { 521 | display: none; 522 | } 523 | 524 | div.document { 525 | width: 100%; 526 | margin: 0; 527 | } 528 | 529 | div.footer { 530 | display: none; 531 | } 532 | 533 | div.bodywrapper { 534 | margin: 0; 535 | } 536 | 537 | div.body { 538 | min-height: 0; 539 | padding: 0; 540 | } 541 | 542 | .rtd_doc_footer { 543 | display: none; 544 | } 545 | 546 | .document { 547 | width: auto; 548 | } 549 | 550 | .footer { 551 | width: auto; 552 | } 553 | 554 | .footer { 555 | width: auto; 556 | } 557 | 558 | .github { 559 | display: none; 560 | } 561 | } 562 | 563 | 564 | /* misc. */ 565 | 566 | .revsys-inline { 567 | display: none!important; 568 | } 569 | 570 | /* Make nested-list/multi-paragraph items look better in Releases changelog 571 | * pages. Without this, docutils' magical list fuckery causes inconsistent 572 | * formatting between different release sub-lists. 573 | */ 574 | div#changelog > div.section > ul > li > p:only-child { 575 | margin-bottom: 0; 576 | } 577 | 578 | /* Hide fugly table cell borders in ..bibliography:: directive output */ 579 | table.docutils.citation, table.docutils.citation td, table.docutils.citation th { 580 | border: none; 581 | /* Below needed in some edge cases; if not applied, bottom shadows appear */ 582 | -moz-box-shadow: none; 583 | -webkit-box-shadow: none; 584 | box-shadow: none; 585 | } --------------------------------------------------------------------------------