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
985 stars 242 forks source link

[TopOpt, Structural mechanics] additional spring stiffness to global stiffness matrix #9698

Open PhiHo-eng opened 2 years ago

PhiHo-eng commented 2 years ago

Compliant mechanism in topology optimization I am currently extending the topology optimization for compliant mechanisms, i.e. maximization of compliance (max of the displacement of a specified dof) for a given load. For this, I need to add a spring stiffness in the dof of the force and of the outpout node (where I assess the displacement).

We see two options (and a two part question here):

  1. Adding of additional stiffness value directly to the assembled global stiffness matrix before the calculation.
  2. Using the spring-damper element from the structural mechanics application in the underlying model.

As I did not find a way to do 1), I attemped 2), though in vain.

To 1): Does anyone know if this is possible and how I could add this stiffness to the assembled global stiffness matrix? I.e. K[dof, dof] += kAdd.

To 2) (and right now my perferred solution): I am having a problem due to the rotations of the spring-damper element. The small dispalcement volume element of the topology optimization of course does not have rotations. The spring-damper element in the structural mechanics application needs the rotations of the nodes too, which is causing the following error:

what(): Error: Not existant DOF in node #66000 for variable : ROTATION_X

where node 66000 is the added spring-damper element.

Is it possible to "turn off" rotations for the SpringDamperElement3D2N, so that I can use this element for my application?

If this is not possible, I would implement SpringDamperElement3D2N locally in the TopOpt application so that it no longer contain rotations. Can this work if I just inherit the element from Structural Mechanics and remove the rotations?

Many thanks in advance!

loumalouomega commented 2 years ago

There is the NodalConcentratedElement:

https://github.com/KratosMultiphysics/Kratos/blob/master/applications/StructuralMechanicsApplication/custom_elements/nodal_concentrated_element.cpp

There is PR to improve it BTW.