MomentInteractionResults

class concreteproperties.results.MomentInteractionResults(default_units: UnitDisplay, results: list[UltimateBendingResults] = <factory>)[source]

Bases: object

Class for storing moment interaction results.

Parameters:

Methods

get_results_lists

Returns a list of axial forces and moments.

plot_diagram

Plots a moment interaction diagram.

plot_multiple_diagrams

Plots multiple moment interaction diagrams.

point_in_diagram

Determines whether or not the design point lies within the diagram.

sort_results

Sorts the results by decreasing axial force.

Attributes

default_units

results

sort_results() None[source]

Sorts the results by decreasing axial force.

get_results_lists(moment: str) tuple[list[float], list[float]][source]

Returns a list of axial forces and moments.

Parameters:

moment (str) – Which moment to return, acceptable values are "m_x", "m_y" or "m_xy"

Raises:

ValueError – If the moment string is not valid

Returns:

Tuple containing a list of axial forces and a list of moments (n_list, m_list)

Return type:

tuple[list[float], list[float]]

plot_diagram(moment: str = 'm_x', fmt: str = 'o-', labels: bool = False, label_offset: bool = False, eng: bool = False, prec: int = 2, units: UnitDisplay | None = None, **kwargs) matplotlib.axes.Axes[source]

Plots a moment interaction diagram.

Parameters:
  • moment (str) – Which moment to plot, acceptable values are "m_x", "m_y" or "m_xy". Defaults to "m_x".

  • fmt (str) – Plot format string. Defaults to "o-".

  • labels (bool) – If set to True, also plots labels on the diagram. Defaults to False.

  • label_offset (bool) – If set to True, attempts to offset the label from the diagram. Defaults to False.

  • eng (bool) – If set to True, formats the plot ticks with engineering notation. If set to False, uses the default matplotlib ticker formatting. Defaults to False.

  • prec (int) – If eng=True, sets the desired precision of the ticker formatting (i.e. one plus this value is the desired number of digits). Defaults to 2.

  • units (UnitDisplay | None) – Unit system to display. Defaults to None.

  • kwargs – Passed to plotting_context()

Returns:

Matplotlib axes object

Return type:

matplotlib.axes.Axes

static plot_multiple_diagrams(moment_interaction_results: list[MomentInteractionResults], labels: list[str], moment: str = 'm_x', fmt: str = 'o-', eng: bool = False, prec: int = 2, units: UnitDisplay | None = None, **kwargs) matplotlib.axes.Axes[source]

Plots multiple moment interaction diagrams.

Parameters:
  • moment_interaction_results (list[MomentInteractionResults]) – List of moment interaction results objects

  • labels (list[str]) – List of labels for each moment interaction diagram.

  • moment (str) – Which moment to plot, acceptable values are "m_x", "m_y" or "m_xy". Defaults to "m_x".

  • fmt (str) – Plot format string. Defaults to "o-".

  • eng (bool) – If set to True, formats the plot ticks with engineering notation. If set to False, uses the default matplotlib ticker formatting. Defaults to False.

  • prec (int) – If eng=True, sets the desired precision of the ticker formatting (i.e. one plus this value is the desired number of digits). Defaults to 2.

  • units (UnitDisplay | None) – Unit system to display. Defaults to None.

  • kwargs – Passed to plotting_context()

Returns:

Matplotlib axes object

Return type:

matplotlib.axes.Axes

point_in_diagram(n: float, m: float, moment: str = 'm_x') bool[source]

Determines whether or not the design point lies within the diagram.

Parameters:
  • n (float) – Axial force

  • m (float) – Bending moment

  • moment (str) – Which moment to analyse, acceptable values are "m_x", "m_y" or "m_xy". Defaults to "m_x".

Returns:

True, if combination of axial force and moment is within the diagram

Return type:

bool