mento package

Contents

mento package#

Subpackages#

Submodules#

mento.beam module#

class mento.beam.RectangularBeam(settings: BeamSettings | None = None, *, concrete: Concrete, steel_bar: SteelBar, c_c: Quantity, label: str | None = None, width: Quantity, height: Quantity)[source]#

Bases: RectangularSection

Represents a reinforced concrete rectangular beam section with methods for design, checking, and visualization of longitudinal and transverse reinforcement according to various design codes.

settings#

Access to global design rules and settings.

Type:

BeamSettings

set_transverse_rebar(n_stirrups, d_b, s_l)[source]#

Sets the transverse (stirrup) rebar configuration for the beam.

set_longitudinal_rebar_bot(n1, d_b1, n2, d_b2, n3, d_b3, n4, d_b4)[source]#

Sets the bottom longitudinal rebar configuration.

set_longitudinal_rebar_top(n1, d_b1, n2, d_b2, n3, d_b3, n4, d_b4)[source]#

Sets the top longitudinal rebar configuration.

design_flexure(forces)[source]#

Designs the flexural reinforcement for the beam based on provided forces and design code.

check_flexure(forces)[source]#

Checks the flexural capacity for all provided forces and stores results.

design_shear(forces)[source]#

Designs the shear reinforcement for the beam based on provided forces and design code.

check_shear(forces)[source]#

Checks the shear capacity for all provided forces and stores results.

data()#

Property. Displays basic beam data in Markdown format.

flexure_results()#

Property. Displays summary of flexural design/check results in Markdown format.

shear_results()#

Property. Displays summary of shear design/check results in Markdown format.

results()#

Property. Displays all available results (properties, flexure, shear) in Markdown format.

flexure_results_detailed(force=None)[source]#

Displays detailed flexure results for a specific force or the limiting case.

flexure_results_detailed_doc(force=None)[source]#

Exports detailed flexure results to a Word document.

shear_results_detailed(force=None)[source]#

Displays detailed shear results for a specific force or the limiting case.

shear_results_detailed_doc(force=None)[source]#

Exports detailed shear results to a Word document.

plot()[source]#

Plots the beam section with its rebar.

Usage:
  • Instantiate with required section and material properties.

  • Use set_longitudinal_rebar_* and set_transverse_rebar to configure reinforcement.

  • Call design_flexure and design_shear to perform design.

  • Use flexure_results, shear_results, and results properties for summary output.

  • Use flexure_results_detailed and shear_results_detailed for detailed output.

  • Use plot() to visualize the rebar arrangement.

Note

This class is intended for use in reinforced concrete beam design workflows, supporting multiple design codes and detailed reporting.

check(forces: list[Forces]) None[source]#

Complete check: flexure + shear.

check_flexure(forces: list[Forces]) DataFrame[source]#
check_shear(forces: list[Forces]) DataFrame[source]#
property data: None#
design(forces: list[Forces]) None[source]#

Complete design: flexure + shear + flexure check.

design_flexure(forces: list[Forces]) DataFrame[source]#

Designs flexural reinforcement for the beam using the provided forces and design code. Identifies the limiting cases for top and bottom reinforcement, designs for those cases, and then checks flexural capacity for all forces.

Returns:

A DataFrame summarizing the flexural design results for all forces.

Return type:

DataFrame

design_shear(forces: list[Forces]) DataFrame[source]#
property flexure_results: None#
flexure_results_detailed(force: Forces | None = None) None[source]#

Displays detailed flexure results.

Parameters:

forces (Forces, optional) – The specific Forces object to display results for. If None, displays results for the limiting case.

Return type:

None

flexure_results_detailed_doc(force: Forces | None = None) None[source]#

Prints detailed flexure results in Word.

Parameters:

forces (Forces, optional) – The specific Forces object to display results for. If None, displays results for the limiting case.

plot(show: bool = False) Figure[source]#

Plots the rectangular section with a dark gray border, light gray hatch, and dimensions. Also plots the stirrup with rounded corners and thickness.

property results: None#

Ensure that properties, flexure results, and shear results are available and display them. Handles cases where flexure or shear results are not yet available.

