Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[StructuralMechanics] Post-simulation von Mises stress calculation for shells returns zeros #13132

Open
takeshimg92 opened this issue Feb 17, 2025 · 5 comments

Comments

@takeshimg92
Copy link

Description
For some modal analysis applications, I need to calculate quantities derived from displacement a posteriori.

Essentially, I use (1) the ModelPart coming from the solver and (2) the automatic VTK output for the displacement of each mode. For a few reasons, I need the displacement field to be normalized before calculating von Mises, so I normalize it (using Pyvista, reading from the VTK files) and then calculate von Mises stress as follows:

for mode in mode_names:
    displacement = modal_fields[mode] # this is a normalized field, as a Pyvista UnstructuredGrid

    # set artificially this as the displacement field in the model part  
    model_part.ProcessInfo[KM.STEP] = 0 # this is the ModelPart coming from my running of the simulation
    for node, u in zip(model_part.Nodes, displacement):
        node.SetSolutionStepValue(KM.DISPLACEMENT, u.tolist())

    # von Mises as a dictionary from id to value (density, so no multiplication by volume)
    dic = {}
    for element in model_part.Elements:
        id = element.Id
        value = element.CalculateOnIntegrationPoints(SMA.VON_MISES_STRESS, model_part.ProcessInfo)[0]
        dic[id] = value

This works just fine for solid elements (SmallDisplacementElement), but the same code for ThinShells returns zero.
My questions are:

  1. Is there a way to bypass this?
  2. Is there anything I need to be careful with, or change in the source code so this will work for shells?

Scope
StructuralMechanics

@loumalouomega
Copy link
Member

Probably VON_MISES_STRESS is not implemented in the shell. Which shell are you using ?

@takeshimg92
Copy link
Author

@loumalouomega thin shells 3D3N. From here it seems it is calculated - for steady state analysis I can just get the von Mises stress in the usual VTK outputs.

@loumalouomega
Copy link
Member

Huum strange, a priori if implemented should return values different from 0.

@loumalouomega
Copy link
Member

Huum strange, a priori if implemented should return values different from 0.

Any idea @KratosMultiphysics/structural-mechanics ?

@AlejandroCornejo
Copy link
Member

IDK exactly but could it be that with shells they use VON_MISES_TOP or bottom?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants