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

Constitutive Laws are being replaced in multi-stage simulation in StructuralMechanics #9147

Open
ddiezrod opened this issue Sep 22, 2021 · 6 comments
Assignees

Comments

@ddiezrod
Copy link
Contributor

ddiezrod commented Sep 22, 2021

This issue came up here #9128. The problem is that if you want to use the same model part for the second stage, CL will be re-built in the element Initialize here

mConstitutiveLawVector[point_number] = GetProperties()[CONSTITUTIVE_LAW]->Clone();

unless IS_RESTARTED flag is set to true.

As usual, I will follow the socratic method of proposing a mediocre solution so you can come up with better ideas. :D

Maybe we can simply solve this doing something like:

if ( mConstitutiveLawVector.size() != integration_points.size() ) {
            InitializeMaterial();
        }

pinging: @qiukailu @pablobecker @Vahid-Galavi @philbucher @loumalouomega @KratosMultiphysics/technical-committee

P.S.: maybe we should create a "multi-stage" label, it seems there are quite a lot of things related to this.

@ddiezrod ddiezrod self-assigned this Sep 22, 2021
@loumalouomega
Copy link
Member

I think we can find a solution less "chapuza", similar to that one. First I would modify directly the method InitializeMaterial, instead of the call of InitializeMaterial. Then I would use the ProcessInfo and the IS_RESTARTED flag as proper solution

@ddiezrod
Copy link
Contributor Author

I think we can find a solution less "chapuza", similar to that one. First I would modify directly the method InitializeMaterial, instead of the call of InitializeMaterial. Then I would use the ProcessInfo and the IS_RESTARTED flag as proper solution

Well in fact I was thinking of separating the creation of the constitutive law from the rest of the methods in InitializeMaterial. Just too lazy to write it :).
Im not so sure about your last point. I dont think a multi-stage simulation is the same as a restarted one, although this could be discussed I guess.

@Vahid-Galavi
Copy link
Member

@ddiezrod Thanks for starting this issue.

I think the issue of constitutive laws in multi-stage analyses should be solved in a more generic way. In my opinion, we should create a container outside CLs and elements to store stresses (and maybe some other integration point variables). Or similar to nodal variables, which are strored in model parts, integration point variables can also be stored in the model part. Then CLs should only cary state variables (if needed).

When we continue a calculation in a following stage, we have two cases:

  1. The same CL is used in the stage: In this case, we need to define a user-defined parameter to check if the user wants to reset internal state variables. If RESET_STATE_VARIABLES are true, the CLs can completely be reconstructed and initialised. Otherwise, we should not initialise the CL.

  2. A different CL is used in the next stage: In this case, the CL should be constructed and initilised using the already available integration point variables (e.g. stresses) in the model.

@ddiezrod
Copy link
Contributor Author

ddiezrod commented Sep 24, 2021

@Vahid-Galavi I completely agree with what you say. My idea was just to separate what you propose into two steps to make things easier.

So in my opinion, the first thing should be to be able to run a second stage without reinitializing the CLs. I was just wondering... if you are using in the second stage the same model part and the same constitutive law that you used in the first stage, can we find a case where we want to reinitialize the state variables? It sounds kind of weird to me but maybe there is one... If not, we can maybe assume that there is no need to reconstruct the CLs

@Vahid-Galavi
Copy link
Member

Vahid-Galavi commented Sep 24, 2021

@ddiezrod In geomechanics, there are some cases, where we are only interested in stresses and not deformation or history of loading, such as gravity loading or construction of dam, .. and after that stage, we want to keep stress but reset unrealistic state variables generated in the previous stage.

@ddiezrod
Copy link
Contributor Author

@Vahid-Galavi I see... Then if we want to maintain more or less the same structure (creating the CLs in the element Initialize), the only option I see is to have a flag in the element that says if we want to keep the old CLs or not. I think process info cannot be used as it is usually shared by all model parts. I have to admit it, it does not look great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants