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
122 stars 54 forks source link

Is there a way to link design variables of shared nodes in multi block FFDs? #205

Closed arnalj closed 1 year ago

arnalj commented 1 year ago

If an FFD box is composed of multiple blocks with shared nodes, addLocalDV will assign a degree of freedom to each of the shared nodes. Perturbations to the local design variables will thus "break" the connection of the previously shared nodes. It would be useful to assign a single degree of freedom to each of the shared nodes so that they move in unison. Is there a feature to preserve the connection of shared nodes across blocks?

I suppose that this could be achieved with addShapeFunctionDV, but I'm wondering if this can be achieved with addLocalDV directly.

sseraj commented 1 year ago

Have you tried this and run into issues? This should already be handled properly in DVGeometry by treating shared nodes as a single node.

arnalj commented 1 year ago

Yes, I have an FFD that is composed of 2 blocks that share a "face". Moving any of the shared nodes in one block does not affect the other block. I will post an example shortly if it's helpful.

Is there a method or flag that I have to invoke to treat shared nodes as a single node?

sseraj commented 1 year ago

This has worked for me before, but we could be using different setups. A MWE would be very helpful.

arnalj commented 1 year ago

So I made a MWE, and it works beautifully. Perhaps the issue is with my FFD, and the blocks are not actually coincident? Regardless, it seems that the issue is not with pyGeo.

sseraj commented 1 year ago

Yes, it could be an issue with the FFD. The tolerance for the shared node check is 1e-4, so if the distance between FFD nodes is greater than that, they are not considered the same node.

sseraj commented 1 year ago

Closing as resolved