Display Results

This example demonstrates how to display results in sectionproperties.

A 165.1 x 5.4 CHS will be analysed and the differences in the display_results() output highlighted.

Create Geometry and Section

[1]:
from sectionproperties.analysis import Section
from sectionproperties.pre.library import circular_hollow_section

geom = circular_hollow_section(d=165.1, t=5.4, n=64)
geom.create_mesh(mesh_sizes=10)
sec = Section(geometry=geom)
sec.plot_mesh(materials=False)
../../_images/examples_results_display_results_3_0.svg
[1]:
<Axes: title={'center': 'Finite Element Mesh'}>

The display_results() method will print all the results that have been calculated for the Section object. If an analysis has not been conducted, no results will display.

[2]:
sec.display_results()
 Section Properties 
┏━━━━━━━━━━┳━━━━━━━┓
┃ Property  Value ┃
┡━━━━━━━━━━╇━━━━━━━┩
└──────────┴───────┘

[3]:
sec.calculate_geometric_properties()
sec.display_results()
     Section Properties      
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Property           Value ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ area        2.704897e+03 │
│ perimeter   5.184687e+02 │
│ qx          3.063860e-11 │
│ qy          3.751666e-12 │
│ ixx_g       8.619244e+06 │
│ iyy_g       8.619244e+06 │
│ ixy_g      -1.491571e-09 │
│ cx          1.386990e-15 │
│ cy          1.132709e-14 │
│ ixx_c       8.619244e+06 │
│ iyy_c       8.619244e+06 │
│ ixy_c      -1.491571e-09 │
│ zxx+        1.044124e+05 │
│ zxx-        1.044124e+05 │
│ zyy+        1.044124e+05 │
│ zyy-        1.044124e+05 │
│ rx          5.644939e+01 │
│ ry          5.644939e+01 │
│ i11_c       8.619244e+06 │
│ i22_c       8.619244e+06 │
│ phi         0.000000e+00 │
│ z11+        1.044124e+05 │
│ z11-        1.044124e+05 │
│ z22+        1.044124e+05 │
│ z22-        1.044124e+05 │
│ r11         5.644939e+01 │
│ r22         5.644939e+01 │
└───────────┴───────────────┘

The formatting can be changed by passing a formatting string to the fmt argument, see here for more information on string formatting.

[4]:
sec.display_results(fmt=".1f")
   Section Properties    
┏━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Property       Value ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━┩
│ area          2704.9 │
│ perimeter      518.5 │
│ qx               0.0 │
│ qy               0.0 │
│ ixx_g      8619243.5 │
│ iyy_g      8619243.5 │
│ ixy_g           -0.0 │
│ cx               0.0 │
│ cy               0.0 │
│ ixx_c      8619243.5 │
│ iyy_c      8619243.5 │
│ ixy_c           -0.0 │
│ zxx+        104412.4 │
│ zxx-        104412.4 │
│ zyy+        104412.4 │
│ zyy-        104412.4 │
│ rx              56.4 │
│ ry              56.4 │
│ i11_c      8619243.5 │
│ i22_c      8619243.5 │
│ phi              0.0 │
│ z11+        104412.4 │
│ z11-        104412.4 │
│ z22+        104412.4 │
│ z22-        104412.4 │
│ r11             56.4 │
│ r22             56.4 │
└───────────┴───────────┘

When more analyses are conducted, more results are displayed.

