
在Abaqus的inp文件中,用户可以指定自己感兴趣的数据,并加以输出,追加在工作目录下的.dat文件中,但本文则展示了如何使用Python提取结果数据:
1 |
from odbAccess import * |
Using the Python to extract the displacement or someother types of Abaqus data, there are two ways to do this.
1. Using the f.write()
example:
1 |
f=open('U1U2.dat','w') |
2. Using the print
1 |
f=open('XY.dat','w') |
I suggest readers to use the second way, because it is simple and clearly. More importantly, the results can be written into the outfile immediatly if in this way. The first way can also do the same thing, but the results are written into the outfile until you close the Abaqus/CAE software. So the second way print is much more safe than the first one f.write.
NOTE:
The Abaqus6.14 is based on the Python2.7.3.
How to check the version of Python of my Abaqus?
Open the Abaqus/CAE and type the following commands:
1 |
>>>import sys |

There are many differences between Python2 and Python3. The detail can be read here. In this process of the Abaqus data, we only use the old print.




近期评论