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.03k stars 245 forks source link

Kratos program is not working #9104

Closed matheusoliveira202 closed 2 years ago

matheusoliveira202 commented 3 years ago

Description Hello good Morning The program is not working correctly, as the Kratos 8.0.1 extension cannot compile any code, causing the following error attached. I can't compile the codes that were already working and not even when running the examples that are in the library included in the program. thanks in advance

Scope Where in Kratos is this bug happening.

To Reproduce Steps to reproduce the bug (if apply). Add any custom example files here if relevant.

Traceback (most recent call last): File "MainKratos.py", line 33, in DEMAnalysisStageWithFlush(model, project_parameters).Run() File "C:\PROGRA~1\GiD\GID150~1.3\PROBLE~1\kratos.gid\exec\kratos\KratosMultiphysics\analysis_stage.py", line 49, in Run self.Initialize() File "C:\PROGRA~1\GiD\GID150~1.3\PROBLE~1\kratos.gid\exec\kratos\KratosMultiphysics\DEMApplication\DEM_analysis_stage.py", line 264, in Initialize self.ReadModelParts() File "C:\PROGRA~1\GiD\GID150~1.3\PROBLE~1\kratos.gid\exec\kratos\KratosMultiphysics\DEMApplication\DEM_analysis_stage.py", line 446, in ReadModelParts self.ReadModelPartsFromMdpaFile(max_node_id, max_elem_id, max_cond_id) File "C:\PROGRA~1\GiD\GID150~1.3\PROBLE~1\kratos.gid\exec\kratos\KratosMultiphysics\DEMApplication\DEM_analysis_stage.py", line 418, in ReadModelPartsFromMdpaFile ReadModelPart(self.spheres_model_part, self.GetDiscreteElementsInputFileTag(), max_node_id, max_elem_id, max_cond_id) File "C:\PROGRA~1\GiD\GID150~1.3\PROBLE~1\kratos.gid\exec\kratos\KratosMultiphysics\DEMApplication\DEM_analysis_stage.py", line 399, in ReadModelPart model_part_io = self.model_part_reader(file_path, max_node_id, max_elem_id, max_cond_id) File "C:\PROGRA~1\GiD\GID150~1.3\PROBLE~1\kratos.gid\exec\kratos\KratosMultiphysics\DEMApplication\DEM_analysis_stage.py", line 59, in model_part_reader return ReorderConsecutiveFromGivenIdsModelPartIO(modelpart, nodeid, elemid, condid, IO.SKIP_TIMER) RuntimeError: Error: Error opening mdpa file : C:\Users\proje\OneDrive\Área de Trabalho\wEFwf.gid\wEFwfDEM.mdpa

in kratos/sources/model_part_io.cpp:64:ModelPartIO::ModelPartIO

Expected behavior A clear and concise description of what should be the expected behaviour.

Environment

I would also take the opportunity to ask if there is any material available (tutorial), in addition to the manuals, that would help me in the realization of a model, in which triaxis tests will be carried out, on a cilytic sample of particles surrounded by a membrane. I sincerely thank you for any help you can make available. Thanks also for the promptness of the answers

rubenzorrilla commented 3 years ago

Referring to the @KratosMultiphysics/dem team.

salvalatorre commented 3 years ago

Thanks, Matheus, I'm looking into it. Please, to begin with, try in general not to use paths having spaces or accents...

matheusoliveira202 commented 3 years ago

Thanks, @rubenzorrilla @salvalatorre @maceligueta @GuillermoCasas Thanks in advance for all the help

AlejandroCornejo commented 3 years ago

Is it solved? :)

salvalatorre commented 3 years ago

It is about to. More than one working on it... @jginternational

maceligueta commented 3 years ago

Hello @matheusoliveira202 , thanks for reporting the error. It was very helpful that you already posted the release version you used and the GiD version you used. It is quite strange that the input file (mdpa file) could not be found. Maybe it was not generated correctly and then it couldn't be found. Didn't you find any other error within GiD before this one? If you could send the whole example as a zip file it would be very helpful to debug it. Concerning the creation of triaxial tests, we used to have an option to set all the boundary conditions automatically, but now it is not available. We can work on it (with the help of @jginternational if possible). Actually, we do not use a membrane, but we put a lateral pressure instead. The sample is compressed by two plates and the same pressure is applied to the lateral walls, until the target confinement stress is reached. Then, the plates keep pushing while the lateral pressure is kept constant. Let's first fix the error and then we will add the Triaxial Test option.

maceligueta commented 3 years ago