set_longitudinal_rebar_bot(n1: int, d_b1: Quantity | None, n2: int = 0, d_b2: Quantity | None = None, n3: int = 0, d_b3: Quantity | None = None, n4: int = 0, d_b4: Quantity | None = None) None[source]#
set_longitudinal_rebar_top(n1: int, d_b1: Quantity | None, n2: int = 0, d_b2: Quantity | None = None, n3: int = 0, d_b3: Quantity | None = None, n4: int = 0, d_b4: Quantity | None = None) None[source]#
set_transverse_rebar(n_stirrups: int = 0, d_b: ~pint.registry.Quantity = <Quantity(0, 'millimeter')>, s_l: ~pint.registry.Quantity = <Quantity(0, 'centimeter')>) None[source]#

Sets the transverse rebar in the beam section.

settings: BeamSettings | None = None#
property shear_results: None#
shear_results_detailed(force: Forces | None = None) None[source]#

Displays detailed shear results.

Parameters:

forces (Forces, optional) – The specific Forces object to display results for. If None, displays results for the limiting case.

Return type:

None

shear_results_detailed_doc(force: Forces | None = None) None[source]#

Prints detailed shear results in Word.

Parameters:

forces (Forces, optional) – The specific Forces object to display results for. If None, displays results for the limiting case.

mento.forces module#

class mento.forces.Forces(label: str | None = None, N_x: ~pint.registry.Quantity = <Quantity(0, 'kilonewton')>, V_z: ~pint.registry.Quantity = <Quantity(0, 'kilonewton')>, M_y: ~pint.registry.Quantity = <Quantity(0, 'kilonewton * meter')>, M_x: ~pint.registry.Quantity = <Quantity(0, 'kilonewton * meter')>, unit_system: str = 'metric')[source]#

Bases: object

A class to represent the forces acting on a structural element.

N_x#

Axial force along the x-axis (default is 0 kN).

Type:

float

V_z#

Shear force along the z-axis (default is 0 kN).

Type:

float

M_y#

Bending moment about the y-axis (default is 0 kN*m).

Type:

float

unit_system#

The unit system to use for displaying forces (‘metric’ or ‘imperial’).

Type:

str

get_forces() dict[source]#

Returns the forces as a dictionary with keys ‘N_x’, ‘V_z’, and ‘M_y’.

set_forces() None[source]#

Sets the forces of the object with the provided values.

compare_to(other: 'Forces', by: str = 'V_z') bool[source]#

Compares this force with another force based on a given attribute.

property M_x: Quantity#

Bending moment about the x-axis — used for biaxial punching shear (default is 0 kN*m).

property M_y: Quantity#

Bending moment about the y-axis (default is 0 kN*m).

property N_x: Quantity#

Axial force along the x-axis (default is 0 kN).

property V_z: Quantity#

Shear force along the z-axis (default is 0 kN).

compare_to(other: Forces, by: str = 'V_z') bool[source]#

Compares this force with another force based on a selected attribute.

Parameters:
  • other (Forces) – Another Forces instance to compare with.

  • by (str) – The attribute to compare by (‘N_x’, ‘V_z’, ‘M_y’, or ‘M_x’).

Returns:

True if this force is greater than the other force by the selected attribute.

Return type:

bool

get_forces() Dict[str, Quantity][source]#

Returns the forces as a dictionary with keys ‘N_x’, ‘V_z’, ‘M_y’, and ‘M_x’.

property id: int#

Read-only property for accessing the unique ID of the instance.

label: str | None = None#
set_forces(N_x: ~pint.registry.Quantity = <Quantity(0, 'kilonewton')>, V_z: ~pint.registry.Quantity = <Quantity(0, 'kilonewton')>, M_y: ~pint.registry.Quantity = <Quantity(0, 'kilonewton * meter')>, M_x: ~pint.registry.Quantity = <Quantity(0, 'kilonewton * meter')>) None[source]#

Sets the forces in the object.

unit_system: str = 'metric'#

mento.material module#

class mento.material.Concrete(name: 'str', f_c: 'Quantity' = <Quantity(25, 'megapascal')>)[source]#

Bases: Material

density: Quantity#
design_code: str = 'ACI 318-19'#
f_c: Quantity = <Quantity(25, 'megapascal')>#
get_properties() Dict[str, Any][source]#
unit_system: str#
class mento.material.Concrete_ACI_318_19(name: str, f_c: Quantity = <Quantity(25, 'megapascal')>)[source]#

Bases: Concrete

