Sections
Module: xfea.model.sections
Sections: what elements need besides their nodes, from beam cross-sections to shell thicknesses.
Beam sections give a cross-section’s constants about its own x and y axes:
x along the beam’s orientation, y across it. Dimensions are in the
model’s length unit.
AngleSection
Section titled “AngleSection”AngleSection(a, b, t1, t2, direction, material, **kwargs)
An L-shaped angle: one leg a long along the section’s x (the beam’s orientation), the other b long along y.
Parameters
| Name | Type | Description |
|---|---|---|
| a | float | Outer length of the leg along x (mm for mm). |
| b | float | Outer length of the leg along y. |
| t1 | float | Thickness of the leg along x. |
| t2 | float | Thickness of the leg along y. |
| direction | str | Kept with the section; it does not change the geometry. |
| material | MaterialBase |
The section’s material. |
| **kwargs | dict, optional | Passed on, such as name, the section’s name. |
Properties
Afloatread-only
float: Cross-section area (mm² for mm).
Avxfloatread-only
float: Shear area for a shear force along the section’s x axis (mm² for mm).
Avyfloatread-only
float: Shear area for a shear force along the section’s y axis (mm² for mm).
Ixxfloatread-only
float: Second moment of area about the section’s x axis, the beam’s orientation (mm⁴ for mm).
Ixyfloatread-only
float: Product moment of area about the section’s x and y axes (mm⁴ for mm).
Iyyfloatread-only
float: Second moment of area about the section’s y axis (mm⁴ for mm).
Jfloatread-only
float: Saint-Venant torsion constant (mm⁴ for mm).
g0floatread-only
float: Warping constant, not used by the current solver plugins.
gwfloatread-only
float: Warping constant, not used by the current solver plugins.
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
materialMaterialBase
MaterialBase: The section’s material.
modelread-only
Model: The model the section is registered to, or None before it is added.
namestr
The object’s name.
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
uidUUID | Noneread-only
The object’s unique id, a UUID.
BoxSection
Section titled “BoxSection”BoxSection(w, h, tw, tf, material, **kwargs)
A rectangular hollow section w wide along the section’s x (the beam’s orientation) and h deep along y.
Ixx is about x: for h > w it is the strong axis.
Parameters
| Name | Type | Description |
|---|---|---|
| w | float | Outer width, along x (mm for mm). |
| h | float | Outer depth, along y. |
| tw | float | Thickness of the two webs, the walls parallel to y. |
| tf | float | Thickness of the two flanges, the walls parallel to x. |
| material | MaterialBase |
The section’s material. |
| **kwargs | dict, optional | Passed on, such as name, the section’s name. |
Properties
Afloatread-only
float: Cross-section area (mm² for mm).
Avxfloatread-only
float: Shear area for a shear force along the section’s x axis (mm² for mm).
Avyfloatread-only
float: Shear area for a shear force along the section’s y axis (mm² for mm).
Ixxfloatread-only
float: Second moment of area about the section’s x axis, the beam’s orientation (mm⁴ for mm).
Ixyfloatread-only
float: Product moment of area about the section’s x and y axes (mm⁴ for mm).
Iyyfloatread-only
float: Second moment of area about the section’s y axis (mm⁴ for mm).
Jfloatread-only
float: Saint-Venant torsion constant (mm⁴ for mm).
g0floatread-only
float: Warping constant, not used by the current solver plugins.
gwfloatread-only
float: Warping constant, not used by the current solver plugins.
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
materialMaterialBase
MaterialBase: The section’s material.
modelread-only
Model: The model the section is registered to, or None before it is added.
namestr
The object’s name.
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
uidUUID | Noneread-only
The object’s unique id, a UUID.
CircularSection
Section titled “CircularSection”CircularSection(r, material, **kwargs)
A solid circle of radius r: Ixx = Iyy = π r⁴ / 4, J = π r⁴ / 2.
Parameters
| Name | Type | Description |
|---|---|---|
| r | float | Radius (mm for mm). |
| material | MaterialBase |
The section’s material. |
| **kwargs | dict, optional | Passed on, such as name, the section’s name. |
Properties
Afloatread-only
float: Cross-section area (mm² for mm).
Avxfloatread-only
float: Shear area for a shear force along the section’s x axis (mm² for mm).
Avyfloatread-only
float: Shear area for a shear force along the section’s y axis (mm² for mm).
Ixxfloatread-only
float: Second moment of area about the section’s x axis, the beam’s orientation (mm⁴ for mm).
Ixyfloatread-only
float: Product moment of area about the section’s x and y axes (mm⁴ for mm).
Iyyfloatread-only
float: Second moment of area about the section’s y axis (mm⁴ for mm).
Jfloatread-only
float: Saint-Venant torsion constant (mm⁴ for mm).
g0floatread-only
float: Warping constant, not used by the current solver plugins.
gwfloatread-only
float: Warping constant, not used by the current solver plugins.
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
materialMaterialBase
MaterialBase: The section’s material.
modelread-only
Model: The model the section is registered to, or None before it is added.
namestr
The object’s name.
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
uidUUID | Noneread-only
The object’s unique id, a UUID.
CompressionOnlyMembraneSection
Section titled “CompressionOnlyMembraneSection”CompressionOnlyMembraneSection(t, material, **kwargs)
The thickness and material of CompressionOnlyMembraneElement elements, which carry no tension.
Parameters
| Name | Type | Description |
|---|---|---|
| t | float | Thickness (mm for mm). |
| material | MaterialBase |
The section’s material; the solver plugin makes a no-tension copy of it. |
| **kwargs | dict, optional | Passed on, such as name, the section’s name. |
See Also
StrutSection : The 1D compression-only counterpart.
Properties
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
materialMaterialBase
MaterialBase: The section’s material.
modelread-only
Model: The model the section is registered to, or None before it is added.
namestr
The object’s name.
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
tfloat
float: Thickness (mm for mm).
uidUUID | Noneread-only
The object’s unique id, a UUID.
ConnectorSection
Section titled “ConnectorSection”ConnectorSection(
axial: float | None = None,
lateral: float | None = None,
rotational: float | None = None,
**kwargs,
)
The stiffnesses of a connector element, as for SpringSection, each optional.
Parameters
| Name | Type | Description |
|---|---|---|
| axial | float, optional | Stiffness along the connector, force per length (N/mm for N and mm), or None. |
| lateral | float, optional | Stiffness across the connector, force per length, or None. |
| rotational | float, optional | Rotational stiffness, moment per radian (N·mm/rad for N and mm), or None. |
| **kwargs | dict, optional | Passed on, such as name, the section’s name. |
Properties
axialfloat | None
float: Stiffness along the line between the nodes, force per length, or None.
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
lateralfloat | None
float: Stiffness across the line between the nodes, force per length, or None.
modelread-only
Model: The model the section is registered to, or None before it is added.
namestr
The object’s name.
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
rotationalfloat | None
float: Rotational stiffness, moment per radian, or None.
stiffnessdictread-only
dict: The three stiffnesses, keyed "Axial", "Lateral" and "Rotational".
uidUUID | Noneread-only
The object’s unique id, a UUID.
GenericBeamSection
Section titled “GenericBeamSection”GenericBeamSection(
A: float,
Ixx: float,
Iyy: float,
Ixy: float,
Avx: float,
Avy: float,
J: float,
g0: float,
gw: float,
material: MaterialBase,
**kwargs,
)
A beam section given by its constants (area, second moments, shear areas, torsion constant) instead of a shape.
The axes are those of every beam section: x along the beam’s
orientation, y across it. Its plotted shape is a circle of the same
area.
Parameters
| Name | Type | Description |
|---|---|---|
| A | float | Cross-section area (mm² for mm). |
| Ixx | float | Second moment of area about the section’s x axis (mm⁴ for mm): it resists bending by loads along y. |
| Iyy | float | Second moment of area about the section’s y axis (mm⁴ for mm): it resists bending by loads along x. |
| Ixy | float | Product moment of area about x and y (mm⁴ for mm), zero for a section symmetric about either axis. |
| Avx | float | Shear area for a shear force along x (mm² for mm). |
| Avy | float | Shear area for a shear force along y (mm² for mm). |
| J | float | Saint-Venant torsion constant (mm⁴ for mm). |
| g0, gw | float | Warping constants, kept but not used by the current solver plugins. |
| material | MaterialBase |
The section’s material. |
| **kwargs | dict, optional | Passed on, such as name, the section’s name. |
Properties
Afloatread-only
float: Cross-section area (mm² for mm).
Avxfloatread-only
float: Shear area for a shear force along the section’s x axis (mm² for mm).
Avyfloatread-only
float: Shear area for a shear force along the section’s y axis (mm² for mm).
Ixxfloatread-only
float: Second moment of area about the section’s x axis, the beam’s orientation (mm⁴ for mm).
Ixyfloatread-only
float: Product moment of area about the section’s x and y axes (mm⁴ for mm).
Iyyfloatread-only
float: Second moment of area about the section’s y axis (mm⁴ for mm).
Jfloatread-only
float: Saint-Venant torsion constant (mm⁴ for mm).
g0floatread-only
float: Warping constant, not used by the current solver plugins.
gwfloatread-only
float: Warping constant, not used by the current solver plugins.
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
materialMaterialBase
MaterialBase: The section’s material.
modelread-only
Model: The model the section is registered to, or None before it is added.
namestr
The object’s name.
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
uidUUID | Noneread-only
The object’s unique id, a UUID.
HexRingShape
Section titled “HexRingShape”HexRingShape(r: float, t: float, **kwargs)
The hollow hexagon of a HexSection, which gives the section its area, inertias and torsion constant.
Parameters
| Name | Type | Description |
|---|---|---|
| r | float | Circumradius of the outer hexagon. |
| t | float | The inner hexagon’s circumradius is r - t. |
Properties
Aread-only
float: Area between the two hexagons.
Avxread-only
float: The whole area, A.
Avyread-only
float: The whole area, A.
I1floatread-only
The larger principal second moment of area, in length⁴ (mm⁴ for mm).
I2floatread-only
The smaller principal second moment of area, in length⁴ (mm⁴ for mm).
Ixxread-only
float: Second moment of area about x.
Ixyread-only
float: Zero, by symmetry.
Iyyread-only
float: Second moment of area about y.
Jread-only
float: Bredt’s thin-walled torsion constant on the mid-line hexagon.
centroidread-only
tuple: (0, 0, 0), the hexagon’s centre.
frameFrameread-only
The shape’s frame (world XY by default).
is_planarboolread-only
Whether the corners lie in one plane.
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
lineslist[Line]read-only
The sides, the last back to the first corner.
namestr
The object’s name.
normalVectorread-only
The unit normal, by the right-hand rule round the points.
planePlaneread-only
The polygon’s plane, its normal by the right-hand rule round the points.
pointsread-only
list[Point]: The outer hexagon’s corners.
points_worldlist[Point]read-only
The points taken as coordinates in the shape’s frame, given in world coordinates: where the shape is drawn.
r1floatread-only
Radius of gyration about the I1 axis, sqrt(I1 / A), in length.
r2floatread-only
Radius of gyration about the I2 axis, sqrt(I2 / A), in length.
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
rxfloatread-only
Radius of gyration about the centroidal x axis, sqrt(Ixx / A), in length.
ryfloatread-only
Radius of gyration about the centroidal y axis, sqrt(Iyy / A), in length.
thetafloatread-only
Angle in radians from the x axis to the axis of I1, positive from x towards y.
uidUUID | Noneread-only
The object’s unique id, a UUID.
xy_arraystuple[list[float], list[float]]read-only
The x and the y coordinates of points_xy, as two lists, the first point repeated at the end.
HexSection
Section titled “HexSection”HexSection(r, t, material, **kwargs)
A hollow regular hexagon of outer circumradius r, a corner on the section’s x axis.
Parameters
| Name | Type | Description |
|---|---|---|
| r | float | Circumradius of the outer hexagon, centre to corner (mm for mm). |
| t | float | Difference between the outer and inner circumradii; the wall, measured normal to it, is t cos 30° thick. |
| material | MaterialBase |
The section’s material. |
| **kwargs | dict, optional | Passed on, such as name, the section’s name. |
Properties
Afloatread-only
float: Cross-section area (mm² for mm).
Avxfloatread-only
float: Shear area for a shear force along the section’s x axis (mm² for mm).
Avyfloatread-only
float: Shear area for a shear force along the section’s y axis (mm² for mm).
Ixxfloatread-only
float: Second moment of area about the section’s x axis, the beam’s orientation (mm⁴ for mm).
Ixyfloatread-only
float: Product moment of area about the section’s x and y axes (mm⁴ for mm).
Iyyfloatread-only
float: Second moment of area about the section’s y axis (mm⁴ for mm).
Jfloatread-only
float: Saint-Venant torsion constant (mm⁴ for mm).
g0floatread-only
float: Warping constant, not used by the current solver plugins.
gwfloatread-only
float: Warping constant, not used by the current solver plugins.
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
materialMaterialBase
MaterialBase: The section’s material.
modelread-only
Model: The model the section is registered to, or None before it is added.
namestr
The object’s name.
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
uidUUID | Noneread-only
The object’s unique id, a UUID.
ISection
Section titled “ISection”ISection(w, h, tw, tbf, ttf, material, **kwargs)
An I-section: flanges w wide along the section’s x (the beam’s orientation), web and depth h along y.
Ixx, about x, is the strong axis. ISection.IPE200(material) and
the other IPE, HEA, HEB and HEM classmethods give the
European profiles, dimensions in mm, without root radii.
Parameters
| Name | Type | Description |
|---|---|---|
| w | float | Width of both flanges, along x (mm for mm). |
| h | float | Overall depth, along y. |
| tw | float | Web thickness. |
| tbf | float | Bottom flange thickness. |
| ttf | float | Top flange thickness. |
| material | MaterialBase |
The section’s material. |
| **kwargs | dict, optional | Passed on, such as name, the section’s name. |
Guidance (sections)
- The
ISection.IPE200-style profiles are in mm: give them a material in N/mm² and t/mm³, not a grade recipe (ElasticIsotropic.steel), which is in Pa and kg/m³.
Properties
Afloatread-only
float: Cross-section area (mm² for mm).
Avxfloatread-only
float: Shear area for a shear force along the section’s x axis (mm² for mm).
Avyfloatread-only
float: Shear area for a shear force along the section’s y axis (mm² for mm).
Ixxfloatread-only
float: Second moment of area about the section’s x axis, the beam’s orientation (mm⁴ for mm).
Ixyfloatread-only
float: Product moment of area about the section’s x and y axes (mm⁴ for mm).
Iyyfloatread-only
float: Second moment of area about the section’s y axis (mm⁴ for mm).
Jfloatread-only
float: Saint-Venant torsion constant (mm⁴ for mm).
g0floatread-only
float: Warping constant, not used by the current solver plugins.
gwfloatread-only
float: Warping constant, not used by the current solver plugins.
kread-only
float: 0.3 + 0.1 (abf + atf) / A, with abf and atf the flange areas, or None without a shape.
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
materialMaterialBase
MaterialBase: The section’s material.
modelread-only
Model: The model the section is registered to, or None before it is added.
namestr
The object’s name.
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
uidUUID | Noneread-only
The object’s unique id, a UUID.
MembraneSection
Section titled “MembraneSection”MembraneSection(t, material, **kwargs)
The thickness and material of MembraneElement elements, which carry in-plane forces only, no bending.
Parameters
| Name | Type | Description |
|---|---|---|
| t | float | Thickness (mm for mm). |
| material | MaterialBase |
The section’s material. |
| **kwargs | dict, optional | Passed on, such as name, the section’s name. |
Properties
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
materialMaterialBase
MaterialBase: The section’s material.
modelread-only
Model: The model the section is registered to, or None before it is added.
namestr
The object’s name.
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
tfloat
float: Thickness (mm for mm).
uidUUID | Noneread-only
The object’s unique id, a UUID.
PipeSection
Section titled “PipeSection”PipeSection(r, t, material, **kwargs)
A circular tube of outer radius r and wall thickness t: Ixx = Iyy = π (r⁴ - (r - t)⁴) / 4.
Parameters
| Name | Type | Description |
|---|---|---|
| r | float | Outer radius (mm for mm). |
| t | float | Wall thickness. |
| material | MaterialBase |
The section’s material. |
| **kwargs | dict, optional | Passed on, such as name, the section’s name. |
Properties
Afloatread-only
float: Cross-section area (mm² for mm).
Avxfloatread-only
float: Shear area for a shear force along the section’s x axis (mm² for mm).
Avyfloatread-only
float: Shear area for a shear force along the section’s y axis (mm² for mm).
Ixxfloatread-only
float: Second moment of area about the section’s x axis, the beam’s orientation (mm⁴ for mm).
Ixyfloatread-only
float: Product moment of area about the section’s x and y axes (mm⁴ for mm).
Iyyfloatread-only
float: Second moment of area about the section’s y axis (mm⁴ for mm).
Jfloatread-only
float: Saint-Venant torsion constant (mm⁴ for mm).
g0floatread-only
float: Warping constant, not used by the current solver plugins.
gwfloatread-only
float: Warping constant, not used by the current solver plugins.
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
materialMaterialBase
MaterialBase: The section’s material.
modelread-only
Model: The model the section is registered to, or None before it is added.
namestr
The object’s name.
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
uidUUID | Noneread-only
The object’s unique id, a UUID.
PlaneHeatTransferSection
Section titled “PlaneHeatTransferSection”PlaneHeatTransferSection(material, t: float = 1.0, **kwargs)
The material and thickness of PlaneHeatTransferElement elements, for 2D heat transfer.
Solver plugins write plane heat-transfer elements (DCPS{n})
and apply film and radiation loads on their edges instead of their faces.
Parameters
| Name | Type | Description |
|---|---|---|
| material | MaterialBase |
A thermal material, such as ThermalElasticIsotropic, with conductivity k and, for a transient analysis, specific heat c. |
| t | float, optional | Out-of-plane thickness, which scales the fluxes (mm for mm). |
| **kwargs | dict, optional | Passed on, such as name, the section’s name. |
Properties
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
materialMaterialBase
MaterialBase: The section’s material.
modelread-only
Model: The model the section is registered to, or None before it is added.
namestr
The object’s name.
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
tfloat
float: Thickness (mm for mm).
uidUUID | Noneread-only
The object’s unique id, a UUID.
RectangularSection
Section titled “RectangularSection”RectangularSection(w, h, material, **kwargs)
A solid rectangle w wide along the section’s x (the beam’s orientation) and h deep along y: Ixx = w h³ / 12.
Parameters
| Name | Type | Description |
|---|---|---|
| w | float | Width, along x (mm for mm). |
| h | float | Depth, along y. |
| material | MaterialBase |
The section’s material. |
| **kwargs | dict, optional | Passed on, such as name, the section’s name. |
Guidance (sections)
- A beam section’s x axis is the element’s
orientationandIxxis about it: on a beam along global x withorientation=[0, 1, 0],his vertical (global z) andIxxcarries vertical loads.
Properties
Afloatread-only
float: Cross-section area (mm² for mm).
Avxfloatread-only
float: Shear area for a shear force along the section’s x axis (mm² for mm).
Avyfloatread-only
float: Shear area for a shear force along the section’s y axis (mm² for mm).
Ixxfloatread-only
float: Second moment of area about the section’s x axis, the beam’s orientation (mm⁴ for mm).
Ixyfloatread-only
float: Product moment of area about the section’s x and y axes (mm⁴ for mm).
Iyyfloatread-only
float: Second moment of area about the section’s y axis (mm⁴ for mm).
Jfloatread-only
float: Saint-Venant torsion constant (mm⁴ for mm).
g0floatread-only
float: Warping constant, not used by the current solver plugins.
gwfloatread-only
float: Warping constant, not used by the current solver plugins.
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
materialMaterialBase
MaterialBase: The section’s material.
modelread-only
Model: The model the section is registered to, or None before it is added.
namestr
The object’s name.
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
uidUUID | Noneread-only
The object’s unique id, a UUID.
Section1DBase
Section titled “Section1DBase”Section1DBase(
A: float,
Ixx: float,
Iyy: float,
Ixy: float,
Avx: float,
Avy: float,
J: float,
g0: float,
gw: float,
material: MaterialBase,
shape: Shape | None = None,
**kwargs,
)
The base of beam and bar sections: the cross-section’s constants, about its own x and y axes.
The section’s x and y axes lie in its plane, through its centroid: x
along the beam’s orientation (the element’s local y), y across it
(the element’s local z). Abstract: use a concrete section, such as
RectangularSection.
Parameters
| Name | Type | Description |
|---|---|---|
| A | float | Cross-section area (mm² for mm). |
| Ixx | float | Second moment of area about the section’s x axis (mm⁴ for mm): it resists bending by loads along y. |
| Iyy | float | Second moment of area about the section’s y axis (mm⁴ for mm): it resists bending by loads along x. |
| Ixy | float | Product moment of area about x and y (mm⁴ for mm), zero for a section symmetric about either axis. |
| Avx | float | Shear area for a shear force along x (mm² for mm). |
| Avy | float | Shear area for a shear force along y (mm² for mm). |
| J | float | Saint-Venant torsion constant (mm⁴ for mm). |
| g0, gw | float | Warping constants, kept but not used by the current solver plugins. |
| material | MaterialBase |
The section’s material. |
| shape | Shape, optional |
The cross-section’s outline, for plots and stress distributions, or None. |
| **kwargs | dict, optional | Passed on, such as name, the section’s name. |
Properties
Afloatread-only
float: Cross-section area (mm² for mm).
Avxfloatread-only
float: Shear area for a shear force along the section’s x axis (mm² for mm).
Avyfloatread-only
float: Shear area for a shear force along the section’s y axis (mm² for mm).
Ixxfloatread-only
float: Second moment of area about the section’s x axis, the beam’s orientation (mm⁴ for mm).
Ixyfloatread-only
float: Product moment of area about the section’s x and y axes (mm⁴ for mm).
Iyyfloatread-only
float: Second moment of area about the section’s y axis (mm⁴ for mm).
Jfloatread-only
float: Saint-Venant torsion constant (mm⁴ for mm).
g0floatread-only
float: Warping constant, not used by the current solver plugins.
gwfloatread-only
float: Warping constant, not used by the current solver plugins.
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
materialMaterialBase
MaterialBase: The section’s material.
modelread-only
Model: The model the section is registered to, or None before it is added.
namestr
The object’s name.
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
uidUUID | Noneread-only
The object’s unique id, a UUID.
Methods
compute_neutral_axis(N=0.0, Mx=0.0, My=0.0)→tuple
compute_neutral_axis(N: float = 0.0, Mx: float = 0.0, My: float = 0.0) -> tuple
The line of zero normal stress across the section, as a slope and an intercept.
Parameters
| Name | Type | Description |
|---|---|---|
| N | float, optional | Axial force, positive in tension. |
| Mx | float, optional | Bending moment about the section’s x axis. |
| My | float, optional | Bending moment about the section’s y axis. |
Returns
| Name | Type | Description |
|---|---|---|
| tuple | (slope, intercept) in the shape’s coordinates: the line y = slope x + intercept, or, with slope None, the vertical line x = intercept. |
compute_stress(N=0.0, Mx=0.0, My=0.0, Vx=0.0, Vy=0.0, x=0.0, y=0.0)→tuple
compute_stress(
N: float = 0.0,
Mx: float = 0.0,
My: float = 0.0,
Vx: float = 0.0,
Vy: float = 0.0,
x: float = 0.0,
y: float = 0.0,
) -> tuple
The normal and mean shear stresses at a point of the section, from its internal forces.
sigma = N / A - Mx y / Ixx + My x / Iyy: a positive Mx
compresses the fibres at positive y. The shear stresses are averages,
Vx / Avx and Vy / Avy (/ A where a shear area is zero).
Parameters
| Name | Type | Description |
|---|---|---|
| N | float, optional | Axial force, positive in tension. |
| Mx | float, optional | Bending moment about the section’s x axis (N·mm for N and mm). |
| My | float, optional | Bending moment about the section’s y axis (N·mm for N and mm). |
| Vx | float, optional | Shear force along x. |
| Vy | float, optional | Shear force along y. |
| x | float, optional | The point’s x, from the centroid. |
| y | float, optional | The point’s y, from the centroid. |
Returns
| Name | Type | Description |
|---|---|---|
| tuple of float | (sigma, tau_x, tau_y), force per area (N/mm² for N and mm). |
compute_stress_distribution(N=0.0, Mx=0.0, My=0.0, Vx=0.0, Vy=0.0, nx=50, ny=50)→tuple
compute_stress_distribution(
N: float = 0.0,
Mx: float = 0.0,
My: float = 0.0,
Vx: float = 0.0,
Vy: float = 0.0,
nx: int = 50,
ny: int = 50,
) -> tuple
The stresses of compute_stress() on a grid over the section’s shape.
Parameters
| Name | Type | Description |
|---|---|---|
| N | float, optional | Axial force, positive in tension. |
| Mx | float, optional | Bending moment about the section’s x axis. |
| My | float, optional | Bending moment about the section’s y axis. |
| Vx | float, optional | Shear force along x. |
| Vy | float, optional | Shear force along y. |
| nx | int, optional | Number of grid points along x, across the shape’s bounding box. |
| ny | int, optional | Number of grid points along y. |
Returns
| Name | Type | Description |
|---|---|---|
| tuple of numpy.ndarray | (grid_x, grid_y, sigma, tau_x, tau_y), each ny by nx: the points in the shape’s coordinates and the stresses there, NaN outside the shape. |
plot()
Plot the section’s shape with the shape’s own plot; return None if it has no shape.
plot_section_with_stress(N=0.0, Mx=0.0, My=0.0, Vx=0.0, Vy=0.0, direction=(1, 0), point=None, nx=50, ny=50)
plot_section_with_stress(
N: float = 0.0,
Mx: float = 0.0,
My: float = 0.0,
Vx: float = 0.0,
Vy: float = 0.0,
direction: tuple = (1, 0),
point: tuple | None = None,
nx: int = 50,
ny: int = 50,
)
Show the section with the normal stress along a line across it, in a matplotlib window.
The line runs one length unit either side of point, along direction.
Parameters
| Name | Type | Description |
|---|---|---|
| N | float, optional | Axial force, positive in tension. |
| Mx | float, optional | Bending moment about the section’s x axis. |
| My | float, optional | Bending moment about the section’s y axis. |
| Vx | float, optional | Shear force along x. |
| Vy | float, optional | Shear force along y. |
| direction | tuple, optional | The line’s direction in the section’s plane, (dx, dy), normalised here. |
| point | tuple, optional | A point (x, y) on the line, in the shape’s coordinates, or None for the centroid. |
| nx | int, optional | Number of grid points along x. |
| ny | int, optional | Number of grid points along y. |
plot_stress_distribution(N=0.0, Mx=0.0, My=0.0, Vx=0.0, Vy=0.0, nx=50, ny=50, cmap='coolwarm', show_tau=True)
plot_stress_distribution(
N: float = 0.0,
Mx: float = 0.0,
My: float = 0.0,
Vx: float = 0.0,
Vy: float = 0.0,
nx: int = 50,
ny: int = 50,
cmap: str = 'coolwarm',
show_tau: bool = True,
)
Show the normal stress over the section with its neutral axis, and the shear stresses, in matplotlib windows.
Parameters
| Name | Type | Description |
|---|---|---|
| N | float, optional | Axial force, positive in tension. |
| Mx | float, optional | Bending moment about the section’s x axis. |
| My | float, optional | Bending moment about the section’s y axis. |
| Vx | float, optional | Shear force along x. |
| Vy | float, optional | Shear force along y. |
| nx | int, optional | Number of grid points along x. |
| ny | int, optional | Number of grid points along y. |
| cmap | str, optional | The matplotlib colour map. |
| show_tau | bool, optional | Also plot the shear stresses tau_x and tau_y, each in its own figure. |
Section2DBase
Section titled “Section2DBase”Section2DBase(t: float, material: MaterialBase, **kwargs)
The base of shell and membrane sections: a thickness and a material.
Abstract: use a concrete section, such as ShellSection.
Parameters
| Name | Type | Description |
|---|---|---|
| t | float | Thickness (mm for mm). |
| material | MaterialBase |
The section’s material. |
| **kwargs | dict, optional | Passed on, such as name, the section’s name. |
Properties
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
materialMaterialBase
MaterialBase: The section’s material.
modelread-only
Model: The model the section is registered to, or None before it is added.
namestr
The object’s name.
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
tfloat
float: Thickness (mm for mm).
uidUUID | Noneread-only
The object’s unique id, a UUID.
Section3DBase
Section titled “Section3DBase”Section3DBase(material: MaterialBase, **kwargs)
The base of solid sections: only a material.
Abstract: use SolidSection.
Properties
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
materialMaterialBase
MaterialBase: The section’s material.
modelread-only
Model: The model the section is registered to, or None before it is added.
namestr
The object’s name.
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
uidUUID | Noneread-only
The object’s unique id, a UUID.
SectionBase
Section titled “SectionBase”SectionBase(material: MaterialBase, **kwargs)
The base of every section: what an element needs besides its nodes, starting with its material.
Abstract: use a concrete section, such as RectangularSection.
Parameters
| Name | Type | Description |
|---|---|---|
| material | MaterialBase |
The section’s material. |
| **kwargs | dict, optional | Passed on, such as name, the section’s name. |
Attributes
| Name | Type | Description |
|---|---|---|
| key | int, read-only | The section’s index in its model. |
| material | MaterialBase |
The section’s material. |
| model | Model |
The model the section is registered to. |
Properties
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
materialMaterialBase
MaterialBase: The section’s material.
modelread-only
Model: The model the section is registered to, or None before it is added.
namestr
The object’s name.
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
uidUUID | Noneread-only
The object’s unique id, a UUID.
ShellSection
Section titled “ShellSection”ShellSection(t, material, **kwargs)
The thickness and material of ShellElement elements, which carry in-plane forces and bending.
Parameters
| Name | Type | Description |
|---|---|---|
| t | float | Thickness (mm for mm), about the elements’ mid-surface. |
| material | MaterialBase |
The section’s material. |
| **kwargs | dict, optional | Passed on, such as name, the section’s name. |
Properties
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
materialMaterialBase
MaterialBase: The section’s material.
modelread-only
Model: The model the section is registered to, or None before it is added.
namestr
The object’s name.
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
tfloat
float: Thickness (mm for mm).
uidUUID | Noneread-only
The object’s unique id, a UUID.
SolidSection
Section titled “SolidSection”SolidSection(material, **kwargs)
The material of solid elements (tetrahedra, bricks), which need no other section property.
Parameters
| Name | Type | Description |
|---|---|---|
| material | MaterialBase |
The section’s material. |
| **kwargs | dict, optional | Passed on, such as name, the section’s name. |
Properties
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
materialMaterialBase
MaterialBase: The section’s material.
modelread-only
Model: The model the section is registered to, or None before it is added.
namestr
The object’s name.
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
uidUUID | Noneread-only
The object’s unique id, a UUID.
SpringSection
Section titled “SpringSection”SpringSection(
axial: float | None,
lateral: float | None,
rotational: float | None,
**kwargs,
)
The stiffnesses of a SpringElement between two nodes: along, across and about their line.
For an elastic support, or a spring between nodes along a direction you
choose, use SpringSupport or SpringLink.
Parameters
| Name | Type | Description |
|---|---|---|
| axial | float or None | Stiffness along the line between the two nodes, force per length (N/mm for N and mm). |
| lateral | float or None | Stiffness across that line, force per length. |
| rotational | float or None | Rotational stiffness, moment per radian (N·mm/rad for N and mm). |
| **kwargs | dict, optional | Passed on, such as name, the section’s name. |
Attributes
| Name | Type | Description |
|---|---|---|
| stiffness | dict | {"Axial": ..., "Lateral": ..., "Rotational": ...}. |
Properties
axialfloat | None
float: Stiffness along the line between the nodes, force per length, or None.
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
lateralfloat | None
float: Stiffness across the line between the nodes, force per length, or None.
modelread-only
Model: The model the section is registered to, or None before it is added.
namestr
The object’s name.
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
rotationalfloat | None
float: Rotational stiffness, moment per radian, or None.
stiffnessdictread-only
dict: The three stiffnesses, keyed "Axial", "Lateral" and "Rotational".
uidUUID | Noneread-only
The object’s unique id, a UUID.
StrutSection
Section titled “StrutSection”StrutSection(A, material, **kwargs)
The cross-section area of a StrutElement, a bar that carries compression only.
Parameters
| Name | Type | Description |
|---|---|---|
| A | float | Cross-section area (mm² for mm). |
| material | MaterialBase |
The section’s material. |
| **kwargs | dict, optional | Passed on, such as name, the section’s name. |
Properties
Afloatread-only
float: Cross-section area (mm² for mm).
Avxfloatread-only
float: Shear area for a shear force along the section’s x axis (mm² for mm).
Avyfloatread-only
float: Shear area for a shear force along the section’s y axis (mm² for mm).
Ixxfloatread-only
float: Second moment of area about the section’s x axis, the beam’s orientation (mm⁴ for mm).
Ixyfloatread-only
float: Product moment of area about the section’s x and y axes (mm⁴ for mm).
Iyyfloatread-only
float: Second moment of area about the section’s y axis (mm⁴ for mm).
Jfloatread-only
float: Saint-Venant torsion constant (mm⁴ for mm).
g0floatread-only
float: Warping constant, not used by the current solver plugins.
gwfloatread-only
float: Warping constant, not used by the current solver plugins.
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
materialMaterialBase
MaterialBase: The section’s material.
modelread-only
Model: The model the section is registered to, or None before it is added.
namestr
The object’s name.
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
uidUUID | Noneread-only
The object’s unique id, a UUID.
TieSection
Section titled “TieSection”TieSection(A, material, **kwargs)
The cross-section area of a TieElement, a bar that carries tension only.
Parameters
| Name | Type | Description |
|---|---|---|
| A | float | Cross-section area (mm² for mm). |
| material | MaterialBase |
The section’s material. |
| **kwargs | dict, optional | Passed on, such as name, the section’s name. |
Properties
Afloatread-only
float: Cross-section area (mm² for mm).
Avxfloatread-only
float: Shear area for a shear force along the section’s x axis (mm² for mm).
Avyfloatread-only
float: Shear area for a shear force along the section’s y axis (mm² for mm).
Ixxfloatread-only
float: Second moment of area about the section’s x axis, the beam’s orientation (mm⁴ for mm).
Ixyfloatread-only
float: Product moment of area about the section’s x and y axes (mm⁴ for mm).
Iyyfloatread-only
float: Second moment of area about the section’s y axis (mm⁴ for mm).
Jfloatread-only
float: Saint-Venant torsion constant (mm⁴ for mm).
g0floatread-only
float: Warping constant, not used by the current solver plugins.
gwfloatread-only
float: Warping constant, not used by the current solver plugins.
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
materialMaterialBase
MaterialBase: The section’s material.
modelread-only
Model: The model the section is registered to, or None before it is added.
namestr
The object’s name.
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
uidUUID | Noneread-only
The object’s unique id, a UUID.
TrapezoidalSection
Section titled “TrapezoidalSection”TrapezoidalSection(w1, w2, h, material, **kwargs)
A solid trapezoid, w1 wide at the bottom and w2 at the top (along the section’s x), h deep along y.
Parameters
| Name | Type | Description |
|---|---|---|
| w1 | float | Width at the bottom, along x (mm for mm). |
| w2 | float | Width at the top, along x. |
| h | float | Depth, along y. |
| material | MaterialBase |
The section’s material. |
| **kwargs | dict, optional | Passed on, such as name, the section’s name. |
Properties
Afloatread-only
float: Cross-section area (mm² for mm).
Avxfloatread-only
float: Shear area for a shear force along the section’s x axis (mm² for mm).
Avyfloatread-only
float: Shear area for a shear force along the section’s y axis (mm² for mm).
Ixxfloatread-only
float: Second moment of area about the section’s x axis, the beam’s orientation (mm⁴ for mm).
Ixyfloatread-only
float: Product moment of area about the section’s x and y axes (mm⁴ for mm).
Iyyfloatread-only
float: Second moment of area about the section’s y axis (mm⁴ for mm).
Jfloatread-only
float: Saint-Venant torsion constant (mm⁴ for mm).
g0floatread-only
float: Warping constant, not used by the current solver plugins.
gwfloatread-only
float: Warping constant, not used by the current solver plugins.
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
materialMaterialBase
MaterialBase: The section’s material.
modelread-only
Model: The model the section is registered to, or None before it is added.
namestr
The object’s name.
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
uidUUID | Noneread-only
The object’s unique id, a UUID.
TrussSection
Section titled “TrussSection”TrussSection(A, material, **kwargs)
The cross-section area of a TrussElement, a bar that carries axial force only.
Its inertias, shear areas and torsion constant are zero.
Parameters
| Name | Type | Description |
|---|---|---|
| A | float | Cross-section area (mm² for mm). |
| material | MaterialBase |
The section’s material. |
| **kwargs | dict, optional | Passed on, such as name, the section’s name. |
Properties
Afloatread-only
float: Cross-section area (mm² for mm).
Avxfloatread-only
float: Shear area for a shear force along the section’s x axis (mm² for mm).
Avyfloatread-only
float: Shear area for a shear force along the section’s y axis (mm² for mm).
Ixxfloatread-only
float: Second moment of area about the section’s x axis, the beam’s orientation (mm⁴ for mm).
Ixyfloatread-only
float: Product moment of area about the section’s x and y axes (mm⁴ for mm).
Iyyfloatread-only
float: Second moment of area about the section’s y axis (mm⁴ for mm).
Jfloatread-only
float: Saint-Venant torsion constant (mm⁴ for mm).
g0floatread-only
float: Warping constant, not used by the current solver plugins.
gwfloatread-only
float: Warping constant, not used by the current solver plugins.
keyAny | Noneread-only
The object’s key (its number) in what it is registered to; None until it is given one.
materialMaterialBase
MaterialBase: The section’s material.
modelread-only
Model: The model the section is registered to, or None before it is added.
namestr
The object’s name.
registrationAny | None
The object this one is registered to (a part, a model, a step, …), or None.
uidUUID | Noneread-only
The object’s unique id, a UUID.
from_shape
Section titled “from_shape”from_shape(shape: Shape, material: MaterialBase, g0=None, gw=None, **kwargs) -> dict
The keyword arguments of a 1D section built from shape: its area, inertias, shear areas and torsion constant.
Parameters
| Name | Type | Description |
|---|---|---|
| shape | Shape |
The cross-section’s shape, whose properties are read. |
| material | MaterialBase |
The section’s material. |
| g0, gw | float, optional | Warping constants, or None. |
| **kwargs | dict, optional | Added to the result, such as name. |
Returns
| Name | Type | Description |
|---|---|---|
| dict | A, Ixx, Iyy, Ixy, Avx, Avy, J, material, g0, gw and shape (None if the shape cannot be serialised). |
© 2026 Francesco Ranaudo · Text and pictures CC BY 4.0 · Code Elastic License 2.0 · how to reuse them