How would we automate the extraction of section forces along a structure (say a column)?

Member, Moderator, Employee Posts: 323
50 Answers 100 Comments Second Anniversary 25 Likes
✭✭✭✭
edited April 3 in Structures

How can we automatically create coordinate systems, construction surfaces + force reaction results scoped to these?

Best Answer

  • Member, Moderator, Employee Posts: 323
    50 Answers 100 Comments Second Anniversary 25 Likes
    ✭✭✭✭
    edited 8:30AM Answer ✓

    Below is one way of doing this (sample script only - change as needed):

    1. model=ExtAPI.DataModel.Project.Model
    2. solution=model.Analyses[0].Solution
    3. constsurf = model.AddConstructionGeometry()
    4.  
    5. for iz in range(1,20,2):
    6. testCS = model.CoordinateSystems.AddCoordinateSystem()
    7. testCS.CoordinateSystemType = CoordinateSystemTypeEnum.Cartesian
    8. testCS.OriginX = Quantity(0,"m")
    9. testCS.OriginY = Quantity(0,"m")
    10. testCS.OriginZ = Quantity(iz,"m")
    11. testCS.PrimaryAxisDefineBy = CoordinateSystemAlignmentType.GlobalX
    12. surf = constsurf.AddSurface()
    13. surf.CoordinateSystem = testCS
    14. forc = solution.AddForceReaction()
    15. forc.LocationMethod=LocationDefinitionMethod.Surface
    16. forc.SurfaceSelection=surf
    17. selection = ExtAPI.SelectionManager.CreateSelectionInfo(SelectionTypeEnum.GeometryEntities)
    18. mybod=ExtAPI.DataModel.GetObjectsByName('Solid')[0] # change name of Solid part
    19. selection.Ids = [mybod.GetGeoBody().Id]
    20. forc.GeometryLocation = selection
    21. forc.EvaluateAllResults()
    22. print('MaxTotal: '+ str(forc.MaximumTotal), 'Z-loc: ' + str(testCS.OriginZ))
    23.  
This discussion has been closed.