py_ConBeamU

I have now converted the VBA code in the ConBeamU spreadsheet to Python, connected to Excel via pyxll. The new spreadsheet and associated Python code can be downloaded from:

py_ConBeamU.zip

In addition to the provided files, the pyxll application is required to link to Excel. See Python and pyxll for details, including a 10% discount code for new users. The following Python libraries are also required:

  • Numpy
  • Scipy
  • Sympy
  • Pint
  • MPMath

Note that this is a work and progress, and some of the functionality of the VBA code is not fully operational. In particular, options for input of units are limited, and all combined unit names must be separated with the appropriate maths operator, e.g. kN.m^2 for a section bending stiffness (EI) unit.

As always, results must be independently checked if they are to be used in a real application.

The spreadsheet provides a number of functions for analysing the effect of loads on straight beams using Macaulay’s Method. For background information on Macaulay see: Beam actions and deflections by Macaulay’s Method. The next few posts will look at each of the functions in more detail.

The py_FEA and py_REA functions return the end actions of beams subject to specified loading, with fully fixed (py_FEA) or partially restrained end conditions (py_REA). Both these functions (and the other functions provided) also come in unit aware versions, py_FEAU and py_REAU.

End conditions for py_FEA are fully fixed at both ends by default, or with End Restraints specified as 11. The moment restraint may be fully released at the right, left, or both ends by entering End Restraints as 10, 1, or 0 respectively. For the py_REA function the translational and rotational restraint must be specified at both ends, with fully fixed restraint indicated with -1.

The beam may be divided into any number of segments with different section properties, and if the shear stiffness value is non-zero shear deflections will be included. For the examples in the spreadsheet two segments with equal properties have been specified, so that the py_FEA results can be compared with standard formula results for uniform beams. The effect of changing the shear stiffness of one segment is shown below.

See the spreadsheet for a range of other examples with different load conditions, with results compared with standard formulas.

The py_REAct3D function provides similar functionality to py_REA for 3 dimensional loading.

For section properties, the shear areas are optional, and all others are required. Output actions are given in the beam principal axis system.

The py_BeamAct3D function returns beam actions and deflections at specified sections for input actions at the beam ends, and along the length.

The input includes an option to include geometric non-linear effects in the analysis (default is not included). Output provides 6 beam actions and deflections at each section.

There is also a py_BeamAct2D function providing similar functionality in two dimensions.

Input:

Output:

The 2D function has the option to return the errors in the calculated end actions and deflections, compared with input values, as shown above. This option is currently not working in the 3D version, but will be added in the near future.

Posted in Beam Bending, Excel, Finite Element Analysis, Frame Analysis, Link to Python, Newton, NumPy and SciPy, PyXLL, UDFs | Tagged , , , , , , , | 4 Comments

Three English Dances

You Tube links to John Renbourn playing The English Dance posted here previously have been deleted, so here other two other performers’ versions:

Cover of John Renbourn’s arrangement of a traditional medieval tune simply known as “English Dance”. Great guitarist and big influence on myself, may he rest in peace Played fairly fast alike to his “Live in America” album, and the opening tune is another Renbourn arrangement of Bunyan’s Hymn Thanks for watching, see my website! http://www.oldwatermusic.com

The original is scribbled on the flyleaf of a psalter from old Coventry Cathedral and is now preserved at the Bodleian Library in Oxford. John Renbourn also has an arrangement of ‘The English Dance’ which is definitely worth seeking out. Also check out an ensemble version by the Dufay Collective. Enjoy! Clive Clive Carroll is touring the USA West Coast this JULY 2024: https://www.clivecarroll.co.uk/concer…

And finally, a recently posted live version from the man himself:

JOHN RENBOURN & JACQUI McSHEE “Bunyan’s Hymn / I Saw Thee Ships / English Dance

Posted in Bach | Tagged , , , | Leave a comment

New Australian Bridge Code and py-RC Elastic update 3

The Australian Bridge Design Code for concrete (AS 5100.5) was recently updated with Amendment 2 to the 2017 version. There are significant changes in many areas, including design for fatigue loading, where the allowable stress range for concrete under repeated loading cycles has been considerably reduced. I have now added a fatigue design function to the py_RC Elastic spreadsheet, that can be downloaded from:

py_RC Elastic.zip

The download file includes full open-source Python code. For details of the pyxll package required to link the Python code to Excel see: https://newtonexcelbach.com/python-and-pyxll/

Input for the new py_Fatigue function is shown in the screenshot below:

Details of requirements for the fatigue data are given in the Bridge Code. The section data is as for the EStress function, and allows for a rectangular section with two layers of reinforcement. A prestress may optionally be applied to the reinforcement, as in EStress.

The Load Data range specifies the maximum and minimum actions under dynamic loading. Note that the “minimum actions” may either be the minimum positive moment, with associated axial load, or if negative moments are critical it should be the greatest negative moment. Shear forces are not used in the current version, and may be entered as zero, but a check of shear stresses will be provided in future versions.

Output results are shown below:

The “fatigue stress limits” are returned by default. The calculated stresses for each layer under “maximum” and minimum” loading are shown in the first two columns, followed by the code limit on fatigue stress for each layer. Output for a specific layer my be returned by setting the Out1 argument to a value of 1-4, or for a specific stress set Out2 to a value between 1 and 3.

If Out1 is set to -1 the “fatigue parameters” are returned, showing the number of loading cycles, the factor on the steel stress range, and the combined reduction factor on the concrete stress range.

This function currently only applies the fatigue stress rules as defined in AS 5100.5. The Australian Concrete Structures code, AS 3600, also now has provisions for fatigue loading, and the function will be modified to deal with these requirements in the future.

Posted in Beam Bending, Concrete, Excel, Link to Python, Newton, PyXLL, UDFs | Tagged , , , , , , , , | 1 Comment

High definition Mandelbrot

There have been several posts here about generating animations of the Mandelbrot set, most recently at Display Matplotlib animations in Excel, but using standard 64 bit floats you rapidly run out of precision. However, using arbitrary precision arithmetic, and with sufficient memory, processing power, and time, you can go much further, as displayed here (and accompanied by Beethoven):

For those who want to do their own investigation of this region of the Mandelbrot Set, it is defined by:

Coordinates :
Re : -1.74995768370609350360221450607069970727110579726252077930242837820286008082972804887218672784431700831100544507655659531379747541999999995
Im : 0.00000000000000000278793706563379402178294753790944364927085054500163081379043930650189386849765202169477470552201325772332454726999999995

Posted in Bach, Computing - general, Newton | Tagged , , , | Leave a comment

py_RC Elastic update 2

Following the previous post, I have added a further new function, and in the process discovered that the py_Estress function was not handling tensile axial loads correctly. That has now been fixed, and the updated spreadsheet and Python files can be downloaded from:

py_RC Elastic.zip

The new function calculates creep and shrinkage effects on section curvature for a rectangular reinforced or prestressed concrete section, under any specified bending moment and axial load.

See the download file for full details of the required input and an example:

As before, for details of the pyxll app required to connect the Python code to Excel see Python and pyxll.

Posted in Beam Bending, Concrete, Excel, Link to Python, Newton, NumPy and SciPy, PyXLL, UDFs | Tagged , , , , , , , | Leave a comment