Concrete_ACI_318_19 represents a concrete material model based on the ACI 318-19 code provisions. This class extends the base Concrete class and implements calculation of key material properties according to the American Concrete Institute (ACI) 318-19 standard, including modulus of elasticity, modulus of rupture, and stress block parameters. It supports both metric and imperial unit systems.

Inputs:

name: Name of the concrete material. f_c: Characteristic compressive strength of concrete.

get_properties() Dict[str, Any][source]#

Returns a dictionary of concrete properties.

E_c()#

Returns modulus of elasticity.

f_r(property)#

Returns modulus of rupture.

beta_1(property)#

Returns β₁ value.

lambda_factor(property)#

Returns λ factor for lightweight concrete.

phi_v(property)#

Returns shear strength reduction factor.

phi_c(property)#

Returns compression-controlled strength reduction factor.

phi_y(property)#

Returns tension-controlled strength reduction factor.

Usage:

Instantiate this class to represent a concrete material with properties and code factors compliant with ACI 318-19, suitable for use in structural analysis and design calculations.

property E_c: Quantity#
property beta_1: float#
property f_r: Quantity#
get_properties() Dict[str, Any][source]#
property lambda_factor: float#
property phi_c: float#
property phi_v: float#
property phi_y: float#
class mento.material.Concrete_CIRSOC_201_25(name: str, f_c: Quantity = <Quantity(25, 'megapascal')>)[source]#

Bases: Concrete_ACI_318_19

Concrete class for a CIRSOC 201-25 design code with metric units.

class mento.material.Concrete_EN_1992_2004(name: str, f_c: Quantity = <Quantity(25, 'megapascal')>)[source]#

Bases: Concrete

Concrete_EN_1992_2004 represents concrete material properties and design parameters according to Eurocode EN 1992-1-1:2004. This class extends the base Concrete class, providing Eurocode-specific calculations for characteristic and mean strengths, modulus of elasticity, and other design factors. It encapsulates the following key methods:

Inputs:

name: Name of the concrete material. f_c: Characteristic compressive strength of concrete (f_ck for Eurocode).

get_properties() Dict[str, Any][source]#

Returns a dictionary of all relevant material properties.

E_cm(property)#

Returns the secant modulus of elasticity.

f_ck(property)#

Returns the characteristic compressive strength.

f_cm(property)#

Returns the mean compressive strength.

f_ctm(property)#

Returns the mean tensile strength.

epsilon_cu3(property)#

Returns the ultimate strain in concrete.

gamma_c(property)#

Returns the partial safety factor for concrete.

alpha_cc(property)#

Returns the α_cc coefficient.

Lambda_factor(property)#

Returns the λ factor.

Eta_factor(property)#

Returns the η factor.

Usage:

This class is intended for use in structural engineering applications where concrete properties must comply with EN 1992-1-1:2004. It provides all necessary parameters for design and verification according to the code.

property E_cm: Quantity#
property Eta_factor: float#
property Lambda_factor: float#
property alpha_cc: float#
property epsilon_cu3: float#
property f_ck: Quantity#
property f_cm: Quantity#
property f_ctm: Quantity#
property gamma_c: float#
property gamma_s: float#
get_properties() Dict[str, Any][source]#
class mento.material.Material(name: 'str')[source]#

Bases: object

name: str#
class mento.material.Steel(name: 'str', f_y: 'Quantity', density: 'Quantity' = <Quantity(7850.0, 'kilogram / meter ** 3')>, gamma_s: 'float' = 1.15)[source]#

Bases: Material

property density: Quantity#
property f_y: Quantity#
class mento.material.SteelBar(name: 'str', f_y: 'Quantity', density: 'Quantity' = <Quantity(7850.0, 'kilogram / meter ** 3')>)[source]#

Bases: Steel

property E_s: Quantity#
property epsilon_y: Quantity#
get_properties() Dict[str, Any][source]#
class mento.material.SteelStrand(name: 'str', f_y: 'Quantity', density: 'Quantity' = <Quantity(7850.0, 'kilogram / meter ** 3')>)[source]#

Bases: Steel

property E_s: Quantity#
property epsilon_y: Quantity#
property f_u: Quantity#
get_properties() Dict[str, Any][source]#
prestress_stress: Quantity = <Quantity(0, 'megapascal')>#

mento.node module#

class mento.node.Node(section: Section, forces: Forces | List[Forces])[source]#

Bases: object

