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

[GeoMechanicsApplication] Investigate 1d consolidation test #12416

Closed markelov208 closed 1 month ago

markelov208 commented 1 month ago

📝 Description

Investigation is done. The test is stable now.

Valgrind was used for profiling but it provided about 4,000,000 problems that is difficult to study. Therefore, the investigation was done as usual by using debugger and placing required prints in specific places. ;)

Two problems are found and fixed.

  1. SetTimeFactors is called in Initialize when file ProjectParameters.json has not been read yet. This also required to fix a number of unit tests.
  2. MatrixType StiffnessMatrix is created but not initialized with zeros.

There are still two problems

  1. the major one causes negative value of detJ
  2. the minor one is a lost of float precision in analytical_solution. An input for the exp function can be a very large negative value. This is only important when the float arithmetic is checked. It can be fixed with the following change
    exp_value_in = -1 (2 j - 1) * 2 pi * 2 / 4 T_v exp_value = 0 if exp_value_in > -600: exp_value = exp(exp_value_in)

    rel_p = (-1) ** (j - 1) / (2 * j - 1) * cos((2 * j - 1) * pi / 2 * y_coord / H) * exp_value + rel_p_old