pystran.freedoms module#
Define the functions for defining and manipulating degrees of freedom.
- pystran.freedoms.ALL_DOFS = 100#
This (
ALL_DOFS
) is a designation of all the degrees of freedom, translations and rotations (U1
,U2
,UR3
in 2D models, orU1
,U2
,U3
,UR1
,UR2
,UR3
in 3D models). It may be used to specify the clamped condition for the joint.
- pystran.freedoms.TRANSLATION_DOFS = 200#
This (
TRANSLATION_DOFS
) is a designation of the translation degrees of freedom (U1
,U2
, in 2D models, orU1
,U2
,U3
in 3D models). It may be used to specify the pinned condition for the joint.
- pystran.freedoms.U1 = 0#
This is a designation of the degree of freedom as translation along
X
.
- pystran.freedoms.U2 = 1#
This is a designation of the degree of freedom as translation along
Z
(in 2D models) or alongY
(in 3D models).
- pystran.freedoms.U3 = 2#
This is a designation of the degree of freedom as translation along
Z
(in 3D models).
- pystran.freedoms.UR1 = 3#
This is a designation of the degree of freedom as rotation about
X
(in 3D models).
- pystran.freedoms.UR2 = 4#
This is a designation of the degree of freedom as rotation about
Y
(in 3D models).
- pystran.freedoms.UR3 = 5#
This is a designation of the degree of freedom as rotation about
Y
(in 2D models) or rotation aboutZ
(in 3D models).
- pystran.freedoms.prescribed_dofs_and_values(dim, dof, value)[source]#
Compute prescribed degrees of freedom and values for a particular support type.
- Parameters:
dim – Dimension of the model (2 or 3).
dof – One of the designations of a degree of freedom. Either individual (
U1
, …), or collective (ALL_DOFS
, …).value – A single number, prescribed by the user.
- Returns:
For a single
dof
andvalue
, return just the tuple of the[dof]
and[value]
.For
dof
equal toALL_DOFS
, return the translation and rotation degrees of freedom and zero values.For
dof
equal toTRANSLATION_DOFS
, return the translation degrees of freedom and zero values.- Return type:
tuple of lists
- pystran.freedoms.rotation_dofs(dim)[source]#
List the rotation degrees of freedom.
- Parameters:
dim – Dimension of the model (2 or 3).
- Returns:
The list varies according to whether
dim
implies two dimensions (2) or three dimensions (3):[UR3]
or[UR1, UR2, UR3]
.- Return type:
list