Skip to content

Commit fd62fad

Browse files
committed
Begin adding code for concrete_column_section
1 parent 5a49085 commit fd62fad

File tree

1 file changed

+109
-0
lines changed

1 file changed

+109
-0
lines changed

sectionproperties/pre/library/concrete_sections.py

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,115 @@ def concrete_rectangular_section(
129129
return geom
130130

131131

132+
def concrete_column_section(
133+
b: float,
134+
d: float,
135+
bar_diam: float,
136+
bar_area: float,
137+
cover: float,
138+
n_bars_b: int,
139+
n_bars_d: int,
140+
conc_mat: pre.Material = pre.DEFAULT_MATERIAL,
141+
steel_mat: pre.Material = pre.DEFAULT_MATERIAL,
142+
filled: bool = False,
143+
n_circle: int = 4,
144+
) -> geometry.CompoundGeometry:
145+
"""Constructs a concrete rectangular section of width *b* and depth *d*, with
146+
steel bar reinforcing organized as an *n_bars_b* by *n_bars_d* array, discretised
147+
with *n_circle* points with equal side and top/bottom
148+
*cover* to the steel.
149+
150+
:param float b: Concrete section width
151+
:param float d: Concrete section depth
152+
:param float dia_top: Diameter of the top steel reinforcing bars
153+
:param int n_top: Number of top steel reinforcing bars
154+
:param float dia_bot: Diameter of the bottom steel reinforcing bars
155+
:param int n_bot: Number of bottom steel reinforcing bars
156+
:param int n_circle: Number of points discretising the steel reinforcing bars
157+
:param float cover: Side and bottom cover to the steel reinforcing bars
158+
:param float area_top: If provided, constructs top reinforcing bars based on their
159+
area rather than diameter (prevents the underestimation of steel area due to
160+
circle discretisation)
161+
:param float area_bot: If provided, constructs bottom reinforcing bars based on
162+
their area rather than diameter (prevents the underestimation of steel area due
163+
to circle discretisation)
164+
:param Optional[sectionproperties.pre.pre.Material] conc_mat: Material to
165+
associate with the concrete
166+
:param Optional[sectionproperties.pre.pre.Material] steel_mat: Material to
167+
associate with the steel
168+
169+
:raises ValueErorr: If the number of bars is not greater than or equal to 2 in an
170+
active layer
171+
172+
The following example creates a 600D x 300W concrete beam with 3N20 bottom steel
173+
reinforcing bars and 30 mm cover::
174+
175+
from sectionproperties.pre.library.concrete_sections import concrete_rectangular_section
176+
from sectionproperties.pre.pre import Material
177+
178+
concrete = Material(
179+
name='Concrete', elastic_modulus=30.1e3, poissons_ratio=0.2, yield_strength=32,
180+
density=2.4e-6, color='lightgrey'
181+
)
182+
steel = Material(
183+
name='Steel', elastic_modulus=200e3, poissons_ratio=0.3, yield_strength=500,
184+
density=7.85e-6, color='grey'
185+
)
186+
187+
geometry = concrete_rectangular_section(
188+
b=300, d=600, dia_top=20, n_top=0, dia_bot=20, n_bot=3, n_circle=24, cover=30,
189+
conc_mat=concrete, steel_mat=steel
190+
)
191+
geometry.create_mesh(mesh_sizes=[500])
192+
193+
.. figure:: ../images/sections/concrete_rectangular_section_geometry.png
194+
:align: center
195+
:scale: 50 %
196+
197+
Concrete rectangular section geometry.
198+
199+
.. figure:: ../images/sections/concrete_rectangular_section_mesh.png
200+
:align: center
201+
:scale: 50 %
202+
203+
Mesh generated from the above geometry.
204+
"""
205+
concrete_geometry = primitive_sections.rectangular_section(b, d, material=conc_mat)
206+
bar_extents = concrete_geometry.offset_perimeter(-cover - bar_diam/2).calculate_extents()
207+
bar_x_min, bar_x_max, bar_y_min, bar_y_max = bar_extents
208+
209+
b_edge_bars_x = np.linspace(bar_x_min, bar_x_max, n_bars_b)
210+
d_edge_bars_y = np.linspace(bar_y_min, bar_y_max, n_bars_d)
211+
212+
if not filled:
213+
b_edge_bars_y1 = [bar_y_min] * n_bars_b
214+
b_edge_bars_y2 = [bar_y_max] * n_bars_b
215+
216+
217+
d_edge_bars_x1 = [bar_x_min] * n_bars_d
218+
d_edge_bars_x2 = [bar_x_max] * n_bars_d
219+
220+
b_edge_bars_top = list(zip(b_edge_bars_x, b_edge_bars_y2))
221+
b_edge_bars_bottom = list(zip(b_edge_bars_x, b_edge_bars_y1))
222+
d_edge_bars_right = list(zip(d_edge_bars_x2, d_edge_bars_y))
223+
d_edge_bars_left = list(zip(d_edge_bars_x1, d_edge_bars_y))
224+
225+
all_bar_coords = list(set(b_edge_bars_top + b_edge_bars_bottom + d_edge_bars_right + d_edge_bars_left))
226+
if filled:
227+
xy = np.meshgrid(b_edge_bars_x, d_edge_bars_y)
228+
all_bar_coords = np.append(xy[0].reshape(-1,1),xy[1].reshape(-1,1),axis=1)
229+
230+
for bar_coord in all_bar_coords:
231+
concrete_geometry = add_bar(
232+
concrete_geometry,
233+
area=bar_area,
234+
material=steel_mat,
235+
x=bar_coord[0],
236+
y=bar_coord[1],
237+
n=n_circle
238+
)
239+
240+
132241
def concrete_tee_section(
133242
b: float,
134243
d: float,

0 commit comments

Comments
 (0)