Section Properties with MeshPY, including torsion and warping

I recently discovered robbie van leeuwen’s structural engineering blog, which has an open-source set of Python routines for calculation of section properties, including torsion and warping constants.  The program uses the MeshPY Library for generating the finite element meshes required for the torsion and warping calculations.   The Python code for generation of the input to MeshPY, and for carrying out the finite element analyses, is all by Robbie van Leeuwen.

I have written an Excel front-end for these routines, allowing most of the functionality to be accessed quickly and easily, with no programming required.  The spreadsheet, including full open source code, can be downloaded from:

xlwSectProp.zip

The spreadsheet requires the following software to be installed:

  • Windows version of Excel
  • Python version 2.7 or later (not checked with version 3)
  • xlwings version 0.11.4 or later
  • Matplotlib, Numpy and Scipy
  • The required MeshPY and other Python files are included with the download

The spreadsheet includes two calculation sheets:

  • Twelve defined shapes
  • Any shape defined by a series of coordinates

The screenshots below show the list of defined shapes and input and output for a rectangular hollow section:

Input cells are shaded blue.  Select a section type by number (1-12) and the required dimensions will update.  The optional input, Nu (Poisson’s Ratio) and mesh size (maximum area of each generated mesh element), is only required for the warping results.  The applied actions are only required for display of stress results.

The section properties output is shown in the two screen-shots below.  More detailed descriptions can be found at the on-line documentation.

For graphic display of the generated cross-section, element meshes, and stress plots under the input actions, click the “Display Stress Results” button:

17 images are shown in sequence in an external window.  Close each image to move on to the next.  There is currently no way to automatically save the images to the spreadsheet, but any image may be manually saved to disk as a png file.  At present each image must be viewed in sequence before control is returned to the spreadsheet.

The image window may be dragged to any required size (or made full-screen):

Stress distributions are generated for each of applied actions, and combined stresses:

The image window has tools to zoom and pan, and edit output format:

Sections defined by co-ordinates may be analysed on the second sheet.  The Python code has provision for analysis of sections with holes, but this is not yet implemented in the spreadsheet version:

The numerical results are as for the defined shapes:

The download file contains output for an asymmetrical I section, compared with the same section analysed in Strand7.  The geometric results are in exact agreement, to machine accuracy, except for the plastic modulus results, which have larger, but still very small differences.  The shear area, and torsion and warping constants have larger differences, due to different implementations of the finite element analysis, but are generally within 1%.

The output torsion and shear stress results from the spreadsheet are compared below with the equivalent results from Strand7:

This entry was posted in Beam Bending, Concrete, Excel, Finite Element Analysis, Frame Analysis, Link to Python, Maths, Newton, Numerical integration, NumPy and SciPy, Strand7, UDFs, VBA, xlwings and tagged , , , , , , , , . Bookmark the permalink.

11 Responses to Section Properties with MeshPY, including torsion and warping

  1. metroxx says:

    Looks amazing. Could be great if somedays there will possibility to use generated results (pictures) directly in Excel

    Liked by 1 person

  2. vefa okumus says:

    Is it possible to use this with sections with different materials? Like composite or rc sections?

    Like

  3. Pingback: SectionProperties update | Newton Excel Bach, not (just) an Excel Blog

  4. Alex says:

    hey i downloaded this but it seems its is not working

    Like

    • Alex says:

      i even download xlam addin , puython 3.10 is installed . these three i havent installed . Matplotlib, Numpy and Scipy. on . when i click on update section properties it just delete the results but do not produce new results

      Like

      • dougaj4 says:

        Well if you haven’t installed all the packages that it says are required, why would you expect it to work? Also this version requires xlwings.
        Also note that the section properties package has had a major upgrade recently and my spreadsheet to link to the new version uses pyxll rather than xlwings.
        For the latest version see:

        SectionProperties update 3

        Like

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.