@@ -12,6 +12,7 @@ def concrete_rectangular_section(
1212 n_bar : int ,
1313 n_circle : int ,
1414 cover : float ,
15+ area : float = None ,
1516 conc_mat : pre .Material = pre .DEFAULT_MATERIAL ,
1617 steel_mat : pre .Material = pre .DEFAULT_MATERIAL ,
1718) -> geometry .CompoundGeometry :
@@ -25,6 +26,9 @@ def concrete_rectangular_section(
2526 :param int n_bar: Number of steel reinforcing bars
2627 :param int n_circle: Number of points discretising the steel reinforcing bars
2728 :param float cover: Side and bottom cover to the steel reinforcing bars
29+ :param float area: If provided, constructs reinforcing bars based on their area
30+ rather than a diameter (prevents the underestimation of steel area due to
31+ circle discretision)
2832 :param Optional[sectionproperties.pre.pre.Material] conc_mat: Material to associate with
2933 the concrete
3034 :param Optional[sectionproperties.pre.pre.Material] steel_mat: Material to associate with
@@ -39,10 +43,12 @@ def concrete_rectangular_section(
3943 from sectionproperties.pre.pre import Material
4044
4145 concrete = Material(
42- name='Concrete', elastic_modulus=30.1e3, poissons_ratio=0.2, yield_strength=32, color='lightgrey'
46+ name='Concrete', elastic_modulus=30.1e3, poissons_ratio=0.2, yield_strength=32,
47+ density=2.4e-6, color='lightgrey'
4348 )
4449 steel = Material(
45- name='Steel', elastic_modulus=200e3, poissons_ratio=0.3, yield_strength=500, color='grey'
50+ name='Steel', elastic_modulus=200e3, poissons_ratio=0.3, yield_strength=500,
51+ density=7.85e-6, color='grey'
4652 )
4753
4854 geometry = concrete_rectangular_section(
@@ -72,7 +78,15 @@ def concrete_rectangular_section(
7278 spacing = (b - 2 * cover - dia ) / (n_bar - 1 )
7379
7480 for i in range (n_bar ):
75- bar = primitive_sections .circular_section (d = dia , n = n_circle , material = steel_mat )
81+ if area :
82+ bar = primitive_sections .circular_section_by_area (
83+ area = area , n = n_circle , material = steel_mat
84+ )
85+ else :
86+ bar = primitive_sections .circular_section (
87+ d = dia , n = n_circle , material = steel_mat
88+ )
89+
7690 geom += bar .shift_section (x_offset = x_i + spacing * i , y_offset = cover + dia / 2 )
7791
7892 return geom
@@ -87,6 +101,7 @@ def concrete_tee_section(
87101 n_bar : int ,
88102 n_circle : int ,
89103 cover : float ,
104+ area : float = None ,
90105 conc_mat : pre .Material = pre .DEFAULT_MATERIAL ,
91106 steel_mat : pre .Material = pre .DEFAULT_MATERIAL ,
92107) -> geometry .CompoundGeometry :
@@ -102,6 +117,9 @@ def concrete_tee_section(
102117 :param int n_bar: Number of steel reinforcing bars
103118 :param int n_circle: Number of points discretising the steel reinforcing bars
104119 :param float cover: Side and bottom cover to the steel reinforcing bars
120+ :param float area: If provided, constructs reinforcing bars based on their area
121+ rather than a diameter (prevents the underestimation of steel area due to
122+ circle discretision)
105123 :param Optional[sectionproperties.pre.pre.Material] conc_mat: Material to associate with
106124 the concrete
107125 :param Optional[sectionproperties.pre.pre.Material] steel_mat: Material to associate with
@@ -116,10 +134,12 @@ def concrete_tee_section(
116134 from sectionproperties.pre.pre import Material
117135
118136 concrete = Material(
119- name='Concrete', elastic_modulus=30.1e3, poissons_ratio=0.2, yield_strength=32, color='lightgrey'
137+ name='Concrete', elastic_modulus=30.1e3, poissons_ratio=0.2, yield_strength=32,
138+ density=2.4e-6, color='lightgrey'
120139 )
121140 steel = Material(
122- name='Steel', elastic_modulus=200e3, poissons_ratio=0.3, yield_strength=500, color='grey'
141+ name='Steel', elastic_modulus=200e3, poissons_ratio=0.3, yield_strength=500,
142+ density=7.85e-6, color='grey'
123143 )
124144
125145 geometry = concrete_tee_section(
@@ -152,7 +172,15 @@ def concrete_tee_section(
152172 spacing = (b - 2 * cover - dia ) / (n_bar - 1 )
153173
154174 for i in range (n_bar ):
155- bar = primitive_sections .circular_section (d = dia , n = n_circle , material = steel_mat )
175+ if area :
176+ bar = primitive_sections .circular_section_by_area (
177+ area = area , n = n_circle , material = steel_mat
178+ )
179+ else :
180+ bar = primitive_sections .circular_section (
181+ d = dia , n = n_circle , material = steel_mat
182+ )
183+
156184 geom += bar .shift_section (x_offset = x_i + spacing * i , y_offset = cover + dia / 2 )
157185
158186 return geom
@@ -165,6 +193,7 @@ def concrete_circular_section(
165193 n_bar : int ,
166194 n_circle : int ,
167195 cover : float ,
196+ area : float = None ,
168197 conc_mat : pre .Material = pre .DEFAULT_MATERIAL ,
169198 steel_mat : pre .Material = pre .DEFAULT_MATERIAL ,
170199) -> geometry .CompoundGeometry :
@@ -178,6 +207,9 @@ def concrete_circular_section(
178207 :param int n_bar: Number of steel reinforcing bars
179208 :param int n_circle: Number of points discretising the steel reinforcing bars
180209 :param float cover: Side and bottom cover to the steel reinforcing bars
210+ :param float area: If provided, constructs reinforcing bars based on their area
211+ rather than a diameter (prevents the underestimation of steel area due to
212+ circle discretision)
181213 :param Optional[sectionproperties.pre.pre.Material] conc_mat: Material to associate with
182214 the concrete
183215 :param Optional[sectionproperties.pre.pre.Material] steel_mat: Material to associate with
@@ -192,10 +224,12 @@ def concrete_circular_section(
192224 from sectionproperties.pre.pre import Material
193225
194226 concrete = Material(
195- name='Concrete', elastic_modulus=30.1e3, poissons_ratio=0.2, yield_strength=32, color='lightgrey'
227+ name='Concrete', elastic_modulus=30.1e3, poissons_ratio=0.2, yield_strength=32,
228+ density=2.4e-6, color='lightgrey'
196229 )
197230 steel = Material(
198- name='Steel', elastic_modulus=200e3, poissons_ratio=0.3, yield_strength=500, color='grey'
231+ name='Steel', elastic_modulus=200e3, poissons_ratio=0.3, yield_strength=500,
232+ density=7.85e-6, color='grey'
199233 )
200234
201235 geometry = concrete_circular_section(
@@ -225,7 +259,15 @@ def concrete_circular_section(
225259 d_theta = 2 * np .pi / n_bar
226260
227261 for i in range (n_bar ):
228- bar = primitive_sections .circular_section (d = dia , n = n_circle , material = steel_mat )
262+ if area :
263+ bar = primitive_sections .circular_section_by_area (
264+ area = area , n = n_circle , material = steel_mat
265+ )
266+ else :
267+ bar = primitive_sections .circular_section (
268+ d = dia , n = n_circle , material = steel_mat
269+ )
270+
229271 geom += bar .shift_section (
230272 x_offset = r * np .cos (i * d_theta ), y_offset = r * np .sin (i * d_theta )
231273 )
0 commit comments