m_n_kappa.Trapezoid#

class m_n_kappa.Trapezoid(top_edge, bottom_edge, top_width, top_left_edge=None, top_right_edge=None, bottom_width=None, bottom_left_edge=None, bottom_right_edge=None)#

Bases: Geometry

Represents a trapezoidal

New in version 0.1.0.

The trapezoid has vertical edges parallel to each other and two horizontal edges that are not parallel to each other.

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

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

  • top_width (float) – width of the trapezoid at the top-edge \(b_\mathrm{top}\) (Default: None).

  • top_left_edge (float) – left-edge position of the trapezoid at the top-edge \(y_\mathrm{top-left}\) (Default: None).

  • top_right_edge (float) – right-edge position of the trapezoid at the top-edge \(y_\mathrm{top-right}\) (Default: None).

  • bottom_width (float) – width of the trapezoid at the bottom-edge \(b_\mathrm{bottom}\) (Default: None).

  • bottom_left_edge (float) – left-edge position of the trapezoid at the bottom-edge \(y_\mathrm{bottom-left}\) (Default: None).

  • bottom_right_edge (float) – right-edge position of the trapezoid at the bottom-edge \(y_\mathrm{bottom-right}\) (Default: None).

../_images/geometry_trapezoid-light.svg
../_images/geometry_trapezoid-dark.svg

Trapezoid - dimensions#

See also

Rectangle

creates a rectangular geometry object

Circle

creates a circular geometry object

Examples

A trapezoid object is easily instantiated as follows.

>>> from m_n_kappa import Trapezoid
>>> trapezoid = Trapezoid(top_edge=0, bottom_edge=10, top_width=10, bottom_width=20)

In case only top_width or bottom_width is passed as argument the centerline of the specific width of the trapezoid is assumed to be a \(y = 0\). In consequence top_left_edge = -0.5 * top_width and top_right_edge = 0.5 * top_width. Similar for the bottom-edge.

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

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

Methods

left_edge_at(vertical_position)

left edge at the given vertical position

right_edge_at(vertical_position)

right edge at the given vertical position

split(at_points[, max_widths])

split trapezoid at the given points and if needed to

width(vertical_position)

width of trapezoid at given vertical position

Attributes

area

cross-sectional area of the trapezoid

bottom_edge

vertical position of bottom-edge of the trapezoid \(z_\mathrm{bottom}\)

bottom_left_edge

left-edge position of the trapezoid at the bottom-edge \(y_\mathrm{bottom-left}\)

bottom_right_edge

right-edge position of the trapezoid at the bottom-edge \(y_\mathrm{bottom-right}\)

bottom_width

width of trapezoid on bottom-edge \(b_\mathrm{top}\)

centroid

vertical position of the centroid of the trapezoid

edges

edges of trapezoid in vertical direction

height

height of the trapezoid \(h\)

left_edge

outer left-edge of the trapezoid

right_edge

outer right-edge of the trapezoid

sides

horizontal edges

top_edge

vertical position of top-edge of the trapezoid \(z_\mathrm{top}\)

top_left_edge

left-edge position of the trapezoid at the top-edge \(y_\mathrm{top-left}\)

top_right_edge

right-edge position of the trapezoid at the top-edge \(y_\mathrm{top-right}\)

top_width

width of trapezoid on top-edge \(b_\mathrm{top}\)

width_interception

theoretical width of the trapezoid at coordinate-origin

width_slope

change of the width of the trapezoid depending on vertical position

left_edge_at(vertical_position)#

left edge at the given vertical position

in case vertical_position is outside of the trapezoid, then zero is returned

Parameters:

vertical_position (float) – vertical position the width of the trapezoid shall be given

Returns:

horizontal position of the left-edge of trapezoid at given vertical position

Return type:

float

right_edge_at(vertical_position)#

right edge at the given vertical position

in case vertical_position is outside of the trapezoid zero is returned

Parameters:

vertical_position (float) – vertical position the width of the trapezoid shall be given

Returns:

horizontal position of the right-edge of trapezoid at given vertical position

Return type:

float

split(at_points, max_widths=None)#

split trapezoid at the given points and if needed to

Parameters:
Returns:

trapezoid split at the material-points into sub-trapezoids

Return type:

list[Trapezoid]

width(vertical_position)#

width of trapezoid at given vertical position

in case vertical_position is outside of the trapezoid zero is returned

Parameters:

vertical_position (float) – vertical position the width of the trapezoid shall be given

Returns:

width of trapezoid at given vertical position

Return type:

float

property area: float#

cross-sectional area of the trapezoid

property bottom_edge: float#

vertical position of bottom-edge of the trapezoid \(z_\mathrm{bottom}\)

property bottom_left_edge: float#

left-edge position of the trapezoid at the bottom-edge \(y_\mathrm{bottom-left}\)

property bottom_right_edge: float#

right-edge position of the trapezoid at the bottom-edge \(y_\mathrm{bottom-right}\)

property bottom_width: float#

width of trapezoid on bottom-edge \(b_\mathrm{top}\)

property centroid: float#

vertical position of the centroid of the trapezoid

property edges: list#

edges of trapezoid in vertical direction

property height: float#

height of the trapezoid \(h\)

property left_edge: float#

outer left-edge of the trapezoid

property right_edge: float#

outer right-edge of the trapezoid

property sides: list[float]#

horizontal edges

property top_edge: float#

vertical position of top-edge of the trapezoid \(z_\mathrm{top}\)

property top_left_edge: float#

left-edge position of the trapezoid at the top-edge \(y_\mathrm{top-left}\)

property top_right_edge: float#

right-edge position of the trapezoid at the top-edge \(y_\mathrm{top-right}\)

property top_width: float#

width of trapezoid on top-edge \(b_\mathrm{top}\)

property width_interception: float#

theoretical width of the trapezoid at coordinate-origin

property width_slope: float#

change of the width of the trapezoid depending on vertical position