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
1k stars 243 forks source link

[Structural] Damping in explicit time integration #7355

Open KlausBSautter opened 4 years ago

KlausBSautter commented 4 years ago

Hi, I noticed for a while that we have the following line in the the StructMech/central_difference_scheme: https://github.com/KratosMultiphysics/Kratos/blob/40b3d64f03b0a37c13a5561bc84731fd5ae1da84/applications/StructuralMechanicsApplication/custom_strategies/custom_schemes/explicit_central_differences_scheme.hpp#L454 https://github.com/KratosMultiphysics/Kratos/blob/40b3d64f03b0a37c13a5561bc84731fd5ae1da84/applications/StructuralMechanicsApplication/custom_strategies/custom_schemes/explicit_central_differences_scheme.hpp#L468

which makes me a bit nervous as most of the elements calcualte the residual in the following way: https://github.com/KratosMultiphysics/Kratos/blob/40b3d64f03b0a37c13a5561bc84731fd5ae1da84/applications/StructuralMechanicsApplication/custom_elements/truss_element_3D2N.cpp#L677-L679 https://github.com/KratosMultiphysics/Kratos/blob/40b3d64f03b0a37c13a5561bc84731fd5ae1da84/applications/StructuralMechanicsApplication/custom_elements/truss_element_3D2N.cpp#L686

if you are not careful one might have the damping included twice ......

right now I don't see any element writing data to NODAL_DISPLACEMENT_DAMPING so at the moment the damping contribution always comes from the function in the element. But I would be happy to get rid of that line, to be consistent and eliminate this potential error.

Klaus

loumalouomega commented 4 years ago

Well, I think is not incompatible. We may be just careful, if the damping is included in the RHS should not be computed in the node.

KlausBSautter commented 4 years ago

I agree, but we should somehow make sure it's not included twice

KlausBSautter commented 4 years ago

If someone would assemble the NODAL_DISPLACEMENT_DAMPING somewhere, we will automatically have the damping influence twice

loumalouomega commented 4 years ago

Any check you do will increase the cost of the explicit simulation...

KlausBSautter commented 4 years ago

So you're suggesting we leave it as it is and just be careful? That's ok for me, I just wanted to bring it up.

KlausBSautter commented 4 years ago

In that case, I think we should talk about this line: https://github.com/KratosMultiphysics/Kratos/blob/40b3d64f03b0a37c13a5561bc84731fd5ae1da84/applications/StructuralMechanicsApplication/custom_strategies/custom_strategies/mechanical_explicit_strategy.hpp#L537-L539

where the reaction forces are calculated. These should include damping contributions. If that contribution is included on the element lvl directly to the force_residual this works. But if it is not but done with the NODAL_DISPLACEMENT_DAMPING it does not influence the reactions right now.

KlausBSautter commented 4 years ago

const double nodal_displacement_damping = itCurrentNode->GetValue(NODAL_DISPLACEMENT_DAMPING); noalias(force_residual) = it_node->FastGetSolutionStepValue(FORCE_RESIDUAL)- nodal_displacement_damping * r_current_velocity; if (it_node->GetDof(DISPLACEMENT_X, disppos).IsFixed()) { double& r_reaction = it_node->FastGetSolutionStepValue(REACTION_X); r_reaction = force_residual[0]; }

sth. like that I guess

loumalouomega commented 4 years ago

I am lost, what do you suggest then?

KlausBSautter commented 4 years ago

ok, we agreed on keeping the update as it is. This means some elements add the damping contribution to the force residual on the element level. One can also consider the damping contribution in the strategy but would have to make sure to assemble NODAL_DISPLACEMENT_DAMPING.

The reaction forces are the residual forces (including damping*velocity). At the moment if one does everything on the element level everything is fine as https://github.com/KratosMultiphysics/Kratos/blob/40b3d64f03b0a37c13a5561bc84731fd5ae1da84/applications/StructuralMechanicsApplication/custom_strategies/custom_strategies/mechanical_explicit_strategy.hpp#L537-L539 considers the force residual from the element (in this case including the damping).

If one would do the damping contributions on strategy level the current implementation would miss this contribution for the reaction forces. The correct way would be: r_reaction = force_residual - damping*velocity and not r_reaction = force_residual

RiccardoRossi commented 4 years ago

guys i think this should be diwcussed at largr.

please include the whole structural mechanics team in thr discussion (i am on the mobike so i cannot do it, sorry)

On Mon, Aug 17, 2020, 8:41 AM Klaus Bernd Sautter notifications@github.com wrote:

ok, we agreed on keeping the update as it is. This means some elements add the damping contribution to the force residual on the element level. One can also consider the damping contribution in the strategy but would have to make sure to assemble NODAL_DISPLACEMENT_DAMPING.

The reaction forces are the residual forces (including damping*velocity). At the moment if one does everything on the element level everything is fine as

https://github.com/KratosMultiphysics/Kratos/blob/40b3d64f03b0a37c13a5561bc84731fd5ae1da84/applications/StructuralMechanicsApplication/custom_strategies/custom_strategies/mechanical_explicit_strategy.hpp#L537-L539 considers the force residual from the element (in this case including the damping).

If one would do the damping contributions on strategy level the current implementation would miss this contribution for the reaction forces. The correct way would be: r_reaction = force_residual - damping*velocity and not r_reaction = force_residual

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/KratosMultiphysics/Kratos/issues/7355#issuecomment-674691990, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5PWENKM7OZFLF2SGD5AZLSBDGIRANCNFSM4P7ICR6A .

KlausBSautter commented 4 years ago

@KratosMultiphysics/structural-mechanics

KlausBSautter commented 4 years ago

@AndreasWinterstein especially

loumalouomega commented 3 years ago

Did we reached an agreement?