RC Rectangular Section#

[3]:
import opstool as opst

outlines = [[0, 0], [2, 0], [2, 2], [0, 2]]
coverlines = opst.offset(outlines, d=0.1)
cover = opst.add_polygon(outlines, holes=[coverlines])
core = opst.add_polygon(coverlines)
sec = opst.SecMesh()
sec.assign_group(dict(cover=cover, core=core))
sec.assign_mesh_size(dict(cover=0.02, core=0.05))
sec.assign_group_color(dict(cover="gray", core="green"))
sec.mesh()
sec.get_sec_props(display_results=True, plot_centroids=False)
sec.centring()
# sec.rotate(45)
sec.view(fill=True, engine='mpl', save_html=None, on_notebook=True)
                              Section Properties                               
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Symbol     Value                   Definition                             ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ A          4.000E+00               Cross-sectional area                   │
│ Asy        3.333E+00               Shear area y-axis                      │
│ Asz        3.333E+00               Shear area z-axis                      │
│ centroid   (1.000E+00, 1.000E+00)  Elastic centroid                       │
│ Iy         1.333E+00               Moment of inertia y-axis               │
│ Iz         1.333E+00               Moment of inertia z-axis               │
│ Iyz        4.441E-15               Product of inertia                     │
│ Wyt        1.333E+00               Section moduli of top fibres y-axis    │
│ Wyb        1.333E+00               Section moduli of bottom fibres y-axis │
│ Wzt        1.333E+00               Section moduli of top fibres z-axis    │
│ Wzb        1.333E+00               Section moduli of bottom fibres z-axis │
│ J          2.250E+00               Torsion constant                       │
│ phi        0.000E+00               Principal axis angle                   │
│ mass       4.000E+00               Section mass                           │
│ rho_rebar  0.000E+00               Ratio of reinforcement                 │
└───────────┴────────────────────────┴────────────────────────────────────────┘
../../_images/src_notebooks_demos_secmesh2_1_1.png