Results

After performing an analysis on a reinforced concrete cross-section (see Analysis), concreteproperties provides the user with a results object specific to the conducted analysis. These results objects have methods tailored for the post-processing of analysis results.

Gross Area Properties

Gross area properties can be retrieved by calling the get_gross_properties() method.

ConcreteSection.get_gross_properties() GrossProperties[source]

Returns the gross section properties of the reinforced concrete section.

Returns:

Gross concrete properties object

Return type:

GrossProperties

This method returns a GrossProperties object, which stores all the calculated section properties as attributes. The gross area properties can be printed to the terminal by calling the print_results() method.

class concreteproperties.results.GrossProperties[source]

Class for storing gross concrete section properties.

All properties with an e_ preceding the property are multiplied by the elastic modulus. In order to obtain transformed properties, call the get_transformed_gross_properties() method.

print_results(eng: bool = True, prec: int = 3, units: UnitDisplay | None = None) None[source]

Prints the gross concrete section properties to the terminal.

Parameters:
  • eng (bool) – If set to True, formats with engineering notation. If set to False, formats with fixed notation. Defaults to True.

  • prec (int) – The desired precision (i.e. one plus this value is the desired number of digits). Defaults to 3.

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

Transformed gross area properties can be obtained by calling the get_transformed_gross_properties() method.

ConcreteSection.get_transformed_gross_properties(elastic_modulus: float) TransformedGrossProperties[source]

Transforms gross section properties given a reference elastic modulus.

Parameters:

elastic_modulus (float) – Reference elastic modulus

Returns:

Transformed concrete properties object

Return type:

TransformedGrossProperties

This method returns a TransformedGrossProperties object, which stores all the calculated transformed section properties as class attributes. The transformed gross area properties can be printed to the terminal by calling the print_results() method.

TransformedGrossProperties.print_results()[source]

Prints the transformed gross concrete section properties to the terminal.

Parameters:
  • eng (bool) – If set to True, formats with engineering notation. If set to False, formats with fixed notation. Defaults to True.

  • prec (int) – The desired precision (i.e. one plus this value is the desired number of digits). Defaults to 3.

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

See also

For an application of the above, see the example Calculating Area Properties.

Cracked Area Properties

Performing a cracked analysis with calculate_cracked_properties() returns a CrackedResults object.

class concreteproperties.results.CrackedResults[source]

Class for storing cracked concrete section properties.

All properties with an e_ preceding the property are multiplied by the elastic modulus. In order to obtain transformed properties, call the calculate_transformed_properties() method.

Parameters:
  • default_units (UnitDisplay) – Default units to use for reporting

  • theta (float) – Angle (in radians) the neutral axis makes with the horizontal axis (\(-\pi \leq \theta \leq \pi\))

reset_results() None[source]

Resets the analysis results.

calculate_transformed_properties(elastic_modulus: float) None[source]

Calculates and stores transformed cracked properties.

Parameters:

elastic_modulus (float) – Reference elastic modulus

plot_cracked_geometries(title: str = 'Cracked Geometries', **kwargs) Axes[source]

Plots geometries that remain (compression/reinf.) after a cracked analysis.

Parameters:
  • title (str) – Plot title. Defaults to "Cracked Geometries".

  • kwargs – Passed to plot_geometry()

Returns:

Matplotlib axes object

Return type:

Axes

print_results(eng: bool = True, prec: int = 3, units: UnitDisplay | None = None) None[source]

Prints cracked concrete section properties to the terminal.

If calculate_transformed_properties() has been called, also prints the transformed properties.

Parameters:
  • eng (bool) – If set to True, formats with engineering notation. If set to False, formats with fixed notation. Defaults to True.

  • prec (int) – The desired precision (i.e. one plus this value is the desired number of digits). Defaults to 3..

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

Note

A PrestressedSection object will return a tuple for the cracking moment m_cr, with the first value the cracking moment for positive bending and the second value the cracking moment for negative bending.

Calling calculate_transformed_properties() on a CrackedResults object stores the transformed cracked properties as attributes within the current object.

See also

For an application of the above, see the example Calculating Cracked Properties.

Moment Curvature Analysis

Running a moment_curvature_analysis() returns a MomentCurvatureResults object. This object can be used to plot moment curvature results.

class concreteproperties.results.MomentCurvatureResults[source]

Class for storing moment curvature results.

Parameters:
  • default_units (UnitDisplay) – Default units to use for reporting

  • theta (float) – Angle (in radians) the neutral axis makes with the horizontal

  • n_target (float) – Target axial force axis (\(-\pi \leq \theta \leq \pi\))

  • kappa (list[float]) – List of curvatures

  • n (list[float]) – List of axial forces

  • m_x (list[float]) – List of bending moments about the x-axis

  • m_y (list[float]) – List of bending moments about the y-axis

  • m_xy (list[float]) – List of resultant bending moments

  • failure_geometry – Geometry object of the region of the cross-section that failed, ending the moment curvature analysis

  • convergence (list[float]) – The critical ratio between the strain and the failure strain within the cross-section for each curvature step in the analysis. A value of one indicates failure.

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

