element_load
element_load
Attributes
Classes
Load
Bases: ABC
Base class for OpenSees load commands emitted inside a pattern Plain block.
Load instances do not self-register. A :class:LoadManager owns tag assignment
and lifecycle for a single model context.
ElementLoad
ElementLoad(*, kind: str, params: Dict[str, float], ele_tags: Optional[List[int]] = None, ele_range: Optional[Tuple[int, int]] = None, element_mask: Optional[object] = None, pid: Optional[int] = None)
Bases: Load
Element load component for applying distributed or point loads to elements.
ElementLoad represents a line or point load applied along the length of beam-column elements. It is commonly used in plain load patterns to represent gravity, uniform pressure, or point loads.
Tcl form
For uniform loads:
eleLoad -ele <tags> -type -beamUniform <Wy> <Wz> <Wx>
For point loads:
eleLoad -ele <tags> -type -beamPoint <Py> <Pz> <xL> <Px>
Note
- The
kindmust be either'beamUniform'or'beamPoint'. - Uniform load (
beamUniform) requires parameterWy, whileWzandWxare optional. - Point load (
beamPoint) requiresPyandxL(relative position along the element from node I, between 0.0 and 1.0), whilePzandPxare optional. - The elements can be specified using a list of explicit tags (
ele_tags), an index range (ele_range), or anelement_mask.
Example
from femora.core.model import Model
model = Model()
ts = model.time_series.constant(factor=1.0)
pattern = model.pattern.plain(time_series=ts)
# Apply a uniform vertical load of -10.0 along the local y-axis of element 2
load = pattern.add_load.element(
kind="beamUniform",
ele_tags=[2],
params={"Wy": -10.0},
)
Create an element load component.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
kind
|
str
|
Type of element load. Must be either |
required |
params
|
Dict[str, float]
|
Dictionary of load parameters. For |
required |
ele_tags
|
Optional[List[int]]
|
Optional list of explicit element tags. |
None
|
ele_range
|
Optional[Tuple[int, int]]
|
Optional tuple of |
None
|
element_mask
|
Optional[object]
|
Optional ElementMask object to apply the load to. |
None
|
pid
|
Optional[int]
|
Optional processor partition ID for parallel execution. |
None
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If constructor arguments are invalid or conflict. |
Functions:
_require_numeric
Validate and convert a value to a float.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of the parameter/field for validation reporting. |
required |
value
|
Any
|
The value to convert. |
required |
Returns:
| Type | Description |
|---|---|
float
|
The validated float value. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the value cannot be converted to a float. |