This repository has been archived by the owner on Mar 4, 2023. It is now read-only.
/
Behavior.py
311 lines (272 loc) · 11.4 KB
/
Behavior.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
from abaqusConstants import *
from .DataSet import DataSet
class Behavior:
"""The Behavior object specifies the method used for calibrating a material.
Attributes
----------
modelName: str
A string specifying the name of the model to which the behavior belongs.
calibrationName: str
A string specifying the name of calibration to which the behavior belongs.
biAxialAllName: str
A String specifying the name of the dataset containing all the raw data in the test data
file. Only valid if the behavior is of type FeFpBehavior
uniAxialAllName: str
A String specifying the name of the dataset containing all the raw data in the test data
file. Only valid if the behavior is of type FeFpBehavior
Notes
-----
This object can be accessed by:
.. code-block:: python
import calibration
mdb.models[name].calibrations[name].behaviors[name]
"""
# A string specifying the name of the model to which the behavior belongs.
modelName: str = ""
# A string specifying the name of calibration to which the behavior belongs.
calibrationName: str = ""
# A String specifying the name of the dataset containing all the raw data in the test data
# file. Only valid if the behavior is of type FeFpBehavior
biAxialAllName: str = ""
# A String specifying the name of the dataset containing all the raw data in the test data
# file. Only valid if the behavior is of type FeFpBehavior
uniAxialAllName: str = ""
def __init__(self, name: str, typeName: str):
"""This method creates a Behavior object.
Notes
-----
This function can be accessed by:
.. code-block:: python
mdb.models[name].calibrations[name].Behavior
Parameters
----------
name
A String specifying the name of the new behavior.
typeName
A String specifying the type of the new Behavior. Values can be "ElasIsoBehavior",
"ElasPlasIsoBehavior", "FeFpBehavior", or a user plug-in behavior type.
Returns
-------
A Behavior object.
"""
pass
def setValues(
self,
E: str = "",
nu: str = "",
ds1Name: str = "",
ds2Name: str = "",
materialName: str = "",
yieldPoint: str = "",
ultimatePoint: str = "",
plasticPoints: str = "",
PoissonsRatio: str = "",
elasticModulus: str = "",
plasticPointsRange: str = "",
name: str = "",
uniaxialName: str = "",
biaxialName: str = "",
interpolation: str = "",
uniWeight: str = "",
biWeight: str = "",
uMullinsReload: str = "",
uMullinsUnload: str = "",
uPYieldPoint: tuple = (),
uPermSet: str = "",
uPrimary: str = "",
bMullinsReload: str = "",
bMullinsUnload: str = "",
bPYieldPoint: tuple = (),
bPermSet: str = "",
bPrimary: str = "",
):
"""This method modifies the data for an existing behavior object.
Parameters
----------
E
Young's modulus. Only valid if the behavior type is ElasIsoBehavior.
nu
Poisson's ratio. Only valid if the behavior type is ElasIsoBehavior.
ds1Name
The name of the first data set. Only valid if the behavior type is ElasIsoBehavior or
ElasPlasIsoBehavior
ds2Name
The name of the second data set. Only valid if the behavior type is ElasIsoBehavior or
ElasPlasIsoBehavior
materialName
Material Name.
yieldPoint
Stress/strain value for the material yield point.Only valid if the behavior type is
ElasPlasIsoBehavior
ultimatePoint
Stress/strain value for the material ultimate point.Only valid if the behavior type is
ElasPlasIsoBehavior
plasticPoints
Stress/strain values for the Plastic portion of material curve. Only valid if the
behavior type is ElasPlasIsoBehavior
PoissonsRatio
Poisson's Ratio. Only valid if the behavior type is ElasPlasIsoBehavior
elasticModulus
Young's Modulus for the elastic portion of the material curve. Only valid if the
behavior type is ElasPlasIsoBehavior
plasticPointsRange
Extent of the material Plastic points. Only valid if the behavior type is
ElasPlasIsoBehavior
name
Name of the behavior.
uniaxialName
Name of the uniaxial dataset. Only valid if the behavior type is FeFpBehavior
biaxialName
Name of the biaxial dataset. Only valid if the behavior type is FeFpBehavior
interpolation
'linear' specifies linear interpolation between data points, otherwise 'logarithmic'.
Only valid if the behavior type is FeFpBehavior
uniWeight
Uniaxial weight factor, uniWeight + biWeight should equal 1.0. Only valid if the
behavior type is FeFpBehavior
biWeight
Biaxial weight factor, uniWeight + biWeight should equal 1.0. Only valid if the behavior
type is FeFpBehavior
uMullinsReload
A List of strings, specifying names of reloading DataSet objects obtained from uniaxial
test data. Only valid if the behavior is of type FeFpBehavior
uMullinsUnload
A List of strings, specifying names of reloading DataSet objects obtained from uniaxial
test data. Only valid if the behavior is of type FeFpBehavior
uPYieldPoint
A tuple specifying the coordinates of yield point of the permanent data set. Only valid
if the behavior is of type FeFpBehavior
uPermSet
A List of strings, specifying names of permanent DataSet objects obtained from uniaxial
test data. Only valid if the behavior is of type FeFpBehavior
uPrimary
A string specifying name of Primary DataSet object.Only valid if the behavior is of type
FeFpBehavior
bMullinsReload
A List of strings, specifying names of reloading DataSet objects obtained from biaxial
test data. Only valid if the behavior is of type FeFpBehavior
bMullinsUnload
A List of strings, specifying names of unloading DataSet objects obtained from biaxial
test data. Only valid if the behavior is of type FeFpBehavior
bPYieldPoint
A tuple specifying the coordinates of yield point of the permanent data set. Only valid
if the behavior is of type FeFpBehavior
bPermSet
A List of strings, specifying names of permanent DataSet objects obtained from biaxial
test data. Only valid if the behavior is of type FeFpBehavior
bPrimary
A string specifying name of Primary DataSet object. Only valid if the behavior is of
type FeFpBehavior
"""
pass
def mapToMaterial(self, materialName: str):
"""This method appends the calibration data obtained from the DataSet object to an existing
material object. In the case of ElasIsoBehavior, it appends the young's modulus and
poisson's ratio. For ElasPlasIsoBehavior it appends the young's modulus, poisson's ratio
and Plastic points range and for FeFpBehavior it appends Plastic points range and
Mullins effect properties.
Parameters
----------
materialName
A String specifying the name of the existing material
"""
pass
def compute_E(self, dataSet: DataSet):
"""This method computes the value of young's modulus from the existing DataSet object. The
method is only valid for ElasIsoBehavior type of behavior.
Parameters
----------
dataSet
A DataSet object.
Returns
-------
A tuple consisting of a and b values of the regression line(y = ax + b), coefficient of
determination(r-squared) value and the start and end-points of the line.
"""
pass
def compute_nu(self, dataSet: DataSet):
"""This method computes the value of Poisson's Ratio from the existing DataSet object. The
method is only valid for ElasIsoBehavior and ElasPlasIsoBehavior type of behavior.
Parameters
----------
dataSet
A DataSet object.
Returns
-------
A tuple consisting of a and b values of the regression line(y = ax + b), coefficient of
determination(r-squared) value and the start and end-points of the line.
"""
pass
def compute_ultimatePoint(self, dataSet: DataSet):
"""This method computes the coordinates of the Ultimate point from the existing DataSet
object. The method is only valid for ElasPlasIsoBehavior type of behavior.
Parameters
----------
dataSet
A DataSet object.
Returns
-------
Coordinates of the ultimate point.
"""
pass
def compute_elasticModulus(self, yieldPoint: tuple):
"""This method computes the value of the elastic modulus from the yieldpoint value. The
method is only valid for ElasPlasIsoBehavior type of behavior.
Parameters
----------
yieldPoint
A tuple consisting of coordinates of the yieldpoint.
Returns
-------
A float specifying the value of elastic modulus.
"""
pass
def compute_plasticPoints(
self,
dataSet: DataSet,
slider_val: str,
start_index: str,
end_index: str,
yp: str = "",
):
"""This method extracts the coordinates of the Plastic Points. The method is only valid for
ElasPlasIsoBehavior type of behavior.
Parameters
----------
dataSet
A DataSet object.
slider_val
A float specifying the number of values to be taken.
start_index
A float specifying the lower limit of the range.
end_index
A float specifying the upper limit of the range.
yp
Coordinates of the yieldpoint. The default value is (0,0).
Returns
-------
A sequence of coordinates of the Plastic points..
"""
pass
def xyDataDissect(
self, dsName: str, modelName: str, calibrationName: str, biaxial: Boolean = True
):
"""This method extracts primary, unload, reload and permanent DataSet objects from the
existing DataSet object.The method is only valid for FeFpBehavior type of behavior.
Parameters
----------
dsName
A string specifying the name of the uniaxial/biaxial test dataset.
modelName
A string specifying the name of the model to which the calibration behavior belongs.
calibrationName
A string specifying the name of the Calibration object to which the behavior belongs.
biaxial
A boolean specifying whether the test data is biaxial or uniaxial. The default value is
True.
Returns
-------
A sequence of strings specifying names of the DataSet objects containing loading,
unloading, reloading and primary datasets.
"""
pass