Python scripting in ABAQUS Part2 (for Advanced Users)
If you have watched the first part of Python scripting in ABAQUS package, now that you know how to do scripting in Abaqus, it is highly recommended to step ahead and complete your information about Abaqus scripting. In this package, you will get a full explanation about post-processing and manipulating the output database. You will learn about using Python libraries to do non-Abaqus tasks such as sending emails, importing data from an Excel file, and generating PDFs from the Abaqus report file. Moreover, you will learn how to build really simple GUI (RSG) and kernel plug-ins which open the door to going further in making your customized plug-ins. The tutorials teach you how to build RSG for nearly all of your scripts; as a result, anyone who has no knowledge in python scripting can benefit from your script. In addition, if you want to discover how to add a python module to Abaqus python and use python libraries for developing your code, this package is the best that you can get.
Lesson 1: Abaqus object model and XY plot options:
Firstly, we skim through the basics of Abaqus scripting to refresh your memory. Secondly, you will get a deep knowledge of all kinds of Abaqus object models. In addition, We will cover post-processing procedures such as plotting XY data on a chart, adjusting chart choices, storing an image of the combined plots, and reporting it to an output file in this chapter. You will be able to create standalone scripts for post-processing tasks that are only executed after the analysis is complete. Furthermore, we will loop through the number of seed edges in the meshing process to reach the mesh convergence. We get the stress value for each iteration and compare it with the previous iteration to examine the effect of different mesh sizes in the simulation.
lesson 2: Explore an output database:
In this lesson, you will gain a solid understanding of how to use a Python script to access information stored in an output database. An odb contains a wealth of information, and all you need to access it is a basic understanding of the output database object model. You will learn how to interrogate an object model using different kinds of commands such as prettyPrint() statements to determine how to access the information you require. In addition, this chapter shows how to change a field by performing a mathematical operation on it or combining it with another field in a linear combination. We’ll also use some built-in Abaqus methods to extract the entire material and section properties from the ODB and put them in a new Abaqus/CAE model for future use. Needless to say that you will learn to formate your printed output during the tutorials.
lesson 3: Combine frames of two output databases:
This lesson aims to use a Python script to read two output databases, extract the nodal displacement information, and combine the data from both analyses into a new output database. As a result, because the frames of both analyses are joined together, the analyst can see the entire set of results (that you choose to include in the combined ODB) in Abaqus/viewer. Furthermore, we will explain how to request Abaqus to write restart information to the .res file during the analysis. Last but not least, we show you how to import data from an Excel file by adding a new python library to the Abaqus Python.
lesson 4: Monitor an analysis job and send an email when complete:
In this course, you will learn about writing a script that monitors a job and presents updates to the analyst. For example, you will be able to detect when the job completes or aborts. We’ll also log into a Gmail account and send an email to a/some different address, informing the analyst that the job has either been completed or failed with errors. In addition, you will learn about how to generate a PDF file from the Abaqus report file. During the workshop, you will use new Python libraries again and see how powerful Python is at performing some everyday computer tasks.
lesson 5: Kernel and RSG plug-ins:
In this lesson, you will learn about different types of Plug-ins in Abaqus, including Kernel, GUI and RSG. Firstly, you learn how to build a kernel plug-in. Secondly, you get to know about Really simple GUI abbreviated as RSG. You will know about all settings and options existent in this tool. We will build an RSG plug-in for simulating the LPG tank and perform all tutorial materials. Moreover, you get familiar with the advantages and disadvantages of using RSG plug-ins instead of other plug-ins.
It would be useful to see Abaqus Documentation to understand how it would be hard to start an Abaqus simulation without any Abaqus tutorial. It should be mentioned it is the second part of the Abaqus Python training package; if you want to get more simple information about Abaqus Python scripting (FEA Python), you can click Python scripting in ABAQUS Part 1.
Python is a popular computer programming language used to develop software and websites, automate processes, and analyze data. Since Python is a general-purpose language, it may be used to develop a wide range of programs and isn’t tailored for any particular issues.
Python is a dynamic, bytecode-compiled, and interpreted language. Variable, parameter, function, and method types are not declared in the source code. You lose the source code’s compile-time type checking but gain short, flexible code as a result.
What are basics of Python?
- Properties. Python is implicitly and dynamically typed, so you do not have to declare variables. …
- Data types. Let’s move ahead to data types. …
- Strings. Let’s move on to strings. …
- Flow control statements. …
- Functions. …
- Classes. …
- Exceptions. …
- File I/O.
The following are some of the advantages of Python:
- Easy to Code. Python is a very high-level programming language, yet it is effortless to learn. …
- Easy to Read. …
- Free and Open-Source. …
- Robust Standard Library. …
- Interpreted. …
- Portable. …
- Object-Oriented and Procedure-Oriented. …
- Extensible.
In order to interface with and automate pre- and post-processing tasks, activities, processes, or more generally, 3rd party Python functionality, Abaqus is provided with a Python AP.
An application programming interface (API) to the models and data utilized by Abaqus is the Abaqus Scripting Interface. The Python object-oriented programming language is extended by the Abaqus Scripting Interface, and Abaqus Scripting Interface scripts are Python scripts.
A script is a piece of code created in a high-level programming language that executes pre-existing operations automatically. It is a potent tool that enables you to combine Python’s strength with the capability of Abaqus’ Graphical User Interface (GUI).
Main tasks can be done using python in Abaqus
- Exactly repeat what is done before
- Modifying a parameter
- Looping over a parameter
- Modifying a location
- Changing the (imported) geometry
- Making a script generally applicable
Reviews
There are no reviews yet