pycba.utils.parse_beam_string#
- parse_beam_string(beam_string)[source]#
This function parses a beam descriptor string and returns CBA input vectors.
The beam descriptor string uses a specific format: spans lengths in float are separated by single characters describing the terminals of that beam element. The terminal characters are:
P - pinned (effectively the same as roller, but retained for visualisations)
R - roller (can occur at any terminal)
E - encastre (i.e. fully-fixed) - can only occur at beam extremity
F - free (e.g. cantilever end) - can only occur at beam extremity
H - hinge - can only occur internally in the beam
Examples of beam strings are:
P40R20R - 2-span, 60 m long, with pinned-roller-roller supports
E20H30R10F - 3-span, 60 m long, encastre-hinge-roller-free
Complex beam configurations may not be describable using the beam string.
The function returns a tuple containing the necessary beam inputs for
pycba.analysis.BeamAnalysis
: (L, EI, R, eType)- Parameters:
beam_string (
str
) – The string to be parsed.- Raises:
ValueError – When the beam string does not meet basic structural requirements.
- Returns:
(L, EI, R, eType) –
- In which:
L is a vector of span lengths.
EI is A vector of member flexural rigidities (prismatic).
R is a vector describing the support conditions at each member end.
eType is a vector of the member types.
- Return type:
tuple(np.ndarray, np.ndarray, np.ndarray, np.ndarray)
Example
This example creates a four-span beam with fixed extreme supports and an internal hinge.
beam_str = "E30R30H30R30E" (L, EI, R, eType) = cba.parse_beam_string(beam_str) ils = cba.InfluenceLines(L, EI, R, eType) ils.create_ils(step=0.1) ils.plot_il(0.0, "R")