It seems I was wrong, and the Cohesive DEM it does have the option to create a Triaxial test under General Settings -> Material Analysis. However, the most recent tests have revealed a bug which we are trying to fix. Some kind of inconsistency between the GUI and Kratos DEM. We are working on it.

matheusoliveira202 commented 3 years ago

good afternoon , thank you very much!!

Holla, thanks for everyone's support ...The bug regarding compilation was resolved, just switching to a directory without spacing and accents was enough to get them to work. Thank you very much @salvalatorre ...

However, I am really having difficulties regarding the implementation of this triaxial test option, I have been testing it but the confinement pressure does not seem to be active which is allowing the particles to flow, without maintaining the integrity necessary for a test simulation.

I will attach the file already with the properties of the test piece and the assignments of displacements of the particles in the compression planes, as it can be noticed even activating the Triaxial test under in General Settings -> Material Analysis. This has not been attributed (I have tested for a range of confining pressure values and had no effect) ... I do not know if it will be necessary to close this forum and open another one so that I can resolve this issue , but once again I thank you all for all your help .

matheusoliveira202 commented 3 years ago

@maceligueta I can't add files in Zip format, Rar .. which formats would be accepted on the platform. printaaddfile

follow a link to a google folder https://drive.google.com/drive/folders/1oNunumeOEzkW7b7fvdUf9KOJVtCMuaYH?usp=sharing

maceligueta commented 3 years ago

Hello @matheusoliveira202 . We are about to finish fixing the code so it can run triaxial tests easily. However, as I understood, you downloaded a pre-compiled version of Kratos, right? You did not compile it on your PC. I am thinking of some way to introduce the new goodies in a fixed release version. What's the usual procedure, @roigcarlo ? Should we wait for the next Release, or there's a possibility of launching intermediate releases?

roigcarlo commented 3 years ago

In general if we want to introduce fixes to an existing version we launch a new minor 8.1.1 or 8.2 if the changes are relevant enough. Having in account that we will release 9.0 (and accounting that we will change all release mechanism etc...) by the end of October I would suggest to wait until then. If the problem can't be solved or you can't wait tell me and I will try to generate a new release with the changes you need.

Also @matheusoliveira202 sorry but github does not accept big compressed files directly into issue messages. This is a policy from Github, not Kratos, and there is nothing we can do, if you want to attach files it needs to be done as you did through drive, dropbox, etc...

matheusoliveira202 commented 3 years ago

Hello good Morning. @maceligueta @roigcarlo ..I can't tell you if this version is a pre-compiled version of kratos 8.1.0 , but it's the one I found available through the gid platform. If there is another version available for me to try to do my essays I would be very grateful because, I have a certain urgency, to obtain these results, as it is part of the component of my graduate project. In which results are expected to be publishable.

In the drive folder there is a file containing all the characteristics of the material that I am working on, I would like to be able to do triaxial tests for confining pressures of 50, 100, 200 and 300 kPa I don't understand, I can't compile and I get this error message

Traceback (most recent call last):
  File "MainKratos.py", line 33, in <module>
    DEMAnalysisStageWithFlush(model, project_parameters).Run()
  File "C:\PROGRA~1\GiD\GiD 15.0.3\problemtypes\kratos.gid\exec\kratos\KratosMultiphysics\analysis_stage.py", line 49, in Run
    self.Initialize()
  File "C:\PROGRA~1\GiD\GiD 15.0.3\problemtypes\kratos.gid\exec\kratos\KratosMultiphysics\DEMApplication\DEM_analysis_stage.py", line 300, in Initialize
    self.materialTest.Initialize(self.DEM_parameters, self.procedures, self._GetSolver(), self.graphs_path, self.post_path, self.spheres_model_part, self.rigid_face_model_part)
  File "C:\PROGRA~1\GiD\GiD 15.0.3\problemtypes\kratos.gid\exec\kratos\KratosMultiphysics\DEMApplication\DEM_procedures.py", line 1223, in Initialize
    self.script.Initialize()
  File "C:\PROGRA~1\GiD\GiD 15.0.3\problemtypes\kratos.gid\exec\kratos\KratosMultiphysics\DEMApplication\DEM_material_test_script.py", line 95, in Initialize
    self.PrepareTests()
  File "C:\PROGRA~1\GiD\GiD 15.0.3\problemtypes\kratos.gid\exec\kratos\KratosMultiphysics\DEMApplication\DEM_material_test_script.py", line 172, in PrepareTests
    initial_height_top = y_top_total/weight_top
ZeroDivisionError: float division by zero

Once again I appreciate all the support you have given me The only problem is the confining that is not being applied to complete this task. I am very grateful for any help that may have come.