Node Class The Node class represents a structural node that is associated with a section (e.g., a beam) and can have forces applied to it. It provides methods for managing forces, performing structural checks, and designing for flexure and shear. .. attribute:: section

The section (e.g., beam) associated with the node.

type:

Section

forces#

A list of forces applied to the node.

Type:

List[Forces]

add_forces(forces

Union[Forces, List[Forces]]) -> None: Adds one or more forces to the node.

get_forces_list() List[Forces][source]#

Returns the list of forces applied to this node.

clear_forces() None[source]#

Removes all forces from the node.

check_flexure() pd.DataFrame[source]#

Performs a flexural check on the section using the applied forces.

design_flexure() pd.DataFrame[source]#

Designs the section for flexure based on the applied forces.

check_shear() pd.DataFrame[source]#

Performs a shear check on the section using the applied forces.

design_shear() pd.DataFrame[source]#

Designs the section for shear based on the applied forces.

shear_results_detailed(force

Optional[Forces] = None) -> None: Provides detailed shear results for a specific force or all forces.

shear_results_detailed_doc(force

Optional[Forces] = None) -> None: Provides detailed shear results documentation for a specific force or all forces.

flexure_results_detailed(force

Optional[Forces] = None) -> None: Provides detailed flexure results for a specific force or all forces.

flexure_results_detailed_doc(force

Optional[Forces] = None) -> None: Provides detailed flexure results documentation for a specific force or all forces.

results -> None

A property that provides beam results for Jupyter Notebook.

id -> int

A read-only property to access the private _id of the node.

add_forces(forces: Forces | List[Forces]) None[source]#
check() None[source]#

Complete check: flexure + shear.

check_flexure() DataFrame[source]#
check_shear() DataFrame[source]#
clear_forces() None[source]#

Remove all forces from the node.

design() None[source]#

Complete design: flexure + shear + flexure check.

design_flexure() DataFrame[source]#
design_shear() DataFrame[source]#
flexure_results_detailed(force: Forces | None = None) None[source]#
flexure_results_detailed_doc(force: Forces | None = None) None[source]#
get_forces_list() List[Forces][source]#

Returns the list of forces applied to this node.

property id: int#

Read-only property to access the private _id.

property results: None#
shear_results_detailed(force: Forces | None = None) None[source]#
shear_results_detailed_doc(force: Forces | None = None) None[source]#

mento.rebar module#

class mento.rebar.Rebar(beam: RectangularBeam)[source]#

Bases: object

calculate_max_spacing_ACI_318_19(V_s_req: Quantity, A_cv: Quantity) Tuple[Quantity, Quantity][source]#

Calculate the maximum allowable spacing across the length and width of the beam based on design requirements.

Parameters:#

V_s_reqfloat

Required shear force for the rebar.

A_cvfloat

Effective shear area of the concrete section.

Returns:#

tuple

(s_max_l, s_max_w): The maximum spacing across the length and width of the beam.

calculate_max_spacing_EN_1992_2004(alpha: float) Tuple[Quantity, Quantity][source]#

Calculate the maximum allowable spacing across the length and width of the beam based on design requirements for EN 1992-2004.

Parameters:#

alpha: stirrups angle

Returns:#

tuple

(s_max_l, s_max_w): The maximum spacing along the length and width of the beam.

longitudinal_rebar(A_s_req: Quantity, A_s_max: Quantity | None = None) Dict[str, Any][source]#

Selects the appropriate longitudinal rebar method based on the design code.

Parameters:
  • A_s_req – Required longitudinal rebar area.

  • A_s_max – Optional maximum allowable longitudinal rebar area.

longitudinal_rebar_ACI_318_19(A_s_req: Quantity, A_s_max: Quantity | None = None, mech_cover: Quantity | None = None) DataFrame[source]#

Computes the required longitudinal reinforcement based on ACI 318-19.

Parameters:
  • A_s_req – Required longitudinal rebar area.

  • A_s_max – Optional maximum allowable longitudinal rebar area. If not provided, the limit defaults to 10 * A_s_req.

Returns:

A DataFrame containing the best combinations of rebar details. If no combination satisfies A_s_req, returns the combination with the maximum possible area.

longitudinal_rebar_EN_1992_2004(A_s_req: Quantity) None[source]#
property longitudinal_rebar_design: DataFrame#
transverse_rebar(A_v_req: Quantity, V_s_req: Quantity, alpha: float) DataFrame[source]#

