mdolab / mdolab/OpenAeroStruct
Taper Function, Problems when mesh has offset
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 281
- Forks
- 135
- PR merge metrics
- No merged PRs in 30d
Description
Description
In the openaerostruct/geometry/utils.py module the Taper Function, taper, that is implemented produces wrong results when the mesh has an offset in the y (spanwise) direction.
Steps to reproduce issue
- Use the generate_mesh function available in the same module to produce a rectangular wing with an offset in the y direction:
from openaerostruct.geometry.utils import (
generate_mesh,
taper
)
mesh_dict = {'num_y' : num_y_outboard,
'num_x' : num_x,
'wing_type' : 'rect',
'symmetry' : True,
'span_cos_spacing' : 0.5,
'span' : 2.5,
'root_chord' : 0.399,
'offset' : np.array([0, -0.75, 0])
}
mesh = generate_mesh(mesh_dict)
- Use the taper function to change the geometry of the mesh:
mesh = taper(
mesh=mesh,
taper_ratio=0.55,
symmetry=True
)
Current behavior
mesh[0, -1, 0] returns a value for the x-coordinate of the Leading Edge root different than the original value defined when calling the generate_mesh helper function.
mesh[-1, -1, 0] also returns a different value than previously defined by the generate_function helper function.
Expected behavior
mesh[0, -1, 0] and mesh[0, -1, 0] to return the same value as given by the generate_function helper function.
The x-coordinates of the wing root should be the same after calling the taper function.
Code versions
- Python 3.9.5
- OpenMDAO 3.6.0
- OpenAeroStruct 2.3.0
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in openaerostruct/geometry/utils.py by reproducing the issue with generate_mesh using the y offset, then applying taper with symmetry enabled. Compare the root leading-edge and trailing-edge x-coordinates before and after taper; the work is done when the wing-root x-coordinates remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- Half a day
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100