[5]:
sec.calculate_warping_properties()
sec.calculate_plastic_properties()
sec.display_results()
     Section Properties      
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Property           Value ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ area        2.704897e+03 │
│ perimeter   5.184687e+02 │
│ qx          3.063860e-11 │
│ qy          3.751666e-12 │
│ ixx_g       8.619244e+06 │
│ iyy_g       8.619244e+06 │
│ ixy_g      -1.491571e-09 │
│ cx          1.386990e-15 │
│ cy          1.132709e-14 │
│ ixx_c       8.619244e+06 │
│ iyy_c       8.619244e+06 │
│ ixy_c      -1.491571e-09 │
│ zxx+        1.044124e+05 │
│ zxx-        1.044124e+05 │
│ zyy+        1.044124e+05 │
│ zyy-        1.044124e+05 │
│ rx          5.644939e+01 │
│ ry          5.644939e+01 │
│ i11_c       8.619244e+06 │
│ i22_c       8.619244e+06 │
│ phi         0.000000e+00 │
│ z11+        1.044124e+05 │
│ z11-        1.044124e+05 │
│ z22+        1.044124e+05 │
│ z22-        1.044124e+05 │
│ r11         5.644939e+01 │
│ r22         5.644939e+01 │
│ j           1.723507e+07 │
│ x_se       -5.413764e-14 │
│ y_se        4.403193e-14 │
│ x1_se      -5.552463e-14 │
│ y2_se       3.270485e-14 │
│ x_st       -4.677381e-14 │
│ y_st        1.860535e-14 │
│ gamma       2.199645e+03 │
│ a_sx        1.354759e+03 │
│ a_sy        1.354759e+03 │
│ a_s11       1.354759e+03 │
│ a_s22       1.354759e+03 │
│ beta_x+     8.159041e-14 │
│ beta_x-    -8.159041e-14 │
│ beta_y+    -1.040259e-13 │
│ beta_y-     1.040259e-13 │
│ beta_11+    8.159041e-14 │
│ beta_11-   -8.159041e-14 │
│ beta_22+   -1.040259e-13 │
│ beta_22-    1.040259e-13 │
│ x_pc        1.386990e-15 │
│ y_pc        1.132709e-14 │
│ x11_pc      1.386990e-15 │
│ y22_pc      1.132709e-14 │
│ sxx         1.374429e+05 │
│ syy         1.374429e+05 │
│ s11         1.374429e+05 │
│ s22         1.374429e+05 │
│ sf_xx+      1.316346e+00 │
│ sf_xx-      1.316346e+00 │
│ sf_yy+      1.316346e+00 │
│ sf_yy-      1.316346e+00 │
│ sf_11+      1.316346e+00 │
│ sf_11-      1.316346e+00 │
│ sf_22+      1.316346e+00 │
│ sf_22-      1.316346e+00 │
└───────────┴───────────────┘

Because we have not specified any material properties, the displayed properties are purely geometric. If we assign a steel material to the CHS, we will see some results change to material property weighted values (see here for more information on how material properties affect results). We can also print the transformed results using the display_transformed_results() method.

[6]:
from sectionproperties.pre import Material

# create steel material
steel = Material(
    name="Steel",
    elastic_modulus=200e3,  # N/mm^2 (MPa)
    poissons_ratio=0.3,  # unitless
    density=7.85e-6,  # kg/mm^3
    yield_strength=500,  # N/mm^2 (MPa)
    color="grey",
)
geom.material = steel  # assign steel to the CHS

# remesh and recreate Section object
geom.create_mesh(mesh_sizes=5)
sec = Section(geometry=geom)

# perform analysis and display results
sec.calculate_geometric_properties()
sec.calculate_warping_properties()
sec.calculate_plastic_properties()
sec.display_results(fmt=".3e")
sec.display_transformed_results(e_ref=steel, fmt=".3e")
    Section Properties    
┏━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Property        Value ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ area        2.705e+03 │
│ perimeter   5.185e+02 │
│ mass        2.123e-02 │
│ e.a         5.410e+08 │
│ e.qx       -8.531e-07 │
│ e.qy       -4.748e-06 │
│ e.ixx_g     1.724e+12 │
│ e.iyy_g     1.724e+12 │
│ e.ixy_g     2.253e-04 │
│ cx         -8.776e-15 │
│ cy         -1.577e-15 │
│ e.ixx_c     1.724e+12 │
│ e.iyy_c     1.724e+12 │
│ e.ixy_c     2.253e-04 │
│ e.zxx+      2.088e+10 │
│ e.zxx-      2.088e+10 │
│ e.zyy+      2.088e+10 │
│ e.zyy-      2.088e+10 │
│ my_xx       5.221e+07 │
│ my_yy       5.221e+07 │
│ rx          5.645e+01 │
│ ry          5.645e+01 │
│ e.i11_c     1.724e+12 │
│ e.i22_c     1.724e+12 │
│ phi         0.000e+00 │
│ e.z11+      2.088e+10 │
│ e.z11-      2.088e+10 │
│ e.z22+      2.088e+10 │
│ e.z22-      2.088e+10 │
│ my_11       5.221e+07 │
│ my_22       5.221e+07 │
│ r11         5.645e+01 │
│ r22         5.645e+01 │
│ e_eff       2.000e+05 │
│ g_eff       7.692e+04 │
│ nu_eff      3.000e-01 │
│ e.j         3.447e+12 │
│ x_se        2.476e-04 │
│ y_se        1.373e-04 │
│ x1_se       2.476e-04 │
│ y2_se       1.373e-04 │
│ x_st        2.493e-04 │
│ y_st        1.378e-04 │
│ e.gamma     4.862e+08 │
│ e.a_sx      2.709e+08 │
│ e.a_sy      2.709e+08 │
│ e.a_s11     2.709e+08 │
│ e.a_s22     2.709e+08 │
│ beta_x+     2.747e-04 │
│ beta_x-    -2.747e-04 │
│ beta_y+     4.952e-04 │
│ beta_y-    -4.952e-04 │
│ beta_11+    2.747e-04 │
│ beta_11-   -2.747e-04 │
│ beta_22+    4.952e-04 │
│ beta_22-   -4.952e-04 │
│ x_pc       -8.776e-15 │
│ y_pc       -1.577e-15 │
│ x11_pc     -8.776e-15 │
│ y22_pc     -1.577e-15 │
│ mp_xx       6.872e+07 │
│ mp_yy       6.872e+07 │
│ mp_11       6.872e+07 │
│ mp_22       6.872e+07 │
│ sf_xx+      1.316e+00 │
│ sf_xx-      1.316e+00 │
│ sf_yy+      1.316e+00 │
│ sf_yy-      1.316e+00 │
│ sf_11+      1.316e+00 │
│ sf_11-      1.316e+00 │
│ sf_22+      1.316e+00 │
│ sf_22-      1.316e+00 │
└───────────┴────────────┘

   Transformed Section    
        Properties        
