How to iterate through load-steps for result objects?
Ayush Kumar
Member, Moderator, Employee Posts: 467
✭✭✭✭
Best Answers
-
ResData = ExtAPI.DataModel.Project.Model.Analyses[0].GetResultsData() DataSets = ResData.ListTimeFreq es = Model.Analyses[0].Solution.Children[1] for data_set in DataSets: es.DisplayTime = Quantity("%s [sec]" % data_set) es.EvaluateAllResults() print es.Maximum
0 -
There is one way to do it if you don't have any result object in your Solution. For instance, imagine that you want to read nodal temperature results, without creating the result object. You use GetResultsData() function, which has the option CurrentTimeFreq to select which time results are read. Below an example where temperature is read for each time without result object creation:
model= ExtAPI.DataModel.Project.Model meshData = model.Analyses[0].MeshData my_nodes = meshData.NodeIds reader = model.Analyses[0].GetResultsData() datasets = reader.ListTimeFreq for i in range(len(datasets)): reader.CurrentTimeFreq = reader.ListTimeFreq[i] #Here is where time is selected TEMPResults = reader.GetResult('TEMP') valuesTEMP = TEMPResults.GetNodeValues(my_nodes)
0
Answers
-
Hello @Javier Vique , thank you for your useful code. Though, it seems to work only with temperatures and displacements, is there a possibility to get the nodal (or element) equivalent vonMises stresses for each time step?
0