roigcarlo commented 3 years ago

Hi @matheusoliveira202, if you obtained it with GiD is the precompiled, so no compilation involved. The error seems to be a division by zero so weight_top is 0. Not sure why is the reason.

@maceligueta are the fixes python only? If so i can try to make a repack fast and send it to @matheusoliveira202. If the fix has changes in the cpp tell me and I will recompile and make a pack for him.

salvalatorre commented 3 years ago

Fixes are python only, so we could try that repack out!

salvalatorre commented 3 years ago

We have also had some Tcl and Tk modifications, but in the master codes, maybe those changes are not needed for the precompiled version...

roigcarlo commented 3 years ago

@salvalatorre if you can send me the scripts I need to replace I will prepare the pack. The TCL changes are part of the GiD problemtype, I can't help with that.

jginternational commented 3 years ago

To get the latest GUI version I recommend Git pull, but if you are not into git. get a zip with the master branch

image

matheusoliveira202 commented 3 years ago

Good morning, It has not yet been possible to resolve this issue, Is there any way this can do this simulation? @jginternational Cannot find this address from Git pull.

maceligueta commented 3 years ago

The address is this one: https://github.com/KratosMultiphysics/GiDInterface We fixed many things in the Graphical User Interface and also in the computing core (Kratos). If you are able to compile the last version of Kratos and download the last version of the GUI, it should work. Please let us know if you manage to do these two things. Otherwise we will try to pack a version for you for direct download, but this takes some work. First option is the best, because you can keep updating the code with the latest bugfixes and features we will be adding.

matheusoliveira202 commented 3 years ago

Hello good Morning @maceligueta thank you but once for your attention and promptness

I'm installing this version of Developer Gid (GiD 15.1.2d), to be quite honest I'm having a bit of a hard time understanding these link-linking steps.

4- Navigate to kratos.gid / exec / There create a symbolic link to the Kratos installation folder (where runkratos is located) Windows: mklink / J Kratos C: \ Kratos or perhaps mklink / J Kratos C: \ kratos \ bin \ Release (choose the actual Kratos installation folder)

I can't find the file that should replace this path... I did the procedure as I did before in the previous version, copying and pasting the Kratos.gid folder into the path C: \ Program Files \ GiD \ GiD 15.1.2d \ problemtypes

however, when running the model, the same error message of division by zero is occurring when I activate Material Analysis.

Traceback (most recent call last):
  File "MainKratos.py", line 33, in <module>
    DEMAnalysisStageWithFlush(model, project_parameters).Run()
  File "C:\PROGRA~1\GiD\GiD 15.1.2d\problemtypes\kratos.gid\exec\kratos\KratosMultiphysics\analysis_stage.py", line 49, in Run
    self.Initialize()
  File "C:\PROGRA~1\GiD\GiD 15.1.2d\problemtypes\kratos.gid\exec\kratos\KratosMultiphysics\DEMApplication\DEM_analysis_stage.py", line 300, in Initialize
    self.materialTest.Initialize(self.DEM_parameters, self.procedures, self._GetSolver(), self.graphs_path, self.post_path, self.spheres_model_part, self.rigid_face_model_part)
  File "C:\PROGRA~1\GiD\GiD 15.1.2d\problemtypes\kratos.gid\exec\kratos\KratosMultiphysics\DEMApplication\DEM_procedures.py", line 1223, in Initialize
    self.script.Initialize()
  File "C:\PROGRA~1\GiD\GiD 15.1.2d\problemtypes\kratos.gid\exec\kratos\KratosMultiphysics\DEMApplication\DEM_material_test_script.py", line 95, in Initialize
    self.PrepareTests()
  File "C:\PROGRA~1\GiD\GiD 15.1.2d\problemtypes\kratos.gid\exec\kratos\KratosMultiphysics\DEMApplication\DEM_material_test_script.py", line 172, in PrepareTests
    initial_height_top = y_top_total/weight_top
ZeroDivisionError: float division by zero

I believe must be making a mistake; in the installation process or even in the model, because even this version presents the same message, and for me, it would be very important to carry out these triaxial and hydrostatic tests for confining pressures of 50, 100, 200 and 300 kPa until the end of this month. But once, thanks for all the support and attention

maceligueta commented 3 years ago

Did you update the computing core (Kratos) to the latest version? This error was fixed by @salvalatorre some time ago. You need to re-compile kratos. Or compile it from scratch in case you downloaded a Release of Kratos. The Release contained one error. The error was fixed and now the source code is available for dowload and compile in your own pc. Maybe we are using the word 'compile' with different meanings: we mean 'convert source code into executable'.

