Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented a multi-section custom mesh generator #422

Draft
wants to merge 26 commits into
base: main
Choose a base branch
from

Conversation

sabakhshi
Copy link

@sabakhshi sabakhshi commented Feb 23, 2024

Purpose

Multi-section custom mesh generator for intuitively defining multi-section wing meshes in terms of taper, root chord, span, and other parameters.

Expected time until merged

This is still a work in progress. I plan to improve the user input style and add support for dihedral. This code will be used later to implement support for multi-section wing geometries OpenMDAO for section optimization, control surfaces, and wing warping. Looking for feedback. The commits should be squashed before merging.

Type of change

This is new feature and is independent from from most of OAS. Will allow users to quickly create a multi-section user specified geometry.

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (non-backwards-compatible fix or feature)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Documentation update
  • Maintenance update
  • Other (please describe)

Testing

Completed the unit and regression test. File contains some built in tests with a few different planforms. Would be interested in a trying a few other platforms.

Checklist

  • I have run flake8 and black to make sure the Python code adheres to PEP-8 and is consistently formatted
  • I have formatted the Fortran code with fprettify or C/C++ code with clang-format as applicable
  • I have run unit and regression tests which pass locally with my changes
  • I have added new tests that prove my fix is effective or that my feature works
  • I have added necessary documentation

Copy link

codecov bot commented Feb 23, 2024

Codecov Report

Attention: Patch coverage is 7.31707% with 266 lines in your changes missing coverage. Please review.

Project coverage is 90.26%. Comparing base (d788e11) to head (f8c2590).
Report is 1 commits behind head on main.

Current head f8c2590 differs from pull request most recent head e38f2b6

Please upload reports for the commit e38f2b6 to get more accurate results.

Files Patch % Lines
openaerostruct/geometry/geometry_multi_sec_mesh.py 5.55% 221 Missing ⚠️
openaerostruct/geometry/geometry_group.py 14.58% 41 Missing ⚠️
openaerostruct/utils/check_surface_dict.py 20.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #422      +/-   ##
==========================================
- Coverage   93.92%   90.26%   -3.67%     
==========================================
  Files         104      105       +1     
  Lines        6472     6748     +276     
==========================================
+ Hits         6079     6091      +12     
- Misses        393      657     +264     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

----------
sections : int
Integer for number of wing sections specified
data : numpy array
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be confusing to put all different parameters into one 2D array. Instead, I'd suggest passing four 1D arrays for taper, root chord, aspect ratio, and LE sweep. They can be put in a dict or passed separately. Ultimately it'd be nice to have the same user interface as the current generate_mesh, which takes all inputs in the mesh_dict, although I don't have a strong preference.

Also, what's the definition of aspect ratio for each section?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. I was thinking about making the input a dictionary like the standard OAS mesh generator. Good idea!

Integer for number of chord-wise panels
symmetry : boolean
Flag set to True if surface is reflected about y=0 plane.
controlPoints: boolean
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are these control points? How are these used in OAS?

Copy link
Author

@sabakhshi sabakhshi Feb 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code is capable of placing control points at the quarter chord which is actually useful for applications where the bound vortex needs to be placed at the leading edge of each panel(i.e vortex lift). I decided to keep the code in and see if anyone else had any feedback or ideas on where it might be useful.

Flag set to True if surface is reflected about y=0 plane.
controlPoints: boolean
Flag set to True if both quarter chord and three-quarter chord control points should be computed
generatePlots: boolean
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of adding a mesh visualizer specific to this multi-section wing, what do you think of adding a plotter that works for any mesh: multi-section, CRM, rectangular wing, or an optimized one. Is there any specific visualization thing for multisection wings? The plotter function would take the OAS's 3D wing array (shape nx, ny, 3), symmetry flag, etc., as inputs.

I previously thought we wouldn't need to add a mesh plotter because that's very simple code, but now I think it'd be nice to add that in openaerostruct/utils and a quick document on that.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could take the code and make it into a standardized mesh plotter. I can even include the ability for it to show the control points, vorticies, and wake rollup.

@kanekosh
Copy link
Contributor

Thanks, @sabakhshi, this is a great addition. Do you plan on adding new OM components to manipulate a multi-section wing for optimization (e.g., we'd define the tapers and ARs for each section as design variables), or would it be enough for your purpose to apply the "global" mesh manipulation OAS currently has to an initial multi-section wing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants