-
Notifications
You must be signed in to change notification settings - Fork 2
/
abaqusMacros.py
137 lines (126 loc) · 3.83 KB
/
abaqusMacros.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# -*- coding: mbcs -*-
# Do not delete the following import lines
from abaqus import *
from abaqusConstants import *
import __main__
def Macro1():
import section
import regionToolset
import displayGroupMdbToolset as dgm
import part
import material
import assembly
import step
import interaction
import load
import mesh
import optimization
import job
import sketch
import visualization
import xyPlot
import displayGroupOdbToolset as dgo
import connectorBehavior
mdb.openAuxMdb(
pathName='x:/YuxiangWang/AbaqusFolder/YoshiModel/OldModel/ToHValidation0122.cae')
mdb.copyAuxMdbModel(fromName='2', toName='2')
mdb.closeAuxMdb()
del mdb.models['Model-1']
p = mdb.models['2'].parts['skin_substrate']
session.viewports['Viewport: 1'].setValues(displayedObject=p)
def Macro2():
import section
import regionToolset
import displayGroupMdbToolset as dgm
import part
import material
import assembly
import step
import interaction
import load
import mesh
import optimization
import job
import sketch
import visualization
import xyPlot
import displayGroupOdbToolset as dgo
import connectorBehavior
pass
def Macro3():
import section
import regionToolset
import displayGroupMdbToolset as dgm
import part
import material
import assembly
import step
import interaction
import load
import mesh
import optimization
import job
import sketch
import visualization
import xyPlot
import displayGroupOdbToolset as dgo
import connectorBehavior
a = mdb.models['FitFem0'].rootAssembly
session.viewports['Viewport: 1'].setValues(displayedObject=a)
session.viewports['Viewport: 1'].assemblyDisplay.setValues(loads=ON, bcs=ON,
predefinedFields=ON, connectors=ON)
mdb.models['FitFem0'].TabularAmplitude(name='Amp-2', timeSpan=STEP,
smooth=SOLVER_DEFAULT, data=((0.0, 0.0), (0.5, 0.5), (1.0, 1.0)))
def Macro4():
import section
import regionToolset
import displayGroupMdbToolset as dgm
import part
import material
import assembly
import step
import interaction
import load
import mesh
import optimization
import job
import sketch
import visualization
import xyPlot
import displayGroupOdbToolset as dgo
import connectorBehavior
session.viewports['Viewport: 1'].view.setValues(nearPlane=0.0335393,
farPlane=0.0401451, width=0.0285057, height=0.0170104,
viewOffsetX=0.000533035, viewOffsetY=0.000320912)
session.viewports['Viewport: 1'].assemblyDisplay.setValues(loads=ON, bcs=ON,
predefinedFields=ON, connectors=ON, adaptiveMeshConstraints=OFF)
del mdb.models['FitFem0Force'].boundaryConditions['movingIndenter']
session.viewports['Viewport: 1'].view.setValues(nearPlane=0.0352995,
farPlane=0.0383849, width=0.0118594, height=0.00707695,
viewOffsetX=-0.00307155, viewOffsetY=0.00291155)
a = mdb.models['FitFem0Force'].rootAssembly
r1 = a.instances['tip-1'].referencePoints
refPoints1=(r1[2], )
region = a.Set(referencePoints=refPoints1, name='Set-7')
mdb.models['FitFem0Force'].ConcentratedForce(name='forceLoad',
createStepName='ramp', region=region, cf2=-0.01, amplitude='RampCurve',
distributionType=UNIFORM, field='', localCsys=None)
def Macro6():
import section
import regionToolset
import displayGroupMdbToolset as dgm
import part
import material
import assembly
import step
import interaction
import load
import mesh
import optimization
import job
import sketch
import visualization
import xyPlot
import displayGroupOdbToolset as dgo
import connectorBehavior
session.viewports['Viewport: 1'].odbDisplay.setFrame(step='ramp')