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
andleft_edge
must be given. If only argumentwidth
is givenleft_edge = -0.5*width
andright_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)
See also
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 consequenceleft_edge = -0.5 * width
andright_edge = 0.5 * width
>>> rectangle.left_edge, rectangle.right_edge (-5.0, 5.0)
For building a
Section
therectangle
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
cross-sectional area of rectangle
vertical position (Z-Axis) of the bottom-edge of the rectangle \(z_\mathrm{bottom}\)
centroid of the rectangle in vertical direction (Z-Axis)
vertical positions (Z-Axis) top- and bottom-edge
height of the rectangle
horizontal position (Y-Axis) of the left-edge of the rectangle \(y_\mathrm{left}\)
horizontal position (Y-Axis) of the right-edge of the rectangle \(y_\mathrm{right}\)
horizontal positions (Y-Axis) of left- and right-edge
vertical position (Z-Axis) of the top-edge of the rectangle \(z_\mathrm{top}\)
width of the rectangle
interception of the width
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 rectanglesmax_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\)