Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mlau154 committed Jan 20, 2024
1 parent 674b891 commit c71a258
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 253 deletions.
5 changes: 0 additions & 5 deletions docs/source/gui.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ This section contains tutorials and helpful hints for the pymead GUI.

.. toctree::

gui_help/gui_airfoil.rst
gui_help/gui_bezier.rst
gui_help/gui_continuity.rst
gui_help/gui_fp.rst
gui_help/gui_ap.rst
gui_help/gui_opt.rst
gui_help/gui_airfoil_matching.rst
gui_help/gui_helpful_hints.rst
117 changes: 0 additions & 117 deletions docs/source/gui_help/gui_ap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,123 +25,6 @@ are also part of the AnchorPoint branch.

Bézier G\ :sup:`2` continuity

The AnchorPoint feature is powerful because it allows for inter- and intra-airfoil
positional constraints at locations other than the leading edge or trailing edge. This is
particularly useful in multi-element airfoil applications with system-level constraints,
such symmmetry, thickness at a point, or distance between two airfoil surface positions.
To insert an AnchorPoint from the GUI, right-click on the desired airfoil in the
Parameter Tree, which brings up a context menu as shown below:


.. figure:: images/fp_ap_menu_dark.*
:align: center
:class: only-dark

Airfoil context menu


.. figure:: images/fp_ap_menu_light.*
:align: center
:class: only-light

Airfoil context menu


After left-clicking on "Add AnchorPoint," the following dialog appears:


.. figure:: images/ap_menu_dark.*
:align: center
:class: only-dark

AnchorPoint menu

.. figure:: images/ap_menu_light.*
:align: center
:class: only-light

AnchorPoint menu

Here is a description of each of the ``AnchorPoint`` menu items:

.. list-table::
:widths: 20 80
:header-rows: 1

* - Item
- Parameter
* - x
- Distance from the origin in the "Geometry" window along the x-axis
* - y
- Distance from the origin in the "Geometry" window along the y-axis
* - L
- Distance between the control points located immediately before and after the ``AnchorPoint``
in the counter-clockwise ordering divided by the chord length of the airfoil.
* - R
- Radius of curvature of the airfoil at the ``AnchorPoint`` divided by the chord length of the
airfoil.
* - r
- Ratio of the distance between the control point immediately upstream of the ``AnchorPoint`` and
the ``AnchorPoint`` itself to the distance between the control points located immediately before
and after the ``AnchorPoint``\ . Here, "upstream" means after the ``AnchorPoint`` in the
counter-clockwise ordering for an ``AnchorPoint`` on the upper surface and before the
``AnchorPoint`` for an ``AnchorPoint`` on the lower surface. This is normally in the
range :math:`[0,1]`; however, this is not enforced.
* - phi
- "Tilt" of the line connecting the control points immediately before and after the ``AnchorPoint``.
Regardless of whether the ``AnchorPoint`` is located on the airfoil upper surface or lower surface,
positive values of "phi" tilt the line toward the leading edge, while negative values of "phi"
tilt the line away from the leading edge.
* - psi1
- Downstream curvature control arm angle. This angle corresponds to the angle :math:`\psi` shown
at the top of this page. This angle takes on the range :math:`(0, \pi)`. When :math:`\psi=0`, the control arm
is collapsed completely inward. When :math:`\psi=\pi`, the control arm is stretched fully
outward relative to the slope control segment. Stretching the curvature control arm past
this angle flips the sign of the radius of curvature.
* - psi2
- Upstream curvature control arm angle. This angle corresponds to the angle :math:`\psi`
closer to the leading edge than the downstream curvature control arm angle. Same range
as psi1.
* - Previous Anchor Point
- Parent ``AnchorPoint`` to which this ``FreePoint`` belongs. More specifically, the ``FreePoint``
will be inserted into the Bézier curve which has this ``AnchorPoint`` as its first ``ControlPoint``
using counter-clockwise ordering. For an airfoil with no custom ``AnchorPoint``\ s, inserting this
``FreePoint`` with the Previous Anchor Point set to ``"te_1"`` corresponds to adding a control
point to the airfoil's upper surface, while inserting a ``FreePoint`` with the
Previous Anchor Point set to ``"le"`` corresponds to adding a control point to the airfoil's
lower surface. Note that ``"te_1"`` represents the upper trailing edge point,
which is distinct from the lower trailing edge point in the case of an airfoil with a blunt
trailing edge.
* - Previous Free Point
- Similar to the "Previous Anchor Point" item, this item sets the ``FreePoint`` insertion index
within the Bézier curve's control point matrix using counter-clockwise ordering. The
difference here is that an existing ``FreePoint`` is specified, rather than an ``AnchorPoint``.
Note that if no ``FreePoint``\ s have been added yet to the Bézier curve corresponding to the
``AnchorPoint`` specified by "Previous Anchor Point", ``None`` is automatically selected.
* - Anchor Point Name
- Tag for the AnchorPoint. Must not be blank and must not match any another AnchorPoint name in
the current airfoil.


