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

How to retrieve PK stress in structural applications ? #11300

Closed azzeddinetiba closed 1 year ago

azzeddinetiba commented 1 year ago

Description In StructuralMechanicsApplication, what is the notation for the Piola Kirchoff stress ? On the json file I used :

    "output_processes" : {
        "vtk_output" : [{
            "python_module" : "vtk_output_process",
            "kratos_module" : "KratosMultiphysics",
            "process_name"  : "VtkOutputProcess",
            "help"          : "This process writes postprocessing files for Paraview",
            "Parameters"    : {
                "model_part_name"                    : "Structure",
                "output_control_type"                : "step",
                "output_interval"                    : 1,
                "file_format"                        : "binary",
                "output_precision"                   : 7,
                "output_sub_model_parts"             : false,
                "output_path"                        : "vtk_output_csm",
                "save_output_files_in_folder"        : true,
                "nodal_solution_step_data_variables" : ["DISPLACEMENT", "POINT_LOAD"],
                "gauss_point_variables_in_elements" : ["PK2_STRESS_VECTOR", "GREEN_LAGRANGE_STRAIN_VECTOR"]
            }
        }]
     }

On the output using Paraview I only get the GREEN_LAGRANGE_STRAIN_VECTOR and nothing else on the elements. Is there smth wrong with the parameters file.

The material file has

{
    "properties" : [{
        "model_part_name" : "Structure.Parts_Solid_Structure",
        "properties_id"   : 2,
        "Material"        : {
            "constitutive_law" : {
                "name" : "HyperElasticPlaneStrain2DLaw"
            },
            "Variables"        : {
                "DENSITY"       : 1.225,
                "YOUNG_MODULUS" : 3500000.0,
                "POISSON_RATIO" : 0.3
            },
            "Tables"           : null
        }
    }]
}

PS : Is the notation used for the 2D tensors (xx, yy, xy) ? Since I get 3 components.

Scope

Thank you in advance.

loumalouomega commented 1 year ago

Yes, the Voight notation in 2D is XX, YY and XY

voigt notation:

loumalouomega commented 1 year ago

What element are you using, some implementations may lack for some variables

azzeddinetiba commented 1 year ago

I'm using the TotalLagrangianElement2D4N

loumalouomega commented 1 year ago

I'm using the TotalLagrangianElement2D4N

Should work..., maybe the VTK setting is not correct...

loumalouomega commented 1 year ago

I'm using the TotalLagrangianElement2D4N

Should work..., maybe the VTK setting is not correct...

Use gauss_point_variables_extrapolated_to_nodes instead of gauss_point_variables_in_elements

azzeddinetiba commented 1 year ago

Yes, Sorry, my bad, I was using PK2_STRESS_TENSOR instead of PK2_STRESS_VECTOR . It works even with gauss_point_variables_in_elements Thank you. Is there a variable for the first Piola Kirchoff stress as well ?

loumalouomega commented 1 year ago

PK2_STRESS_VECTOR

I am not sure if PK1 is the same as KIRCHHOFF_STRESS_VECTOR

AlejandroCornejo commented 1 year ago

PK2_STRESS_VECTOR

I am not sure if PK1 is the same as KIRCHHOFF_STRESS_VECTOR

Nope, they are not the same. PK1 is not symmetrical (half based on the ref and curr conf) and Kirchhoff (full curr config) yes AFAIK

see https://en.wikipedia.org/wiki/Alternative_stress_measures

azzeddinetiba commented 1 year ago

And it can't be retrieved since it's a tensor and not a vector (like PK2_STRESS_TENSOR ?)

AlejandroCornejo commented 1 year ago

Thatit is true. However when retrieving the vector is doing the conversion as it was symm.