Skip to content

Implement support for pygeo and OM wrapper for custom meshes#64

Open
sabakhshi wants to merge 73 commits intojoanibal:mainfrom
sabakhshi:bakhshi_patch8
Open

Implement support for pygeo and OM wrapper for custom meshes#64
sabakhshi wants to merge 73 commits intojoanibal:mainfrom
sabakhshi:bakhshi_patch8

Conversation

@sabakhshi
Copy link
Copy Markdown
Collaborator

@sabakhshi sabakhshi commented Mar 2, 2026

This PR includes support for pygeo FFD parameterization in the OVLSolver class and support for dictionary input/custom meshes in the OM wrapper.

The pygeo api is very easy to use. The user just needs to set up their FFD box and their DVGeo object with all design variables set. Then it's just a matter of setting the DVGeo instance to the OVLSolver object using the set_DVGeo function. To apply any changes made to the DVGeo design variables to the OptVL mesh the update_DVGeo function needs to be called. This will embed any mesh surfaces in the FFD if needed and then perform the pointset update. The updated point set will then be set back into OptVL and the and update surfaces routine called to update the Fortran layer. Currently, OptVL will try to embed all meshes into the same FFD so for now we suggest that FFDs only be used with cases that only have a single mesh surface. A unit test is included for the pyGeo API. A FFD box generator for VLM meshes is also included in utilities.

The OM wrapper can also now be used with meshes and input dictionaries. When a mesh is used for a particular surface all geometry inputs for that surfaces are replaced with a single mesh input. The shape of this mesh input is set by the input_mesh_shape option in the OVLGroup class. Input arrays shapes of 1,2, or 3 dimensions can be chosen with it defaulting to 1 (which is a flat array). This input shape selection allows for wide compatibility with a variety of geometry parameterization components. A unit test for the mesh features in the OM wrapper are also included.

sabakhshi and others added 30 commits October 15, 2025 16:55
… fixed scale and translate of custom meshes not working
…fortran layer indexing bugs. runtime mesh updating still needs to be implemented
@sabakhshi sabakhshi marked this pull request as ready for review April 1, 2026 21:57
@sabakhshi sabakhshi requested a review from joanibal April 1, 2026 21:57
@sabakhshi sabakhshi changed the title Implement support for pygeo Implement support for pygeo and OM wrapper for custom meshes Apr 2, 2026
Copy link
Copy Markdown
Owner

@joanibal joanibal left a comment

Choose a reason for hiding this comment

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

Nice work! Here are a few questions and suggestions

self.set_reference_ad_seeds(ref_seeds)

# Since DVGeo seeds operate entirely within the python layer we set them here
if self.DVGeo is not None and dvgeo_seeds is not None:
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This chunk appears 4 times with some variation. Could we generalize these chunks into a function?

sens[func_key][surf_key] = geom_seeds[surf_key] | mesh_seeds[surf_key]
for key in geom_seeds:
sens[func_key][key] = geom_seeds[key] | mesh_seeds[key] | dvgeo_seeds[key]
# sens[func_key].update(geom_seeds)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

left over comments? or was that intentional

# prob.model.add_design_var("ovlsolver.Wing:zles")
# prob.model.add_design_var("ovlsolver.Wing:chords")
# prob.model.add_design_var("ovlsolver.Wing:mesh") # This is a really costly test
# prob.model.add_design_var("ovlsolver.Wing:aincs") # dCL/dalpha on the first element fails
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Can you explain this comment?

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.

2 participants