In Abaqus, there is an Abaqus Scripting Interface to control Abaqus/CAE models and analysis jobs. The programming language Python is used for the script. This feature is detailed in Abaqus Scripting User’s Guide. Here is a simple but fair detail and completed explanation on the basic rule for Python language.
This explanation is from coffeeghost.net as a picture. It’s for those who have basic programming experience to get familiar with Python style in a few minutes. It’s also useful to the beginners for a fast reference.
In this picture, the basic grammer rules and coding style are detailed in a simple example. The main content includes:
- Load other code modules.
- Function definition and call for a function.
- Variables.
- Indentation as the indicator of the end of a block or the beggining of a new block.
- For loop and If-Else statements.
- Boolean operators.
- Style for comments.
This is a brief list of need-to-known for those who want to take the advantage of script in Abaqus.©
本文发表于水景一页。永久链接:<https://cnzhx.net/fe/2015/07/04/quick-python-script-explanation/>。转载请保留此信息及相应链接。
引用通告: An introduction on the macro script feature in Abaqus | Abaqus 学习笔记
引用通告: Python script to get ODB object | Abaqus 学习笔记