Hello everyone.

For a particular application regarding optimization procedures (SIMP method), I need the element-level stiffness matrix and displacement vectors to compute sensitivities for the design variables of my study. For each element from the mesh, I need to compute the product {u}^T [k] {u} where {u} is the displacement vector for the nodes in each element and [k] is the element stiffness matrix. All the other values (p and x) are known:

From the data I gathered here in the forum and the CCX documentation, I have the following alternatives:

- Use the already implemented *SENSITIVITY analysis.
- To get the global stiffness matrix, one can use *FREQUENCY with SOLVER=MATRIXSTORAGE.
- To get a local stiffness matrix, one can use *SUBSTRUCTURE GENERATE.
- Calculate outside CalculiX the stiffness matrix for each element.

The issue with the first point is that the current sensitivity approach does not support the calculation I need because x_e is a variable defined by me, and only coordinates for the nodes and orientations are supported.

For the second bullet, I have no idea how to reconstruct the local stiffness matrix for each element using the global matrix as a starting point. Does anybody know how to do it?

For the third point, I think I would need to create a substructure for each element in the mesh. Let’s say I’m going to optimize 100000 elements (which is not an absurd number), I would need 100000 substructure analysis just to start my optimization. That does not seem to be an efficient approach.

For the fourth approach, I would need to know how CCX calculates the stiffness matrix for each element (probably C3D20R and C3D10 would be enough). However, I am not sure how to get the displacement vector for the local coordinates in each element.

I would gladly appreciate any help with this problem I’m facing and thoughts about which way to proceed. Any suggestions are welcome.

Best regards,

Lucas.