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
1.01k stars 244 forks source link

FeastSolver computation time #1570

Closed veiguf closed 6 years ago

veiguf commented 6 years ago

I am a student at the Free University of Bozen-Bolzano, currently working on a study project using Kratos Multiphysics. I am using the FEAST SOLVER to calculate the mode shapes and eigenfrequencies of different components. I have noticed that the calculation time becomes very long increasing the degrees of freedom. At the moment I’m trying to get results for a 3D mesh with 34000 nodes and 172000 tetrahedral elements and the simulation takes many hours and giving at the end an error message. I understood that the search dimension should be increased but I would like to avoid to wait so long for the next simulation. Attached you can find a 3D beam which I created for test reasons. The simulation takes about 5 minutes which also seems to be long for that simple structure. Test.zip Are there some parameters which can be changed in order to decrease the computation time? What else could I change? Any help would be appreciated!

msandre commented 6 years ago

Hi, The skyline linear solver is likely very slow for such a large mesh. I would suggest switching to the _complex_pastixsolver. This is an external solver so you first need to install pastix and enable it in the ExternalSolversApplication. The following may be helpful

https://github.com/KratosMultiphysics/Kratos/wiki/How-to-use-the-PaStiX-solver-in-Kratos

veiguf commented 6 years ago

Thank you for your suggestion! I installed pastix and recompiled kratos. I tested it on the example I have uploaded above. Below you can find the new solver settings. The computation time is about the same as it was with the other linear solver. Did I do something wrong? Are there other possibilities?

    "eigensolver_settings":{
        "solver_type": "FEAST",
        "print_feast_output": true,
        "perform_stochastic_estimate": false,
        "solve_eigenvalue_problem": true,
        "lambda_min": 1e7,
        "lambda_max": 2e7,
        "search_dimension": 40,
        "linear_solver_settings":{
            "solver_type": "complex_pastix_solver"
        }
    },
armingeiser commented 6 years ago

You could also have a look at the EigenSolversApplication. It offers an alternative solver for eigenvalue problems. In combination with the MKL library it should be quite fast. (At a first step you can also try without MKL) Have a look at https://github.com/KratosMultiphysics/Kratos/tree/master/applications/EigenSolversApplication

veiguf commented 6 years ago

Hi @armingeiser! I installed the EigenSolversApplication as you mentioned for now without MKL. With a low number of eigenvalues the simulation runs quite fast. But the results I get are very strange to me. The eigenvalues are around zero and the mode shapes look strange. Could you please check if I defined the parameters correctly? Test2.zip

"solver_settings"          : {
    "solver_type"                        : "eigen_value",
    "echo_level"                         : 1,
    "scheme_type"                        : "dynamic",
    "model_import_settings"              : {
        "input_type"     : "mdpa",
        "input_filename" : "Test"
    },
    "material_import_settings"           : {
        "materials_filename" : "StructuralMaterials.json"
    },
    "eigensolver_settings":{
        "solver_type": "eigen_eigensystem",
        "number_of_eigenvalues": 2,
        "max_iteration": 1000,
        "tolerance": 1e-6,
        "echo_level": 1
    },
    "line_search"                        : false,
    "convergence_criterion"              : "residual_criterion",
    "displacement_relative_tolerance"    : 100,
    "displacement_absolute_tolerance"    : 1e-3,
    "residual_relative_tolerance"        : 100,
    "residual_absolute_tolerance"        : 1e-3,
    "max_iteration"                      : 10,
    "problem_domain_sub_model_part_list" : ["Parts_Body"],
    "processes_sub_model_part_list"      : [],
    "rotation_dofs"                      : false
},
armingeiser commented 6 years ago

The problem seems to be that the structure is not supported. If you add supports it should work.

veiguf commented 6 years ago

Thank you! You are right, with boundary conditions it works well! But I would like to compute also the eigenfrequencies of unsupported structures. The first 6 eigenvalues of an unsupported structure should be ca. 0 which corresponds to the free-body movement. Is this not possible with this solver?

armingeiser commented 6 years ago

Unfortunately I have no experience with the eigenfrequencies of unsupported structures...

msandre commented 6 years ago

Can we close this?