-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathabaqus_batch_rpt.py
41 lines (38 loc) · 1.25 KB
/
abaqus_batch_rpt.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
from abaqus import *
from abaqusConstants import *
import odbAccess
from math import floor
import __main__
def BatchReport():
step_name = 'form'
step_number = 1
save_dir = 'C:/save/directory/here/'
save_count = 10 # frames count
view = session.viewports[session.currentViewportName]
odb_name = view.displayedObject.name
odb = session.odbs[odb_name]
count = len(odb.steps[step_name].frames)-1
print count
stepsize = int(floor(count/save_count))
#
#
for F in range(count,0,-stepsize) + [0]:
view.odbDisplay.setFrame(step=step_number, frame=F)
session.fieldReportOptions.setValues(printTotal=OFF, printMinMax=OFF)
pad = "%03d" % (F)
file = save_dir + pad + "_" + step_name + ".rpt"
session.writeFieldReport(
fileName=file,
append=OFF, sortItem='Node Label',
odb=odb, step=1, frame=F,
outputPosition=NODAL, variable=(
('U', NODAL, (
(COMPONENT, 'U1'),
(COMPONENT, 'U2'),
(COMPONENT, 'U3'),
)),
('LE', INTEGRATION_POINT, (
(INVARIANT, 'Max. In-Plane Principal'),
(INVARIANT, 'Min. In-Plane Principal'),
)),
))