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

Erik Kostson
Member, Moderator, Employee Posts: 327
✭✭✭✭
How can we automatically create coordinate systems, construction surfaces + force reaction results scoped to these?
0
Best Answer
-
Below is one way of doing this (sample script only - change as needed):
model=ExtAPI.DataModel.Project.Model solution=model.Analyses[0].Solution constsurf = model.AddConstructionGeometry() for iz in range(1,20,2): testCS = model.CoordinateSystems.AddCoordinateSystem() testCS.CoordinateSystemType = CoordinateSystemTypeEnum.Cartesian testCS.OriginX = Quantity(0,"m") testCS.OriginY = Quantity(0,"m") testCS.OriginZ = Quantity(iz,"m") testCS.PrimaryAxisDefineBy = CoordinateSystemAlignmentType.GlobalX surf = constsurf.AddSurface() surf.CoordinateSystem = testCS forc = solution.AddForceReaction() forc.LocationMethod=LocationDefinitionMethod.Surface forc.SurfaceSelection=surf selection = ExtAPI.SelectionManager.CreateSelectionInfo(SelectionTypeEnum.GeometryEntities) mybod=ExtAPI.DataModel.GetObjectsByName('Solid')[0] # change name of Solid part selection.Ids = [mybod.GetGeoBody().Id] forc.GeometryLocation = selection forc.EvaluateAllResults() print('MaxTotal: '+ str(forc.MaximumTotal), 'Z-loc: ' + str(testCS.OriginZ))
0
This discussion has been closed.