Computes the required transverse reinforcement based on ACI 318-19.

Parameters:

A_v_req – Required area for transverse reinforcement.

Returns:

A dictionary containing the transverse rebar design.

transverse_rebar_ACI_318_19(V_s_req: Quantity) Any[source]#
transverse_rebar_CIRSOC_201_25(V_s_req: Quantity) Any[source]#
transverse_rebar_EN_1992_2004(alpha: float) Any[source]#
property transverse_rebar_design: DataFrame#

mento.rectangular module#

class mento.rectangular.RectangularSection(*, concrete: Concrete, steel_bar: SteelBar, c_c: Quantity, label: str | None = None, width: Quantity, height: Quantity)[source]#

Bases: Section

Represents a rectangular cross-section for structural analysis and design. This class extends the generic Section class to provide properties and methods specific to rectangular sections, including geometric properties (area, moments of inertia), access to design settings, and plotting capabilities.

width#

The width of the rectangular section.

Type:

Quantity

height#

The height of the rectangular section.

Type:

Quantity

Properties:

settings (BeamSettings): Access to global design rules and settings. A_x (Quantity): Cross-sectional area, returned in cm². I_y (Quantity): Moment of inertia about the Y axis, returned in cm⁴. I_z (Quantity): Moment of inertia about the Z axis, returned in cm⁴.

plot()#

Plots the rectangular section with dimensions and stirrup representation, including rounded corners and thickness.

property A_x: Quantity#

Cross section area.

property I_y: Quantity#

Moment of inertia about the Y axis.

property I_z: Quantity#

Moment of inertia about the Z axis.

height: Quantity#
width: Quantity#

mento.results module#

class mento.results.DocumentBuilder(title: str, font_name: str = 'Lato', font_size: int = 9)[source]#

Bases: object

A class to build and style a Word document, including adding headings and tables from data frames.

Attributes:#

titlestr

Title of the document, displayed at the beginning.

font_namestr

Default font name for the document text.

font_sizeint

Default font size for the document text.

docDocument

The Document object representing the Word document being built.

Methods:#

set_document_style() -> None

Configures the document’s default style with the specified font name and size.

add_heading(text: str, level: int) -> None

Adds a heading to the document at the specified level.

set_col_widths(table: ‘docx.table.Table’, column_widths: List[Cm]) -> None

Sets the width for each column in a given table.

add_table(df: pd.DataFrame, column_widths: List[Cm]) -> None

Adds a table to the document, with data from a DataFrame and custom column widths.

save(filename: str) -> None

Saves the document to a specified filename.

add_figure(fig: Figure, width: float = 16) None[source]#

Inserts a matplotlib Figure into the Word document.

Parameters:
  • fig (matplotlib.figure.Figure) – The figure to insert.

  • width (float) – Width in centimeters (default 12 cm). Height auto-scales.

add_heading(text: str, level: int, font_size: float | None = 10) None[source]#

Adds a heading to the document at the specified level.

Parameters:#

textstr

The text for the heading.

levelint

The heading level (e.g., 0 for title, 1 for main headings, etc.).

font_sizefloat, optional

Font size in points. Default is 10 pt.

Returns:#

None

add_image(image_path: str, width: Cm | None = None) None[source]#

Insert an external image into the document.

Parameters:
  • image_path (str) – Absolute or relative path to the image file.

  • width (docx.shared.Cm, optional) – Target width. Height scales to keep aspect ratio.

add_table(df: DataFrame, column_widths: List[Cm], font_size: float | None = 9) None[source]#

Adds a table to the document, populated with data from a DataFrame.

Parameters:
  • df (pd.DataFrame) – The DataFrame containing the data for the table.

  • column_widths (List[Cm]) – List of column widths for the table.

  • font_size (float, optional) – Font size (in points) for table text. Default is 10 pt.

Returns:

The created table object.

Return type:

docx.table.Table

add_table_data(df: DataFrame, column_widths=[4320000, 720000, 720000, 720000]) None[source]#
add_table_dcr(df: DataFrame) None[source]#

Adds a table using add_table and modifies the last row’s DCR cell color.

  • Green if DCR < 1

  • Red if DCR >= 1

add_table_min_max(df: DataFrame) None[source]#
add_text(text: str) None[source]#

Adds a paragraph to the document

save(filename: str) None[source]#

Saves the document to a specified file.

Parameters:#

filenamestr

The filename (including path) where the document will be saved.

