Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Workshop 1

Creating and Reviewing a Replay File

Goals
When you complete this workshop, you will be able to:
1. Create an Abaqus/CAE model.
2. Understand the commands written to the replay file when creating an
Abaqus/CAE model.
3. Use the replay file to recreate a model.
4. Edit a replay file to modify a model.

Introduction
In this workshop, you will create a very simple Abaqus/CAE model and then review the
Abaqus Scripting Interface commands that are written to the replay file. The model is a
square tube with a through hole at one end. It is modeled with shell elements. A free
modal analysis is performed on it. The completed model is shown in Figure W1–1.

Figure W1–1

Preliminaries
1. Start a new session of Abaqus/CAE using the following command:
abaqus cae
where abaqus is the command used to run Abaqus.
2. In the Start Session dialog box, underneath Create Model Database, click With
Standard/Explicit Model.

© Dassault Systèmes, 2019 Introduction to Abaqus Scripting


W1.2

Creating a part
1. Click the Create Part tool.
2. In the Create Part dialog box, name the part Tube.
3. Change the base feature shape to Shell and the type to Extrusion; click
Continue.
4. In the sketcher, click the Create Lines: Rectangle tool.
5. For the starting corner enter -10, 10.
6. For the opposite corner enter 10, -10.
7. Click the red X button to quit the rectangle tool.
8. The resulting sketch should look as shown Figure W1–2.

Figure W1–2

9. Click Done.
10. In the Edit Base Extrusion dialog enter 100 for the depth, and click OK.

Create and assign properties


Create a material
1. Switch to the Property module. Click the Create Material tool.
2. In the Create Material dialog box, enter Steel as the material name.
3. In the Material Behaviors menu, select General→Density. Enter 7.7e-9 for
the mass density.
4. In the Material Behaviors menu, select Mechanical→Elasticity→Elastic.
Enter 207000 for Young's Modulus and 0.3 for Poisson's Ratio. Click OK.

© Dassault Systèmes, 2019 Introduction to Abaqus Scripting


W1.3

Create a section
1. Click the Create Section tool.
2. In the Create Section dialog box, enter ShellSect as the section name.
3. Switch the Category to Shell and click Continue.
4. Enter 1.0 for the shell thickness and click OK.

Assign the section


1. Click the Assign Section tool.
2. Select all surfaces in the model. Click Done.
3. Click OK in the Edit Section dialog box.

Instance into the assembly


1. Switch to the Assembly module. Click the Create Instance tool. Click OK.

Create a step
1. Switch to the Step module. Click the Create Step tool.
2. Enter Modal as the step name.
3. Select Linear Perturbation as the procedure type.
4. Select Frequency and click Continue.
5. Under Number of eigenvalues requested enter the value 10. Click OK.

Create a mesh
1. Switch to the Mesh module. Make sure the Part Object is set to Tube.
2. Click on the Seed Part Instance tool.
3. Assign a global size of 2.
4. Click the Mesh Part tool to generate the mesh.

Create a job
1. Switch to the Job module. Click the Create Job tool.
2. Enter TubeModel as the job name. Click Continue.
3. Click OK in the Edit Job dialog box.
4. Click the Job Manager tool. Click DataCheck and then click Dismiss.

Finishing up
1. From the main menu bar, select File → Save As.
2. Enter tube.cae for the filename and click OK.
3. Exit Abaqus/CAE.
4. Find the file named abaqus.rpy in your working directory.
5. Rename this file to tube.py.

6. This replay file will be used in later workshops. If you have any difficulty
creating this model, you may use the file ws_scr_tube_1_answer.py file
that is provided.

© Dassault Systèmes, 2019 Introduction to Abaqus Scripting


W1.4

Task 1
Delete the tube.cae and tube.jnl files. Use the tube.py file to recreate the model.
Enter the following command:

abaqus cae script=tube.py

Abaqus/CAE will use the replay file to rebuild the model exactly as it was. Exit CAE.

Task 2
Open the tube.py file in a Python-aware text editor (Notepad++, Abaqus PDE, etc. ).
Read through the file and make note of the commands that were created in it as you built
the model.

Questions:
 Which command created the sketch rectangle?
 Which command set the length of the tube?
 Which command set the thickness of the tube?

Task 3
Edit the tube.py file to make some changes to the model. Do the following:

 Change the size of the tube cross section to be 10 by 30 rather than 20 by 20.
 Make the length 200.

Run the revised replay file and note the changes to the model. An answer script is
provided in ws_scr_tube_2_answer.py.

© Dassault Systèmes, 2019 Introduction to Abaqus Scripting


Workshop 1 Answers
Creating and Reviewing a Replay File

If you have trouble completing this workshop, the file ws_scr_tube_1_answer.py


contains the answer to the workshop. It is provided for your convenience.

Answers to questions:

 Which command created the sketch rectangle?


s.rectangle(point1=(-10.0, 10.0), point2=(10.0, -10.0))
rectangle is a method of the sketch object that was created 3 commands
earlier.

 Which command set the length of the tube?


p.BaseShellExtrude(sketch=s, depth=100.0)
BaseShellExtrude is a method of the part created 2 commands earlier.

 Which command set the thickness of the tube?


mdb.models['Model-1'].HomogeneousShellSection(
name='ShellSect',
preIntegrate=OFF,
material='Steel',
thickness=1.0,
poissonDefinition=DEFAULT,
thicknessModulus=None,
temperature=GRADIENT,
useDensity=OFF,
nodalThicknessField='',
integrationRule=SIMPSON,
numIntPts=5)

Answers to Task 3
File ws_scr_tube_2_answer.py contains answers to Task 3. The commands to change
are:

s1.rectangle(point1=(-5.0, 15.0), point2=(5.0, -15.0))


p.BaseShellExtrude(sketch=s1, depth=200.0)

© Dassault Systèmes, 2019 Introduction to Abaqus Scripting

You might also like