m_n_kappa.Rectangle#

class m_n_kappa.Rectangle(top_edge, bottom_edge, width=None, left_edge=None, right_edge=None)#

Bases: Geometry

Represents a rectangle

New in version 0.1.0.

Neither two of the following arguments width, right_edge and left_edge must be given. If only argument width is given left_edge = -0.5*width and right_edge = 0.5*width

Parameters:
  • top_edge (float) – vertical position of top-edge of the rectangle \(z_\mathrm{top}\)

  • bottom_edge (float) – vertical position of bottom-edge of the rectangle \(z_\mathrm{bottom}\)

  • width (float) – width of the rectangle \(b\) (Default: None)

  • left_edge (float) – horizontal position of left-edge of the rectangle \(y_\mathrm{left}\) (Default: None).

  • right_edge (float) – horizontal position of right-edge of the rectangle \(y_\mathrm{right}\) (Default: None)

../_images/geometry_rectangle-light.svg
../_images/geometry_rectangle-dark.svg

Rectangle - dimensions#

See also

Circle

creates a circular geometry object

Trapezoid

creates a trapezoidal geometry object

IProfile

creates a geometry object comprised of various Rectangle-objects forming an I

UPEProfile

creates a geometry object comprised of varous Rectangle-objects forming an U

Examples

A rectangle object is easily instantiated as follows.

>>> from m_n_kappa import Rectangle
>>> rectangle = Rectangle(top_edge=10, bottom_edge=20, width=10)

In case only width is passed as argument the centerline of the rectangle is assumed to be a \(y = 0\). In consequence left_edge = -0.5 * width and right_edge = 0.5 * width

>>> rectangle.left_edge, rectangle.right_edge
(-5.0, 5.0)

For building a Section the rectangle must only be added to a material.

>>> from m_n_kappa import Steel
>>> steel = Steel(f_y=355)
>>> section = rectangle + steel
>>> type(section)
<class 'm_n_kappa.section.Section'>

Methods

get_horizontal_edges(point, max_widths)

Get the horizontal edges of the rectangles considering the effective widths as well as real dimensions of the rectangle

split(at_points[, max_widths])

splitting the rectangle horizontally in smaller rectangles

Attributes

area

cross-sectional area of rectangle

bottom_edge

vertical position (Z-Axis) of the bottom-edge of the rectangle \(z_\mathrm{bottom}\)

centroid

centroid of the rectangle in vertical direction (Z-Axis)

edges

vertical positions (Z-Axis) top- and bottom-edge

height

height of the rectangle

left_edge

horizontal position (Y-Axis) of the left-edge of the rectangle \(y_\mathrm{left}\)

right_edge

horizontal position (Y-Axis) of the right-edge of the rectangle \(y_\mathrm{right}\)

sides

horizontal positions (Y-Axis) of left- and right-edge

top_edge

vertical position (Z-Axis) of the top-edge of the rectangle \(z_\mathrm{top}\)

width

width of the rectangle

width_interception

interception of the width

width_slope

slope of the width depending of vertical position \(z\)

get_horizontal_edges(point, max_widths)#

Get the horizontal edges of the rectangles considering the effective widths as well as real dimensions of the rectangle

Parameters:
  • point (StrainPosition) – position and strain at this position as well as the corresponding material. Needed to differentiate between rectangle under tension and under compression.

  • max_widths (EffectiveWidths) – effective widths to consider

Returns:

left and right edge considering the effective widths as well as real dimensions of the rectangle

Return type:

tuple[float, float]

split(at_points, max_widths=None)#

splitting the rectangle horizontally in smaller rectangles

Parameters:
  • at_points (list[StrainPosition]) – points where the rectangle is split into smaller rectangles

  • max_widths (EffectiveWidths) – widths under consideration of bending or membran loading

Returns:

rectangles assembling to the original rectangle

Return type:

list[Rectangle]

property area: float#

cross-sectional area of rectangle

property bottom_edge#

vertical position (Z-Axis) of the bottom-edge of the rectangle \(z_\mathrm{bottom}\)

property centroid: float#

centroid of the rectangle in vertical direction (Z-Axis)

property edges: list[float]#

vertical positions (Z-Axis) top- and bottom-edge

property height: float#

height of the rectangle

property left_edge: float#

horizontal position (Y-Axis) of the left-edge of the rectangle \(y_\mathrm{left}\)

property right_edge: float#

horizontal position (Y-Axis) of the right-edge of the rectangle \(y_\mathrm{right}\)

property sides: list[float]#

horizontal positions (Y-Axis) of left- and right-edge

property top_edge#

vertical position (Z-Axis) of the top-edge of the rectangle \(z_\mathrm{top}\)

property width: float#

width of the rectangle

property width_interception: float#

interception of the width

property width_slope: float#

slope of the width depending of vertical position \(z\)