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] NaN value in the stress displacement derivative matrix #9884

Open PhiHo-eng opened 2 years ago

PhiHo-eng commented 2 years ago

NaN value in the derivative matrix Within the issue #9835 @e-dub implemented the KS approximation for the Max Stress Adjoint problem. I am currently using it for the Topology Optimization Application in order to implement stress constraints in the optimization process. The code seems to run fine and it is showing promising results. Although there is a problem that can come up within the optimization. It seems to occur spontaneously, as I ran the same optimization and the problem occurred in different iterations steps or not at all. The problem seems to start in the KS script from the Issue #9835 in the adjoint_KS_max_stress_response_function.cpp on line 125, where the stress displacement derivative matrix is calculated. The problem is that every single value in the matrix becomes "nan". This seems to happen for every element. Does anyone have an idea what this might be or by what this might be triggered? @armingeiser @MFusseder has this happened with the original adjoint_max_stress_response_function.cpp too?

Thank you in advance!

rubenzorrilla commented 1 year ago

@PhiHo-eng is this still happening?

PhiHo-eng commented 1 year ago

Hello @rubenzorrilla

Haven't been working on the project in a while. When I last used the KS function, the problem was still happening.