Kratos
Kratos copied to clipboard
[Fluid] MPC-based slip condition
📝 Description This PR adds support for MPC-based slip boundary conditions. In front of what we did so far to apply the slip BC (by rotating the system of equations) this has the advantage of correctly computing the reactions from the RHS. On top of this, it can be somehow understood as a generalization of the multi-freedom technique we are using.
Right now both options are available, but in the long term I think that this is the way we should go. The blocker for this is the MPI implementation of the MPCs.
In a nutshell the changes are:
- Creation of a
static
method to generate the slip BC MPCs in theFluidAuxiliaryUtilities
. - Change the
FluidDynamicsApplication
custom schemes to make the rotation optional - Add support to the Python solvers. Note that this is done by calling the
Initialize
method of the basefluid_solver.py
(so far it used to throw an error).
🆕 Changelog
- Support for MPC-based slip conditions
I just wanted to add,
The rotation based slip conditions are now used in adjoint formulations, and MPC are not yer supported by adjoint formulations.
Good to see this ! One small comment. This condition cannot be used in MPI as constraints are not yet treated in MPI.
Good to see this ! One small comment. This condition cannot be used in MPI as constraints are not yet treated in MPI.
Right now both options are available, but in the long term I think that this is the way we should go. The blocker for this is the MPI implementation of the MPCs.
See my comment in the PR description. It would be very good to get rid of the rotation (at least in the standard non-adjoint cases). Is this in our short-term ToDo list @adityaghantasala ?
I did a test with almost 1M elements and the build takes around
- 3.3-3.4 seconds for the rotation-based slip condition
- 3.2-3.3 seconds for the new mpc-based slip condition
Having said this, I think we shouldn't be worried about the performance so we can safely merge this.
el timing del build incluye la aplicación de los constraints?
Riccardo
On Fri, Dec 10, 2021 at 3:45 PM Rubén Zorrilla @.***> wrote:
I did a test with almost 1M elements and the build takes around
- 3.3-3.4 seconds for the rotation-based slip condition
- 3.2-3.3 seconds for the new mpc-based slip condition
Having said this, I think we shouldn't be worried about the performance so we can safely merge this.
— You are receiving this because your review was requested. Reply to this email directly, view it on GitHub https://github.com/KratosMultiphysics/Kratos/pull/9380#issuecomment-991031755, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5PWENKXMMSUUV2STI5F73UQIHAZANCNFSM5IRJRLSQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
el timing del build incluye la aplicación de los constraints? Riccardo … On Fri, Dec 10, 2021 at 3:45 PM Rubén Zorrilla @.***> wrote: I did a test with almost 1M elements and the build takes around - 3.3-3.4 seconds for the rotation-based slip condition - 3.2-3.3 seconds for the new mpc-based slip condition Having said this, I think we shouldn't be worried about the performance so we can safely merge this. — You are receiving this because your review was requested. Reply to this email directly, view it on GitHub <#9380 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5PWENKXMMSUUV2STI5F73UQIHAZANCNFSM5IRJRLSQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
I've just realized that the build time doesn't take into account the constraints... I think this is a minor issue we should correct in our B&S. I'd repeat the test again. Thanks for pointing it out.
I did a test with almost 1M elements and the build takes around
* 3.3-3.4 seconds for the rotation-based slip condition * 3.2-3.3 seconds for the new mpc-based slip condition
Having said this, I think we shouldn't be worried about the performance so we can safely merge this.
The correct times are:
- 3.3-3.4 seconds for the rotation-based slip condition
- 4.3-4.4 seconds (3.2-3.3 seconds for the build + 1.1 seconds to apply the constraints) for the new mpc-based slip condition
@RiccardoRossi shall we merge it?
@RiccardoRossi what do we do with this?
i think it is interesting to have it as option, on particular as it can be used together with the structure
On Wed, Feb 9, 2022, 12:36 Rubén Zorrilla @.***> wrote:
@RiccardoRossi https://github.com/RiccardoRossi what do we do with this?
— Reply to this email directly, view it on GitHub https://github.com/KratosMultiphysics/Kratos/pull/9380#issuecomment-1033666030, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5PWEMTUC3X4D6CEAVY5OLU2JGSZANCNFSM5IRJRLSQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
i think it is interesting to have it as option, on particular as it can be used together with the structure … On Wed, Feb 9, 2022, 12:36 Rubén Zorrilla @.> wrote: @RiccardoRossi https://github.com/RiccardoRossi what do we do with this? — Reply to this email directly, view it on GitHub <#9380 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5PWEMTUC3X4D6CEAVY5OLU2JGSZANCNFSM5IRJRLSQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.>
What you mean? To impose slip BCs in structural mechanics problems? If this is your aim, we should move some of the implementations to the core.
Maybe we can merge it as it is and upgrade it in a future PR.
I think I already talked about this with @rubenzorrilla in private, but just as a comment in case it is interesting for someone: We used to have many problems imposing slip conditions in the corners with the current approach. What really worked very well for us finally was to integrate the velocity by parts in the mass equation, so slip boundary conditions are then imposed as natural boundary conditions, then you see corners behaving really well.