┏━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Property        Value ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ geom area   2.705e+03 │
│ perimeter   5.185e+02 │
│ mass        2.123e-02 │
│ e_ref       2.000e+05 │
│ a           2.705e+03 │
│ qx         -4.265e-12 │
│ qy         -2.374e-11 │
│ ixx_g       8.619e+06 │
│ iyy_g       8.619e+06 │
│ ixy_g       1.127e-09 │
│ cx         -8.776e-15 │
│ cy         -1.577e-15 │
│ ixx_c       8.619e+06 │
│ iyy_c       8.619e+06 │
│ ixy_c       1.127e-09 │
│ zxx+        1.044e+05 │
│ zxx-        1.044e+05 │
│ zyy+        1.044e+05 │
│ zyy-        1.044e+05 │
│ my_xx       5.221e+07 │
│ my_yy       5.221e+07 │
│ rx          5.645e+01 │
│ ry          5.645e+01 │
│ i11_c       8.619e+06 │
│ i22_c       8.619e+06 │
│ phi         0.000e+00 │
│ z11+        1.044e+05 │
│ z11-        1.044e+05 │
│ z22+        1.044e+05 │
│ z22-        1.044e+05 │
│ my_11       5.221e+07 │
│ my_22       5.221e+07 │
│ r11         5.645e+01 │
│ r22         5.645e+01 │
│ e_eff       2.000e+05 │
│ g_eff       7.692e+04 │
│ nu_eff      3.000e-01 │
│ j           1.723e+07 │
│ x_se        2.476e-04 │
│ y_se        1.373e-04 │
│ x1_se       2.476e-04 │
│ y2_se       1.373e-04 │
│ x_st        2.493e-04 │
│ y_st        1.378e-04 │
│ gamma       2.431e+03 │
│ a_sx        1.355e+03 │
│ a_sy        1.355e+03 │
│ a_s11       1.355e+03 │
│ a_s22       1.355e+03 │
│ beta_x+     2.747e-04 │
│ beta_x-    -2.747e-04 │
│ beta_y+     4.952e-04 │
│ beta_y-    -4.952e-04 │
│ beta_11+    2.747e-04 │
│ beta_11-   -2.747e-04 │
│ beta_22+    4.952e-04 │
│ beta_22-   -4.952e-04 │
│ x_pc       -8.776e-15 │
│ y_pc       -1.577e-15 │
│ x11_pc     -8.776e-15 │
│ y22_pc     -1.577e-15 │
│ mp_xx       6.872e+07 │
│ mp_yy       6.872e+07 │
│ mp_11       6.872e+07 │
│ mp_22       6.872e+07 │
│ sf_xx+      1.316e+00 │
│ sf_xx-      1.316e+00 │
│ sf_yy+      1.316e+00 │
│ sf_yy-      1.316e+00 │
│ sf_11+      1.316e+00 │
│ sf_11-      1.316e+00 │
│ sf_22+      1.316e+00 │
│ sf_22-      1.316e+00 │
└───────────┴────────────┘