EvaluateCulmativeDamage

This routine creates a dummy result to obtain the number of result sets. Then, for each set, calls the “EvaluateDamage” function summing the results into a dictionary of element nodal results called CulmativeDamage.

def EvaluateCulmativeDamage(Const1, Const2, Const3):
    DummyRes = UpstreamSolution.CreateSolutionResult("","EPPLEQV_RST","Strain")
    
    CulmativeDamage = {}
    
    for Set in range(DummyRes.ResultSetCount):
        DamageValues = EvaluateDamage(Set,Const1, Const2, Const3)

        if (Set > 1):        
            for Element in DA.MeshData.Elements():
                for Node in Element.Nodes():
                    CulmativeDamage[Element.Id,Node.Id] = CulmativeDamage[Element.Id,Node.Id] +\
                                                          DamageValues[Element.Id,Node.Id]
        else:
            CulmativeDamage = DamageValues
        
    return CulmativeDamage

Release 18.2 - © ANSYS, Inc. All rights reserved.