jginternational commented 3 years ago

@matheusoliveira202 I've posted this video to show the set up I use to run kratos in developer mode, both the kratos binaries and the GiD interface

Slide1 https://youtu.be/zZq7ypDdudo

matheusoliveira202 commented 3 years ago

Hello everyone, good evening, @maceligueta really you are correct, I use the word compile to describe when the model I'm simulating in GID can process without problems and errors. realizes now that it would be necessary to recompile the core of the Kratos Program with the updates.

Thank you very much @jginternational for the explanations, it was much easier for me to follow the guidelines through the video, however I'm still having some difficulties, because in the code compilation step there is a problem.

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\Users\proje> cd C:\Users\proje\Desktop\KRATOS\Kratos-master\scripts
PS C:\Users\proje\Desktop\KRATOS\Kratos-master\scripts> .\configure.bat
O sistema não conseguiu localizar o caminho especificado.
O sistema não conseguiu localizar o caminho especificado.
O sistema não conseguiu localizar o caminho especificado.

C:\Users\proje\Desktop\KRATOS\Kratos-master\scripts>cmake -G"Visual Studio 16 2019" -H"C:\Users\proje\Desktop\KRATOS\Kratos-master\scripts\.." -B"C:\Users\proje\Desktop\KRATOS\Kratos-master\scripts\../build\Release"          -DUSE_EIGEN_MKL=OFF        -DCMAKE_CXX_FLAGS="  "
'cmake' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\proje\Desktop\KRATOS\Kratos-master\scripts>rem Build

C:\Users\proje\Desktop\KRATOS\Kratos-master\scripts>cmake --build "C:\Users\proje\Desktop\KRATOS\Kratos-master\scripts\../build/Release" --target install -- /property:configuration=Release /p:Platform=x64
'cmake' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\proje\Desktop\KRATOS\Kratos-master\scripts>goto:eof
PS C:\Users\proje\Desktop\KRATOS\Kratos-master\scripts>`
matheusoliveira202 commented 3 years ago

Carefully follow all the steps https://www.youtube.com/watch?v=zZq7ypDdudo and install the booster according to this tutorial: https://www.youtube.com/watch?v=TEF5U1AaIV8 Since I couldn't compile the code, I tried to use it, tried a second alternative, tried to use the bin address of a precompiled version, to make the link Windows : mklink /J Kratos C:\kratos or maybe mklink /J Kratos C:\kratos\bin\Release (current choice Kratos installation folder) however, it did not work and when trying to process the model it is showing the following error message.


raceback (most recent call last):
  File "MainKratos.py", line 30, in <module>
    DEMAnalysisStageWithFlush(global_model, parameters).Run()
  File "MainKratos.py", line 11, in __init__
    super().__init__(model, project_parameters)
  File "C:\Users\proje\Desktop\KRATOS\GIDINT~1\kratos.gid\exec\kratos\KratosMultiphysics\DEMApplication\DEM_analysis_stage.py", line 73, 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 : 
{
    "AmplifiedSearchRadiusExtension": 1.1,
    "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,
    "ComputeStressTensorOption": false,
    "ContactMeshOption": false,
    "CoordinationNumber": 10,
    "DeltaOption": "Absolute",
    "Dimension": 3,
    "ElementType": [],
    "FinalTime": 1.0,
    "GlobalDamping": 0.65,
    "GraphExportFreq": 0.001,
    "GravityX": 0.0,
    "GravityY": 0.0,
    "GravityZ": -9.81,
    "MaxAmplificationRatioOfSearchRadius": 1000,
    "MaxTimeStep": 1e-06,
    "Multifile": "multiple_files",
    "NeighbourSearchFrequency": 50,
    "OutputFileType": "Binary",
    "OutputTimeStep": 0.01,
    "PeriodicDomainOption": false,
    "PoissonEffectOption": false,
    "PostAngularVelocity": false,
    "PostBoundingBox": false,
    "PostContactFailureId": 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.0001,
    "ShearStrainParallelToBondOption": false,
    "TranslationalIntegrationScheme": "Symplectic_Euler",
    "VelTrapGraphExportFreq": 0.001,
    "VirtualMassCoefficient": 1.0,
    "dem_inlet_option": false,
    "material_test_settings": {
        "ConfinementPressure": 50000,
        "LoadingVelocity": 0.1,
        "MeasuringSurface": 0.007853980000000002,
        "SpecimenDiameter": 0.1,
        "SpecimenLength": 0.2,
        "TestType": "UCS"
    },
    "problem_name": "Test01",
    "solver_settings": {
        "RemoveBallsInitiallyTouchingWalls": false,
        "material_import_settings": {
            "materials_filename": "MaterialsDEM.json"
        },
        "strategy": "continuum_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,
    "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"
        }
    ],
    "dem_inlet_option": true,
    "do_print_results_option": true,
    "echo_level": 1,
    "material_test_settings": {
        "ConfinementPressure": 0.0,
        "LoadingVelocity": -0.1,
        "MeasuringSurface": 0.01767145867644375,
        "MeshPath": "0",
        "MeshType": "1",
        "SpecimenDiameter": 0.15,
        "SpecimenLength": 0.3,
        "TestType": "None"
    },
    "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,
    "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:1177:Parameters::ValidateDefaults
   kratos/sources/kratos_parameters.cpp:1182:Parameters::ValidateDefaults
   kratos
```/sources/kratos_parameters.cpp:1132:Parameters::ValidateAndAssignDefaults
jginternational commented 3 years ago
C:\Users\proje\Desktop\KRATOS\Kratos-master\scripts>cmake -G"Visual Studio 16 2019" -H"C:\Users\proje\Desktop\KRATOS\Kratos-master\scripts\.." -B"C:\Users\proje\Desktop\KRATOS\Kratos-master\scripts\../build\Release"          -DUSE_EIGEN_MKL=OFF        -DCMAKE_CXX_FLAGS="  "
'cmake' is not recognized as an internal or external command,
operable program or batch file.

It seems like you have not installed CMake, and added it to the PATH https://github.com/KratosMultiphysics/Kratos/blob/master/INSTALL.md#windows-installation

matheusoliveira202 commented 3 years ago

hello @jginternational again, i did the CMake installation and the compilation of Kratos's apparition happened correctly however, while testing the Model it presented this error message.

Traceback (most recent call last):
  File "C:\Users\proje\OneDrive\Documentos\GIDBiblioteca\Test01.gid\MainKratos.py", line 5, in <module>
    from KratosMultiphysics.DEMApplication.DEM_analysis_stage import DEMAnalysisStage
ModuleNotFoundError: No module named 'KratosMultiphysics.DEMApplication'

I don't know if you forget something but apparently all the steps were followed.

jginternational commented 3 years ago

Well, the configure.bat file should contain, in your case, the DEMApplication, the same way I see it for the structural application in the video

matheusoliveira202 commented 3 years ago

ok thanks @jginternational , where can I get this add-on, DEMApplication, would it just add in the same configure.bat file and compile it again? I still don't understand very well what I should do to resolve this error.

jginternational commented 3 years ago

In your configure.bat file, Just below the other apps you should place this

CALL :add_app %KRATOS_APP_DIR%\DEMApplication;

So you compile the DEMApplication, and it will be available to use it

matheusoliveira202 commented 3 years ago

I added the call pelo Visual studio CALL :add_app %KRATOS_APP_DIR%\DEMApplication; , below the tructuralMechanicsApplication; and ask to compile the configure.bat file again, (compilation time was relatively fast, much shorter than it had previously been without the call) I don't know if it would be necessary to delete the previous files or less to recreate the symbolic link mklink / J Kratos , since there was no change in the path.

so it went to GiD retest the Model , which presented the following error message

Traceback (most recent call last):
  File "C:\Users\proje\OneDrive\Documentos\GIDBiblioteca\Test01.gid\MainKratos.py", line 5, in <module>
    from KratosMultiphysics.DEMApplication.DEM_analysis_stage import DEMAnalysisStage
  File "C:\Users\proje\Desktop\KRATOS\GIDINT~1\kratos.gid\exec\kratos\KratosMultiphysics\DEMApplication\DEM_analysis_stage.py", line 10, in <module>
    from KratosMultiphysics.DEMApplication.analytic_tools import analytic_data_procedures
  File "C:\Users\proje\Desktop\KRATOS\GIDINT~1\kratos.gid\exec\kratos\KratosMultiphysics\DEMApplication\analytic_tools\analytic_data_procedures.py", line 2, in <module>
    import numpy as np
ModuleNotFoundError: No module named 'numpy'
jginternational commented 3 years ago

Try open a terminal (cmd or powershell) and execute pip install numpy

matheusoliveira202 commented 3 years ago

Hello good morning, @jginternational I did the recommended process

C:\Users\proje>pip install numpy
Collecting numpy
  Downloading numpy-1.21.3-cp310-cp310-win_amd64.whl (14.0 MB)
     |████████████████████████████████| 14.0 MB 1.3 MB/s
