This repository has been archived by the owner on Mar 4, 2023. It is now read-only.
/
PropertyTable.py
135 lines (107 loc) · 4.01 KB
/
PropertyTable.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
from abaqusConstants import *
from .PropertyTableData import PropertyTableData
class PropertyTable:
"""A PropertyTable is an object that is used to define the container that encapsulates the
PropertyTableData object.
The data of the PropertyTableData object is dependent on the contents of the
PropertyTable object.
After PropertyTableDatais instantiated, making changes to PropertyTable may lead to data
corruption.
Attributes
----------
propertyTableDatas: dict[str, PropertyTableData]
A repository of PropertyTableData. Specifies all the propertyTableData in PropertyTable
Notes
-----
This object can be accessed by:
.. code-block:: python
mdb.models[name].tableCollections[name].propertyTables[name]
The corresponding analysis keywords are:
- PROPERTY TABLE TYPE
- PROPERTY TABLE
"""
# A repository of PropertyTableData. Specifies all the propertyTableData in PropertyTable
propertyTableDatas: dict[str, PropertyTableData] = dict[str, PropertyTableData]()
def __init__(self, name: str, properties: str, variables: str = ""):
"""This method creates a PropertyTable object.
Notes
-----
This function can be accessed by:
.. code-block:: python
mdb.models[name].tableCollections[name].PropertyTable
Parameters
----------
name
A String specifying the repository key.
properties
A string array specifying the multiple properties to build the parameter table type.
variables
A String array specifying multiple independent variables. The default value is an empty
array.
Returns
-------
A PropertyTable object.
Raises
------
RangeError
"""
pass
def setValues(self, variables: str = ""):
"""This method modifies the PropertyTable object.
Parameters
----------
variables
A String array specifying multiple independent variables. The default value is an empty
array.
Returns
-------
Raises
------
RangeError
"""
pass
def PropertyTableData(
self,
label: str = "",
regularize: SymbolicConstant = None,
extrapolate: SymbolicConstant = None,
isTemp: Boolean = OFF,
fieldNums: int = None,
regularizeTolerance: str = "",
data: str = "",
) -> PropertyTableData:
"""This method creates a PropertyTableData object.
Notes
-----
This function can be accessed by:
.. code-block:: python
mdb.models[name].tableCollections[name].PropertyTable
Parameters
----------
label
A String specifying a unique label name for the current PropertyTable object.
regularize
A SymbolicConstant specifying the type of regularize to the user-defined property data.
extrapolate
A SymbolicConstant specifying the type of extrapolation of dependent variables outside
the specified range of the independent variables.
isTemp
A Boolean specifying the dependency of properties on temperature.
fieldNums
An Int specifying the field variables on which properties are dependent.
regularizeTolerance
A Double specifying the tolerance to be used to regularize the property table data.
data
An Array of doubles specifying the values of the properties, the variables mentioned in
PropertyTable, and the field variables mentioned in PropertyTableData.
Returns
-------
A PropertyTableData object.
Raises
------
RangeError.
"""
self.propertyTableDatas[label] = propertyTableData = PropertyTableData(
label, regularize, extrapolate, isTemp, fieldNums, regularizeTolerance, data
)
return propertyTableData