Plots the moment curvature results.

Parameters:
  • fmt (str) – Plot format string. Defaults "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

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

Plots multiple moment curvature results.

Parameters:
  • moment_curvature_results (list[MomentCurvatureResults]) – List of moment curvature results objects

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

  • fmt (str) – Plot format string. Defaults "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

plot_failure_geometry(title: str = 'Failure Geometry', **kwargs) Axes[source]

Plots the geometry that fails in the moment curvature analysis.

Parameters:
  • title (str) – Plot title. Defaults to "Failure Geometry".

  • kwargs – Passed to plot_geometry()

Returns:

Matplotlib axes object

Return type:

Axes

get_curvature(moment: float) float[source]

Given a moment, uses the moment-curvature results to interpolate a curvature.

Parameters:

moment (float) – Bending moment at which to obtain curvature

Raises:

ValueError – If supplied moment is outside bounds of moment-curvature results.

Returns:

Curvature

Return type:

float

See also

For an application of the above, see the example Moment Curvature Analysis.

Ultimate Bending Capacity

The ultimate_bending_capacity() method returns an UltimateBendingResults object. This object stores results relating to the analysis and allows the results to be printed to the terminal by calling the print_results() method.

class concreteproperties.results.UltimateBendingResults[source]

Class for storing ultimate bending results.

Parameters:
  • default_units (UnitDisplay) – Default units to use for reporting

  • theta (float) – Angle (in radians) the neutral axis makes with the horizontal axis (\(-\pi \leq \theta \leq \pi\))

  • d_n (float) – Ultimate neutral axis depth

  • k_u (float) – Neutral axis parameter (d_n / d)

  • n (float) – Resultant axial force

  • m_x (float) – Resultant bending moment about the x-axis

  • m_y (float) – Resultant bending moment about the y-axis

  • m_xy (float) – Resultant bending moment

  • label (str | None) – Result label

print_results(eng: bool = True, prec: int = 3, units: UnitDisplay | None = None) None[source]

Prints the ultimate bending results to the terminal.

Parameters:
  • eng (bool) – If set to True, formats with engineering notation. If set to False, formats with fixed notation. Defaults to True.

  • prec (int) – The desired precision (i.e. one plus this value is the desired number of digits). Defaults to 3.

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

See also

For an application of the above, see the example Ultimate Bending Capacity.

Moment Interaction Diagram

Calling the moment_interaction_diagram() method returns a MomentInteractionResults object. This object can be used to plot moment interaction results.

class concreteproperties.results.MomentInteractionResults[source]

Class for storing moment interaction results.

Parameters:
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

See also

For an application of the above, see the example Moment Interaction Diagram.

Biaxial Bending Diagram

The biaxial_bending_diagram() method returns a BiaxialBendingResults object. This object can be used to plot biaxial bending results.

class concreteproperties.results.BiaxialBendingResults[source]

Class for storing biaxial bending results.

Parameters:
get_results_lists() tuple[list[float], list[float]][source]

Returns a list and moments about the x and y axes.

Returns:

Tuple containing two list of moments (mx_list, my_list)

Return type:

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

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

Plots a biaxial bending diagram.

Parameters:
  • 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

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

Plots multiple biaxial bending diagrams in a 2D plot.

Parameters:
  • biaxial_bending_results (list[BiaxialBendingResults]) – List of biaxial bending results objects

  • labels (list[str] | None) – List of labels for each biaxial bending diagram, if not provided labels are axial forces. Defaults to None.

  • 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

static plot_multiple_diagrams_3d(biaxial_bending_results: list[BiaxialBendingResults], fmt: str = '-', eng: bool = False, prec: int = 2, units: UnitDisplay | None = None) matplotlib.axes.Axes[source]

Plots multiple biaxial bending diagrams in a 3D plot.

Parameters:
  • biaxial_bending_results (list[BiaxialBendingResults]) – List of biaxial bending results objects

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

  • 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.

Returns:

Matplotlib axes object

Return type:

matplotlib.axes.Axes

point_in_diagram(m_x: float, m_y: float) bool[source]

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

Parameters:
  • m_x (float) – Bending moment about the x-axis

  • m_y (float) – Bending moment about the y-axis

Returns:

True, if combination of bendings moments is within the diagram

Return type:

bool

See also

For an application of the above, see the example Biaxial Bending Diagram.

Stress Analysis

Stress analyses can be performed by calling any of the following methods: calculate_uncracked_stress(), calculate_cracked_stress(), calculate_service_stress() and calculate_ultimate_stress(). All these methods return a StressResult object. This object stores results relating to the stress analysis and can also be used to plot stress results.

