Users who work with large models often find it tiring to pore over text output files such as .dat and .msg files to look for warning messages that give them information about their analysis.
The following script attempts to make this task easier by scanning through .dat or .msg files to group warnings/errors of a similar kind and writing them out to separate files. In cases where warning/error messages are of similar type, these are gathered together and summarized.
The script and the files to be read are to be placed in the local/working directory. This script is meant to be executed from the DOS command prompt and the following is the format of the command required to execute it:
abaqus python
Additional parameters:
-h : for help
-w: for processing warning related data
-e : for processing error related data
(By default, if no parameters are given, both warnings and errors are processed)
For example, the command:
abaqus python wescan.py cantilever.dat -w –e
would scan through ‘cantilever.dat’, collect all the warnings and errors, and store them in separate files (if they exist) – both in a bulk format, as well as a summarized format.
In this case, the script would scan through ‘cantilever.dat’ which has warnings, but no errors.
In this case, two new files are written to the current directory:
a) cantilever_warnings_bulk.txt which stores all the warnings in the format that they were present in the file
b) cantilever_warning_summary.log which stores the summary of warning messages.
If errors were present in the file and its processing was requested, error information would be written out in a similar fashion.
On execution of the script for ‘cantilever .dat’ file, all the warnings are written out to “cantilever_warnings_bulk.txt” as shown below :
The summary log file is also generated and will contain the warnings in the format shown in the picture below:
You will notice that for warnings of the same format, the dissimilar characters (or variables) will be printed out in the form of a table with headings as VAR1,VAR2 e.t.c, with each “VAR” represented the variable part of the warning format that repeats itself.
For example in the picture below, you will notice that the following three warnings have a similar format, except for different degree of freedom value and the node on which it is active. These two are the variable values for this warning format under discussion.
For each similar format of warnings, the varying words/strings are printed in the form of a table, with headings as VAR1 (for the first variable) representing the DOF number, VAR2 (for the second variable) representing the Node number in this example.
This format makes it much easier for the user to look through the warning messages and understand which regions of the model are connected to the warning messages. The number of times this warning/error type occurs is also printed in the summary file. In addition, warnings/errors that occur multiple times are written first, and those warning/error types that occur once are written later.
