pycba.units.UnitSystem#

class UnitSystem(name, force='', length='', moment='', distributed='', disp_label='', disp_scale=1.0)[source]#

Bases: object

A display unit system: axis-label units and the deflection display scale.

Holds only label strings and a deflection display factor - it is purely a presentation aid and never affects the analysis (PyCBA does no unit conversion).

Parameters:
  • name (str) – Human-readable identifier (e.g. "SI (kN, m)").

  • force (str) – Force unit label, e.g. "kN" (used for shear, reactions, loads).

  • length (str) – Length unit label, e.g. "m" (used for the distance axis).

  • moment (str) – Moment unit label, e.g. "kNm" (conventions vary, so it is given explicitly rather than composed from force x length).

  • distributed (str) – Distributed-load unit label, e.g. "kN/m".

  • disp_label (str) – Unit shown on the deflection axis, e.g. "mm".

  • disp_scale (float) – Factor the native deflection is multiplied by for display. For SI (kN, m) this is 1000 (m shown as mm); for a system whose length unit already matches the deflection unit it is 1.

Methods

fmt_distributed

Format a (possibly varying) distributed load, e.g. 5→8 kN/m.

fmt_force

fmt_moment

length_axis

Axis label for a length quantity, e.g. length_axis("Position").

Attributes

deflection_axis

disp_label

disp_scale

distance_axis

distributed

force

length

moment

moment_axis

shear_axis

name

length_axis(what='Distance along beam')[source]#

Axis label for a length quantity, e.g. length_axis("Position").

Return type:

str

fmt_distributed(w0, w1=None)[source]#

Format a (possibly varying) distributed load, e.g. 5→8 kN/m.

Return type:

str