pystran.section module#
Define section dictionaries.
A section defines material properties, geometrical properties, such as the second moment of area, and also orientation of the cross section profile.
- pystran.section.beam_2d_section(name, E=0.0, A=0.0, I=0.0, rho=0.0, CTE=0.0)[source]#
Define 2d beam section.
The parameters can be defined either as regular list of values or variables, or in the
keyword=value
style.- Parameters:
E – Young’s modulus.
A – Cross-sectional area.
I – Central moment of inertia of the cross-section about the \(y\) coordinate axis (i.e. the axis perpendicular to the plane of the bending, \(x-z\)).
rho – Mass density.
CTE – Coefficient of thermal expansion.
- Returns:
Dictionary that holds the data for this section.
- Return type:
Dict
Examples
>>> sbar = section.beam_2d_section("sbar", E=E, rho=rho, A=A, I=Iy)
- pystran.section.beam_3d_section(name, E=0.0, G=0.0, A=0.0, Ix=0.0, Iy=0.0, Iz=0.0, J=0.0, rho=0.0, xz_vector=(0, 0, 1), CTE=0.0)[source]#
Define 3d beam section.
The parameters can be defined either as regular list of values or variables, or in the
keyword=value
style.- Parameters:
E – Young’s modulus.
G – Shear modulus.
A – Cross-sectional area.
rho – Mass density.
A – Cross-sectional area.
Ix – Central moment of inertia of the cross-section about the local \(x\).
Iy – Central moment of inertia of the cross-section about the local \(y\).
Iz – Central moment of inertia of the cross-section about the local \(z\).
J – St Venant torsion constant.
xz_vector – Vector that lies in the local \(x-z\) coordinate plane.
CTE – Coefficient of thermal expansion.
- Returns:
Dictionary that holds the data for this section.
- Return type:
Dict
Examples
>>> sb = section.beam_3d_section("sb", E=E, G=G, A=A, Ix=Ix, Iy=Iy, Iz=Iz, J=J)
- pystran.section.circular_tube(innerradius, outerradius)[source]#
Calculate cross section characteristics for a hollow circle (tube).
- Parameters:
innerradius – Inner radius of the tube.
outerradius – Outer radius of the tube.
- Returns:
Area, moments of inertia and torsion constant.
- Return type:
tuple of A, Ix, Iy, Iz, J
- pystran.section.i_beam(H, B, tf, tw)[source]#
Calculate cross section characteristics for an I-beam.
- Parameters:
H – Height of the cross section, i.e. dimension along z. The axis parallel to the flanges is \(y\), the axis parallel to the web is \(z\).
B – Width of the flanges.
tf – Thickness of the flanges.
tw – Thickness of the web.
- Returns:
Area, moments of inertia and torsion constant.
- Return type:
tuple of A, Ix, Iy, Iz, J
- pystran.section.rect_tube(H, B, th, tb)[source]#
Calculate cross section characteristics for an rectangular tube.
- Parameters:
H – Height of the cross section, i.e. dimension along \(z\).
B – Width of the cross section, i.e. dimension along \(y\).
th – Thickness of the walls along the height.
tb – Thickness of the walls along the width.
- Returns:
Area, moments of inertia and torsion constant.
- Return type:
tuple of A, Ix, Iy, Iz, J
- pystran.section.rectangle(H, B)[source]#
Calculate cross section characteristics for a solid rectangle.
- Parameters:
H – Height of the cross section, i.e. dimension along \(z\).
B – Width of the cross section, i.e. dimension along \(y\).
- Returns:
Area, moments of inertia and torsion constant.
- Return type:
tuple of A, Ix, Iy, Iz, J
- pystran.section.rigid_link_section(name, Gamma)[source]#
Define a rigid link section.
The parameters can be defined either as regular list of values or variables, or in the
keyword=value
style.- Parameters:
Gamma – Diagonal matrix of penalty coefficients; zero coefficient means the degrees of freedom are not linked.
- Returns:
Dictionary that holds the data for this section.
- Return type:
Dict
Examples
>>> sr = section.rigid_link_section("sr", Gamma=1e8 * numpy.diagflat([1.0, 1.0, 1.0]))
- pystran.section.spring_section(name, kind, direction, stiffness_coefficient=1.0)[source]#
Define a section for a general extension or torsion spring.
The parameters can be defined either as regular list of values or variables, or in the
keyword=value
style.- Parameters:
kind – Either
"extension"
or"torsion"
. The connected joints either react to displacement or to rotation.direction – The spring acts along this direction for extension springs, or about this direction for torsion springs.
stiffness_coefficient – Stiffness coefficient of the spring.
- Returns:
Dictionary that holds the data for this section.
- Return type:
Dict
Examples
>>> section.spring_section("EXT_A", "extension", [0, 1, 0], K),
- pystran.section.truss_section(name, E=0.0, A=0.0, rho=0.0, CTE=0.0)[source]#
Define truss section.
The parameters can be defined either as regular list of values or variables, or in the
keyword=value
style.- Parameters:
E – Young’s modulus.
A – Cross-sectional area.
rho – Mass density.
CTE – Coefficient of thermal expansion.
- Returns:
Dictionary that holds the data for this section.
- Return type:
Dict
Examples
>>> s1 = section.truss_section("steel", E, A)
>>> sr = section.truss_section("sr", E=E, A=Ar, CTE=0.0)
>>> sr = section.truss_section("sr", E=E, A=Ar)