Returns:#

None

set_col_widths(table: Any, column_widths: List[Cm]) None[source]#

Sets the width of each column in the table.

Parameters:#

tabledocx.table.Table

The table object whose column widths need to be set.

column_widthsList[Cm]

List of widths for each column, in centimeters.

Returns:#

None

set_document_style() None[source]#

Sets the default style of the document, applying the font name and size.

Returns:#

None

set_margins(top: float = 3.5, bottom: float = 2.5, left: float = 1.6, right: float = 1.6) None[source]#

Set page margins in centimeters.

Parameters:
  • top (float) – Margins in centimeters. Default is 1 cm for all.

  • bottom (float) – Margins in centimeters. Default is 1 cm for all.

  • left (float) – Margins in centimeters. Default is 1 cm for all.

  • right (float) – Margins in centimeters. Default is 1 cm for all.

set_page_size() None[source]#

Sets the page size to A4 by default.

Returns:#

None

class mento.results.Formatter[source]#

Bases: object

Class to stlye the results in a Markdown display and a DataFrame output.

DCR(DCR: float) str[source]#
DCR_value(DCR: float) str[source]#
DCR_value_df(DCR: float | None) str[source]#
apply_DCR_style(value: float) str[source]#
color_DCR_df(df: DataFrame, DCR_columns: list) Styler[source]#

Apply color styling to specified DCR-related columns in the DataFrame.

Parameters:
  • df – DataFrame with DCR values to color.

  • DCR_columns – List of column names to apply the DCR styling to.

Returns:

A styled DataFrame with colored DCR values.

is_greater(value1: float, value2: float) str[source]#
is_lower(value1: float, value2: float) str[source]#
class mento.results.TablePrinter(title: str | None = None)[source]#

Bases: object

A class for printing tables with customizable formatting options.

Attributes:#

titleOptional[str]

Optional title displayed above the printed table.

Methods:#

print_table_data(data: List[List[Any]], headers: List[str], tablefmt: str = “fancygrid”, numalign: str = “right”)
-> None

Prints table data with customizable formatting.

print_table_min_max(data: List[List[Any]], headers: List[str], tablefmt: str = “fancygrid”, numalign: str = “right”)
-> None

Prints table data with column alignment for minimum and maximum values.

print_table_data(data: dict[str, list[Any]], headers: str, tablefmt: str = 'fancygrid', numalign: str = 'right') None[source]#

Prints table data with customizable formatting options.

Parameters:#

dataList[List[Any]]

The data to be printed in table format, where each inner list represents a row.

headersList[str]

Column headers for the table.

tablefmtstr, default=”fancygrid”

Table formatting style supported by tabulate (e.g., “plain”, “grid”, “fancygrid”).

numalignstr, default=”right”

Number alignment in the table. Common options are “right”, “center”, or “left”.

Returns:#

table: Return the formatted table string

print_table_min_max(data: dict[str, list[Any]], headers: str, tablefmt: str = 'fancygrid', numalign: str = 'right') None[source]#

Prints table data with column alignment for minimum and maximum values.

Parameters:#

dataList[List[Any]]

The data to be printed in table format, where each inner list represents a row.

headersList[str]

Column headers for the table.

tablefmtstr, default=”fancygrid”

Table formatting style supported by tabulate (e.g., “plain”, “grid”, “fancygrid”).

numalignstr, default=”right”

Number alignment in the table. Common options are “right”, “center”, or “left”.

Returns:#

None

mento.results.configure_plot_settings() None[source]#

Configures global settings for Matplotlib and Seaborn plots.

mento.section module#

class mento.section.Section(*, concrete: Concrete, steel_bar: SteelBar, c_c: Quantity, label: str | None = None)[source]#

Bases: object

Represents a section composed of concrete and steel reinforcement.

concrete#

The concrete material used in the section.

Type:

Concrete

steel_bar#

The steel reinforcement used in the section.

Type:

SteelBar

c_c#

The concrete cover or another relevant quantity.

Type:

Quantity

node#

The node associated with this section, if any.

Type:

Optional[Node]

label#

An optional label for the section.

Type:

Optional[str]

id()#

Read-only property to access the section’s unique ID.

check_shear(forces

List[Forces]): Checks the section for shear under given forces.

design_shear(forces

List[Forces]): Designs the section for shear under given forces.

