Numerical Integration With Tanh-Sinh Quadrature v 6.0

Graeme Dennes has updated his Tanh-Sinh Quadrature spreadsheet to V 6.0. The new version (including full open source code) may be downloaded from:

Tanh-Sinh Quadrature

Graeme’s summary of the new features in the spreadsheet:

  1. All programs run at near twice the speed of the v5.03 programs.
  2. The accuracy of the finite interval programs has been improved.
  3. All programs are written in Excel VBA.
  4. As implemented, the Tanh-Sinh integrator may be the fastest Excel VBA finite-interval integrator available.

5.      The Romberg integrator may be the fastest and most accurate Excel VBA Romberg integrator available.

6.      Now includes over 1200 test integrals with true results to 15 significant digits. This may be the largest set of diverse test integrals available at no cost. It includes several of the “standard” sets of test integrals in wide use.

7.      The Plotter worksheet shows two plots: the plot of the selected function over the specified finite interval, and the (part) plot of the function after being transformed by the Tanh-Sinh function. It’s the transformed function which is integrated by the Tanh-Sinh integrator over the entire real line (-inf to +inf).

8.      The workbook provides a convenient test bed for developing and implementing Excel VBA integration programs and for comparing the performance of your programs with the programs in this workbook. Replace the core integration code in one of the program modules which have the same interval type as your own program, retrofitting your code into the existing program structure.

9.      Should you develop an Excel VBA Tanh-Sinh integrator program which improves on the accuracy and speed of the Tanh-Sinh program in the workbook, I urge you to leave a comment on Newton Excel Bach and I will happily recognise your contribution.

Note that the speed improvement is clearly visible when integrating VBA functions. When integrating functions entered as text on the spreadsheet nearly all the computation time is in converting the text values and symbols to numerical values.

As always, if you have any questions or comments, please leave a comment below.

Posted in Excel, Maths, Newton, Numerical integration, UDFs, VBA | Tagged , , , , | Leave a comment

Cleaning Data – Sort functions and shortcuts

Back in 2020 I posted here on New sort functions and sorting to groups, looking at using the sort functions to clean data. Revisiting that post I found that the link to the sample spreadsheet was broken, and that is now fixed:

GroupSort.zip

That post caught the attention of the people at PdfHaul, and they drew my attention to their blog, which has a wealth of information on pdf related topics, including using Excel with pdf data.

Click image to go to the blog:

Posted in Computing - general, Excel | Tagged , , , | Leave a comment

Maeve Gilchrist – Beeswing

Maeve Gilchrist is a Scottish harpist who plays a wide variety of musical styles. Here she is with her version of Richard Thompson’s song Beeswing:

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

Lists and Arrays in Excel

I recently learned from MyOnlineTraingHub that Microsoft recently released a new feature allowing lists, arrays, and nested arrays to be stored in single cells. This feature is currently only available on the Beta Channel for Microsoft 365 Insiders, but it will be interesting to see how this interacts with pyxll cache objects, when it becomes generally available.

See the YouTube video for more details:

Posted in Arrays, Excel | Tagged , , | Leave a comment

AS 3600 public comment draft and py_RC Design

A draft of the latest update to AS 3600 (the Australian code for concrete structures) was recently published for public comment (now closed). There are many significant changes to design procedures, and I have updated the py_RC Design spreadsheet to allow some of the new proposed procedures to be used:

  • For ULS design of beams and columns there are minor changes to the current rules for using a rectangular stress block, including increasing the strain at the compression face from 0.003 to 0.0035.
  • Alternatively, a curvilinear-rectangular stress block may be used, with a similar definition to that used in Eurocode 2.
  • The crack width calculation has been modified to take better account of the effects of creep on tensile strains in the concrete.

The new spreadsheet and associated Python code can be downloaded from:

py_RC Design.zip

Also see py_RC Design 2 for more details of the other functions in the spreadsheet, and Python and pyxll for information about the required pyxll add-in, together with a discount voucher for new users.

The spreadsheet has been modified with VBA code to call the LoadRCFunc function at start-up, so this code should be added to the pyxll start-up module:

@xl_macro
@xl_menu("RC Functions", menu="Load")
def LoadRCFunc():
    try:
        imp.import_module('RC_design')
        pyxll.rebind()
        xlcAlert('RC Functions module import completed')
    except:
        xlcAlert('Module not imported')
    return

The Code variable for the py_Umom function has been changed to accept a two cell range as input, specifying the Code and Version numbers. Currently the Version is only used for AS 3600 (Code 1), with the following options:

  • 1 = current code (2018, Amendment 2)
  • 2 = 2026 draft with modified rectangular stress block
  • 3 = 2026 draft with curvilinear-rectangular stress block

Click on any image for full-size view:

The same change to the Code input has been applied to the py_Estress function, with Version =2 specifying the new draft. This currently only affects the results for the calculated crack width:

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