Download examples
You can download the examples in your chosen format using the buttons on the right.
Create a Rectangular Reinforced Cross-section¶
This example demonstrates how to create a rectangular reinforced concrete cross-section step by step using the blueprints library.
We'll start by defining materials, create the rectangular cross-section geometry with custom covers, add reinforcement to all edges, include stirrups, and finally visualize our complete design.
Let's begin!
Import Required Libraries¶
First, let's import the necessary modules for rectangular cross-sections:
"""Rectangular reinforced concrete cross-section example."""
from blueprints.materials.concrete import ConcreteMaterial, ConcreteStrengthClass
from blueprints.materials.reinforcement_steel import ReinforcementSteelMaterial, ReinforcementSteelQuality
from blueprints.structural_sections.concrete.covers import CoversRectangular
from blueprints.structural_sections.concrete.reinforced_concrete_sections.rectangular import RectangularReinforcedCrossSection
Define Materials¶
Next, we'll define the concrete and reinforcement steel materials:
# Define a concrete material
concrete = ConcreteMaterial(concrete_class=ConcreteStrengthClass.C35_45)
# Define a reinforcement steel material
steel = ReinforcementSteelMaterial(steel_quality=ReinforcementSteelQuality.B500B)
Create the Rectangular Cross-section¶
Now we'll create the rectangular cross-section with custom covers for each edge:
# Define a rectangular reinforced cross-section
cs = RectangularReinforcedCrossSection(
width=1000,
height=800,
covers=CoversRectangular(upper=45, right=30, lower=35, left=50),
concrete_material=concrete,
)
Add Reinforcement to Upper Edge¶
Let's start by adding reinforcement bars to the upper edge:
# Add reinforcement to the upper edge
cs.add_longitudinal_reinforcement_by_quantity(
n=5,
diameter=14,
edge="upper",
material=steel,
)
Add Reinforcement to Lower Edge¶
Now add reinforcement with a larger diameter to the lower edge (tension zone in typical beams):
# Add reinforcement to the lower edge
cs.add_longitudinal_reinforcement_by_quantity(
n=4,
diameter=40,
edge="lower",
material=steel,
)
Add Reinforcement to Side Edges¶
Add reinforcement to the left and right edges:
# Add reinforcement to the right edge
cs.add_longitudinal_reinforcement_by_quantity(
n=5,
diameter=14,
edge="right",
material=steel,
)
# Add reinforcement to the left edge
cs.add_longitudinal_reinforcement_by_quantity(
n=5,
diameter=14,
edge="left",
material=steel,
)
Add Stirrups - First Layer¶
Add the first layer of stirrups for shear reinforcement:
# Add stirrups to the cross-section (first layer)
cs.add_stirrup_along_edges(
diameter=8,
distance=150,
material=steel,
)
Stirrup (id=1)|⌀8/B500B
Add Stirrups - Second Layer¶
Add a second layer of larger stirrups with different spacing:
# Add stirrups to the cross-section in the center with a width of 500mm (second layer)
cs.add_stirrup_in_center(
diameter=12,
width=500,
distance=300,
material=steel,
)
Stirrup (id=2)|⌀12/B500B
Review What We've Built¶
At this point, we have:
- ✅ A 1000×800mm rectangular concrete cross-section with custom covers
- Upper cover: 45mm
- Right cover: 30mm
- Lower cover: 35mm
- Left cover: 50mm
- ✅ Upper edge: 5 reinforcement bars (14mm diameter)
- ✅ Lower edge: 4 reinforcement bars (40mm diameter) - main tension reinforcement
- ✅ Side edges: 5 bars each (14mm diameter) for shear resistance
- ✅ Two layers of stirrups:
- First layer: 8mm diameter, spaced at 150mm
- Second layer: 12mm diameter with a width of 500mm, spaced at 300mm
Now let's see our complete rectangular reinforced concrete cross-section!
Visualize Our Cross-section¶
Finally, let's plot the cross-section to see our complete rectangular design:
# Plot the cross-section
import matplotlib.pyplot as plt
fig = cs.plot(show=False) # Create the plot but don't show it yet
plt.show()
Summary¶
This example demonstrated how to create rectangular reinforced concrete cross-sections:
- Import modules specific to rectangular cross-sections
- Define materials (concrete and steel)
- Create geometry with custom covers for each edge
- Add edge reinforcement with different bar sizes for different structural roles
- Add multiple stirrup layers for comprehensive shear reinforcement
- Visualize the result showing all reinforcement details
Key features of rectangular cross-sections:
- Custom covers for each edge (upper, right, lower, left)
- Edge-specific reinforcement allowing different bar arrangements per edge
- Multiple stirrup layers for complex shear reinforcement schemes
- Asymmetric design typical of beam cross-sections with tension and compression zones
The blueprints library provides support for rectangular cross-sections commonly used in beam and column design!