Installing collected packages: numpy
Successfully installed numpy-1.21.3
WARNING: You are using pip version 21.2.3; however, version 21.3.1 is available.
You should consider upgrading via the 'C:\Python\Python310\python.exe -m pip install --upgrade pip' command.

C:\Users\proje>C:\Python\Python310\python.exe -m pip install --upgrade pip
Requirement already satisfied: pip in c:\python\python310\lib\site-packages (21.2.3)
Collecting pip
  Downloading pip-21.3.1-py3-none-any.whl (1.7 MB)
     |████████████████████████████████| 1.7 MB 656 kB/s
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 21.2.3
    Uninstalling pip-21.2.3:
      Successfully uninstalled pip-21.2.3
Successfully installed pip-21.3.1

I went back to compiling configure.bat and I ran the model no GiD, but it still kept getting the same error message.

Traceback (most recent call last):
  File "C:\Users\proje\OneDrive\Documentos\GIDBiblioteca\Test01.gid\MainKratos.py", line 5, in <module>
    from KratosMultiphysics.DEMApplication.DEM_analysis_stage import DEMAnalysisStage
  File "C:\Users\proje\Desktop\KRATOS\GIDINT~1\kratos.gid\exec\kratos\KratosMultiphysics\DEMApplication\DEM_analysis_stage.py", line 10, in <module>
    from KratosMultiphysics.DEMApplication.analytic_tools import analytic_data_procedures
  File "C:\Users\proje\Desktop\KRATOS\GIDINT~1\kratos.gid\exec\kratos\KratosMultiphysics\DEMApplication\analytic_tools\analytic_data_procedures.py", line 2, in <module>
    import numpy as np
ModuleNotFoundError: No module named 'numpy'
jginternational commented 3 years ago

Be sure that the python path you set in the configure.bat is the same as the one used in the pip install process

From your log I can see:

C:\Python\Python310\python.exe

This is the python executable your PATH knows, be sure that in your configure.bat, this is the same path in line 25 PYTHON_EXECUTABLE.

Change your configure.bat to use the same python.exe as pip, and run the bat script agan

matheusoliveira202 commented 3 years ago

@jginternational yes, it's the path I put in configure.bat.

rem Set basic configuration
if not defined KRATOS_BUILD_TYPE set KRATOS_BUILD_TYPE=Release
if not defined BOOST_ROOT set BOOST_ROOT=C:\Users\proje\Desktop\boost_1_77_0
if not defined PYTHON_EXECUTABLE set PYTHON_EXECUTABLE=C:\Python\Python310\python.exe
matheusoliveira202 commented 3 years ago

Hello everyone, A message I get when compiling configure.bat in the shell is this:

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\Users\proje> cd C:\Users\proje\Desktop\KRATOS\Kratos-master\scripts
PS C:\Users\proje\Desktop\KRATOS\Kratos-master\scripts> .\configure.bat

C:\Users\proje\Desktop\KRATOS\Kratos-master\scripts>cmake -G"Visual Studio 16 2019" -H"C:\Users\proje\Desktop\KRATOS\Kratos-master\scripts\.." -B"C:\Users\proje\Desktop\KRATOS\Kratos-master\scripts\../build\Release"          -DUSE_EIGEN_MKL=OFF        -DCMAKE_CXX_FLAGS="  "
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
-- The C compiler identification is MSVC 19.29.30133.0
-- The CXX compiler identification is MSVC 19.29.30133.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at CMakeLists.txt:2 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- No KRATOS_SOURCE_DIR is defined, using: C:/Users/proje/Desktop/KRATOS/Kratos-master
-- No KRATOS_BINARY_DIR is defined, using: C:/Users/proje/Desktop/KRATOS/Kratos-master/build/Release
-- No INSTALL_RUNKRATOS is defined, setting to ON
-- No KRATOS_INSTALL_PYTHON_USING_LINKS is defined, setting to OFF
-- No KRATOS_BUILD_TESTING is defined. Setting to ON
-- No CMAKE_INSTALL_MESSAGE is defined. Setting to NEVER
CMake Error: failed to create symbolic link 'C:/Users/proje/Desktop/KRATOS/Kratos-master/compile_commands.json': Um privil´┐¢gio necess´┐¢rio n´┐¢o ´┐¢ mantido pelo cliente.