The image below shows the default airfoil with an anchor point inserted. The values corresponding
to the items in the table are shown in the Parameter Tree on the left of the image. Note that
the airfoil is now comprised of three Bézier curves (rather than two), and the Bézier curves
pass directly through the special control points marked by an "x," which correspond to the :math:`(x_0,y_0)`
point as mentioned previously.

.. figure:: images/anchor_point_insertion_dark.*
:align: center
:class: only-dark

FreePoint insertion


.. figure:: images/anchor_point_insertion_light.*
:align: center
:class: only-light

FreePoint insertion


..
This HTML code adds the "only-light" and "only-dark" class to the parent figures of
Expand Down
103 changes: 0 additions & 103 deletions docs/source/gui_help/gui_fp.rst

This file was deleted.

43 changes: 16 additions & 27 deletions docs/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,6 @@ To accomplish this, first clone the directory using
git clone https://github.com/mlau154/pymead.git
If installing the most recent version of pymead, the branch corresponding to that version must be checked out.
For instance, to checkout version 2.0.0, use

.. code-block::
git checkout v2.0.0
To see all available branches, use

.. code-block::
git branch -a
To pull the latest changes from the repository at some point after installation, use

.. code-block::
Expand All @@ -76,15 +63,9 @@ Python. To check that the installation succeeded, run the following lines of cod

.. code-block:: python
from pymead.core.airfoil import Airfoil
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
a = Airfoil()
a.plot_airfoil(ax)
ax.set_aspect("equal")
plt.show()
import pymead
If the installation was successful, an airfoil will appear on the screen.
If the installation was successful, no errors will be thrown.

Dependencies
============
Expand All @@ -93,22 +74,30 @@ Required
--------

Each of the following dependencies are required to use pymead. All packages listed in this section are automatically
installed when using ``pip install pymead``. Alternatively, if cloning from the
`pymead GitHub repo <https://github.com/mlau154/pymead>`_, these requirements can be installed using the included
``requirements.txt`` file.
installed when using Methods 1, 2, or 3 above. If using Method 4, the line ``pip install .`` installs these
dependencies.

- `scipy <https://scipy.org/>`_: Used for airfoil matching
- `numpy <https://numpy.org/>`_: Used for linear algebra and random numbers
- `numpy <https://numpy.org/>`_: Used for math, vector, and matrix computations
- `shapely <https://shapely.readthedocs.io/en/stable/>`_: Computational geometry
- `matplotlib <https://matplotlib.org/>`_: Static plotting
- `requests <https://requests.readthedocs.io/en/latest/>`_: Downloading airfoil coordinate sets
from `Airfoil Tools <http://airfoiltools.com/>`_
- `PyQt5 <https://pypi.org/project/PyQt5/>`_: Graphical User Interface (GUI)
- `pyqtgraph <https://www.pyqtgraph.org/>`_: Interactive plotting and parameter trees
- `pyqtgraph <https://www.pyqtgraph.org/>`_: Interactive plots
- `python-benedict <https://pypi.org/project/python-benedict/>`_: Dictionary utilities
- `pandas <https://pandas.pydata.org/>`_: Data structures
- `pymoo <https://pymoo.org/>`_: Aerodynamic shape optimization
- `pymoo <https://pymoo.org/>`_: Genetic algorithms used for aerodynamic shape optimization
- `numba <https://numba.pydata.org/>`_: Speed-up of inviscid lift coefficient calculation
- `PyQtWebEngine <https://pypi.org/project/PyQtWebEngine/>`_: Internal GUI web-based help browser
- `cmcrameri <https://www.fabiocrameri.ch/colourmaps/>`_: Perceptually uniform, color-vision-deficiency friendly color
maps by Fabio Crameri (used for flow visualization)
- `JAX <https://jax.readthedocs.io/en/latest/>`_: Just-in-time compilation and automatic differentiation of non-linear
systems of geometric constraint equations for dynamic constraint editing
- `jaxopt <https://jaxopt.github.io/stable/>`_: Root finding of non-linear systems of geometric constraint equations
using JAX's methods for just-in-time compilation and computation of the Jacobian using automatic differentiation
- `networkx <https://networkx.org/documentation/stable/>`_: Analysis of the undirected graph describing the geometric
constraint system

Optional
--------
Expand Down
5 changes: 4 additions & 1 deletion docs/source/todo.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
Developer To-Dos
================

Install
-------
- Add pip install option

Planned feature additions
-------------------------
- Add the ability to fix points
- Add absolute angle constraints
- Add curvature continuity constraints
- Add error handling for over-constrained/Jax shape/no solution in GCS

Refactoring
Expand Down

0 comments on commit c71a258

Please sign in to comment.