KratosMultiphysics / Kratos

Kratos Multiphysics (A.K.A Kratos) is a framework for building parallel multi-disciplinary simulation software. Modularity, extensibility and HPC are the main objectives. Kratos has BSD license and is written in C++ with extensive Python interface.
https://kratosmultiphysics.github.io/Kratos/
Other
1.05k stars 246 forks source link

[Shape opt] water drain response function #12830

Open DSchmoelz opened 2 weeks ago

DSchmoelz commented 2 weeks ago

📝 Description Introduces a new geometrical response function which avoids ponding. Includes a node search to detect the ponds and their water volume. The response function value can be chosen as the water volume of the pond or the product of the water volume with the water level ("quadratic_height_penalization").

Example: Cosinus shaped shell - no filtering, using raw sensitivities

https://github.com/user-attachments/assets/23f2b760-a72c-43f1-aec1-ba057f33cd2c

Example: Initial flat shell, corner supported, vertical point load, objective strain energy, constraint water drain left: constrained optimization, right: unconstrained optimization

https://github.com/user-attachments/assets/05185c4c-e92c-493b-b5d6-1d7ac1eddcb3

objective strain energy constraint water drain
Video_obj Video_con

🆕 Changelog

sunethwarna commented 1 week ago

I agree with @Igarizza. I would add an FD test. This PR has 30k lines due to that large shape_change_results.json file. I would reduce the size by reducing the number of values being compared.

DSchmoelz commented 3 days ago

Thank you @Igarizza @sunethwarna for reviewing very quickly!

I've shrunk the test so that it only consists of 139 nodes, reducing the size of shape_change_results.json to 1.5k lines.

As discussed with @sunethwarna, a FD sensitivity test is right now not possible, because the derivatives of the nodal area are neglected. Additionally, one needs to take into account that the response function can only compute sensitivities for the infeasible nodes (nodes which are "under water"). Hence, a FD sensitivity test should also just be applied on these only.