Skip to content

Commit 88da43c

Browse files
Fix concrete tee top bars
1 parent 2ea83cd commit 88da43c

File tree

2 files changed

+97
-30
lines changed

2 files changed

+97
-30
lines changed

docs/user_guide/geometry.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ from a shapely :class:`~shapely.Polygon`.
7979
geom = CompoundGeometry(geoms=[geom_sq1, geom_sq2])
8080
geom.plot_geometry()
8181

82+
.. _label-from-points:
83+
8284
Cartesian Coordinates
8385
^^^^^^^^^^^^^^^^^^^^^
8486

@@ -114,6 +116,8 @@ Various CAD files can be imported to creating ``sectionproperties`` geometries.
114116
pip install sectionproperties[dxf]
115117
pip install sectionproperties[rhino]
116118
119+
.. _label-geometry-dxf:
120+
117121
``.dxf``
118122
""""""""
119123

@@ -149,6 +153,8 @@ files using the
149153
saving each region as a separate ``.dxf`` file, importing each region individually
150154
using ``Geometry.from_dxf()``, then combining the regions using the ``+`` operator.
151155

156+
.. _label-geometry-3dm:
157+
152158
Rhino
153159
"""""
154160

@@ -251,6 +257,8 @@ generate typical structural cross-sections, resulting in
251257
:class:`~sectionproperties.pre.geometry.CompoundGeometry` objects. These typical
252258
cross-sections reside in the ``sectionproperties.pre.library`` module.
253259

260+
.. _label-primitive-library:
261+
254262
Primitive Sections
255263
""""""""""""""""""
256264

@@ -287,6 +295,8 @@ Steel Sections
287295
~sectionproperties.pre.library.steel_sections.box_girder_section
288296
~sectionproperties.pre.library.steel_sections.bulb_section
289297

298+
.. _label-concrete-library:
299+
290300
Concrete Sections
291301
"""""""""""""""""
292302

@@ -298,6 +308,8 @@ Concrete Sections
298308
~sectionproperties.pre.library.concrete_sections.concrete_tee_section
299309
~sectionproperties.pre.library.concrete_sections.concrete_circular_section
300310

