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

Problem run DEM 3D #10111

Open LVilla96 opened 2 years ago

LVilla96 commented 2 years ago

GOOD DAY!!

I have a problem with a DEM 3d simulation:

error

The error window describes the following error: "Traceback (most recent call last): File "MainKratos.py", line 31, in DEMAnalysisStageWithFlush(global_model, parameters).Run() File "MainKratos.py", line 12, in init super(DEMAnalysisStageWithFlush, self).init(model, project_parameters) File "/home/engineer-user/.local/lib/python3.8/site-packages/KratosMultiphysics/DEMApplication/DEM_analysis_stage.py", line 72, in init self.DEM_parameters.ValidateAndAssignDefaults(default_input_parameters) RuntimeError: Error: ** The item with name :"ElementType" does not have the same type as the corresponding one in the default values


Parameters being validated are : { "AutomaticBoundingBoxOption": false, "BoundingBoxEnlargementFactor": 1.1, "BoundingBoxMaxX": 10, "BoundingBoxMaxY": 10, "BoundingBoxMaxZ": 10, "BoundingBoxMinX": -10, "BoundingBoxMinY": -10, "BoundingBoxMinZ": -10, "BoundingBoxOption": false, "BoundingBoxStartTime": 0.0, "BoundingBoxStopTime": 1000.0, "CleanIndentationsOption": false, "ContactMeshOption": false, "Dimension": 2, "ElementType": [], "FinalTime": 1.0, "GlobalDamping": 0.0, "GraphExportFreq": 0.001, "GravityX": 0.0, "GravityY": -9.81, "GravityZ": 0.0, "MaxTimeStep": 1e-06, "Multifile": "multiple_files", "NeighbourSearchFrequency": 50, "OutputFileType": "Binary", "OutputTimeStep": 0.01, "PeriodicDomainOption": false, "PostAngularVelocity": false, "PostBoundingBox": false, "PostContactForces": false, "PostDisplacement": true, "PostElasticForces": false, "PostEulerAngles": false, "PostLocalContactForce": false, "PostNonDimensionalVolumeWear": false, "PostParticleMoment": false, "PostPressure": false, "PostRadius": true, "PostRigidElementForces": false, "PostRollingResistanceMoment": false, "PostShearStress": false, "PostSkinSphere": false, "PostStressStrainOption": false, "PostTangentialElasticForces": false, "PostTotalForces": false, "PostVelocity": true, "RollingFrictionOption": false, "RotationOption": true, "RotationalIntegrationScheme": "Direct_Integration", "SearchTolerance": 0.001, "TranslationalIntegrationScheme": "Symplectic_Euler", "VelTrapGraphExportFreq": 0.001, "VirtualMassCoefficient": 1.0, "dem_inlet_option": false, "problem_name": "UNNAMED", "solver_settings": { "RemoveBallsInitiallyTouchingWalls": false, "material_import_settings": { "materials_filename": "MaterialsDEM.json" }, "strategy": "sphere_strategy" } } Defaults against which the current parameters are validated are : { "AmplifiedSearchRadiusExtension": 0.0, "AutomaticBoundingBoxOption": false, "AutomaticSkinComputation": false, "AutomaticTimestep": false, "BoundingBoxEnlargementFactor": 1.0, "BoundingBoxMaxX": 10.0, "BoundingBoxMaxY": 10.0, "BoundingBoxMaxZ": 10.0, "BoundingBoxMinX": -10.0, "BoundingBoxMinY": -10.0, "BoundingBoxMinZ": -10.0, "BoundingBoxOption": false, "BoundingBoxStartTime": 0.0, "BoundingBoxStopTime": 1000.0, "CleanIndentationsOption": false, "ComputeStressTensorOption": false, "ContactMeshOption": false, "ControlTime": 4.0, "CoordinationNumber": 10, "DeltaOption": "Absolute", "DeltaTimeSafetyFactor": 1.0, "Dimension": 3, "DontSearchUntilFailure": false, "ElementType": "SphericPartDEMElement3D", "EnergyCalculationOption": false, "FinalTime": 0.05, "GlobalCoordinationNumberOption": true, "GlobalDamping": 0.0, "GraphExportFreq": 0.001, "GravityX": 0.0, "GravityY": 0.0, "GravityZ": -9.81, "ImposeZStrainIn2DOption": false, "ImposeZStrainIn2DWithControlModule": false, "IntegrationScheme": "deprecated_key_since_6_december_2017", "LoadingVelocityBot": 0.0, "LoadingVelocityTop": 0.0, "LocalCoordinationNumberOption": false, "MaxAmplificationRatioOfSearchRadius": 10, "MaxNumberOfIntactBondsToConsiderASphereBroken": 0, "MaxTimeStep": 5e-05, "ModelDataInfo": false, "Multifile": "multiple_files", "NeighbourSearchFrequency": 50, "OutputFileType": "Binary", "OutputTimeStep": 0.01, "PeriodicDomainOption": false, "PoissonEffectOption": true, "PostAngularVelocity": false, "PostAppliedForces": false, "PostBoundingBox": false, "PostCharacteristicLength": false, "PostContactFailureId": false, "PostContactForces": false, "PostContactSigma": false, "PostContactTau": false, "PostControlModule": false, "PostDampForces": false, "PostDeltaDisplacement": false, "PostDisplacement": false, "PostElasticForces": false, "PostEulerAngles": false, "PostExportId": false, "PostFaceNormalImpactVelocity": false, "PostFaceTangentialImpactVelocity": false, "PostFailureCriterionState": false, "PostGluedSphere": false, "PostGroupId": false, "PostLocalContactForce": false, "PostMeanContactArea": false, "PostNodalArea": false, "PostNonDimensionalVolumeWear": false, "PostNormalImpactVelocity": false, "PostParticleMoment": false, "PostPoissonRatio": false, "PostPressure": false, "PostRHS": false, "PostRadius": false, "PostReactions": false, "PostRigidElementForces": false, "PostRollingResistanceMoment": false, "PostShearStress": false, "PostSkinSphere": false, "PostStressStrainOption": false, "PostTangentialElasticForces": false, "PostTangentialImpactVelocity": false, "PostTotalForces": false, "PostVelocity": true, "PotentialEnergyReferencePointX": 0.0, "PotentialEnergyReferencePointY": 0.0, "PotentialEnergyReferencePointZ": 0.0, "RemoveBallsInEmbeddedOption": false, "RollingFrictionOption": false, "RotationOption": true, "RotationalIntegrationScheme": "Direct_Integration", "SearchTolerance": 0.0, "ShearStrainParallelToBondOption": true, "SkinFactorRadius": 1.0, "TranslationalIntegrationScheme": "Symplectic_Euler", "VelTrapGraphExportFreq": 0.001, "VelocityTrapMaxX": 0.0, "VelocityTrapMaxY": 0.0, "VelocityTrapMaxZ": 0.0, "VelocityTrapMinX": 0.0, "VelocityTrapMinY": 0.0, "VelocityTrapMinZ": 0.0, "VelocityTrapOption": false, "VirtualMassCoefficient": 1.0, "WriteMdpaFromResults": false, "ZStrainValue": "0.0*t", "_json_output_process": [ { "Parameters": { "model_part_name": "CandelierDEM", "output_file_name": "candelier_results.json", "output_variables": [ "DISPLACEMENT_X", "DISPLACEMENT_Y" ], "time_frequency": 1 }, "kratos_module": "KratosMultiphysics", "process_name": "JsonOutputProcess", "python_module": "json_output_process" } ], "creator_destructor_settings": {}, "dem_inlet_option": true, "dem_inlets_settings": {}, "do_print_results_option": true, "echo_level": 1, "material_test_settings": { "ConfinementPressure": 0.0, "LoadingVelocity": -0.1, "SpecimenDiameter": 0.15, "SpecimenLength": 0.3, "TestType": "None", "YCoordinateOfCylinderBottomBase": 0.0, "ZCoordinateOfCylinderBottomBase": 0.0 }, "output_configuration": { "print_number_of_neighbours_histogram": false }, "output_processes": {}, "post_vtk_option": false, "print_output_process": [ { "Parameters": { "check_variables": [ "DISPLACEMENT_X", "DISPLACEMENT_Y" ], "input_file_name": "candelier_errors.json", "model_part_name": "SpheresPart", "time_frequency": 1 }, "kratos_module": "KratosMultiphysics", "process_name": "FromJsonCheckResultProcess", "python_module": "from_json_check_result_process" } ], "problem_data": { "echo_level": 1, "end_time": 1, "parallel_type": "OpenMP", "problem_name": "dummy_name.Provide_a_real_one", "start_time": 0.0 }, "problem_name": "dummy_name.Provide_a_real_one", "processes": {}, "respect_preprocessor_marked_skin": true, "search_tolerance_against_walls": 0.0, "seed": 42, "solver_settings": {}, "virtual_sea_surface_settings": { "PostVirtualSeaSurfaceX1": 0.0, "PostVirtualSeaSurfaceX2": 0.0, "PostVirtualSeaSurfaceX3": 0.0, "PostVirtualSeaSurfaceX4": 0.0, "PostVirtualSeaSurfaceY1": 0.0, "PostVirtualSeaSurfaceY2": 0.0, "PostVirtualSeaSurfaceY3": 0.0, "PostVirtualSeaSurfaceY4": 0.0, "print_sea_surface": false } }

