2
2
Mechanical API
3
3
==============
4
4
5
- Module to setup Explicit or Implicit analysis
5
+ Module for settting up explicit or implicit analysis.
6
6
"""
7
7
8
8
from .dynabase import * # noqa : F403
@@ -15,7 +15,7 @@ class AnalysisType(Enum):
15
15
16
16
17
17
class DynaMech (DynaBase ):
18
- """Define an Mechanical analysis."""
18
+ """Defines a Mechanical analysis."""
19
19
20
20
def __init__ (self , analysis = AnalysisType .EXPLICIT ):
21
21
DynaBase .__init__ (self )
@@ -27,18 +27,23 @@ def create_control_output(self, npopt=0, neecho=0):
27
27
28
28
Parameters
29
29
----------
30
- npopt : int
31
- Print suppression during input phase flag for the d3hsp file:
32
- EQ.0: No suppression.
33
- EQ.1: Nodal coordinates, element connectivities, rigid wall definitions,
34
- nodal SPCs, initial velocities, initial strains, adaptive constraints, and
35
- SPR2/SPR3 constraints are not printed.
36
- neecho : int
37
- Print suppression during input phase flag for echo file:
38
- EQ.0: All data printed.
39
- EQ.1: Nodal printing is suppressed.
40
- EQ.2: Element printing is suppressed.
41
- EQ.3: Both nodal and element printing is suppressed.
30
+ npopt : int, optional
31
+ Print suppression during the input phase flag for the D3HSP file.
32
+ The default is ``0``. Options are:
33
+
34
+ - EQ.0: No suppression.
35
+ - EQ.1: Nodal coordinates, element connectivities, rigid wall definitions,
36
+ nodal SPCs, initial velocities, initial strains, adaptive constraints, and
37
+ SPR2/SPR3 constraints are not printed.
38
+
39
+ neecho : int, optional
40
+ Print suppression during the input phase flag for the echo file.
41
+ The default is ``0``. Options are:
42
+
43
+ - EQ.0: All data is printed.
44
+ - EQ.1: Nodal printing is suppressed.
45
+ - EQ.2: Element printing is suppressed.
46
+ - EQ.3: Both nodal and element printing is suppressed.
42
47
43
48
Returns
44
49
-------
@@ -50,14 +55,14 @@ def create_control_output(self, npopt=0, neecho=0):
50
55
return ret
51
56
52
57
def set_init_velocity (self , translational = Velocity (0 , 0 , 0 ), rotational = RotVelocity (0 , 0 , 0 )):
53
- """Define initial nodal point velocities using nodal set ID.
58
+ """Define initial nodal point velocities using a nodal set ID.
54
59
55
60
Parameters
56
61
----------
57
62
nsid : int
58
63
Nodal set ID.
59
64
translational : Velocity
60
- Initial translational velocity in x,y,z-direction.
65
+ Initial translational velocity in the x,y,z-direction.
61
66
rotational : RotVelocity
62
67
Initial rotational velocity about the x,y,z-axis.
63
68
@@ -86,20 +91,20 @@ def create_defineorientation(self, vid, iop, vector, node1, node2):
86
91
vid : int
87
92
Orientation vector ID.
88
93
iop : int
89
- Option :
94
+ Options are :
90
95
91
- * EQ.0: deflections /rotations are measured and forces/moments applied
96
+ - EQ.0: Deflections /rotations are measured and forces/moments are applied
92
97
along the following orientation vector.
93
- * EQ.1: deflections /rotations are measured and forces/moments applied
98
+ - EQ.1: Deflections /rotations are measured and forces/moments are applied
94
99
along the axis between the two spring/damper nodes projected onto the plane normal
95
100
to the following orientation vector.
96
- * EQ.2: deflections /rotations are measured and forces/moments applied
101
+ - EQ.2: Deflections /rotations are measured and forces/moments are applied
97
102
along a vector defined by the following two nodes.
98
- * EQ.3: deflections /rotations are measured and forces/moments applied
103
+ - EQ.3: Deflections /rotations are measured and forces/moments are applied
99
104
along the axis between the two spring/damper nodes projected onto the
100
105
plane normal to the a vector defined by the following two nodes.
101
106
vector : list [x,y,z]
102
- x,y,z : x,y,z-value of orientation vector.
107
+ x,y,z : x,y,z-value of the orientation vector.
103
108
node1 : int
104
109
Node 1 ID.
105
110
node2 : int
@@ -122,13 +127,13 @@ def create_shellset(self, option, title, sid, eids):
122
127
Parameters
123
128
----------
124
129
option : string
125
- Available options: <BLANK>, LIST, GENERAL
130
+ Available options. Choices are `` <BLANK>``,`` LIST``, and `` GENERAL``.
126
131
title : string
127
- Define title for shell set.
132
+ Title for the shell set.
128
133
sid : int
129
134
Set ID.
130
135
eids : list
131
- Shell element IDs.
136
+ List of shell element IDs.
132
137
133
138
Returns
134
139
-------
@@ -145,7 +150,7 @@ def create_solidset(self, title, sid, ki):
145
150
Parameters
146
151
----------
147
152
title : string
148
- Define title for solid set.
153
+ Title for the set of solid elements .
149
154
sid : int
150
155
Set ID.
151
156
ki : list
@@ -166,9 +171,9 @@ def create_section_solid(self, title, secid, elform):
166
171
Parameters
167
172
----------
168
173
title : string
169
- Define title for section solid.
174
+ Title for section solid.
170
175
secid : int
171
- Section ID. SECID is referenced on the \*PART card.
176
+ Section ID. `` SECID`` is referenced on the `` \*PART`` card.
172
177
A unique number must be specified.
173
178
elform : int
174
179
Element formulation options.
@@ -189,22 +194,24 @@ def create_section_discrete(self, secid, dro=0, kd=0, v0=0, cl=0, fd=0, cdl=0, t
189
194
----------
190
195
secid : int
191
196
Section ID.
192
- dro : int
193
- Displacement/Rotation Option:
194
- EQ.0: the material describes a translational spring/damper,
195
- EQ.1: the material describes a torsional spring/damper.
196
- kd : float
197
- Dynamic magnification factor.
198
- v0 : float
199
- Test velocity.
200
- cl : float
201
- Clearance.
202
- fd : float
203
- Failure deflection.
204
- cdl : float
205
- Deflection limit in compression.
206
- cd1 : float
207
- Deflection limit in tension.
197
+ dro : int, optional
198
+ Displacement/rotation. The default is ``0``. Options are:
199
+
200
+ - EQ.0: Material describes a translational spring/damper.
201
+ - EQ.1: Material describes a torsional spring/damper.
202
+
203
+ kd : float, optional
204
+ Dynamic magnification factor. The default is ``0``.
205
+ v0 : float, optional
206
+ Test velocity. The default is ``0``.
207
+ cl : float, optional
208
+ Clearance. The default is ``0``.
209
+ fd : float, optional
210
+ Failure deflection. The default is ``0``.
211
+ cdl : float, optional
212
+ Deflection limit in compression. The default is ``0``.
213
+ td1 : float, optional
214
+ Deflection limit in tension. The default is ``0``.
208
215
209
216
Returns
210
217
-------
@@ -226,16 +233,16 @@ def create_hourglass(self, ghid, ihq, qm=0.1, q1=1.5, q2=0.06, qb=1e-9, qw=1e-9)
226
233
Hourglass ID. A unique number or label must be specified.
227
234
ihq : int
228
235
Hourglass control type.
229
- qm : float
230
- Hourglass coefficient.
231
- q1 : float
232
- Quadratic bulk viscosity coefficient.
233
- q2 : float
234
- Linear bulk viscosity coefficient.
235
- qb : float
236
- Hourglass coefficient for shell bending.
237
- qw : float
238
- Hourglass coefficient for shell warping.
236
+ qm : float, optional
237
+ Hourglass coefficient. The default is ``0.1``.
238
+ q1 : float, optional
239
+ Quadratic bulk viscosity coefficient. The default is ``1.5``.
240
+ q2 : float, optional
241
+ Linear bulk viscosity coefficient. The default is ``0.06``.
242
+ qb : float, optional
243
+ Hourglass coefficient for shell bending. The default is ``1e-09``.
244
+ qw : float, optional
245
+ Hourglass coefficient for shell warping. The default is ``1e-09``.
239
246
240
247
Returns
241
248
-------
@@ -314,26 +321,31 @@ def save_file(self, defaultsetting=1):
314
321
315
322
316
323
class Airbag :
317
- """Define an airbag or control volume.
324
+ """Defines an airbag or control volume.
318
325
319
326
Parameters
320
327
----------
321
- Set : SegmentSet/PartSet
322
- Set : EQ.0:segment EQ.1: part set ID.
323
- heat_capacity_at_constant_volume : float
324
- Heat capacity at constant volume.
325
- heat_capacity_at_constant_pressure : float
326
- Heat capacity at constant pressure.
327
- input_gas_temperature : float
328
- Temperature of input gas.
329
- input_mass_flow_rate : int
330
- Load curve ID specifying input mass flow rate.
331
- shape_factor_for_exit_hole : float
332
- Shape factor for exit hole.
333
- ambient_pressure : float
334
- Ambient pressure.
335
- ambient_density : float
336
- Ambient density.
328
+ Set : SegmentSet or PartSet
329
+ Set. Options are:
330
+
331
+ - EQ.0: Segment set ID.
332
+ - EQ.1: Part set ID.
333
+
334
+ heat_capacity_at_constant_volume : float, optional
335
+ Heat capacity at constant volume. The default is ``0``.
336
+ heat_capacity_at_constant_pressure : float, optional
337
+ Heat capacity at constant pressure. The default is ``0``.
338
+ input_gas_temperature : float, optional
339
+ Temperature of the input gas. The default is ``0``.
340
+ input_mass_flow_rate : int, optional
341
+ Load curve ID specifying the input mass flow rate.
342
+ The default is ``0``.
343
+ shape_factor_for_exit_hole : float, optional
344
+ Shape factor for exit hole. The default is ``0``.
345
+ ambient_pressure : float, optional
346
+ Ambient pressure. The default is ``0``.
347
+ ambient_density : float, optional
348
+ Ambient density. The default is ``0``.
337
349
338
350
Returns
339
351
-------
@@ -367,7 +379,7 @@ def __init__(
367
379
self .sidtyp = 1
368
380
369
381
def create (self ):
370
- """Create airbag."""
382
+ """Create an airbag."""
371
383
self .stub .CreateAirbagModel (
372
384
AirbagModelRequest (
373
385
modeltype = "SIMPLE_AIRBAG_MODEL" ,
0 commit comments