StraightLayer
StraightLayer
StraightLayer(material: Union[int, str, Material], num_fibers: int, area_per_fiber: float, y1: float, z1: float, y2: float, z2: float)
Bases: LayerBase
Straight layer of fibers between two points.
This class defines a line of fibers in a fiber section. The fibers are distributed evenly along a straight line between two specified endpoints.
Tcl form
layer straight <matTag> <numFiber> <areaFiber> <yStart> <zStart> <yEnd> <zEnd>
Attributes:
| Name | Type | Description |
|---|---|---|
num_fibers |
Number of fibers in the layer. |
|
area_per_fiber |
Cross-sectional area of each individual fiber. |
|
y1 |
Local y-coordinate of the starting point. |
|
z1 |
Local z-coordinate of the starting point. |
|
y2 |
Local y-coordinate of the ending point. |
|
z2 |
Local z-coordinate of the ending point. |
Example
from femora.core.model import Model
import femora.components.section.fiber # noqa: F401
model = Model()
mat = model.material.uniaxial.steel01(user_name="Rebar", Fy=60.0, E0=29000.0, b=0.01)
section = model.section.fiber.section(user_name="StraightLayerSection")
section.add_straight_layer(
material=mat,
num_fibers=5,
area_per_fiber=0.1,
y1=-5.0,
z1=0.0,
y2=5.0,
z2=0.0,
)
print(section.tag)
Create a StraightLayer with validated geometry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
material
|
Union[int, str, Material]
|
Uniaxial material reference (object, tag, or name). |
required |
num_fibers
|
int
|
Number of fibers to distribute. |
required |
area_per_fiber
|
float
|
Area of each fiber. |
required |
y1
|
float
|
Y-coordinate of start point. |
required |
z1
|
float
|
Z-coordinate of start point. |
required |
y2
|
float
|
Y-coordinate of end point. |
required |
z2
|
float
|
Z-coordinate of end point. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
If parameters are not numeric, if counts/areas are non-positive, or if endpoints are identical. |