pycba.nonlinear.NonlinearBeamAnalysis#

class NonlinearBeamAnalysis(L, EI, R, Mp, My=None, q=0.0, mesh_size=0.5)[source]#

Bases: object

Nonlinear continuous beam analysis using the Generalized Clough model.

The beam is automatically meshed into short elements whose end stiffnesses degrade from elastic (R = 1) to plastic (R = q) as the bending moment increases from M_y to M_p. Collapse is detected when the pattern of plastic hinges forms a mechanism (global stiffness matrix becomes singular).

Two analysis modes are provided:

  • analyze() — proportional static loading with an increasing load factor.

  • analyze_moving() — a vehicle (single axle or multi-axle) traverses the beam, with paired elastic-unload / nonlinear-reload sub-increments at each position step.

Parameters:
  • L (Union[list, ndarray]) – Span lengths (m).

  • EI (Union[float, list, ndarray]) – Flexural rigidity (kNm²), scalar or per-span.

  • R (Union[list, ndarray]) – Restraint vector in pycba convention (-1 = fixed, 0 = free).

  • Mp (Union[float, list, ndarray]) – Plastic moment capacity (kNm), scalar or per-span.

  • My (Union[float, list, ndarray, None]) – Yield moment capacity (kNm). Defaults to Mp / 1.15.

  • q (float) – Strain-hardening ratio. 0 gives elastic-perfectly-plastic behaviour; a small positive value (e.g. 0.01) adds post-yield stiffness. Default 0.

  • mesh_size (float) – Target element length (m) for the internal mesh. Default 0.5.

References

See module-level docstring for full reference list.

Examples

>>> nba = NonlinearBeamAnalysis(L=[12, 12], EI=67035.0,
...     R=[-1, 0, -1, 0, -1, 0], Mp=432.0, My=376.0)
>>> result = nba.analyze(LM=[[1, 2, 100, 6]], lambda_max=5.0)
>>> result.collapsed
True

Methods

analyze

Run a proportional-load incremental nonlinear analysis.

analyze_moving

Moving-load nonlinear analysis.

analyze(LM, lambda_max=20.0, record_every=0, max_steps=50000)[source]#

Run a proportional-load incremental nonlinear analysis.

The reference load defined by LM is scaled by a load factor lambda that increases from 0 to lambda_max (or until collapse). Step sizes adapt automatically based on the minimum R value.

Parameters:
  • LM (list of lists) – Load matrix in pycba convention. Each entry is [span, type, value, position] where type 1 = UDL, type 2 = point load.

  • lambda_max (float, optional) – Maximum load factor to reach. Default 20.0.

  • record_every (int, optional) – Store moment snapshots every n increments (0 = off).

  • max_steps (int, optional) – Safety limit on the number of increments. Default 50000.

Returns:

Contains collapse load factor, hinge history, and moment distribution at end of analysis.

Return type:

NonlinearResult

analyze_moving(P=None, vehicle=None, step=0.5, n_sub=5, record_every=0)[source]#

Moving-load nonlinear analysis.

A vehicle traverses the beam from left to right. At each position step the load is transferred via paired elastic-unload / nonlinear- reload sub-increments.

The vehicle can be specified as:

  • Single axle — pass P (float, kN).

  • Multi-axle — pass a pycba.Vehicle object.

Parameters:
  • P (float, optional) – Single point load magnitude.

  • vehicle (pycba.Vehicle, optional) – A pycba Vehicle object with axle weights and spacings.

  • step (float) – Distance the front axle moves per position step.

  • n_sub (int) – Sub-increments per position step for the unload/reload transfer.

  • record_every (int) – Store moment snapshots every n position steps.

Returns:

collapse_lambda is the front-axle position (m) at collapse.

Return type:

NonlinearResult