check_flexure(forces

List[Forces]): Checks the section for flexure under given forces.

design_flexure(forces

List[Forces]): Designs the section for flexure under given forces.

shear_results_detailed(force

Optional[Forces] = None): Provides detailed shear results.

shear_results_detailed_doc(force

Optional[Forces] = None): Provides detailed shear results for documentation.

flexure_results_detailed(force

Optional[Forces] = None): Provides detailed flexure results.

flexure_results_detailed_doc(force

Optional[Forces] = None): Provides detailed flexure results for documentation.

results()#

Property to access beam results for Jupyter Notebook.

c_c: Quantity#
check(forces: List[Forces]) None[source]#
check_flexure(forces: List[Forces]) None[source]#
check_shear(forces: List[Forces]) None[source]#
concrete: Concrete#
design(forces: List[Forces]) None[source]#
design_flexure(forces: List[Forces]) None[source]#
design_shear(forces: List[Forces]) None[source]#
flexure_results_detailed(force: Forces | None = None) None[source]#
flexure_results_detailed_doc(force: Forces | None = None) None[source]#
property id: int#

Read-only property to access the private _id.

label: str | None = None#
node: Node | None = None#
property results: None#
shear_results_detailed(force: Forces | None = None) None[source]#
shear_results_detailed_doc(force: Forces | None = None) None[source]#
steel_bar: SteelBar#

mento.settings module#

class mento.settings.BeamSettings(unit_system: str = 'metric', clear_spacing: ~typing.Any = <object object>, stirrup_diameter_ini: ~typing.Any = <object object>, vibrator_size: ~typing.Any = <object object>, layers_spacing: ~typing.Any = <object object>, max_diameter_diff: ~typing.Any = <object object>, minimum_longitudinal_diameter: ~typing.Any = <object object>, max_longitudinal_diameter: ~typing.Any = <object object>, max_bars_per_layer: ~typing.Any = <object object>)[source]#

Bases: object

Settings for beam design with separate metric and imperial defaults. Can optionally be initialized with a Concrete material to determine the unit system.

Available Parameters with Default Values:#

Unit system: “metric” or “imperial”

Metric Defaults:
  • clear_spacing: 25 mm

  • stirrup_diameter_ini: 8 mm

  • vibrator_size: 30 mm

  • layers_spacing: 25 mm

  • max_diameter_diff: 5 mm

  • minimum_longitudinal_diameter: 8 mm

  • max_longitudinal_diameter: 32 mm

  • max_bars_per_layer: 12

Imperial Defaults:
  • clear_spacing: 1 inch

  • stirrup_diameter_ini: 3/8 inch

  • vibrator_size: 1.25 inch

  • layers_spacing: 1 inch

  • max_diameter_diff: 0.25 inch

  • minimum_longitudinal_diameter: 3/8 inch

  • max_longitudinal_diameter: 1.693 inch

  • max_bars_per_layer: 12

clear_spacing: Any = <object object>#
layers_spacing: Any = <object object>#
max_bars_per_layer: Any = <object object>#
max_diameter_diff: Any = <object object>#
max_longitudinal_diameter: Any = <object object>#
minimum_longitudinal_diameter: Any = <object object>#
stirrup_diameter_ini: Any = <object object>#
unit_system: str = 'metric'#
vibrator_size: Any = <object object>#

mento.shear_wall module#

class mento.shear_wall.ShearWall(*, concrete: Concrete, steel_bar: SteelBar, c_c: Quantity, thickness: Quantity, length: Quantity, height: Quantity, label: str | None = None, level: str | None = None, settings: BeamSettings | None = None)[source]#

Bases: RectangularBeam

Reinforced concrete structural wall — ACI 318-19 Section 11 shear check/design.

Geometry:

thickness — wall thickness (t) [maps to parent’s width] length — wall in-plane length (lw) [maps to parent’s height] height — wall story height (hw) [exposed via property; replaces hw]

Reinforcement:

Horizontal distributed bars resist in-plane shear (ρt). Vertical distributed bars provide minimum vertical steel (ρl). Use set_horizontal_rebar() and set_vertical_rebar() instead of stirrups.

check(forces: list[Forces]) None[source]#

Complete check for a shear wall: shear only (no flexure in Phase 0).

check_flexure(forces: list[Forces]) DataFrame[source]#
check_shear(forces: list[Forces]) DataFrame[source]#
property data: None#

