How can we get the force reaction at fixed support though the Results Data Reader?

Erik Kostson
Erik Kostson Member, Moderator, Employee Posts: 285
50 Answers 100 Comments Second Anniversary 25 Likes
✭✭✭✭
edited December 2024 in Structures

How can we get the force reaction at a fixed support, that has Named Selection Scoping associated with it, though the Results Data Reader (GetResultsData)?

Best Answer

  • Erik Kostson
    Erik Kostson Member, Moderator, Employee Posts: 285
    50 Answers 100 Comments Second Anniversary 25 Likes
    ✭✭✭✭
    edited December 2024 Answer ✓

    Below is one way of doing this (uses first named selection that is associated with a Fixed Support where we want the reaction on):

    model=ExtAPI.DataModel.Project.Model # refer to Model
    reader = model.Analyses[0].GetResultsData() # get results data of first analysis in the tree
    
    
    
    ns=model.NamedSelections.Children
    f=ns[0].Location.Ids
    meshData = ExtAPI.DataModel.Project.Model.Analyses[0].MeshData
    faceMesh = meshData.MeshRegionById(f[0])
    nodes=faceMesh.NodeIds
    
    DataSets=reader.ListTimeFreq
    
    
    
    myForce = reader.GetResult("F")
    fzsum=0
    
    for set in range(len(DataSets)):
        reader.CurrentTimeFreq = reader.ListTimeFreq[set]
        for node in nodes:
            fznode = myForce .GetNodeValues(node)[2]
            fzsum=fzsum+fznode
        print ('time : ' + str(reader.CurrentTimeFreq) + ' rea : ' + str(fzsum))
        fzsum=0
    
    reader.Dispose()
    
This discussion has been closed.