OpenSeesPyAssistant 1.1
OpenSeesPy for everyone
Section.py
Go to the documentation of this file.
1"""
2Module for the section (steel I shape profiles, RC circular/square/rectangular sections).
3Carmine Schipani, 2021
4"""
5
6import numpy as np
7import math
8from copy import copy, deepcopy
11from OpenSeesPyAssistant.Units import *
12
14 """
15 Parent abstract class for the storage and manipulation of a section's information (mechanical and geometrical parameters, etc).
16
17 @param DataManagement: Parent abstract class.
18 """
19 pass
20
21
23 """
24 Class that stores funcions, geometric and mechanical properties of a steel double symmetric I-shape profile.
25 The parameter 'n' is used as global throughout the SteelIShape sections to optimise the program (given the fact that is constant everytime).
26
27 @param Section: Parent abstract class.
28 """
29 global n
30 n = 10.0
31
32 def __init__(self, Type: str, d, bf, tf, tw, L, r, E, Fy, Fy_web = -1, name_tag = "Not Defined"):
33 """
34 The conctructor of the class.
35
36 @param Type (str): Type of the section. It can be 'Col' for column or 'Beam' for beams.
37 @param d (float): Depth of the section.
38 @param bf (float): Flange's width of the section
39 @param tf (float): Flange's thickness of the section
40 @param tw (float): Web's thickness of the section
41 @param L (float): Effective length of the element associated with this section.
42 If the panel zone is present, exclude its dimension.
43 @param r (float): Radius of the weld fillets of the section.
44 @param E (float): Young modulus of the section.
45 @param Fy (float): Yield strength of the flange of the section. Used as the yield strength of the entire section.
46 @param Fy_web (float, optional): Yield strength of the web of the section. Used for panel zone associated to this section.
47 Defaults to -1, e.g. computed in __init__() as equal to Fy.
48 @param name_tag (str, optional): Name TAG of the section. Defaults to "Not Defined".
49
50 @exception WrongArgument: Type needs to be 'Col' or 'Beam'.
51 @exception NegativeValue: d needs to be positive.
52 @exception NegativeValue: bf needs to be positive.
53 @exception NegativeValue: tf needs to be positive.
54 @exception NegativeValue: tw needs to be positive.
55 @exception NegativeValue: L needs to be positive.
56 @exception NegativeValue: r needs to be positive.
57 @exception NegativeValue: E needs to be positive.
58 @exception NegativeValue: Fy needs to be positive.
59 @exception NegativeValue: Fy_web needs to be positive if different from -1.
60 @exception InconsistentGeometry: tw should be smaller than bf.
61 @exception InconsistentGeometry: tf needs to be smaller than half of d
62 @exception InconsistentGeometry: r should be less than half bf and d
63 """
64 # Check
65 if Type != "Beam" and Type != "Col": raise WrongArgument()
66 if d < 0: raise NegativeValue()
67 if bf < 0: raise NegativeValue()
68 if tf < 0: raise NegativeValue()
69 if tw < 0: raise NegativeValue()
70 if L < 0: raise NegativeValue()
71 if r < 0: raise NegativeValue()
72 if E < 0: raise NegativeValue()
73 if Fy < 0: raise NegativeValue()
74 if Fy_web != -1 and Fy_web < 0: raise NegativeValue()
75 if tw > bf: raise InconsistentGeometry()
76 if tf > d/2: raise InconsistentGeometry()
77 if r > bf/2 or r > d/2: raise InconsistentGeometry()
78
79 # Arguments
80 self.TypeType = Type
81 self.dd = d
82 self.bfbf = bf
83 self.tftf = tf
84 self.twtw = tw
85 self.LL = L
86 self.rr = r
87 self.EE = E
88 self.FyFy = Fy
89 self.Fy_webFy_web = Fy if Fy_web == -1 else Fy_web
90 self.name_tagname_tag = name_tag
91
92 # Initialized the parameters that are dependent from others
93 self.ReInitReInit()
94
95 def ReInit(self):
96 """
97 Implementation of the homonym abstract method.
98 See parent class DataManagement for detailed information.
99 """
100 # Member
101 self.h_1h_1 = self.dd - 2.0*self.rr -2.0*self.tftf
102 self.AA = self.ComputeAComputeA()
103 self.NplNpl = self.AA*self.FyFy
104 self.IyIy = self.ComputeIyComputeIy()
105 self.IzIz = self.ComputeIzComputeIz()
106 self.WplyWply = self.ComputeWplyComputeWply()
107 self.WplzWplz = self.ComputeWplzComputeWplz()
108 self.MyMy = self.FyFy*self.WplyWply
109 self.Iy_modIy_mod = self.IyIy*(n + 1.0)/n
110 self.iziz = self.Compute_izCompute_iz()
111 self.iyiy = self.Compute_iyCompute_iy()
112
113 # Data storage for loading/saving
114 self.UpdateStoredDataUpdateStoredData()
115
117 """
118 Implementation of the homonym abstract method.
119 See parent class DataManagement for detailed information.
120 """
121 self.datadata = [["INFO_TYPE", "SteelIShape"], # Tag for differentiating different data
122 ["name_tag", self.name_tagname_tag],
123 ["Type", self.TypeType],
124 ["d", self.dd],
125 ["bf", self.bfbf],
126 ["tf", self.tftf],
127 ["tw", self.twtw],
128 ["L", self.LL],
129 ["r", self.rr],
130 ["h_1", self.h_1h_1],
131 ["E", self.EE],
132 ["Fy", self.FyFy],
133 ["Fy_web", self.Fy_webFy_web],
134 ["A", self.AA],
135 ["Iy", self.IyIy],
136 ["Iz", self.IzIz],
137 ["Wply", self.WplyWply],
138 ["Wplz", self.WplzWplz],
139 ["Iy_mod", self.Iy_modIy_mod],
140 ["iy", self.iyiy],
141 ["iz", self.iziz],
142 ["Npl", self.NplNpl],
143 ["My", self.MyMy]]
144
145 def ShowInfo(self):
146 """
147 Implementation of the homonym abstract method.
148 See parent class DataManagement for detailed information.
149 """
150 print("")
151 print("Requested info for steel I shape section of type = {} and name tag = {}".format(self.TypeType, self.name_tagname_tag))
152 print("d = {} mm".format(self.dd/mm_unit))
153 print("Fy = {} MPa".format(self.FyFy/MPa_unit))
154 print("Fy web = {} MPa".format(self.Fy_webFy_web/MPa_unit))
155 print("E = {} GPa".format(self.EE/GPa_unit))
156 print("h_1 = {} mm".format(self.h_1h_1/mm_unit))
157 print("A = {} mm2".format(self.AA/mm2_unit))
158 print("Iy = {} mm4".format(self.IyIy/mm4_unit))
159 print("Iz = {} mm4".format(self.IzIz/mm4_unit))
160 print("Wply = {} mm3".format(self.WplyWply/mm3_unit))
161 print("Wplz = {} mm3".format(self.WplzWplz/mm3_unit))
162 print("Iy_mod = {} mm4".format(self.Iy_modIy_mod/mm4_unit))
163 print("iy = {} mm".format(self.iyiy/mm_unit))
164 print("iz = {} mm".format(self.iziz/mm_unit))
165 print("My = {} kNm".format(self.MyMy/kNm_unit))
166 print("Npl = {} kN".format(self.NplNpl/kN_unit))
167 print("")
168
169
170 def ComputeA(self):
171 """
172 Compute the area of a double symmetric I-profile section with fillets.
173
174 @returns float: Area of the I shape section (with fillets included)
175 """
176 # d : The depth
177 # bf : The flange's width
178 # tf : The flange's thickness
179 # tw : The web's thickness
180 # r : The weld fillet radius
181
182 # without fillets bf*tf*2 + tw*(d-2*tf)
183 return 2.0*self.bfbf*self.tftf+self.twtw*(self.dd-2.0*self.tftf)+0.8584*self.rr**2
184
185 def ComputeIy(self):
186 """
187 Compute the moment of inertia of a double symmetric I-profile section, with respect to its strong axis with fillets.
188
189 @returns float: The moment of inertia with respect to the strong axis.
190 """
191 # d : The depth
192 # bf : The flange's width
193 # tf : The flange's thickness
194 # tw : The web's thickness
195 # r : The weld fillet radius
196
197 # without fillets: bf*tf/2*(d-tf)**2 + bf*tf**3/6 + (d-tf*2)**3*tf/12
198 return (self.bfbf*self.dd**3.0-(self.bfbf-self.twtw)*(self.dd-2.0*self.tftf)**3)/12.0+0.8584*self.rr**2*(0.5*self.dd-self.tftf-0.4467*self.rr/2.0)**2
199
200 def ComputeIz(self):
201 """
202 Compute the moment of inertia of a double symmetric I-profile section, with respect to its weak axis with fillets.
203
204 @returns float: The moment of inertia with respect to the weak axis.
205 """
206 # d : The depth
207 # bf : The flange's width
208 # tf : The flange's thickness
209 # tw : The web's thickness
210 # r : The weld fillet radius
211
212 return (self.tftf*self.bfbf**3)/6.0+((self.dd-2.0*self.tftf)*self.twtw**3)/12.0+0.8584*self.rr**2*(0.5*self.twtw+0.2234*self.rr)**2
213
214 def ComputeWply(self):
215 """
216 Compute the plastic modulus of a double symmetric I-profile section, with respect to its strong axis with fillets.
217
218 @returns float: The plastic modulus with respect to the strong axis.
219 """
220 # d : The depth
221 # bf : The flange's width
222 # tf : The flange's thickness
223 # tw : The web's thickness
224 # r : The weld fillet radius
225
226 return self.bfbf*self.tftf*(self.dd-self.tftf)+(self.dd-2.0*self.tftf)**2.0*(self.twtw/4.0)+0.4292*self.rr**2*(self.dd-2.0*self.tftf-0.4467*self.rr)
227
228 def ComputeWplz(self):
229 """
230 Compute the plastic modulus of a double symmetric I-profile section, with respect to its weak axis with fillets.
231
232 @returns float: The plastic modulus with respect to the weak axis.
233 """
234 # d : The depth
235 # bf : The flange's width
236 # tf : The flange's thickness
237 # tw : The web's thickness
238 # r : The weld fillet radius
239 return (self.tftf*self.bfbf**2)/2+(self.dd-2.0*self.tftf)*(self.twtw**2/4.0)+0.4292*self.rr**2*(self.twtw+0.4467*self.rr)
240
241 def Compute_iy(self):
242 """
243 Compute the gyration radius with respect to the strong axis.
244
245 @returns float: The gyration radius with respect to the strong axis.
246 """
247 # Iy : The second moment of inertia with respect to thte strong axis
248 # A : The area
249
250 return math.sqrt(self.IyIy/self.AA)
251
252 def Compute_iz(self):
253 """
254 Compute the gyration radius with respect to the weak axis.
255
256 @returns float: The gyration radius with respect to the weak axis.
257 """
258 # Iz : The second moment of inertia with respect to thte weak axis
259 # A : The area
260
261 return math.sqrt(self.IzIz/self.AA)
262
263
265 """
266 Class that stores funcions, geometric and mechanical properties of RC rectangular shape profile.
267 Note that for the validity of the formulas, at least one bar per corner and at least one hoop closed (with 135 degress possibly).
268
269 @param Section: Parent abstract class.
270 """
271 def __init__(self, b, d, L, e, fc, D_bars, bars_position_x: np.ndarray, bars_ranges_position_y: np.ndarray, fy, Ey,
272 D_hoops, s, fs, Es, name_tag = "Not Defined", rho_s_x = -1, rho_s_y = -1, Ec = -1):
273 """
274 The conctructor of the class.
275
276 @param b (float): Width of the section.
277 @param d (float): Depth of the section.
278 @param L (float): Effective length of the element associated with this section.
279 If the panel zone is present, exclude its dimension.
280 @param e (float): Concrete cover.
281 @param fc (float): Unconfined concrete compressive strength (cylinder test).
282 @param D_bars (float): Diameter of the reinforcing bars.
283 @param bars_position_x (np.ndarray): Array with a range of aligned vertical reinforcing bars for each row in x direction.
284 Distances from border to bar centerline, bar to bar centerlines and
285 finally bar centerline to border in the x direction (aligned).
286 Starting from the left to right, from the top range to the bottom one.
287 The number of bars for each range can vary; in this case, add this argument when defining the array " dtype = object".
288 @param bars_ranges_position_y (np.ndarray): Array of dimension 1 with the position or spacing in y of the ranges in bars_position_x.
289 Distances from border to range centerlines, range to range centerlines and
290 finally range centerline to border in the y direction.
291 Starting from the top range to the bottom one.
292 @param fy (float): Yield stress for reinforcing bars.
293 @param Ey (float): Young modulus for reinforcing bars.
294 @param D_hoops (float): Diameter of the hoops.
295 @param s (float): Centerline distance for the hoops.
296 @param fs (float): Yield stress for the hoops.
297 @param Es (float): Young modulus for the hoops
298 @param name_tag (str, optional): A nametag for the section. Defaults to "Not Defined".
299 @param rho_s_x (float, optional): Ratio of the transversal area of the hoops to the associated concrete area in the x direction.
300 Defaults to -1, e.g. computed in __init__() and ReInit() assuming one range of hoops.
301 @param rho_s_y (float, optional): Ratio of the transversal area of the hoops to the associated concrete area in the y direction.
302 Defaults to -1, e.g. computed in __init__() and ReInit() assuming one range of hoops.
303 @param Ec (float, optional): Young modulus for concrete. Defaults to -1, e.g. computed in __init__() and ReInit().
304
305 @exception NegativeValue: b needs to be positive.
306 @exception NegativeValue: d needs to be positive.
307 @exception NegativeValue: L needs to be positive.
308 @exception NegativeValue: e needs to be positive.
309 @exception PositiveValue: fc needs to be negative.
310 @exception NegativeValue: D_bars needs to be positive.
311 @exception NegativeValue: fy needs to be positive.
312 @exception NegativeValue: Ey needs to be positive.
313 @exception NegativeValue: D_hoops needs to be positive.
314 @exception NegativeValue: s needs to be positive.
315 @exception NegativeValue: fs needs to be positive.
316 @exception NegativeValue: Es needs to be positive.
317 @exception NegativeValue: rho_s_x needs to be positive if different from -1.
318 @exception NegativeValue: rho_s_y needs to be positive if different from -1.
319 @exception NegativeValue: Ec needs to be positive if different from -1.
320 @exception WrongDimension: Number of lists in the list bars_position_x needs to be the same of the length of bars_ranges_position_y - 1.
321 @exception InconsistentGeometry: The sum of the distances for each list in bars_position_x should be equal to the section's width (tol = 5 mm).
322 @exception InconsistentGeometry: The sum of the distances in bars_ranges_position_y should be equal to the section's depth (tol = 5 mm).
323 @exception InconsistentGeometry: e should be smaller than half the depth and the width of the section.
324 """
325 # Check
326 if b < 0: raise NegativeValue()
327 if d < 0: raise NegativeValue()
328 if L < 0: raise NegativeValue()
329 if e < 0: raise NegativeValue()
330 if fc > 0: raise PositiveValue()
331 if D_bars < 0: raise NegativeValue()
332 if fy < 0: raise NegativeValue()
333 if Ey < 0: raise NegativeValue()
334 if D_hoops < 0: raise NegativeValue()
335 if s < 0: raise NegativeValue()
336 if fs < 0: raise NegativeValue()
337 if Es < 0: raise NegativeValue()
338 if rho_s_x != -1 and rho_s_x < 0: raise NegativeValue()
339 if rho_s_y != -1 and rho_s_y < 0: raise NegativeValue()
340 if Ec != -1 and Ec < 0: raise NegativeValue()
341 if np.size(bars_position_x) != np.size(bars_ranges_position_y)-1: raise WrongDimension()
342 geometry_tol = 5*mm_unit
343 for bars in bars_position_x:
344 if abs(np.sum(bars) - b) > geometry_tol: raise InconsistentGeometry()
345 if abs(np.sum(bars_ranges_position_y)-d) > geometry_tol: raise InconsistentGeometry()
346 if e > b/2 or e > d/2: raise InconsistentGeometry()
347 warning_min_bars = "!!!!!!! WARNING !!!!!!! The hypothesis of one bar per corner (aligned) is not fullfilled."
348 if len(bars_position_x) < 2:
349 print(warning_min_bars)
350 elif len(bars_position_x[0]) < 3 or len(bars_position_x[-1]) < 3:
351 print(warning_min_bars)
352
353 # Arguments
354 self.bb = b
355 self.dd = d
356 self.LL = L
357 self.ee = e
358 self.fcfc = fc
359 self.D_barsD_bars = D_bars
360 self.bars_position_xbars_position_x = deepcopy(bars_position_x)
361 self.bars_ranges_position_ybars_ranges_position_y = copy(bars_ranges_position_y)
362 self.fyfy = fy
363 self.EyEy = Ey
364 self.D_hoopsD_hoops = D_hoops
365 self.ss = s
366 self.fsfs = fs
367 self.EsEs = Es
368 self.name_tagname_tag = name_tag
369
370 # Initialized the parameters that are dependent from others
371 self.ReInitReInit(rho_s_x, rho_s_y, Ec)
372
373
374 def ReInit(self, rho_s_x = -1, rho_s_y = -1, Ec = -1):
375 """
376 Implementation of the homonym abstract method.
377 See parent class DataManagement for detailed information.
378
379 @param rho_s_x (float, optional): Ratio of the transversal area of the hoops to the associated concrete area in the x direction.
380 Defaults to -1, e.g. computed assuming one range of hoops.
381 @param rho_s_y (float, optional): Ratio of the transversal area of the hoops to the associated concrete area in the y direction.
382 Defaults to -1, e.g. computed assuming one range of hoops.
383 @param Ec (float, optional): Young modulus for concrete. Defaults to -1, e.g. computed according to Mander et Al. 1988.
384 """
385 # Precompute some members
386 self.cl_hoopscl_hoops = self.ee + self.D_hoopsD_hoops/2.0 # centerline distance from the border of the extreme confining hoops
387 self.cl_barscl_bars = self.ee + self.D_barsD_bars/2.0 + self.D_hoopsD_hoops # centerline distance from the border of the corner bars
388 self.bcbc = self.bb - self.cl_hoopscl_hoops*2
389 self.dcdc = self.dd - self.cl_hoopscl_hoops*2
390 self.AsAs = ComputeACircle(self.D_hoopsD_hoops)
391
392 # Arguments
393 self.rho_s_xrho_s_x = 2.0*ComputeRho(self.AsAs, 1, self.bcbc*self.ss) if rho_s_x == -1 else rho_s_x
394 self.rho_s_yrho_s_y = 2.0*ComputeRho(self.AsAs, 1, self.dcdc*self.ss) if rho_s_y == -1 else rho_s_y
395 self.EcEc = self.ComputeEcComputeEc() if Ec == -1 else Ec
396
397 # Members
398 self.nr_barsnr_bars = self.ComputeNrBarsComputeNrBars()
399 self.AA = self.ComputeAComputeA()
400 self.AcAc = self.ComputeAcComputeAc()
401 self.AyAy = ComputeACircle(self.D_barsD_bars)
402 self.rho_barsrho_bars = ComputeRho(self.AyAy, self.nr_barsnr_bars, self.AA)
403 self.IyIy = self.ComputeIyComputeIy()
404 self.IzIz = self.ComputeIzComputeIz()
405
406 # Data storage for loading/saving
407 self.UpdateStoredDataUpdateStoredData()
408
409
411 """
412 Implementation of the homonym abstract method.
413 See parent class DataManagement for detailed information.
414 """
415 self.datadata = [["INFO_TYPE", "RCRectShape"], # Tag for differentiating different data
416 ["name_tag", self.name_tagname_tag],
417 ["b", self.bb],
418 ["d", self.dd],
419 ["bc", self.bcbc],
420 ["dc", self.dcdc],
421 ["L", self.LL],
422 ["e", self.ee],
423 ["A", self.AA],
424 ["Ac", self.AcAc],
425 ["Iy", self.IyIy],
426 ["Iz", self.IzIz],
427 ["fc", self.fcfc],
428 ["Ec", self.EcEc],
429 ["D_bars", self.D_barsD_bars],
430 ["nr_bars", self.nr_barsnr_bars],
431 ["Ay", self.AyAy],
432 ["bars_position_x", self.bars_position_xbars_position_x],
433 ["bars_ranges_position_y", self.bars_ranges_position_ybars_ranges_position_y],
434 ["rho_bars", self.rho_barsrho_bars],
435 ["cl_bars", self.cl_barscl_bars],
436 ["fy", self.fyfy],
437 ["Ey", self.EyEy],
438 ["D_hoops", self.D_hoopsD_hoops],
439 ["s", self.ss],
440 ["As", self.AsAs],
441 ["rho_s_x", self.rho_s_xrho_s_x],
442 ["rho_s_y", self.rho_s_yrho_s_y],
443 ["cl_hoops", self.cl_hoopscl_hoops],
444 ["fs", self.fsfs],
445 ["Es", self.EsEs]]
446
447
448 def ShowInfo(self):
449 """
450 Implementation of the homonym abstract method.
451 See parent class DataManagement for detailed information.
452 """
453 print("")
454 print("Requested info for RC rectangular section of name tag = {}".format(self.name_tagname_tag))
455 print("Width of the section b = {} mm".format(self.bb/mm_unit))
456 print("Depth of the section d = {} mm".format(self.dd/mm_unit))
457 print("Concrete cover e = {} mm".format(self.ee/mm_unit))
458 print("Concrete area A = {} mm2".format(self.AA/mm2_unit))
459 print("Core concrete area Ac = {} mm2".format(self.AcAc/mm2_unit))
460 print("Unconfined concrete compressive strength fc = {} MPa".format(self.fcfc/MPa_unit))
461 print("Young modulus for concrete Ec = {} GPa".format(self.EcEc/GPa_unit))
462 print("Diameter of the reinforcing bars D_bars = {} mm and area of one bar Ay = {} mm2 with {} bars".format(self.D_barsD_bars/mm_unit, self.AyAy/mm2_unit, self.nr_barsnr_bars))
463 print("Diameter of the hoops D_hoops = {} mm and area of one stirrup As = {} mm2".format(self.D_hoopsD_hoops/mm_unit, self.AsAs/mm2_unit))
464 print("Ratio of area of longitudinal reinforcement to area of concrete section rho_bars = {}".format(self.rho_barsrho_bars))
465 print("Ratio of area of lateral reinforcement to lateral area of concrete section in x rho_s_x = {} ".format(self.rho_s_xrho_s_x))
466 print("Ratio of area of lateral reinforcement to lateral area of concrete section in y rho_s_y = {} ".format(self.rho_s_yrho_s_y))
467 print("Moment of inertia of the circular section (strong axis) Iy = {} mm4".format(self.IyIy/mm4_unit))
468 print("Moment of inertia of the circular section (weak axis) Iz = {} mm4".format(self.IzIz/mm4_unit))
469 print("")
470
471
472 def ComputeNrBars(self):
473 """
474 Compute the number of vertical bars in the array bars_position_x (note that this list of lists can have different list sizes).
475
476 @returns int: Number of vertical reinforcing bars.
477 """
478 nr_bars = 0
479 for range in self.bars_position_xbars_position_x:
480 nr_bars += np.size(range)-1
481
482 return nr_bars
483
484
485 def ComputeEc(self):
486 """
487 Compute Ec using the formula from Mander et Al. 1988.
488
489 @returns float: Young modulus of concrete.
490 """
491
492 return 5000.0 * math.sqrt(-self.fcfc/MPa_unit) * MPa_unit
493
494
495 def ComputeA(self):
496 """
497 Compute the area for a rectangular section.
498
499 @returns float: Total area.
500 """
501 return self.bb * self.dd
502
503
504 def ComputeAc(self):
505 """
506 Compute the confined area (area inside the centerline of the hoops, according to Mander et Al. 1988).
507
508 @returns float: Confined area.
509 """
510 return self.bcbc * self.dcdc
511
512
513 def ComputeIy(self):
514 """
515 Compute the moment of inertia of the rectangular section with respect to the strong axis.
516
517 @returns float: Moment of inertia (strong axis)
518 """
519 return self.bb * self.dd**3 / 12.0
520
521
522 def ComputeIz(self):
523 """
524 Compute the moment of inertia of the rectangular section with respect to the weak axis.
525
526 @returns float: Moment of inertia (weak axis)
527 """
528 return self.dd * self.bb**3 / 12.0
529
530
532 """
533 Class that is the children of RCRectShape and cover the specific case of square RC sections.
534
535 @param RCRectShape: Parent class.
536 """
537 def __init__(self, b, L, e, fc, D_bars, bars_position_x: np.ndarray, bars_ranges_position_y: np.ndarray, fy, Ey, D_hoops, s, fs, Es, name_tag="Not Defined", rho_s_x=-1, rho_s_y=-1, Ec=-1):
538 """
539 Constructor of the class. It passes the arguments into the parent class to generate the specific case of a aquare RC section.
540
541 @param b (float): Width/depth of the section.
542 @param L (float): Effective length of the element associated with this section.
543 If the panel zone is present, exclude its dimension.
544 @param e (float): Concrete cover.
545 @param fc (float): Unconfined concrete compressive strength (cylinder test).
546 @param D_bars (float): Diameter of the reinforcing bars.
547 @param bars_position_x (np.ndarray): Distances from border to bar centerline, bar to bar centerlines and
548 finally bar centerline to border in the x direction (aligned).
549 Starting from the left to right, from the top range to the bottom one.
550 The number of bars for each range can vary; in this case, add this argument when defining the array " dtype = object".
551 @param bars_ranges_position_y (np.ndarray): Distances from border to range centerlines, range to range centerlines and
552 finally range centerline to border in the y direction.
553 Starting from the top range to the bottom one.
554 @param fy (float): Yield stress for reinforcing bars.
555 @param Ey (float): Young modulus for reinforcing bars.
556 @param D_hoops (float): Diameter of the hoops.
557 @param s (float): Vertical centerline spacing between hoops.
558 @param fs (float): Yield stress for the hoops.
559 @param Es (float): Young modulus for the hoops
560 @param name_tag (str, optional): A nametag for the section. Defaults to "Not Defined".
561 @param rho_s_x (float, optional): Ratio of the transversal area of the hoops to the associated concrete area in the x direction.
562 Defaults to -1, e.g. computed in __init__() and ReInit() assuming one range of hoops.
563 @param rho_s_y (float, optional): Ratio of the transversal area of the hoops to the associated concrete area in the y direction.
564 Defaults to -1, e.g. computed in __init__() and ReInit() assuming one range of hoops.
565 @param Ec (float, optional): Young modulus for concrete. Defaults to -1, e.g. computed in __init__() and ReInit().
566 """
567 super().__init__(b, b, L, e, fc, D_bars, bars_position_x, bars_ranges_position_y, fy, Ey, D_hoops, s, fs, Es, name_tag, rho_s_x, rho_s_y, Ec)
568
569
571 """
572 Class that stores funcions, geometric and mechanical properties of RC circular shape profile.
573 Note that for the validity of the formulas, the hoops needs to be closed (with 135 degress possibly).
574
575 @param Section: Parent abstract class.
576 """
577 def __init__(self, b, L, e, fc, D_bars, n_bars: int, fy, Ey, D_hoops, s, fs, Es, name_tag = "Not Defined", rho_s_vol = -1, Ec = -1):
578 """
579 The conctructor of the class.
580
581 @param b (float): Width of the section.
582 @param L (float): Effective length of the element associated with this section.
583 If the panel zone is present, exclude its dimension.
584 @param e (float): Concrete cover.
585 @param fc (float): Unconfined concrete compressive strength (cylinder test).
586 @param D_bars (float): Diameter of the vertical reinforcing bars.
587 @param n_bars (int): Number of vertical reinforcing bars.
588 @param fy (float): Yield stress for reinforcing bars.
589 @param Ey (float): Young modulus for reinforcing bars.
590 @param D_hoops (float): Diameter of the hoops.
591 @param s (float): Vertical centerline spacing between hoops.
592 @param fs (float): Yield stress for the hoops.
593 @param Es (float): Young modulus for the hoops
594 @param name_tag (str, optional): A nametag for the section. Defaults to "Not Defined".
595 @param rho_s_vol (float, optional): Ratio of the volume of transverse confining steel to the volume of confined concrete core.
596 Defaults to -1, e.g. computed according to Mander et Al. 1988.
597 @param Ec (float, optional): Young modulus for concrete. Defaults to -1, e.g. computed in __init__() and ReInit().
598
599 @exception NegativeValue: b needs to be positive.
600 @exception NegativeValue: L needs to be positive.
601 @exception NegativeValue: e needs to be positive.
602 @exception PositiveValue: fc needs to be negative.
603 @exception NegativeValue: D_bars needs to be positive.
604 @exception NegativeValue: n_bars needs to be a positive integer.
605 @exception NegativeValue: fy needs to be positive.
606 @exception NegativeValue: Ey needs to be positive.
607 @exception NegativeValue: D_hoops needs to be positive.
608 @exception NegativeValue: s needs to be positive.
609 @exception NegativeValue: fs needs to be positive.
610 @exception NegativeValue: Es needs to be positive.
611 @exception NegativeValue: Ec needs to be positive if different from -1.
612 @exception InconsistentGeometry: e should be smaller than half the depth and the width of the section.
613 """
614 # Check
615 if b < 0: raise NegativeValue()
616 if L < 0: raise NegativeValue()
617 if e < 0: raise NegativeValue()
618 if fc > 0: raise PositiveValue()
619 if D_bars < 0: raise NegativeValue()
620 if n_bars < 0: raise NegativeValue()
621 if fy < 0: raise NegativeValue()
622 if Ey < 0: raise NegativeValue()
623 if D_hoops < 0: raise NegativeValue()
624 if s < 0: raise NegativeValue()
625 if fs < 0: raise NegativeValue()
626 if Es < 0: raise NegativeValue()
627 if Ec != -1 and Ec < 0: raise NegativeValue()
628 if e > b/2: raise InconsistentGeometry()
629
630 # Arguments
631 self.bb = b
632 self.LL = L
633 self.ee = e
634 self.fcfc = fc
635 self.D_barsD_bars = D_bars
636 self.n_barsn_bars = n_bars
637 self.fyfy = fy
638 self.EyEy = Ey
639 self.D_hoopsD_hoops = D_hoops
640 self.ss = s
641 self.fsfs = fs
642 self.EsEs = Es
643 self.name_tagname_tag = name_tag
644
645 # Initialized the parameters that are dependent from others
646 self.ReInitReInit(rho_s_vol, Ec)
647
648
649 def ReInit(self, rho_s_vol = -1, Ec = -1):
650 """
651 Implementation of the homonym abstract method.
652 See parent class DataManagement for detailed information.
653
654 @param rho_s_vol (float, optional): Ratio of the volume of transverse confining steel to the volume of confined concrete core.
655 Defaults to -1, e.g. computed according to Mander et Al. 1988.
656 @param Ec (float): Young modulus for concrete. Defaults to -1, e.g. computed according to Mander et Al. 1988.
657 """
658 # Precompute some members
659 self.cl_hoopscl_hoops = self.ee + self.D_hoopsD_hoops/2.0 # centerline distance from the border of the extreme confining hoops
660 self.cl_barscl_bars = self.ee + self.D_barsD_bars/2.0 + self.D_hoopsD_hoops # centerline distance from the border of the corner bars
661 self.bcbc = self.bb - self.cl_hoopscl_hoops*2 # diameter of spiral (hoops) between bar centerline
662 self.AsAs = ComputeACircle(self.D_hoopsD_hoops)
663
664 # Arguments
665 self.rho_s_volrho_s_vol = self.ComputeRhoVolComputeRhoVol() if rho_s_vol == -1 else rho_s_vol
666 self.EcEc = self.ComputeEcComputeEc() if Ec == -1 else Ec
667
668 # Members
669 self.AA = ComputeACircle(self.bb)
670 self.AcAc = ComputeACircle(self.bcbc)
671 self.AyAy = ComputeACircle(self.D_barsD_bars)
672 self.rho_barsrho_bars = ComputeRho(self.AyAy, self.n_barsn_bars, self.AA)
673 self.II = self.ComputeIComputeI()
674
675 # Data storage for loading/saving
676 self.UpdateStoredDataUpdateStoredData()
677
678
680 """
681 Implementation of the homonym abstract method.
682 See parent class DataManagement for detailed information.
683 """
684 self.datadata = [["INFO_TYPE", "RCCircShape"], # Tag for differentiating different data
685 ["name_tag", self.name_tagname_tag],
686 ["b", self.bb],
687 ["bc", self.bcbc],
688 ["L", self.LL],
689 ["e", self.ee],
690 ["A", self.AA],
691 ["Ac", self.AcAc],
692 ["I", self.II],
693 ["fc", self.fcfc],
694 ["Ec", self.EcEc],
695 ["D_bars", self.D_barsD_bars],
696 ["n_bars", self.n_barsn_bars],
697 ["Ay", self.AyAy],
698 ["rho_bars", self.rho_barsrho_bars],
699 ["cl_bars", self.cl_barscl_bars],
700 ["fy", self.fyfy],
701 ["Ey", self.EyEy],
702 ["D_hoops", self.D_hoopsD_hoops],
703 ["s", self.ss],
704 ["As", self.AsAs],
705 ["rho_s_vol", self.rho_s_volrho_s_vol],
706 ["cl_hoops", self.cl_hoopscl_hoops],
707 ["fs", self.fsfs],
708 ["Es", self.EsEs]]
709
710 def ShowInfo(self):
711 """
712 Implementation of the homonym abstract method.
713 See parent class DataManagement for detailed information.
714 """
715 print("")
716 print("Requested info for RC circular section of name tag = {}".format(self.name_tagname_tag))
717 print("Width of the section b = {} mm".format(self.bb/mm_unit))
718 print("Concrete cover e = {} mm".format(self.ee/mm_unit))
719 print("Concrete area A = {} mm2".format(self.AA/mm2_unit))
720 print("Core concrete area Ac = {} mm2".format(self.AcAc/mm2_unit))
721 print("Unconfined concrete compressive strength fc = {} MPa".format(self.fcfc/MPa_unit))
722 print("Young modulus for concrete Ec = {} GPa".format(self.EcEc/GPa_unit))
723 print("Diameter of the reinforcing bars D_bars = {} mm and area of one bar Ay = {} mm2 with {} bars".format(self.D_barsD_bars/mm_unit, self.AyAy/mm2_unit, self.n_barsn_bars))
724 print("Diameter of the hoops D_hoops = {} mm and area of one stirrup As = {} mm2".format(self.D_hoopsD_hoops/mm_unit, self.AsAs/mm2_unit))
725 print("Ratio of area of longitudinal reinforcement to area of concrete section rho_bars = {} ".format(self.rho_barsrho_bars))
726 print("Ratio of the volume of transverse confining steel to the volume of confined concrete core rho_s = {} ".format(self.rho_s_volrho_s_vol))
727 print("Moment of inertia of the circular section I = {} mm4".format(self.II/mm4_unit))
728 print("")
729
730
731 def ComputeRhoVol(self):
732 """
733 Compute the ratio of the volume of transverse confining steel to the volume of confined concrete core.
734 (according to Mander et Al. 1988).
735
736 @returns float: Ratio.
737 """
738 vol_s = self.AsAs*math.pi*self.bcbc
739 vol_c = math.pi/4*self.bcbc**2*self.ss
740
741 return vol_s/vol_c
742
743
744 def ComputeEc(self):
745 """
746 Compute Ec using the formula from Mander et Al. 1988.
747
748 @returns float: Young modulus of concrete.
749 """
750
751 return 5000.0 * math.sqrt(-self.fcfc/MPa_unit) * MPa_unit
752
753
754 def ComputeI(self):
755 """
756 Compute the moment of inertia of the circular section.
757
758 @returns float: Moment of inertia.
759 """
760 return self.bb**4*math.pi/64
761
762
764 """
765 Function that computes the area of one circle (reinforcing bar or hoop).
766
767 @param D (float): Diameter of the circle (reinforcing bar of hoop).
768
769 @returns float: Area the circle (for reinforcing bars or hoops).
770 """
771 return D**2/4.0*math.pi
772
773
774def ComputeRho(A, nr, A_tot):
775 """
776 Compute the ratio of area of a reinforcement to area of a section.
777
778 @param A (float): Area of reinforcement.
779 @param nr (float): Number of reinforcement (allow float for computing ratio with different area;
780 just convert the other areas to one and compute the equivalent n).
781 @param A_tot (float): Area of the concrete.
782
783 @returns float: Ratio.
784 """
785 return nr * A / A_tot
Class that stores funcions, geometric and mechanical properties of RC circular shape profile.
Definition: Section.py:570
def ReInit(self, rho_s_vol=-1, Ec=-1)
Implementation of the homonym abstract method.
Definition: Section.py:649
def ComputeI(self)
Compute the moment of inertia of the circular section.
Definition: Section.py:754
def ComputeEc(self)
Compute Ec using the formula from Mander et Al.
Definition: Section.py:744
def ShowInfo(self)
Implementation of the homonym abstract method.
Definition: Section.py:710
def UpdateStoredData(self)
Implementation of the homonym abstract method.
Definition: Section.py:679
def __init__(self, b, L, e, fc, D_bars, int n_bars, fy, Ey, D_hoops, s, fs, Es, name_tag="Not Defined", rho_s_vol=-1, Ec=-1)
The conctructor of the class.
Definition: Section.py:577
def ComputeRhoVol(self)
Compute the ratio of the volume of transverse confining steel to the volume of confined concrete core...
Definition: Section.py:731
Class that stores funcions, geometric and mechanical properties of RC rectangular shape profile.
Definition: Section.py:264
def ReInit(self, rho_s_x=-1, rho_s_y=-1, Ec=-1)
Implementation of the homonym abstract method.
Definition: Section.py:374
def ComputeEc(self)
Compute Ec using the formula from Mander et Al.
Definition: Section.py:485
def ComputeIy(self)
Compute the moment of inertia of the rectangular section with respect to the strong axis.
Definition: Section.py:513
def ShowInfo(self)
Implementation of the homonym abstract method.
Definition: Section.py:448
def ComputeA(self)
Compute the area for a rectangular section.
Definition: Section.py:495
def UpdateStoredData(self)
Implementation of the homonym abstract method.
Definition: Section.py:410
def __init__(self, b, d, L, e, fc, D_bars, np.ndarray bars_position_x, np.ndarray bars_ranges_position_y, fy, Ey, D_hoops, s, fs, Es, name_tag="Not Defined", rho_s_x=-1, rho_s_y=-1, Ec=-1)
The conctructor of the class.
Definition: Section.py:272
def ComputeNrBars(self)
Compute the number of vertical bars in the array bars_position_x (note that this list of lists can ha...
Definition: Section.py:472
def ComputeIz(self)
Compute the moment of inertia of the rectangular section with respect to the weak axis.
Definition: Section.py:522
def ComputeAc(self)
Compute the confined area (area inside the centerline of the hoops, according to Mander et Al.
Definition: Section.py:504
Class that is the children of RCRectShape and cover the specific case of square RC sections.
Definition: Section.py:531
def __init__(self, b, L, e, fc, D_bars, np.ndarray bars_position_x, np.ndarray bars_ranges_position_y, fy, Ey, D_hoops, s, fs, Es, name_tag="Not Defined", rho_s_x=-1, rho_s_y=-1, Ec=-1)
Constructor of the class.
Definition: Section.py:537
Parent abstract class for the storage and manipulation of a section's information (mechanical and geo...
Definition: Section.py:13
Class that stores funcions, geometric and mechanical properties of a steel double symmetric I-shape p...
Definition: Section.py:22
def ComputeWplz(self)
Compute the plastic modulus of a double symmetric I-profile section, with respect to its weak axis wi...
Definition: Section.py:228
def Compute_iz(self)
Compute the gyration radius with respect to the weak axis.
Definition: Section.py:252
def Compute_iy(self)
Compute the gyration radius with respect to the strong axis.
Definition: Section.py:241
def __init__(self, str Type, d, bf, tf, tw, L, r, E, Fy, Fy_web=-1, name_tag="Not Defined")
The conctructor of the class.
Definition: Section.py:32
def ComputeIy(self)
Compute the moment of inertia of a double symmetric I-profile section, with respect to its strong axi...
Definition: Section.py:185
def ShowInfo(self)
Implementation of the homonym abstract method.
Definition: Section.py:145
def ComputeA(self)
Compute the area of a double symmetric I-profile section with fillets.
Definition: Section.py:170
def UpdateStoredData(self)
Implementation of the homonym abstract method.
Definition: Section.py:116
def ReInit(self)
Implementation of the homonym abstract method.
Definition: Section.py:95
def ComputeIz(self)
Compute the moment of inertia of a double symmetric I-profile section, with respect to its weak axis ...
Definition: Section.py:200
def ComputeWply(self)
Compute the plastic modulus of a double symmetric I-profile section, with respect to its strong axis ...
Definition: Section.py:214
Module with the parent abstract class DataManagement.
def ComputeACircle(D)
Function that computes the area of one circle (reinforcing bar or hoop).
Definition: Section.py:763
def ComputeRho(A, nr, A_tot)
Compute the ratio of area of a reinforcement to area of a section.
Definition: Section.py:774