This repository has been archived by the owner on Mar 4, 2023. It is now read-only.
/
OdbMeshRegionData.py
386 lines (350 loc) · 17.5 KB
/
OdbMeshRegionData.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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
from abaqusConstants import *
class OdbMeshRegionData:
"""The OdbMeshRegionData object defines the external source data of MappedField from an ODB
file.
Attributes
----------
stepIndex: int
An Int specifying the step index. Possible values are 0 ≤≤ **stepIndex** ≤≤ (**numSteps** −
1). The default value is 0.
frameIndex: int
An Int specifying the frame in the specified step. Valid values are 0 ≤≤ **frameIndex** ≤≤
(**numFramesInStep** − 1). The default value is 0.
outputPosition: SymbolicConstant
A SymbolicConstant specifying the position from which to obtain data. Data can be
obtained only from the position at which they were written to the output database during
the analysis. This position should be aligned with the field output variable. Possible
values are:
- UNDEFINED_POSITION
- NODAL
- INTEGRATION_POINT
- ELEMENT_FACE
- ELEMENT_NODAL
- ELEMENT_CENTROID
- WHOLE_ELEMENT
- WHOLE_REGION
- WHOLE_PART_INSTANCE
- WHOLE_MODEL
- GENERAL_PARTICLE
The default value is UNDEFINED_POSITION.
dataType: SymbolicConstant
A SymbolicConstant specifying the data type of the field output variable which should be
aligned with the variable. Currently only SCALAR is supported. Possible values are:
- ENUMERATION
- BOOLEAN
- INTEGER
- SCALAR
- VECTOR
- QUATERNION_2D
- QUATERNION_3D
- TENSOR
- TENSOR_3D_FULL
- TENSOR_3D_PLANAR
- TENSOR_3D_SURFACE
- TENSOR_2D_PLANAR
- TENSOR_2D_SURFACE
The default value is SCALAR.
storageType: SymbolicConstant
A SymbolicConstant specifying the storage type of the field output variable which should
be aligned with the variable. Possible values are FLOAT, DOUBLE, INTEGER, and BOOLEAN.
The default value is FLOAT.
quantityToPlot: SymbolicConstant
A SymbolicConstant specifying the quantity to plot. Currently only FIELD_OUTPUT is
supported. Possible values are FIELD_OUTPUT and DISCONTINUITIES. The default value is
FIELD_OUTPUT.
averageElementOutput: Boolean
A Boolean specifying whether to average the element output. The default value is OFF.
useRegionBoundaries: Boolean
A Boolean specifying whether to use region boundaries when averaging. The default value
is OFF.
regionBoundaries: SymbolicConstant
A SymbolicConstant specifying the type of averaging region boundaries. Currently only
NONE and ODB_REGIONS are supported. Possible values are NONE, ODB_REGIONS, ELEMENT_SET,
and DISPLAY_GROUPS. The default value is NONE.
includeFeatureBoundaries: Boolean
A Boolean specifying whether to include additional averaging boundaries for shells and
membranes based on feature edges. The default value is ON.
featureAngle: float
A Float specifying the feature angle to be used when **includeFeatureBoundaries=ON**. The
default value is 20.0.
averageOnlyDisplayed: Boolean
A Boolean specifying whether to average only values on displayed elements. The default
value is OFF.
averagingThreshold: float
A Float specifying the nodal averaging threshold percentage. 0 ≤≤ **averagingThreshold**
≤≤100. The default value is 75.0.
computeOrder: SymbolicConstant
A SymbolicConstant specifying the order or the computations to be performed on the
interested field output variable. Possible values are EXTRAPOLATE_AVERAGE_COMPUTE,
EXTRAPOLATE_COMPUTE_AVERAGE, EXTRAPOLATE_COMPUTE, EXTRAPOLATE_COMPUTE_DISCONTINUITIES,
and RAW_DATA. The default value is EXTRAPOLATE_COMPUTE_AVERAGE.
numericForm: SymbolicConstant
A SymbolicConstant specifying the numeric form in which to display results that contain
complex numbers. Possible values are COMPLEX_MAGNITUDE, COMPLEX_PHASE, REAL, IMAGINARY,
and COMPLEX_MAG_AT_ANGLE. The default value is REAL.
complexAngle: float
A Float specifying the angle (in degrees) at which to display results that contain
complex numbers when *numericForm=COMPLEX_MAG_AT_ANGLE*=COMPLEX_MAG_AT_ANGLE. The
default value is 0.0.
odbFileName: str
A String specifying the name of the output database file (including the .odb extension)
to be read into as the source data. This String can also be the full path to the output
database file if it is located in another directory.
variableLabel: str
A String specifying the field output variable.
displayOutputPosition: SymbolicConstant
A SymbolicConstant specifying the position where the output is displayed in the
viewport. Possible values
are:UNDEFINED_POSITIONNODALINTEGRATION_POINTELEMENT_FACEELEMENT_NODALELEMENT_CENTROIDWHOLE_ELEMENTWHOLE_REGIONWHOLE_PART_INSTANCEWHOLE_MODELGENERAL_PARTICLEThe
default value is UNDEFINED_POSITION.
Notes
-----
This object can be accessed by:
.. code-block:: python
import field
mdb.models[name].analyticalFields[name].odbMeshRegionData
"""
# An Int specifying the step index. Possible values are 0 ≤≤ *stepIndex* ≤≤ (*numSteps* −
# 1). The default value is 0.
stepIndex: int = 0
# An Int specifying the frame in the specified step. Valid values are 0 ≤≤ *frameIndex* ≤≤
# (*numFramesInStep* − 1). The default value is 0.
frameIndex: int = 0
# A SymbolicConstant specifying the position from which to obtain data. Data can be
# obtained only from the position at which they were written to the output database during
# the analysis. This position should be aligned with the field output variable. Possible
# values are:
# - UNDEFINED_POSITION
# - NODAL
# - INTEGRATION_POINT
# - ELEMENT_FACE
# - ELEMENT_NODAL
# - ELEMENT_CENTROID
# - WHOLE_ELEMENT
# - WHOLE_REGION
# - WHOLE_PART_INSTANCE
# - WHOLE_MODEL
# - GENERAL_PARTICLE
# The default value is UNDEFINED_POSITION.
outputPosition: SymbolicConstant = UNDEFINED_POSITION
# A SymbolicConstant specifying the data type of the field output variable which should be
# aligned with the variable. Currently only SCALAR is supported. Possible values are:
# - ENUMERATION
# - BOOLEAN
# - INTEGER
# - SCALAR
# - VECTOR
# - QUATERNION_2D
# - QUATERNION_3D
# - TENSOR
# - TENSOR_3D_FULL
# - TENSOR_3D_PLANAR
# - TENSOR_3D_SURFACE
# - TENSOR_2D_PLANAR
# - TENSOR_2D_SURFACE
# The default value is SCALAR.
dataType: SymbolicConstant = SCALAR
# A SymbolicConstant specifying the storage type of the field output variable which should
# be aligned with the variable. Possible values are FLOAT, DOUBLE, INTEGER, and BOOLEAN.
# The default value is FLOAT.
storageType: SymbolicConstant = FLOAT
# A SymbolicConstant specifying the quantity to plot. Currently only FIELD_OUTPUT is
# supported. Possible values are FIELD_OUTPUT and DISCONTINUITIES. The default value is
# FIELD_OUTPUT.
quantityToPlot: SymbolicConstant = FIELD_OUTPUT
# A Boolean specifying whether to average the element output. The default value is OFF.
averageElementOutput: Boolean = OFF
# A Boolean specifying whether to use region boundaries when averaging. The default value
# is OFF.
useRegionBoundaries: Boolean = OFF
# A SymbolicConstant specifying the type of averaging region boundaries. Currently only
# NONE and ODB_REGIONS are supported. Possible values are NONE, ODB_REGIONS, ELEMENT_SET,
# and DISPLAY_GROUPS. The default value is NONE.
regionBoundaries: SymbolicConstant = NONE
# A Boolean specifying whether to include additional averaging boundaries for shells and
# membranes based on feature edges. The default value is ON.
includeFeatureBoundaries: Boolean = ON
# A Float specifying the feature angle to be used when *includeFeatureBoundaries*=ON. The
# default value is 20.0.
featureAngle: float = 20
# A Boolean specifying whether to average only values on displayed elements. The default
# value is OFF.
averageOnlyDisplayed: Boolean = OFF
# A Float specifying the nodal averaging threshold percentage. 0 ≤≤ *averagingThreshold*
# ≤≤100. The default value is 75.0.
averagingThreshold: float = 75
# A SymbolicConstant specifying the order or the computations to be performed on the
# interested field output variable. Possible values are EXTRAPOLATE_AVERAGE_COMPUTE,
# EXTRAPOLATE_COMPUTE_AVERAGE, EXTRAPOLATE_COMPUTE, EXTRAPOLATE_COMPUTE_DISCONTINUITIES,
# and RAW_DATA. The default value is EXTRAPOLATE_COMPUTE_AVERAGE.
computeOrder: SymbolicConstant = EXTRAPOLATE_COMPUTE_AVERAGE
# A SymbolicConstant specifying the numeric form in which to display results that contain
# complex numbers. Possible values are COMPLEX_MAGNITUDE, COMPLEX_PHASE, REAL, IMAGINARY,
# and COMPLEX_MAG_AT_ANGLE. The default value is REAL.
numericForm: SymbolicConstant = REAL
# A Float specifying the angle (in degrees) at which to display results that contain
# complex numbers when *numericForm=COMPLEX_MAG_AT_ANGLE*=COMPLEX_MAG_AT_ANGLE. The
# default value is 0.0.
complexAngle: float = 0
# A String specifying the name of the output database file (including the .odb extension)
# to be read into as the source data. This String can also be the full path to the output
# database file if it is located in another directory.
odbFileName: str = ""
# A String specifying the field output variable.
variableLabel: str = ""
# A SymbolicConstant specifying the position where the output is displayed in the
# viewport. Possible values
# are:UNDEFINED_POSITIONNODALINTEGRATION_POINTELEMENT_FACEELEMENT_NODALELEMENT_CENTROIDWHOLE_ELEMENTWHOLE_REGIONWHOLE_PART_INSTANCEWHOLE_MODELGENERAL_PARTICLEThe
# default value is UNDEFINED_POSITION.
displayOutputPosition: SymbolicConstant = UNDEFINED_POSITION
def __init__(
self,
odbFileName: str,
variableLabel: str,
stepIndex: int = 0,
frameIndex: int = 0,
outputPosition: SymbolicConstant = UNDEFINED_POSITION,
dataType: SymbolicConstant = SCALAR,
storageType: SymbolicConstant = FLOAT,
quantityToPlot: SymbolicConstant = FIELD_OUTPUT,
averageElementOutput: str = OFF,
useRegionBoundaries: str = OFF,
regionBoundaries: SymbolicConstant = NONE,
includeFeatureBoundaries: str = ON,
featureAngle: float = 20,
averageOnlyDisplayed: str = OFF,
averagingThreshold: float = 75,
computeOrder: SymbolicConstant = EXTRAPOLATE_COMPUTE_AVERAGE,
numericForm: SymbolicConstant = REAL,
complexAngle: float = 0,
sectionPoint: str = "",
refinementType: SymbolicConstant = None,
refinementLabel: str = "",
displayOutputPosition: SymbolicConstant = None,
):
"""This method creates an OdbMeshRegionData object.
Notes
-----
This function can be accessed by:
.. code-block:: python
mdb.models[name].analyticalFields[name].OdbMeshRegionData
Parameters
----------
odbFileName
A String specifying the name of the output database file (including the .odb extension)
to be read into as the source data. This String can also be the full path to the output
database file if it is located in another directory.
variableLabel
A String specifying the field output variable.
stepIndex
An Int specifying the step index. Possible values are 0 ≤≤ *stepIndex* ≤≤ (*numSteps* −
1). The default value is 0.
frameIndex
An Int specifying the frame in the specified step. Valid values are 0 ≤≤ *frameIndex* ≤≤
(*numFramesInStep* − 1). The default value is 0.
outputPosition
A SymbolicConstant specifying the position where the data is written in the output
database. Data can be obtained only from the position at which it was written to the
output database during the analysis. This position should be aligned with the field
output variable. Possible values are:
- UNDEFINED_POSITION
- NODAL
- INTEGRATION_POINT
- ELEMENT_FACE
- ELEMENT_NODAL
- ELEMENT_CENTROID
- WHOLE_ELEMENT
- WHOLE_REGION
- WHOLE_PART_INSTANCE
- WHOLE_MODEL
- GENERAL_PARTICLE
The default value is UNDEFINED_POSITION.
dataType
A SymbolicConstant specifying the data type of the field output variable which should be
aligned with the variable. Currently only SCALAR is supported. Possible values are:
- ENUMERATION
- BOOLEAN
- INTEGER
- SCALAR
- VECTOR
- QUATERNION_2D
- QUATERNION_3D
- TENSOR
- TENSOR_3D_FULL
- TENSOR_3D_PLANAR
- TENSOR_3D_SURFACE
- TENSOR_2D_PLANAR
- TENSOR_2D_SURFACE
The default value is SCALAR.
storageType
A SymbolicConstant specifying the storage type of the field output variable which
should be aligned with the variable. Possible values are FLOAT, DOUBLE, INTEGER, and
BOOLEAN. The default value is FLOAT.
quantityToPlot
A SymbolicConstant specifying the quantity to plot. Currently only FIELD_OUTPUT is
supported. Possible values are FIELD_OUTPUT and DISCONTINUITIES. The default value is
FIELD_OUTPUT.
averageElementOutput
A Boolean specifying whether to average the element output. The default value is OFF.
useRegionBoundaries
A Boolean specifying whether to use region boundaries when averaging. The default
value is OFF.
regionBoundaries
A SymbolicConstant specifying the type of averaging region boundaries. Currently only
NONE and ODB_REGIONS are supported. Possible values are NONE, ODB_REGIONS, ELEMENT_SET,
and DISPLAY_GROUPS. The default value is NONE.
includeFeatureBoundaries
A Boolean specifying whether to include additional averaging boundaries for shells and
membranes based on feature edges. The default value is ON.
featureAngle
A Float specifying the feature angle to be used when *includeFeatureBoundaries*=ON.
The default value is 20.0.
averageOnlyDisplayed
A Boolean specifying whether to average only values on displayed elements. The default
value is OFF.
averagingThreshold
A Float specifying the nodal averaging threshold percentage. 0 ≤≤ *averagingThreshold*
≤≤100. The default value is 75.0.
computeOrder
A SymbolicConstant specifying the order or the computations to be performed on the
interested field output variable. Possible values are EXTRAPOLATE_AVERAGE_COMPUTE,
EXTRAPOLATE_COMPUTE_AVERAGE, EXTRAPOLATE_COMPUTE, EXTRAPOLATE_COMPUTE_DISCONTINUITIES,
and RAW_DATA. The default value is EXTRAPOLATE_COMPUTE_AVERAGE.
numericForm
A SymbolicConstant specifying the numeric form in which to display results that
contain complex numbers. Possible values are COMPLEX_MAGNITUDE, COMPLEX_PHASE, REAL,
IMAGINARY, and COMPLEX_MAG_AT_ANGLE. The default value is REAL.
complexAngle
A Float specifying the angle (in degrees) at which to display results that contain
complex numbers when *numericForm=COMPLEX_MAG_AT_ANGLE*=COMPLEX_MAG_AT_ANGLE. The
default value is 0.0.
sectionPoint
A Dictionary with String keys and String values. Each key specifies a region in the
model; the corresponding value specifies a section point within that region. For
example:
sectionPoint={'shell < MAT > < 7 section points >':'SPOS
(fraction = 1.0)', 'shell < MAT > < 5 section points >':
'SPOS, (fraction = 1.0)', }
refinementType
A SymbolicConstant specifying the type of the FieldOutput object. Possible values for
the SymbolicConstant are NO_REFINEMENT, INVARIANT and COMPONENT. Default argument is
NO_REFINEMENT. *refinementType* is mandetory if *variableLabel* has an INVARIANT or a
COMPONENT.
refinementLabel
A String specifying the Label of FieldOutput object. This is required only if the
*refinementType* is INVARIANT or COMPONENT.
displayOutputPosition
A SymbolicConstant specifying the position from which to obtain the data. Possible
values are NODAL, INTEGRATION_POINT, ELEMENT_FACE, ELEMENT_NODAL, ELEMENT_CENTROID,
WHOLE_ELEMENT, WHOLE_REGION, WHOLE_PART_INSTANCE, WHOLE_MODEL, and GENERAL_PARTICLE.
Returns
-------
An OdbMeshRegionData object.
Raises
------
TextException.
"""
pass
def setValues(self):
"""This method modifies the OdbMeshRegionData object."""
pass