This repository has been archived by the owner on Mar 4, 2023. It is now read-only.
/
OdbStep.py
165 lines (132 loc) · 5.16 KB
/
OdbStep.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
import typing
from .HistoryPoint import HistoryPoint
from .HistoryRegion import HistoryRegion
from .OdbFrame import OdbFrame
from .OdbLoadCase import OdbLoadCase
from .OdbStepBase import OdbStepBase
class OdbStep(OdbStepBase):
def HistoryRegion(
self, name: str, description: str, point: HistoryPoint, loadCase: str = None
) -> HistoryRegion:
"""This method creates a HistoryRegion object.
Notes
-----
This function can be accessed by:
.. code-block:: python
session.odbs[name].steps[name].HistoryRegion
Parameters
----------
name
A String specifying the name of the HistoryRegion object.
description
A String specifying the description of the HistoryRegion object.
point
A HistoryPoint object specifying the point to which the history data refer.
loadCase
None or an OdbLoadCase object specifying the load case associated with the HistoryRegion
object. The default value is None.
Returns
-------
A HistoryRegion object.
"""
self.historyRegions[name] = historyRegion = HistoryRegion(
name, description, point, loadCase
)
return historyRegion
@typing.overload
def Frame(
self, incrementNumber: int, frameValue: float, description: str = ""
) -> OdbFrame:
"""This method creates an OdbFrame object and appends it to the frame sequence.
Notes
-----
This function can be accessed by:
.. code-block:: python
session.odbs[name].steps[name].Frame
Parameters
----------
incrementNumber
An Int specifying the frame increment number within the step. The base frame has
normally increment number 0, and the results run from 1. In case of multiple load cases,
the same increment number is duplicated for each load case.
frameValue
A Float specifying the value in units determined by the *domain* member of the Step
object. The equivalent in the time domain is *stepTime*; in the frequency domain the
equivalent is *frequency*; and in the modal domain the equivalent is *mode*.
description
A String specifying the contents of the frame. The default value is an empty string.
Returns
-------
An OdbFrame object.
"""
pass
@typing.overload
def Frame(self, mode: int, frequency: float, description: str = "") -> OdbFrame:
"""This constructor creates an OdbFrame object in the frequency domain and appends it to
the frame sequence. The arguments to the constructor are valid only when
*domain*=FREQUENCY or *domain*=MODAL.
Notes
-----
This function can be accessed by:
.. code-block:: python
session.odbs[name].steps[name].Frame
Parameters
----------
mode
An Int specifying the eigenmode. This member is valid only if *domain*=MODAL.
frequency
A Float specifying the frequency. This member is valid only if *domain*=FREQUENCY or if
the *procedureType* member of the Step object=FREQUENCY. The default value is 0.0.
description
A String specifying the contents of the frame. The default value is an empty string.
Returns
-------
An OdbFrame object.
"""
pass
@typing.overload
def Frame(
self, loadCase: OdbLoadCase, description: str = "", frequency: float = 0
) -> OdbFrame:
"""This constructor creates an OdbFrame object for a specific load case and appends it to
the frame sequence.
Notes
-----
This function can be accessed by:
.. code-block:: python
session.odbs[name].steps[name].Frame
Parameters
----------
loadCase
An OdbLoadCase object specifying the load case for the frame.
description
A String specifying the contents of the frame. The default value is an empty string.
frequency
A Float specifying the frequency. This member is valid only if *domain*=FREQUENCY or if
the *procedureType* member of the Step object=FREQUENCY. The default value is 0.0.
Returns
-------
An OdbFrame object.
"""
pass
def Frame(self, *args, **kwargs) -> OdbFrame:
frame = OdbFrame(*args, **kwargs)
self.frames.append(frame)
return frame
def OdbLoadCase(self, name: str) -> OdbLoadCase:
"""This method creates an OdbLoadCase object.
Notes
-----
This function can be accessed by:
.. code-block:: python
session.odbs[*name*].steps[*name*].LoadCase
Parameters
----------
name
A String specifying the name of the OdbLoadCase object.
Returns
-------
An OdbLoadCase object.
"""
self.loadCases[name] = odbLoadCase = OdbLoadCase(name)
return odbLoadCase