pycba.beam.Beam#
- class Beam(L=None, EI=None, R=None, LM=None, eletype=None)[source]#
Bases:
object
Class definition
Constructs a beam object
- Parameters:
L (np.ndarray) – A vector of span lengths.
EI (np.ndarray) – A vector of member flexural rigidities.
R (np.ndarray) – A vector describing the support conditions at each member end.
LM (Optional[list[list[Union[int, float]]]]) – The load matrix: a list of loads on the beam; each load with several parameters.
eletype (Optional[np.ndarray]) – A vector of the member types. Defaults to a fixed-fixed element.
- Return type:
None.
Methods
Adds a new load to the beam's load matrix
Add a span to the continuous beam
Returns the span index and position in span for a position given in global coordinates on the beam
Returns Released End Forces for the member; that is, the Consistent Nodal Loads modified for the element type (i.e.
Returns the stiffness matrix for the ith span
Stiffness matrix for a fixed-fixed element
Stiffness matrix for a fixed-pinned element
Stiffness matrix for a pinned-fixed element
Stiffness matrix for a pinned-pinned element
Attributes
returns: length -- The total length of the beam :rtype: float
Returns the load matrix for the beam
Returns the number of fixed restraints of the beam (fully-supported DOFs)
Returns the number of restraints of the beam
Returns the no.
Returns the restraints vector for the beam
- add_span(L, EI, eletype)[source]#
Add a span to the continuous beam
- Parameters:
L (float) – The length of the member.
EI (np.ndarray) – The flexural rigidity of the member.
eletype (int) – The element type for the member
- Return type:
None.
- property loads: List[List[int | float]]#
Returns the load matrix for the beam
- Returns:
LM – The load matrix for the beam
- Return type:
LoadMatrix
- add_load(load)[source]#
Adds a new load to the beam’s load matrix
- Parameters:
load (List[Union[int,float]]) – A list describing the load to be added
- Return type:
None
- property restraints: ndarray#
Returns the restraints vector for the beam
- Returns:
_restraints – The restraints vector for the beam
- Return type:
np.ndarray
- property no_spans#
Returns the no. of spans in the beam
- Returns:
no_spans – The number of spans in the beam
- Return type:
int
- property no_restraints#
Returns the number of restraints of the beam
- Returns:
no_restraints – The number of restraints in the beam
- Return type:
int
- property no_fixed_restraints#
Returns the number of fixed restraints of the beam (fully-supported DOFs)
- Returns:
no_fixed_restraints – The number of fixed restraints in the beam
- Return type:
int
- property length#
returns: length – The total length of the beam :rtype: float
- get_local_span_coords(pos)[source]#
Returns the span index and position in span for a position given in global coordinates on the beam
- Parameters:
pos (float) – The position of interest in global coordinates along the length of the beam
- Return type:
(
int
,float
)- Returns:
ispan (int) – The index (1-based) of the span in which the point of interest falls
pos_in_span (float) – The local coordinate along the member of the point of interest
- get_ref(i_span)[source]#
Returns Released End Forces for the member; that is, the Consistent Nodal Loads modified for the element type (i.e. releases)
- Parameters:
ispan (int) – The index (1-based) of the span in which the point of interest falls
- Returns:
ref – The totalled CNL object for the member, considering all loads.
- Return type:
- get_span_k(i_span)[source]#
Returns the stiffness matrix for the ith span
- Parameters:
ispan (int) – The index (1-based) of the span in which the point of interest falls
- Returns:
kb – The stiffness matrix for the member
- Return type:
np.ndarray
- k_FF(EI, L)[source]#
Stiffness matrix for a fixed-fixed element
- Parameters:
EI (float) – The flexural rigidity for the member (assumed prismatic)
L (float) – The length of the member
- Returns:
k – The stiffness matrix for the member
- Return type:
np.ndarray
- k_FP(EI, L)[source]#
Stiffness matrix for a fixed-pinned element
- Parameters:
EI (float) – The flexural rigidity for the member (assumed prismatic)
L (float) – The length of the member
- Returns:
k – The stiffness matrix for the member
- Return type:
np.ndarray