-- Could NOT find Git (missing: GIT_EXECUTABLE)
Git was not found on your system. SHA1 number will be set to 0.
-- CMAKE_SYSTEM_NAME = Windows
Detected compiler as MSVC
-- Found PythonInterp: C:\Python\Python310\python.exe (found version "3.10")
-- Found PythonLibs: C:/Python/Python310/libs/Python310.lib
Python version used for the interface will be 3.10
-- Standard install dir C:/Users/proje/Desktop/KRATOS/Kratos-master/bin/Release
"KRATOS_SHARED_MEMORY_PARALLELIZATION" not defined, defaulting to "OpenMP"
-- Found OpenMP_C: -openmp (found version "2.0")
-- Found OpenMP_CXX: -openmp (found version "2.0")
-- Found OpenMP: TRUE (found version "2.0")
Using OpenMP for shared memory parallelization
-- Found Boost: C:/Users/proje/Desktop/boost_1_77_0 (found version "1.77.0")
-- Boost Include: C:/Users/proje/Desktop/boost_1_77_0
-- Boost Linkdir: C:/Users/proje/Desktop/boost_1_77_0/stage/lib
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-- Preparing local ZLIB compilation.
CMake Deprecation Warning at external_libraries/zlib/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of off64_t
-- Check size of off64_t - failed
-- Looking for fseeko
-- Looking for fseeko - not found
-- Looking for unistd.h
-- Looking for unistd.h - not found
-- AMatrix not found. Please define the AMATRIX_DIR pointing to the AMatrix root directory.

CMAKE_BUILD_TYPE ........ Release

WARNING: YOUR GIDPOST IS BEING COMPILED  WITHOUT DEBUG (ALL ASSERTS WILL BE AVOIDED)
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Configuring applications (ENV):
Adding application 'applications\LinearSolversApplication'
**** configuring KratosLinearSolversApplication ****
Adding application 'applications\StructuralMechanicsApplication'
**** configuring KratosStructuralMechanicsApplication ****
Adding application 'applications\DEMApplication'
**** configuring KratosDEMApplication ****

***********************************************************************

        LIST OF APPLICATIONS THAT ARE GOING TO BE COMPILED:

        LinearSolversApplication
        StructuralMechanicsApplication
        DEMApplication

        APPLICATIONS ADDED TO COMPILATION THROUGH DEPENDENCIES:

***********************************************************************

List of upcoming api-breaking changes:
         Making variables non-copiable: https://github.com/KratosMultiphysics/Kratos/pull/6339
         Deprecation of NOT_FLAGS : https://github.com/KratosMultiphysics/Kratos/pull/6233
         Removing long deprecated conditions : https://github.com/KratosMultiphysics/Kratos/pull/6475
         Changing 'FindNodalNeighboursProcess' constructor signature: https://github.com/KratosMultiphysics/Kratos/pull/4947
         Minor update of import mechanism for applications: https://github.com/KratosMultiphysics/Kratos/pull/6556
         Update of Element, Condition and Scheme Interface: https://github.com/KratosMultiphysics/Kratos/issues/7381
         VariableComponent and VectorComponentAdaptor are no longer used: https://github.com/KratosMultiphysics/Kratos/pull/6686
         Make Check() method of ConstitutiveLaw const: https://github.com/KratosMultiphysics/Kratos/pull/7948
         Geometry old projection methods deprecation: https://github.com/KratosMultiphysics/Kratos/pull/9024
         Geometry old closest point methods deprecation: https://github.com/KratosMultiphysics/Kratos/pull/9243
-- triangle : C:/Users/proje/Desktop/KRATOS/Kratos-master/external_libraries/triangle
-- tinyexpr : C:/Users/proje/Desktop/KRATOS/Kratos-master/external_libraries/tinyexpr/tinyexpr/
python libraries to be installed are: C:/Python/Python310/libs/python310.lib
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/proje/Desktop/KRATOS/Kratos-master/build/Release

C:\Users\proje\Desktop\KRATOS\Kratos-master\scripts>rem Build

