Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GeoMechanicsApplication] Degrees of freedom should be freed in between stages #12454

Open
rfaasse opened this issue Jun 13, 2024 · 6 comments · May be fixed by #13099 or #13112
Open

[GeoMechanicsApplication] Degrees of freedom should be freed in between stages #12454

rfaasse opened this issue Jun 13, 2024 · 6 comments · May be fixed by #13099 or #13112
Assignees

Comments

@rfaasse
Copy link
Contributor

rfaasse commented Jun 13, 2024

As a user, I would like to be able to run a multi-stage analysis, where I fix degrees of freedom in one stage, and free them in the next.

Background
This issue was found by an external user (see #12277). A 2-stage problem was presented, where displacements were fixed in the first stage and should be free in the second. However, the dofs were never freed.

As seen in the comment thread of this issue, python versions of the processes in question (ApplyComponentTableProcess & ApplyConstantScalarValueProcess) do free the DoF. The code can be found in:
https://github.com/KratosMultiphysics/Kratos/blob/master/kratos/python_scripts/assign_scalar_variable_process.py#L134-L144

A similar function on Finalize or FinalizeSolutionStep needs to be added to the C++ processes we rely upon (exact location needs to be discussed, but the processes in question only implement the Initialize function, not the InitializeSolutionStep, so for symmetry's sake, implementing it in the Finalize function would seem more logical).

We could use the reported case LysmerBoundaries-K0.zip as a test case (but might want to create a simpler one).

Acceptance Criteria
Given A user runs a two-stage analysis, where some DoF are fixed in the first stage using the ApplyComponentTableProcess or the ApplyConstantScalarValueProcess
When The user doesn't fix said DoF in the second stage
Then They are free in the second stage.

@rfaasse rfaasse converted this from a draft issue Jun 13, 2024
@RiccardoRossi
Copy link
Member

Hi,

this is a bit strange to me. In principle degrees of freedom are fixed by processes in the InitializeSolutionStep and are freed in the FinalizeSolutionStep ... so that they should be definitely free between one stage and the other

@rfaasse
Copy link
Contributor Author

rfaasse commented Jun 13, 2024

Hi @RiccardoRossi,
Thank you for reaching out! We are using our ApplyVectorConstraintTableProcess which makes use of the ApplyComponentTableProcess and/or ApplyConstantScalarValueProcess from Kratos Core.

However, they don't seem to have an override for the FinalizeSolutionStep or Finalize, therefore at least the process itself doesn't seem to free the dofs if I'm correct.

Is this something that could be implemented in the core processes?

@RiccardoRossi
Copy link
Member

to my understanding the expected behavioru is what is shown in here

(variables freed in the ExecuteFinalizeSolutionStep).

pinging @KratosMultiphysics/technical-committee for comments

@roigcarlo
Copy link
Member

roigcarlo commented Jun 14, 2024

As far as I can see @rfaasse is correct. The ApplyConstantScalarValueProcess does not free anything previously fixed.

My understanding is that they can not make use of the process we would normally use for that (assign_scalar_variable_process.py) as it only exists in python.

If we want the dofs to become free we have to implement the ExecuteOnFinalize as we do with the Assign_scalar_variable_process

@rfaasse
Copy link
Contributor Author

rfaasse commented Jun 14, 2024

That is a good point @RiccardoRossi, I didn't know this functionality was there in the python process. However, as @roigcarlo mentioned, indeed for the case described here, we can rely only on the C++ implementation of the processes and therefore, cannot use the python implementation of finalize solution step.

It would help us a lot if that functionality could be moved to the C++ process (that would hold for ApplyComponentTableProcess as well as ApplyConstantScalarValueProcess).

FYI @mcgicjn2 @avdg81 @WPK4FEM on the issue of freeing dofs.

@indigocoral indigocoral moved this from 📑 Product Backlog to 📋 Sprint Backlog in Kratos Product Backlog Jan 29, 2025
@WPK4FEM
Copy link
Contributor

WPK4FEM commented Jan 30, 2025

dirichlet release stage.zip

1 element problem. stage 1 comprresses with a Dirichlet condition vertically. stage 2 does not have this Top Dirichlet condition. Stage 2 should show springback, so going back to zero vertical stresses and total displacements zero.

@rfaasse rfaasse moved this from 📋 Sprint Backlog to 👷 In Progress in Kratos Product Backlog Feb 3, 2025
@rfaasse rfaasse moved this from 👷 In Progress to 👀 In Review in Kratos Product Backlog Feb 7, 2025
@rfaasse rfaasse linked a pull request Feb 11, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants