pycba.nonlinear.NonlinearResult#
- class NonlinearResult(collapse_lambda, collapsed, hinge_events, node_coords, final_moments, final_R, support_coords=<factory>, lambda_history=<factory>, moment_history=<factory>, final_displacements=<factory>)[source]#
Bases:
objectResults container for a nonlinear beam analysis.
- collapse_lambda#
Load factor at collapse (static) or front-axle position in metres at collapse (moving load). If no collapse occurred, this is the final value reached.
- Type:
float
- collapsed#
Trueif a collapse mechanism was detected.- Type:
bool
- hinge_events#
Chronological list of yield and plastic-hinge events.
- Type:
list[HingeEvent]
- node_coords#
Global coordinates of all mesh nodes.
- Type:
ndarray
- final_moments#
Nodal bending moments at the end of the analysis.
- Type:
ndarray
- final_R#
Final element-end stiffness-reduction parameters.
- Type:
ndarray, shape (n_elem, 2)
- support_coords#
Global x-coordinates of the support locations.
- Type:
ndarray
- lambda_history#
Recorded load-factor (or position) snapshots.
- Type:
list[float]
- moment_history#
Recorded moment-distribution snapshots (same length as lambda_history).
- Type:
list[ndarray]
Methods
Plot the beam with hinge locations and optional vehicle position.
Plot the deformed shape at collapse, with the plastic hinges marked.
Plot the hinge formation sequence along the beam.
Plot the bending moment distribution at collapse.
Attributes
final_displacements- plot_moments(Mp=None, ax=None, units=None)[source]#
Plot the bending moment distribution at collapse.
If moment history snapshots were recorded (via
record_every), they are shown as light traces behind the final distribution.- Parameters:
Mp (float, optional) – Plastic moment capacity. If given, horizontal dashed lines are drawn at +/- Mp.
ax (matplotlib Axes, optional) – Axes to plot on. If
None, a new figure is created.units (str or pycba.units.UnitSystem, optional) – Display unit system for the labels (see
pycba.set_units()).
- Returns:
ax
- Return type:
matplotlib Axes
- plot_hinge_history(moving=False, ax=None, units=None)[source]#
Plot the hinge formation sequence along the beam.
Each event is shown as a marker at
(x, stage)where x is the hinge location on the beam.For static analysis, stage is the load factor at which the event occurred. The beam line is drawn at $lambda = 1$.
For moving-load analysis (
moving=True), stage is the front-axle position when the event occurred — showing where the load was when each hinge formed.- Parameters:
moving (bool, optional) – If
True, label the y-axis as front-axle position. DefaultFalse(load factor).ax (matplotlib Axes, optional) – Axes to plot on. If
None, a new figure is created.units (str or pycba.units.UnitSystem, optional) – Display unit system for the labels (see
pycba.set_units()).
- Returns:
ax
- Return type:
matplotlib Axes
- plot_beam_state(vehicle=None, ax=None, units=None)[source]#
Plot the beam with hinge locations and optional vehicle position.
Draws the beam, supports, and marks yield/hinge locations along the beam line. If vehicle is given and the analysis collapsed, axle positions at collapse are shown above the beam.
- Parameters:
vehicle (
pycba.Vehicle, optional) – Vehicle object. Axle positions are drawn at the collapse position (collapse_lambda).ax (matplotlib Axes, optional) – Axes to plot on. If
None, a new figure is created.units (str or pycba.units.UnitSystem, optional) – Display unit system for the labels (see
pycba.set_units()).
- Returns:
ax
- Return type:
matplotlib Axes
- plot_collapse(scale=None, ax=None, units=None)[source]#
Plot the deformed shape at collapse, with the plastic hinges marked.
The undeformed beam is drawn in grey and the (exaggerated) collapse deflected shape overlaid, with a large marker at every plastic‑hinge location — the standard collapse‑mechanism picture for a plastic analysis.
- Parameters:
scale (float, optional) – Deflection exaggeration factor. By default the shape is auto‑scaled so the largest deflection spans a sensible fraction of the beam length.
ax (matplotlib Axes, optional) – Axes to plot on; a new figure is created if
None.units (str or pycba.units.UnitSystem, optional) – Display unit system for the distance axis (see
pycba.set_units()).
- Returns:
ax
- Return type:
matplotlib Axes