find_convergedIncrements
- czmtestkit.py_modules.find_convergedIncrements(fileName)
Find line numbers corresponding to converged increments.
Abaqus prints the statement
EQUILIBRIUM NOT ACHIEVED WITHIN TOLERANCE
at the end of each increment where convergence was not achieved and the step time details including theFRACTION OF STEP COMPLETED
at the end of each converged increment.find_convergedIncrements()
retrives the line numbers for the end of each increment using these strings as keywords. Futher, it finds the fraction of step time of converged increments from the corresponding lines and appends it toconverged_time
. Along with appending the line number corresponding to the end of each converged increment toconverged_lastLine
,find_convergedIncrements()
also finds and appends the largest line numbers marking the end of an increment (converged or unconverged) that is closest to and smaller than the entries inconverged_lastLine
. This marks the end of an increment that occured just prior to the converged increment and consequently also marks the start of the converged increment.- Parameters
fileName (str): path to the .msg file including the file name and extension.
- Returns
converged_time (List): Increment time of converged increments. The times in the list are floats.
converged_firstLine (List): First line of the converged increments. The line numbers in the list are integers.
converged_lastLine (List): Last line of the converged increments. The line numbers in the list are integers.
Example
If
filename.msg
file has the following content,678 FORCE EQUILIBRIUM NOT ACHIEVED WITHIN TOLERANCE.
1118 FORCE EQUILIBRIUM NOT ACHIEVED WITHIN TOLERANCE.
2978 TIME INCREMENT COMPLETED 0.500 , FRACTION OF STEP COMPLETED 0.500
3158 TIME INCREMENT COMPLETED 0.750 , FRACTION OF STEP COMPLETED 0.750
3852 FORCE EQUILIBRIUM NOT ACHIEVED WITHIN TOLERANCE.
4200 TIME INCREMENT COMPLETED 1.000 , FRACTION OF STEP COMPLETED 1.000
Executing the
find_convergedIncrements()
function finds the line numbers and increment times.time, start, stop = find_convergedIncrements("filename.msg") print('Time = ', time) print('Start = ', start) print('Stop = ', stop)
Output
Time = [0.5, 0.75, 1] Start = [1118, 2978, 3852] Stop = [2978, 3158, 4200]