311+
.. _label-bridge-library:
312+
301313
Bridge Sections
302314
"""""""""""""""
303315

@@ -423,6 +435,8 @@ value.
423435
.. automethod:: sectionproperties.pre.geometry.CompoundGeometry.offset_perimeter
424436
:noindex:
425437

438+
.. _label-geometry-set:
439+
426440
Set Operations
427441
^^^^^^^^^^^^^^
428442

src/sectionproperties/pre/library/concrete_sections.py

Lines changed: 83 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ def concrete_tee_section(
397397
398398
Example:
399399
The following example creates a 900 mm deep x 450 mm wide concrete tee beam with
400-
a 150 mm deep x 1800 mm wide flange. The tee beam is reinforced with 5 x 24 mm
400+
a 150 mm deep x 1800 mm wide flange. The tee beam is reinforced with 12 x 24 mm
401401
top bars, 5 x 28 mm bottom bars and 4 x 16 mm side bars, with 42 mm cover all
402402
around (30 mm cover + 12 mm tie). A coarse finite element mesh is generated to
403403
show the different material regions:
@@ -434,7 +434,7 @@ def concrete_tee_section(
434434
b_f=1800,
435435
dia_top=24,
436436
area_top=450,
437-
n_top=5,
437+
n_top=12,
438438
c_top=42,
439439
dia_bot=28,
440440
area_bot=620,
@@ -452,38 +452,91 @@ def concrete_tee_section(
452452
geom.create_mesh(mesh_sizes=[0]) # a size of zero creates a coarse mesh
453453
Section(geometry=geom).plot_mesh()
454454
"""
455-
# generate rectangular section of the beam
456-
geom = concrete_rectangular_section(
457-
d=d,
458-
b=b,
459-
dia_top=dia_top,
460-
area_top=area_top,
461-
n_top=n_top,
462-
c_top=c_top,
463-
dia_bot=dia_bot,
464-
area_bot=area_bot,
465-
n_bot=n_bot,
466-
c_bot=c_bot,
467-
dia_side=dia_side,
468-
area_side=area_side,
469-
n_side=n_side,
470-
c_side=c_side,
471-
n_circle=n_circle,
472-
conc_mat=conc_mat,
473-
steel_mat=steel_mat,
455+
# generate concrete geometry
456+
beam = primitive_sections.rectangular_section(b=b, d=d - d_f, material=conc_mat)
457+
flange = primitive_sections.rectangular_section(b=b_f, d=d_f, material=conc_mat)
458+
geom = beam + flange.align_to(other=beam, on="top").shift_section(
459+
x_offset=-(b_f / 2 - b / 2)
474460
)
461+
geom = geom.shift_section(x_offset=-b / 2)
475462

476-
# add flange
477-
left_flange = (
478-
primitive_sections.rectangular_section(
479-
d=d_f, b=(b_f - b) / 2, material=conc_mat
463+
# calculate reinforcing bar dimensions for top and bottom layers
464+
if n_top == 1:
465+
x_i_top = 0
466+
spacing_top = 0
467+
else:
468+
if c_side:
469+
x_i_top = -b_f / 2 + c_side + dia_top / 2
470+
spacing_top = (b_f - 2 * c_side - dia_top) / (n_top - 1)
471+
else:
472+
x_i_top = -b_f / 2 + c_top + dia_top / 2
473+
spacing_top = (b_f - 2 * c_top - dia_top) / (n_top - 1)
474+
475+
if n_bot == 1:
476+
x_i_bot = 0
477+
spacing_bot = 0
478+
else:
479+
if c_side:
480+
x_i_bot = -b / 2 + c_side + dia_bot / 2
481+
spacing_bot = (b - 2 * c_side - dia_bot) / (n_bot - 1)
482+
else:
483+
x_i_bot = -b / 2 + c_bot + dia_bot / 2
484+
spacing_bot = (b - 2 * c_bot - dia_bot) / (n_bot - 1)
485+
486+
# calculate reinforcing bar dimensions for side layers if specified
487+
if dia_side and n_side != 0:
488+
x_i_side_left = -b / 2 + c_side + dia_side / 2
489+
x_i_side_right = -x_i_side_left
490+
491+
spacing_side = (d - c_top - c_bot - dia_top / 2 - dia_bot / 2) / (n_side + 1)
492+
else:
493+
x_i_side_left = 0
494+
x_i_side_right = 0
495+
spacing_side = 0
496+
497+
# add top bars
498+
for idx in range(n_top):
499+
bar = primitive_sections.circular_section_by_area(
500+
area=area_top,
501+
n=n_circle,
502+
material=steel_mat,
503+
).shift_section(
504+
x_offset=x_i_top + spacing_top * idx,
505+
y_offset=d - c_top - dia_top / 2,
480506
)
481-
.align_to(other=geom, on="left")
482-
.align_to(other=geom, on="top", inner=True)
483-
)
484-
right_flange = left_flange.mirror_section(axis="y", mirror_point=(b / 2, 0))
507+
geom = (geom - bar) + bar
485508

486-
return geom + left_flange + right_flange
509+
# add bot bars
510+
for i in range(n_bot):
511+
bar = primitive_sections.circular_section_by_area(
512+
area=area_bot,
513+
n=n_circle,
514+
material=steel_mat,
515+
).shift_section(
516+
x_offset=x_i_bot + spacing_bot * i,
517+
y_offset=c_bot + dia_bot / 2,
518+
)
519+
geom = (geom - bar) + bar
520+
521+
# add side bars
522+
if area_side:
523+
for i in range(n_side):
524+
bar_left = primitive_sections.circular_section_by_area(
525+
area=area_side,
526+
n=n_circle,
527+
material=steel_mat,
528+
).shift_section(
529+
x_offset=x_i_side_left,
530+
y_offset=c_bot + dia_bot / 2 + spacing_side * (i + 1),
531+
)
532+
bar_right = bar_left.shift_section(x_offset=x_i_side_right - x_i_side_left)
533+
534+
geom = (geom - bar_left - bar_right) + bar_left + bar_right
535+
536+
if isinstance(geom, geometry.CompoundGeometry):
537+
return geom
538+
else:
539+
raise ValueError("Concrete section generation failed.")
487540

488541

489542
def concrete_circular_section(

0 commit comments

Comments
 (0)