in kratos/sources/kratos_parameters.cpp:1182:void Parameters::ValidateDefaults(const Parameters&) const kratos/sources/kratos_parameters.cpp:1187:void Parameters::ValidateDefaults(const Parameters&) const kratos/sources/kratos_parameters.cpp:1137:void Parameters::ValidateAndAssignDefaults(const Parameters&)"

MatiasVenegas commented 2 years ago

I got the same problem.

rubenzorrilla commented 2 years ago

Ping @maceligueta

maceligueta commented 2 years ago

Hello @LVilla96 and @MatiasVenegas . Thanks for reporting, Can you provide more details on how did you generate the case and which version of Kratos you used? For the GUI, did you use the Internet Retrieve within GiD? If not, was it a pre-compiled release? Or did you compile Kratos by yourself?

jginternational commented 2 years ago

Hi @LVilla96 Could you attach a zip containing the model?

LVilla96 commented 2 years ago

@jginternational It is a cone created to test the operation of 3D with DEM. It doesn't seem to work https://drive.google.com/drive/folders/1Iqt5X80ygXpHqTHNwR3DifJoACg5vxZ-?usp=sharing

LVilla96 commented 2 years ago

@maceligueta Is Kratos Multiphysics 9.1.3. No, i didn't use internet retrieve. I compiled Kratos by myself.

maceligueta commented 2 years ago

Ok, I will take a look this morning.

maceligueta commented 2 years ago

Ok, in the ProjectParametersDEM.json file, instead of "ElementType" : [], if shoud read "ElementType" : "SphericPartDEMElement3D", With this change, the case starts running. Now we have to figure out why the ElementType ended up being [] Any idea, @jginternational ?

maceligueta commented 2 years ago

@jginternational , could you take a look at this?

jginternational commented 2 years ago

Hi @LVilla96

The model you've attached was created using the problemtype (User interface) version 9.0.1, not the one in the current master. The master branch version changed like a couple months ago, and the function that assigns the element type in the DEM project parameters was changed 9 months ago.

Please check if you are using the master branch (git status) and latest version (git pull) , because I can not reproduce this behaviour now