Skip to content

Commit

Permalink
CST airfoil parameterization (#141)
Browse files Browse the repository at this point in the history
* Initial CST push, not close to being ready to run/home/eytan/miniconda3/envs/foil/bin/python

* Added tests

* Removed plotting from test

* Ran black

* Parameterized more airfoils in the test

* Added more (and fixed) derivative tests

* First draft of most of the needed functions in DVGeoCST have been added (except derivative stuff)

* Fixed point set so it works with only the points assigned to the current proc

* Added separate N1 and N2 values for upper and lower surfaces and associated DVs

* Added chord DV

* Fixed default DV errors

* Ran black

* First pass (certainly incorrect so far) at derivatives for CST

* Cleaned up a bit and added more (still incorrect) derivatives for use with DVCon...still needs testing and some other TODOs

* Supposedly added CST parameter fitting

* Initialized CST parameter and chord DVs to the fit values

* Added some tests for totalSensitivityProd, still need more for N1 and N2 DVs

* Added TODO for better complex handling

* Much cleaner handling of compelx numbers for derivatives debugging via isComplex in __init__

* Derivatives tests and some related corrections to DVGeoCST

* Fixed bug in trailing edge that messed up derivatives

* Ran black

* Removed old TODO about derivatives with scaling

* Getting there on the fixes, need to figure out how to set the default DVs to the airfoil fit in the pyOpt initialization and fix the bug when there are no DVGeoCST DVs (only alpha) in an opt problem

* All good except initializing optimization problem with fitted CST params

* Changed the interface yet again to take in a dat file, fixes all existing problems

* Added individual xMax, xMin, and thicknessTE to each point set (fixing another bug)

* Added dummy comm to total sensitivities

* Added allreduce to totalSensitivity function

* Added debug mode and plotting

* Ran black and removed unused imports

* fix prefoil import

* Updated prefoil import in DVGeoCST

* Updated imports in test for DVGeometryCST

* Switched airfoil splitting to use preFoil utilities, added printDesignVariables, added new airfoil for testing

* Ran black

* Minor version bump to 1.12.0

* Hoping to assuage our flake8 overlords

* I failed

* Fixed test failures (I hope)

* Added prefoil to autodoc_mock_imports

* Added ESP and CST to the API docs

* Hopefully fixed the math

* Added pyOCSM to autodoc_mock_imports

* Added DVGeometryVSP to the API docs

* Added cstDV

* Sorry black and flake8

* Refined docstrings

* Added more tests

* Fixed some math in docstrings

* More tests

* Fixed the silver baboon

* Credentials no longer required

* No more drivatives

* Addressed most of Anil's comments

* Fixed new flake8 complaint

* Moved number of CST coeffs to init from addDV

* Added improved trailing edge detection to identify non-vertical trailing edges and sharp and closed cases

* Added metric to measure goodness of airfoil CST fit

* Undid change to try to fix flake8

* Modified tolTE input so the angle is provided by the user

* Moved prints only on root and changed upper/lower bound name in addDV

* Perform fit on only one proc and broadcast the result to the rest

* Another attempt to fix flake8

* Ran black

* Improved debug plot so it gathers data into a single plot on the root

* Fixed complex warnings in tests

* Ran black

Co-authored-by: Alasdair Gray <alachris@umich.edu>
  • Loading branch information
eytanadler and A-CGray authored Jul 15, 2022
1 parent c417b0f commit 511e70c
Show file tree
Hide file tree
Showing 17 changed files with 2,711 additions and 4 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ It provides a free form deformation (FFD) based geometry manipulation object, an
## Documentation

Please see the [documentation](https://mdolab-pygeo.readthedocs-hosted.com/en/latest/) for installation details and API documentation.
This link requires credentials currently only available to MDO Lab members.

To locally build the documentation, enter the `doc` folder and enter `make html` in terminal.
You can then view the built documentation in the `_build` folder.
Expand Down
3 changes: 3 additions & 0 deletions doc/API.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ This package consists of the following modules:
DVConstraints
DVGeometry
DVGeometryMulti
DVGeometryESP
DVGeometryVSP
DVGeometryCST
pyNetwork
pyGeo
pyBlock
Expand Down
8 changes: 8 additions & 0 deletions doc/DVGeometryCST.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. _DVGeometryCST:

DVGeometryCST
-------------
.. currentmodule:: pygeo

.. autoclass:: DVGeometryCST
:members:
8 changes: 8 additions & 0 deletions doc/DVGeometryESP.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. _DVGeometryESP:

DVGeometryESP
-------------
.. currentmodule:: pygeo

.. autoclass:: DVGeometryESP
:members:
8 changes: 8 additions & 0 deletions doc/DVGeometryVSP.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. _DVGeometryVSP:

DVGeometryVSP
-------------
.. currentmodule:: pygeo

.. autoclass:: DVGeometryVSP
:members:
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
extensions.extend(["numpydoc"])

# mock import for autodoc
autodoc_mock_imports = ["numpy", "mpi4py", "scipy", "pyspline", "baseclasses", "pysurf"]
autodoc_mock_imports = ["numpy", "mpi4py", "scipy", "pyspline", "baseclasses", "pysurf", "prefoil", "pyOCSM"]
3 changes: 2 additions & 1 deletion pygeo/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
__version__ = "1.11.2"
__version__ = "1.12.0"

from .pyNetwork import pyNetwork
from .pyGeo import pyGeo
from .pyBlock import pyBlock
from .constraints import DVConstraints
from .parameterization import DVGeometry
from .parameterization import DVGeometryAxi
from .parameterization import DVGeometryCST

try:
from .parameterization import DVGeometryVSP
Expand Down
Loading

0 comments on commit 511e70c

Please sign in to comment.