How to get time, load step and max sub step at a given load step information from dpf?

Vishnu
Vishnu Member, Employee Posts: 222
100 Comments 100 Likes Second Anniversary Name Dropper
✭✭✭✭
edited September 2023 in Structures

We might be interested in extracting below info:

enter image description here

Tagged:

Comments

  • Vishnu
    Vishnu Member, Employee Posts: 222
    100 Comments 100 Likes Second Anniversary Name Dropper
    ✭✭✭✭
    Answer ✓
    import mech_dpf
    import Ans.DataProcessing as dpf
    
    #Model
    #Result Data
    analysis1 = ExtAPI.DataModel.Project.Model.Analyses[0]
    dataSource = dpf.DataSources(analysis1.Solution.ResultFilePath)
    
    my_model = dpf.Model(analysis1.Solution.ResultFilePath)
    
    timefreqsupport = my_model.TimeFreqSupport
    print 'loadsteps are-->',list(dpf.operators.metadata.time_freq_provider(data_sources=dataSource).outputs.time_freq_support.GetData().TimeFreqs.ScopingIds)
    print 'Time list is-->',list(dpf.operators.metadata.time_freq_provider(data_sources=dataSource).outputs.time_freq_support.GetData().TimeFreqs.Data)
    print 'Max Substep for load step 3 is-->',dpf.operators.metadata.time_freq_provider(data_sources=dataSource).outputs.time_freq_support.GetData().TimeFreqs.GetEntityDataById(3).Count