Skip to content

Commit 1ac8965

Browse files
committed
Updated concrete_column_section to include optional area argument and calculate it off of bar diameter if not provided.
1 parent b76ed2c commit 1ac8965

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

sectionproperties/pre/library/concrete_sections.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Union
1+
from typing import Union, Optional
22
import numpy as np
33
from shapely.geometry import Polygon
44
import sectionproperties.pre.pre as pre
@@ -133,11 +133,11 @@ def concrete_rectangular_section(
133133
def concrete_column_section(
134134
b: float,
135135
d: float,
136-
dia_bar: float,
137-
bar_area: float,
138136
cover: float,
139137
n_bars_b: int,
140138
n_bars_d: int,
139+
dia_bar: float,
140+
bar_area: Optional[float] = None,
141141
conc_mat: pre.Material = pre.DEFAULT_MATERIAL,
142142
steel_mat: pre.Material = pre.DEFAULT_MATERIAL,
143143
filled: bool = False,
@@ -150,11 +150,13 @@ def concrete_column_section(
150150
151151
:param float b: Concrete section width, parallel to the x-axis
152152
:param float d: Concrete section depth, parallel to the y-axis
153-
:param float dia_bar: Diameter of reinforcing bars. Used only for calculating bar location.
154-
:param float bar_area: Area of reinforcing bars. Used for section capacity calculations.
155153
:param float cover: Clear cover, calculated as distance from edge of reinforcing bar to edge of section.
156154
:param int n_bars_b: Number of bars placed across the width of the section, minimum 2.
157155
:param int n_bars_d: Number of bars placed across the depth of the section, minimum 2.
156+
:param float dia_bar: Diameter of reinforcing bars. Used for calculating bar placement and,
157+
optionally, for calculating the bar area for section capacity calculations.
158+
:param Optional[float] bar_area: Area of reinforcing bars. Used for section capacity calculations.
159+
If not provided, then dia_bar will be used to calculate the bar area.
158160
:param Optional[sectionproperties.pre.pre.Material] conc_mat: Material to
159161
associate with the concrete
160162
:param Optional[sectionproperties.pre.pre.Material] steel_mat: Material to
@@ -237,6 +239,8 @@ def concrete_column_section(
237239
xy = np.meshgrid(b_edge_bars_x, d_edge_bars_y)
238240
all_bar_coords = np.append(xy[0].reshape(-1, 1), xy[1].reshape(-1, 1), axis=1)
239241

242+
if bar_area is None:
243+
bar_area = np.pi * dia_bar**2 / 4
240244
for bar_coord in all_bar_coords:
241245
concrete_geometry = add_bar(
242246
concrete_geometry,

0 commit comments

Comments
 (0)