PYTHON SCRIPTS FOR ABAQUS

PYTHON SCRIPTS FOR ABAQUS

LEARN BY EXAMPLE

Gautam Puri

This document is the Table of Contents for the book.

A preview version of the book is available as a separate download

from the book website.

Book website:

Contents

1.

A Taste of Scripting

1.1

1.2

1.3

1.4

1.5

2.

Running a Script

2.1

2.2

2.3

2.4

2.5

2.6

3.

Introduction

Using a script to define materials

To script or not to script..

Running a complete analysis through a script

Conclusion

Introduction

How Python fits in

Running a script within Abaqus/CAE

2.3.1 Running a script in GUI to execute a single or multiple tasks

2.3.2 Running a script in GUI to execute an entire simulation

Running a script from the command line

2.4.1 Run the script from the command line without the GUI

2.4.2 Run the script from the command line with the GUI

Running a script from the command line interface (CLI)

Conclusion

Python 101

3.1

3.2

3.3

3.4

3.5

3.6

3.7

3.8

Introduction

Statements

Variables and assignment statements

Lists

Dictionaries

Tuples

Classes, Objects and Instances

What¡¯s next?

1

1

1

8

8

32

33

33

33

34

35

35

35

37

38

39

40

41

41

41

41

44

46

49

51

59

ii Contents

4.

The Basics of Scripting ¨C Cantilever Beam Example

4.1

4.2

4.3

4.4

5.

Python 102

5.1

5.2

6.

Introduction

A basic script

Breaking down the script

4.3.1 Initialization (import required modules)

4.3.2 Create the model

4.3.3 Create the part

4.3.4 Define the materials

4.3.5 Create solid sections and make section assignments

4.3.6 Create an assembly

4.3.7 Create steps

4.3.8 Create and define field output requests

4.3.9 Create and define history output requests

4.3.10 Apply loads

4.3.11 Apply constraints/boundary conditions

4.3.12 Mesh

4.3.13 Create and run the job

4.3.14 Post processing

What¡¯s Next?

Introduction

5.1.1 If¡­ elif ¡­ else statements

5.1.2 For loops

5.1.3 range() function

5.1.4 While-loops

5.1.5 break and continue statements

What¡¯s Next?

Replay files, Macros and IDEs

6.1

6.2

6.3

6.4

Introduction

Replay Files

Example - Compare replay with a well written script

Macros

60

60

60

64

65

67

68

71

72

74

75

76

77

78

81

83

88

89

90

92

92

92

94

95

97

97

99

100

100

100

101

106

Contents iii

6.5

6.6

7.

Static Analysis of a Loaded Truss

7.1

7.2

7.3

7.4

7.5

8.

IDEs and Text Editors

6.5.1 IDLE

6.5.2 Notepad ++

6.5.3 Abaqus PDE

6.5.4 Other options

What¡¯s Next?

Introduction

Procedure in GUI

Python Script

Examining the Script

7.4.1 Initialization (import required modules)

7.4.2 Create the model

7.4.3 Create the part

7.4.4 Define the materials

7.4.5 Create sections and make section assignments

7.4.6 Create an assembly

7.4.7 Create steps

7.4.8 Create and define field output requests

7.4.9 Create and define history output requests

7.4.10 Apply loads

7.4.11 Apply boundary conditions

7.4.12 Mesh

7.4.13 Create and run the job

7.4.14 Post processing ¨C setting the viewport

7.4.15 Plot the deformed state and modify common options

7.4.16 Plot the field outputs

Summary

Explicit Analysis of a Dynamically Loaded Truss

8.1

8.2

8.3

Introduction

Procedure in GUI

Python Script

109

109

109

110

113

114

117

117

118

124

129

129

130

130

131

132

134

135

135

135

136

137

139

141

141

142

143

145

146

146

147

154

iv Contents

8.4

9.

8.3.1 Part, material, section and assembly blocks

8.3.2 Creating sets

8.3.3 Creating steps

8.3.4 Create and define history output requests

8.3.5 Apply loads

8.3.6 Boundary conditions, mesh, running the job and initial post

processing

8.3.7 XY plots of displacement

Summary

Analysis of a Frame of I-Beams

9.1

9.2

9.3

9.4

9.5

Introduction

Procedure in GUI

Python Script

Examining the Script

9.4.1 Initialization (import required modules)

9.4.2 Create the model

9.4.3 Create the part

9.4.4 Define the materials

9.4.5 Create profiles

9.4.6 Create sections and make section assignments

9.4.7 Assign section orientations

9.4.8 Create an assembly

9.4.9 Create connectors using wire features

9.4.10 Use constraint equations for two nodes

9.4.11 Create steps

9.4.12 Create and define field output requests

9.4.13 Create and define history output requests

9.4.14 Apply loads

9.4.15 Apply boundary conditions

9.4.16 Mesh

9.4.17 Create and run the job

Summary

160

161

162

163

164

164

165

170

171

171

174

188

199

199

199

199

206

206

207

210

210

211

216

218

218

218

218

220

222

222

223

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download