pycba.load_cases.LoadCase#

class LoadCase(name, loads=<factory>, loaded_spans=(), metadata=None)[source]#

Bases: object

Neutral load-case definition for independent full-beam analyses.

loads are ordinary PyCBA load-matrix rows. Span numbers inside each load row therefore remain 1-based, matching BeamAnalysis. loaded_spans is stored as 0-based indices for convenient Python use.

Methods

add_all_spans_udl

Append a full-span UDL of intensity w to every span.

add_ic

Append an imposed-curvature load to this load case.

add_load

Append one raw PyCBA load-matrix row.

add_ml

Append a concentrated moment load to this load case.

add_pl

Append a point load to this load case.

add_pudl

Append a partial UDL to this load case.

add_segment_udl

Append a UDL covering a global beam segment from x0 to x1.

add_trap

Append a full-span or partial trapezoidal load to this load case.

add_udl

Append a full-span UDL to this load case.

to_LM

Return a copy of this load case's PyCBA load matrix.

Attributes

loaded_spans

metadata

name

loads

add_load(load)[source]#

Append one raw PyCBA load-matrix row.

Return type:

LoadCase

to_LM()[source]#

Return a copy of this load case’s PyCBA load matrix.

Return type:

List[List[Union[int, float]]]

add_udl(i_span, w)[source]#

Append a full-span UDL to this load case.

Return type:

LoadCase

add_pl(i_span, p, a)[source]#

Append a point load to this load case.

Return type:

LoadCase

add_pudl(i_span, w, a, c)[source]#

Append a partial UDL to this load case.

Return type:

LoadCase

add_segment_udl(beam_model, x0, x1, w)[source]#

Append a UDL covering a global beam segment from x0 to x1.

Return type:

LoadCase

add_all_spans_udl(beam_model, w)[source]#

Append a full-span UDL of intensity w to every span.

This replaces the hand-written for i in range(1, no_spans + 1): case.add_udl(i, w) loop. The span count is read from beam_model, which is required here (mirroring add_segment_udl()).

Parameters:
  • beam_model (Union[BeamAnalysis, Beam]) – The beam definition used to count spans.

  • w (float) – UDL intensity applied to every span.

Returns:

self, for fluent chaining.

Return type:

LoadCase

Notes

This adds all spans into the one (this) load case, unlike LoadCases.add_span_udl(), which creates one separate case per span.

add_ml(i_span, m, a)[source]#

Append a concentrated moment load to this load case.

Return type:

LoadCase

add_trap(i_span, w1, w2, a=None, c=None)[source]#

Append a full-span or partial trapezoidal load to this load case.

Return type:

LoadCase

add_ic(i_span, kappa)[source]#

Append an imposed-curvature load to this load case.

Return type:

LoadCase