Creating the Script to be Run on Evaluate

The below code snippet shows it looping though the creation of a number of these sets, then setting the ResultTimeFrequency value for it to use for each result set in the display.

            while substepvalue <= EndTime:
                
                #Create a DA Result set for each substep
                NewResultData = DAResult.CreateDAResultSet(UpstreamResult.DisplayStyle,"Nodal") 
                
                #Set the substep value
                NewResultData.SubstepValue = substepvalue
                
                #Set the Solution result to obtain results at this time
                UpstreamResult.ResultTimeFrequency = NewResultData.SubstepValue
                
                #Loop over elements
                for Element in DesignAssessment.MeshData.Elements():
                    ElementID = Element.Id              
                    #Loop over nodes
                    for Node in Element.Nodes():
                        NodeID = Node.Id         
                        #Set the value for each Node in the Values Dictionary
                        ValueDict[NodeID] = UpstreamResult.NodalValues(NodeID)[0]  
                        
                #Loop over Nodes in the mesh
                for Node in DesignAssessment.MeshData.Nodes():
                    NodeID = Node.Id            
                    #Set the value at the node to be the value set for that node in the Values Dictionary
                    NewResultData.SetNodalValue(NodeID, 1, ValueDict[NodeID])
                    
                #increment substep value 
                substepvalue += increment

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