class concreteproperties.results.StressResult[source]

Class for storing stress results.

The lever arm is computed to the elastic centroid.

Parameters:
  • default_units (UnitDisplay) – Default units to use for reporting

  • concrete_analysis_sections (list[AnalysisSection]) – List of concrete analysis section objects present in the stress analysis, which can be visualised by calling the plot_mesh() or plot_shape()

  • concrete_stresses (list[np.ndarray]) – List of concrete stresses at the nodes of each concrete analysis section

  • concrete_forces (list[tuple[float, float, float]]) – List of net forces for each concrete analysis section and its lever arm (force, d_x, d_y)

  • meshed_reinforcement_sections (list[AnalysisSection]) – List of meshed reinforcement section objects present in the stress analysis

  • meshed_reinforcement_stresses (list[np.ndarray]) – List of meshed reinforcement stresses at the nodes of each meshed reinforcement analysis section

  • meshed_reinforcement_forces (list[tuple[float, float, float]]) – List of net forces for each meshed reinforcement analysis section and its lever arm (force, d_x, d_y)

  • lumped_reinforcement_geometries (list[CPGeom]) – List of lumped reinforcement geometry objects present in the stress analysis

  • lumped_reinforcement_stresses (list[float]) – List of lumped reinforcement stresses for each lumped geometry

  • lumped_reinforcement_strains (list[float]) – List of lumped reinforcement strains for each lumped geometry

  • lumped_reinforcement_forces (list[tuple[float, float, float]]) – List of net forces for each lumped reinforcement geometry and its lever arm (force, d_x, d_y)

  • strand_geometries (list[CPGeom]) – List of strand geometry objects present in the stress analysis

  • strand_stresses (list[float]) – List of strand stresses for each strand

  • strand_strains (list[float]) – List of strand strains for each strand

  • strand_forces (list[tuple[float, float, float]]) – List of net forces for each strand geometry and its lever arm (force, d_x, d_y)

plot_stress(title: str = 'Stress', conc_cmap: str = 'RdGy', reinf_cmap: str = 'bwr', eng: bool = False, prec: int = 2, units: UnitDisplay | None = None, **kwargs) matplotlib.axes.Axes[source]

Plots concrete and steel stresses on a concrete section.

Parameters:
  • title (str) – Plot title. Defaults to "Stress".

  • conc_cmap (str) – Colour map for the concrete stress. Defaults to "RdGy".

  • reinf_cmap (str) – Colour map for the reinforcement stress. Defaults to "bwr".

  • eng (bool) – If set to True, formats with engineering notation. If set to False, formats with fixed notation. Defaults to False.

  • prec (int) – The desired precision (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

sum_forces() float[source]

Returns the sum of the internal forces.

Returns:

Sum of internal forces

Return type:

float

sum_moments() tuple[float, float, float][source]

Returns the sum of the internal moments.

Returns:

Sum of internal moments about each axis and resultant moment (m_x, m_y, m)

Return type:

tuple[float, float, float]

get_concrete_stress_limits() tuple[float, float][source]

Returns the minimum and maximum concrete stress.

Returns:

Minimum concrete stress, maximum concrete stress

Return type:

tuple[float, float]

See also

For an application of the above, see the example Stress Analysis.

Units

Most of the above methods take an optional units argument as a UnitDisplay() object. This argument allows results to be scaled and unit labels applied to numbers/plot axes.

class concreteproperties.post.UnitDisplay[source]

Class for displaying units in concreteproperties.

Variables:
  • length (str) – Length unit string

  • force (str) – Force unit string

  • mass (str) – Mass unit string

  • radians (bool) – If set to True, displays angles in radians, otherwise displays angles in degrees. Defaults to True.

  • length_factor (float) – Factor by which the length unit differs from the base units. Defaults to 1.0.

  • force_factor (float) – Factor by which the force unit differs from the base units. Defaults to 1.0.

  • mass_factor (float) – Factor by which the mass unit differs from the base units. Defaults to 1.0.

For example, if the model data is specified in [N] and [mm], results can be expressed using [kN] and [m] by creating an appropriate UnitDisplay object:

from concreteproperties.post import UnitDisplay

kn_m = UnitDisplay(
  length="m", force="kN", mass="kg", length_factor=1e3, force_factor=1e3
)

Note that stresses will automatically be displayed as kilopascals using the above unit system as [kPa] is equivalent to [kN/m2]. Similarly, results in [N.mm], [MPa] etc. can be automatically displayed by creating a UnitDisplay object that represents the base unit system:

from concreteproperties.post import UnitDisplay

n_mm = UnitDisplay(length="mm", force="N", mass="kg")

Note that the above two unit systems are baked into concreteproperties in the post module with the si_n_mm and si_kn_m objects:

from concreteproperties.post import si_kn_m, si_n_mm

concreteproperties welcomes the contribution of further unit systems!