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

Error: Element MPMUpdatedLagrangian2D3N is not registered in Kratos. #11264

Open hekungeo opened 1 year ago

hekungeo commented 1 year ago

Description Hi Dear all, The material issue appeared when I processed the MPM module in developer version of Kratos by using GiDinterface.

Traceback (most recent call last): File "E:\Kratos\test_MPM2.gid\MainKratos.py", line 45, in simulation.Run() File "D:\Software\GID\GiD 16.1.5d\GiD 16.1.5d\scripts\tohil\python\lib\site-packages\KratosMultiphysics\analysis_stage.py", line 47, in Run self.Initialize() File "E:\Kratos\test_MPM2.gid\MainKratos.py", line 17, in Initialize super().Initialize() File "D:\Software\GID\GiD 16.1.5d\GiD 16.1.5d\scripts\tohil\python\lib\site-packages\KratosMultiphysics\analysis_stage.py", line 81, in Initialize self._GetSolver().ImportModelPart() File "D:\Software\GID\GiD 16.1.5d\GiD 16.1.5d\scripts\tohil\python\lib\site-packages\KratosMultiphysics\ParticleMechanicsApplication\mpm_solver.py", line 106, in ImportModelPart self._ModelPartReading() File "D:\Software\GID\GiD 16.1.5d\GiD 16.1.5d\scripts\tohil\python\lib\site-packages\KratosMultiphysics\ParticleMechanicsApplication\mpm_solver.py", line 316, in _ModelPartReading self._ImportModelPart(self.initial_mesh_model_part, self.settings["model_import_settings"]) File "D:\Software\GID\GiD 16.1.5d\GiD 16.1.5d\scripts\tohil\python\lib\site-packages\KratosMultiphysics\python_solver.py", line 155, in _ImportModelPart KratosMultiphysics.SingleImportModelPart.Import(model_part, model_part_import_settings, input_type) RuntimeError: Error: Element MPMUpdatedLagrangian2D3N is not registered in Kratos. Please check the spelling of the element name and see if the application which containing it, is registered correctly. [Line 51 ]

Scope MPM

image

matekelemen commented 1 year ago

I'm not familiar with the GiD interface, but unregistered elements/variables usually mean that the application they're defined in wasn't imported. It looks like MPMUpdatedLagrangian2D3N is defined in the ParticleMechanicsApplication, so try importing it in your MainKratos.py.