NodeBoundaryCondition#

class planestress.pre.boundary_condition.NodeBoundaryCondition(point: tuple[float, float], direction: str, value: float)[source]#

Bases: BoundaryCondition

Abstract base class for a boundary condition at a node.

Variables:

mesh_tag – Tagged node object.

Methods

apply_bc

Applies the boundary condition.

get_node_dofs

Get the degrees of freedom of the node.

__init__(point: tuple[float, float], direction: str, value: float) None[source]#

Inits the NodeBoundaryCondition class.

Parameters:
  • point (tuple[float, float]) – Point tuple (x, y) describing the node location.

  • direction (str) – Direction of the boundary condition, "x" or "y".

  • value (float) – Value of the boundary condition.

get_node_dofs() list[int][source]#

Get the degrees of freedom of the node.

Returns:

List (length 2) of degrees of freedom.

Return type:

list[int]

apply_bc(k: ndarray[Any, dtype[float64]], f: ndarray[Any, dtype[float64]]) tuple[ndarray[Any, dtype[float64]], ndarray[Any, dtype[float64]]]#

Applies the boundary condition.

Parameters:
Raises:

NotImplementedError – If this method has not been implemented.

Return type:

tuple[ndarray[Any, dtype[float64]], ndarray[Any, dtype[float64]]]