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

py_RC Elastic update

Following the previous post I have updated the py_RC Elastic spreadsheet and code to work with the new solver function, and also add new functionality. The updated files can be downloaded from:

py_RC Elastic.zip

For details of the pyxll app required to conect the Python code to Excel see Python and pyxll.

As reported in the previous post, the py_CurveatMA function returns the curvature of a reinforced concrete section for a specified axial force and bending moment, with non-linear steel and concrete properties (in spite of the spreadsheet name!):

The py_CurveatMA function calls the functions py_SectForceMV, Stressatx and py_EC2ForceM, which can also be called directly from the spreadsheet:

New functions will calculate the development of shrinkage and creep over time, according to the AS 3600, AS 5100.5, Eurocode 2, or fib model code provisions:

Also “basic drying shrinkage” (to AS 3600) can be calculated from test results:

Finally the EC2Props function returns 13 concrete properties defined in Eurocode 2, for a specified compressive strength:

The other functions available with this spreadsheet are described at: SLS Concrete design with Python

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

Scipy solver update

The py_SolveFS function calls the Scipy optimize.root function to solve multi-variable equations. Examples are found on the py_Solvers spreadsheet, see Scipy Functions with Excel and pyxll 4 – Solvers 2.

One problem with using this function is that the input data must be arranged to suit the Scipy root function, as shown on the help screen below:

The root function requires an initial guess for each of the unknown values (x0). Any additional known variables are passed in the args parameter, which is a tuple, that is a list or list of lists. If py_SolveFS is called from an interface function, that function can arrange the input in the required format, but if it is called directly from the spreadsheet, and there are many input values, it is convenient if the data can be arranged in a range, with each column being treated as a 1D array, that will be converted to a Python list.

To allow this to be used in a flexible way I have added an optional TransposeVals argument to the py_SolveFS function, with a default value of True. If input arrays are arranged row-wise on the spreadsheet this should be set to False.

The revised inputs for the function are:

If TransposeVals is omitted or set to False the Values data must be arranged in columns, either as a single column:

Or as a range with two or more columns:

In the example above the py_SolveFS function is called both indirectly with py_CurveatMA, and directly. For the indirect case the Values data is in Columns C and F. For the direct case the data has been copied to adjacent columns (J and K). In both cases the target values are passed as a single column array, which is combined with the Values data in py_SolveFS.

The new version of py_SolveFS is included in the Scipy download file at:

py_Scipy.zip

For information on the pyxll package, required to connect the Python code to Excel, see: https://newtonexcelbach.com/python-and-pyxll/.

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