LineBoundaryCondition#
- class planestress.pre.boundary_condition.LineBoundaryCondition(point1: tuple[float, float], point2: tuple[float, float], direction: str, value: float, priority: int)[source]#
Bases:
BoundaryCondition
Abstract base class for a boundary condition along 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, priority: int) None [source]#
Inits the LineBoundaryCondition class.
- Parameters:
point1 (tuple[float, float]) – Point location (
x
,y
) of the start of the line.point2 (tuple[float, float]) – Point location (
x
,y
) of the end of the line.direction (str) – Direction of the boundary condition,
"x"
,"y"
or"xy"
.value (float) – Value of the boundary condition.
priority (int) – Integer denoting the order in which the boundary condition gets applied.
- get_unique_nodes() list[int] [source]#
Returns a list of unique node indexes along the line BC.
- Raises:
RuntimeError – If a mesh tag has not been assigned.
- Returns:
List of unique node indexes along the line.
- Return type:
- apply_bc(k: lil_array, f: npt.NDArray[np.float64]) tuple[lil_array, npt.NDArray[np.float64]] #
Applies the boundary condition.
- Parameters:
k (lil_array) – Stiffness matrix.
f (npt.NDArray[np.float64]) – Load vector.
- Raises:
NotImplementedError – If this method has not been implemented.
- Return type:
tuple[lil_array, npt.NDArray[np.float64]]