mdolab / pygeo

pyGeo provides geometric design variables and constraints suitable for gradient-based optimization.
https://mdolab-pygeo.readthedocs-hosted.com/en/latest/?badge=latest
Apache License 2.0
131 stars 55 forks source link

Changed projectNode to work with overset surface triangulations #186

Closed bmlowe4 closed 2 months ago

bmlowe4 commented 1 year ago

Purpose

A few lines of code were added to account for the direction of the projection in projectNode (projection.py) when nsol>2. The use of overset surface meshes can lead to more than 2 resulting projections. This addesses the issue of which projected point to choose.

Expected time until merged

A few weeks

Type of change

Testing

Create a volume and/or thickness constraint with a surface triangulation composed of overlapping meshes.

Checklist

codecov[bot] commented 1 year ago

Codecov Report

Attention: Patch coverage is 11.11111% with 96 lines in your changes missing coverage. Please review.

Project coverage is 64.89%. Comparing base (3404b51) to head (5a48cb7). Report is 1 commits behind head on main.

Files Patch % Lines
pygeo/constraints/thicknessConstraint.py 8.92% 51 Missing :warning:
pygeo/constraints/DVCon.py 2.50% 39 Missing :warning:
pygeo/geo_utils/projection.py 0.00% 4 Missing :warning:
pygeo/parameterization/DVGeoMulti.py 75.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #186 +/- ## ========================================== - Coverage 65.47% 64.89% -0.59% ========================================== Files 47 47 Lines 12265 12387 +122 ========================================== + Hits 8030 8038 +8 - Misses 4235 4349 +114 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

anilyil commented 1 year ago

Hi @bmlowe4, I did not fully understand how the overset mesh is resulting in 3 ray-intersections. If you are using a zipper mesh to remove overlapping compute cells, and if the zipper mesh is done well so that it does not fold on itself, I would have expected only 2 intersections. So this leads me to think that the overset mesh you have either does not remove overlapping cells or there are issues with the zipper. Any chance you can explain your application further so I can understand it better?

bmlowe4 commented 1 year ago

Hey, sorry, this got put on the back burner behind some other projects.

@anilyil the CFD code we are using does not use a zipper mesh, hence our resulting surface triangulation has overlapping meshes. It is simpler to fix the node projection in DVConstraint than it is to remove the overlap in the surface triangulation. This makes the node projection algorithm more general unless you expect the two surfaces onto which you want to project to be both below or above the original plane. I don't think this will be the case based on the requirements that leList and teList be inside the wing/geometry.

@sseraj I will work on a test for this. Apologies for the delay

anilyil commented 1 year ago

Okay, understood. Then, I am fine with the PR after @sseraj's comments are addressed. Thanks for the explanation.

sseraj commented 1 year ago

Any updates on this @bmlowe4?

sseraj commented 1 year ago

Hi @bmlowe4, I wanted to check on this PR again. Any updates?

sseraj commented 2 months ago

I think we should close this PR. The incoming branch now has multiple disjoint developments.

bmlowe4 commented 2 months ago

Closed. Will continue development independently.