LineLoad#
- class planestress.pre.boundary_condition.LineLoad(point1: tuple[float, float], point2: tuple[float, float], direction: str, value: float)[source]#
Bases:
LineBoundaryCondition
Class for adding a load to a line.
- Variables:
mesh_tag – Tagged line object.
Methods
Applies the boundary condition.
Gets the degrees of freedom based on the BC direction.
Returns a list of unique node indexes along the line BC.
- __init__(point1: tuple[float, float], point2: tuple[float, float], direction: str, value: float) None [source]#
Inits the LineLoad class.
- Parameters:
point1 (tuple[float, float]) – Point location (
x
,y
) of the start of the line load.point2 (tuple[float, float]) – Point location (
x
,y
) of the end of the line load.direction (str) – Direction of the line load,
"x"
,"y"
or"xy"
(two line loads in bothx
andy
directions).value (float) – Line load per unit length.
Example
TODO.
- apply_bc(k: lil_array, f: npt.NDArray[np.float64]) tuple[lil_array, npt.NDArray[np.float64]] [source]#
Applies the boundary condition.
- Parameters:
k (lil_array) – Stiffness matrix.
f (npt.NDArray[np.float64]) – Load vector.
- Raises:
RuntimeError – If a mesh tag has not been assigned.
- Returns:
Modified stiffness matrix and load vector (
k
,f
).- Return type:
tuple[lil_array, npt.NDArray[np.float64]]