Wall basic info as Markdown (length, thickness, story height, materials).

design(forces: list[Forces]) None[source]#

Complete design for a shear wall: shear only (no flexure in Phase 0).

design_flexure(forces: list[Forces]) DataFrame[source]#

Designs flexural reinforcement for the beam using the provided forces and design code. Identifies the limiting cases for top and bottom reinforcement, designs for those cases, and then checks flexural capacity for all forces.

Returns:

A DataFrame summarizing the flexural design results for all forces.

Return type:

DataFrame

design_shear(forces: list[Forces]) DataFrame[source]#

Design the horizontal (shear) mesh and the minimum vertical mesh.

Selects a bar diameter + spacing for both directions against the worst-case force combination, applies them, and returns the re-evaluated check results.

flexure_results_detailed(force: Forces | None = None) None[source]#

Displays detailed flexure results.

Parameters:

forces (Forces, optional) – The specific Forces object to display results for. If None, displays results for the limiting case.

Return type:

None

flexure_results_detailed_doc(force: Forces | None = None) None[source]#

Prints detailed flexure results in Word.

Parameters:

forces (Forces, optional) – The specific Forces object to display results for. If None, displays results for the limiting case.

property height: Quantity#

Wall story height — replaces the legacy hw field.

property length: Quantity#

Wall in-plane length (the dimension that resists in-plane shear).

plot(show: bool = False) Figure[source]#

Plan view of the wall (length × thickness) with dimensions and rebar callouts.

property results: None#

Display wall data + shear results in Markdown (no flexure).

set_horizontal_rebar(d_b: Quantity, s: Quantity) None[source]#

Set distributed horizontal (transverse) reinforcement.

Bars are placed on each face (E.F.): ρt = n_curtains · Ab / (t × s_h)

set_vertical_rebar(d_b: Quantity, s: Quantity) None[source]#

Set distributed vertical reinforcement.

Bars are placed on each face (E.F.): ρl = n_curtains · Ab / (t × s_v)

property shear_results: None#
shear_results_detailed(force: Forces | None = None) None[source]#

Displays detailed shear results.

Parameters:

forces (Forces, optional) – The specific Forces object to display results for. If None, displays results for the limiting case.

Return type:

None

shear_results_detailed_doc(force: Forces | None = None) None[source]#

Prints detailed shear results in Word.

Parameters:

forces (Forces, optional) – The specific Forces object to display results for. If None, displays results for the limiting case.

property thickness: Quantity#

Wall thickness — alias for the parent’s width attribute.

mento.summary module#

class mento.summary.BeamSummary(concrete: Concrete, steel_bar: SteelBar, beam_list: DataFrame)[source]#

Bases: object

check(capacity_check: bool = False) DataFrame[source]#

Perform a check on all beams in the summary.

Parameters:

capacity_check (bool, optional) – If True, resets all forces in the node to zero to perform a capacity check. Otherwise, uses the forces currently assigned to the node.

Returns:

A DataFrame with the results of the check.

Return type:

DataFrame

check_and_process_input() None[source]#
convert_to_nodes() None[source]#
design() DataFrame[source]#

Run design for all beams in the summary. Fills in the rebar columns (n1–n4, db1–db4, ns, dbs, sl) with the suggested designs for shear and flexure.

Returns:

A copy of the beam summary with designed reinforcement filled in.

Return type:

DataFrame

export_design(path: str) None[source]#

Export current beam list (including units row) to Excel. Typically used after design() to create an editable file.

Parameters:

path (str) – Path to the Excel file to create.

flexure_results(index: int | None = None, capacity_check: bool = False) DataFrame[source]#

Get flexure results for one or all beams. Includes a units row only once at the top.

get_unit_variable(unit_str: str) Dict[source]#
import_design(path: str) None[source]#

Import an Excel file containing edited or designed rebar information. Updates self.beam_list, reprocesses units, and rebuilds nodes.

Parameters:

path (str) – Path to the Excel file to import.

results_detailed_doc(index: int = 1) None[source]#

Export detailed results to Word document. Shows detailed shear/flexure for one beam, then summary tables for all.

Parameters:

index (int) – 1-based index of the beam to show detailed results for (default: 1)

shear_results(index: int | None = None, capacity_check: bool = False) DataFrame[source]#

Get shear results for one or all beams. Includes a units row only once at the top.

validate_units(units_row: List) None[source]#

mento.units module#