C:\Users\proje\Desktop\KRATOS\Kratos-master\scripts>cmake --build "C:\Users\proje\Desktop\KRATOS\Kratos-master\scripts\../build/Release" --target install -- /property:configuration=Release /p:Platform=x64
Microsoft (R) Build Engine version 16.11.0+0538acc04 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

  KratosVersion.vcxproj -> C:\Users\proje\Desktop\KRATOS\Kratos-master\build\Release\kratos\KratosVersion.dir\Release\K
  ratosVersion.lib
  zlib.vcxproj -> C:\Users\proje\Desktop\KRATOS\Kratos-master\build\Release\external_libraries\zlib\Release\zlib.dll
  gidpost.vcxproj -> C:\Users\proje\Desktop\KRATOS\Kratos-master\build\Release\external_libraries\gidpost\Release\gidpo
  st.lib
  tinyexpr.vcxproj -> C:\Users\proje\Desktop\KRATOS\Kratos-master\build\Release\external_libraries\tinyexpr\Release\tin
  yexpr.lib
  triangle.vcxproj -> C:\Users\proje\Desktop\KRATOS\Kratos-master\build\Release\external_libraries\triangle\Release\tri
  angle.lib
  KratosCore.vcxproj -> C:\Users\proje\Desktop\KRATOS\Kratos-master\build\Release\kratos\Release\KratosCore.dll
  Kratos.vcxproj -> C:\Users\proje\Desktop\KRATOS\Kratos-master\build\Release\kratos\Release\Kratos.cp310-win_amd64.pyd
  KratosDEMCore.vcxproj -> C:\Users\proje\Desktop\KRATOS\Kratos-master\build\Release\applications\DEMApplication\Releas
  e\KratosDEMCore.dll
  KratosDEMApplication.vcxproj -> C:\Users\proje\Desktop\KRATOS\Kratos-master\build\Release\applications\DEMApplication
  \Release\KratosDEMApplication.pyd
  KratosLinearSolversCore.vcxproj -> C:\Users\proje\Desktop\KRATOS\Kratos-master\build\Release\applications\LinearSolve
  rsApplication\Release\KratosLinearSolversCore.pyd
  KratosLinearSolversApplication.vcxproj -> C:\Users\proje\Desktop\KRATOS\Kratos-master\build\Release\applications\Line
  arSolversApplication\Release\KratosLinearSolversApplication.pyd
  KratosStructuralMechanicsCore.vcxproj -> C:\Users\proje\Desktop\KRATOS\Kratos-master\build\Release\applications\Struc
  turalMechanicsApplication\Release\KratosStructuralMechanicsCore.dll
  KratosStructuralMechanicsApplication.vcxproj -> C:\Users\proje\Desktop\KRATOS\Kratos-master\build\Release\application
  s\StructuralMechanicsApplication\Release\KratosStructuralMechanicsApplication.pyd
  example.vcxproj -> C:\Users\proje\Desktop\KRATOS\Kratos-master\build\Release\external_libraries\zlib\Release\example.
  exe
  minigzip.vcxproj -> C:\Users\proje\Desktop\KRATOS\Kratos-master\build\Release\external_libraries\zlib\Release\minigzi
  p.exe
  runkratos.vcxproj -> C:\Users\proje\Desktop\KRATOS\Kratos-master\build\Release\kratos\run_kratos\Release\runkratos.ex
  e
  zlibstatic.vcxproj -> C:\Users\proje\Desktop\KRATOS\Kratos-master\build\Release\external_libraries\zlib\Release\zlibs
  tatic.lib
  -- Install configuration: "Release"
  -- Deleting: C:/Users/proje/Desktop/KRATOS/Kratos-master/bin/Release/KratosMultiphysics
  -- Deleting: C:/Users/proje/Desktop/KRATOS/Kratos-master/bin/Release/libs

C:\Users\proje\Desktop\KRATOS\Kratos-master\scripts>goto:eof
PS C:\Users\proje\Desktop\KRATOS\Kratos-master\scripts>

I already installed and uninstalled Python, used all the commands I found to try to solve a possible error.

C:\Users\proje>pip3 install numpy
Requirement already satisfied: numpy in c:\python\python310\lib\site-packages (1.21.3)

C:\Users\proje>pip3 install numpy
Requirement already satisfied: numpy in c:\python\python310\lib\site-packages (1.21.3)

I also made sure the path to the environment variables was correct. C:\Python\Python310 C:\Python\Python310\Scripts however, when trying to simulate the model, the same error message is displayed, it is likely that you are commenting on an error, if someone knows how to solve it, they would be very grateful. I really need to finish this work.

Traceback (most recent call last):
  File "C:\Users\proje\OneDrive\Documentos\GIDBiblioteca\Test01.gid\MainKratos.py", line 5, in <module>
    from KratosMultiphysics.DEMApplication.DEM_analysis_stage import DEMAnalysisStage
  File "C:\Users\proje\Desktop\KRATOS\GIDINT~1\kratos.gid\exec\kratos\KratosMultiphysics\DEMApplication\DEM_analysis_stage.py", line 10, in <module>
    from KratosMultiphysics.DEMApplication.analytic_tools import analytic_data_procedures
  File "C:\Users\proje\Desktop\KRATOS\GIDINT~1\kratos.gid\exec\kratos\KratosMultiphysics\DEMApplication\analytic_tools\analytic_data_procedures.py", line 2, in <module>
    import numpy as np
ModuleNotFoundError: No module named 'numpy'
roigcarlo commented 2 years ago

Closing due to inactivity. Reopen if needed