Extract information on time stepping
Pernelle Marone-Hitz
Member, Moderator, Employee Posts: 871
✭✭✭✭
How can we extract information on time stepping settings in Mechanical, through scripting?
Tagged:
2
Answers
-
The following function can be used:
def ExtractLoadStepInfo(analysis): ''' Extract load stepping information ''' listExtractLoadStepInfo = [] settings = analysis.AnalysisSettings numberSteps = settings.NumberOfSteps for iterStep in range(1, numberSteps + 1): settings.CurrentStepNumber = iterStep AutomaticTimeStepping = settings.AutomaticTimeStepping DefineBy = settings.DefineBy if settings.DefineBy == TimeStepDefineByType.Substeps: InitialSubsteps = settings.InitialSubsteps MinimumSubsteps = settings.MinimumSubsteps MaximumSubsteps = settings.MaximumSubsteps listExtractLoadStepInfo.append([ str(AutomaticTimeStepping), str(DefineBy), str(InitialSubsteps), str(MinimumSubsteps), str(MaximumSubsteps) ]) elif settings.DefineBy == TimeStepDefineByType.Time: InitialTimeStep = settings.InitialTimeStep MinimumTimeStep = settings.MinimumTimeStep MaximumTimeStep = settings.MaximumTimeStep listExtractLoadStepInfo.append([ str(AutomaticTimeStepping), str(DefineBy), str(InitialTimeStep), str(MinimumTimeStep), str(MaximumTimeStep) ]) return listExtractLoadStepInfo
2