AS 3600 and RC Design Functions 8.01

The updated RC Design Functions spreadsheet (presented here) included an updated UMom function to find the ultimate strength of a rectangular section under combined bending and axial load; but I omitted to include the revisions to the alpha2 and Gamma factors; that is the factors defining the depth stress of the rectangular stress block.  This has now been fixed, in Version 8.01, which may be downloaded from:

RC Design Functions8.zip

As before, the shear design results currently only cover the simplified shear design requirements.

 

Posted in Beam Bending, Concrete, Excel, Newton, UDFs, VBA | Tagged , , , , , , | Leave a comment

Falling feathers and hammers

It is well known that at the end of the Apollo 15 Moon landing, Commander David Scott dropped a hammer and a feather to demonstrate that they would accelerate at the  same rate, and land on the ground together:

What is not so well known, at least I didn’t know, is that this experiment has been repeated on Earth, at a much grander scale, at NASA’s space power facility:

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

More iterative solvers

Following the recent post on using Brent’s Method solvers on an array (Iterative solvers and arrays), here is another example with an engineering related problem.  The example is included in the xlScipy3 spreadsheet, which can be downloaded from:

xlScipy3.zip

The depth of the Neutral Axis of a reinforced concrete section, under specified bending moment and axial load, can be found with the cubic equation below (click any image for full size view):

Derivation of the constants A to G is shown below.  As before, the equation may either be solved using a Python function (FindDNA), or by evaluating a lambda function entered as text on the spreadsheet.  In the former case the constants are passed to the function as an array; in the latter the constants are converted to their numerical value in the text on the spreadsheet, as shown below.  Note that this is done automatically using the Eval function:

Results calling Func Type 1 (FindDNA) are shown below:

Using Func Type 2 (evaluating the text function on the spreadsheet) returns the same results.  Note that the xl_BrentA arguments must be edited to remove the final argument (the array of constant values), otherwise the function will return an error.  To edit an array function:

  • Select the top-left cell of the array (Y79), and press F2 (Edit).
  • Make the required changes.
  • Press Ctrl-Shift-Enter.
Posted in Arrays, Beam Bending, Concrete, Excel, Link to Python, Maths, Newton, NumPy and SciPy, UDFs, VBA, xlwings | Tagged , , , , , , , , | Leave a comment

Quite Good

This song has actually appeared here before, but it was a bit buried, so here it is again; Robin Williamson with a quite good interpretation of Like a Rolling Stone:

 

 

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

Iterative solvers and arrays

A recent thread at Eng-Tips was looking for a solution to the problem described  below:

The solutions to this problem described below can be downloaded from:

ItSolve.zip

and

xlScipy3.zip

The ItSolve.xlsb spreadsheet contains a user defined function (UDF) to solve iterative problems using Brent’s method, so the first approach was to modify this to return an array of results, with the input variables defined by a column and row of data, solving a function entered as text on the spreadsheet:

This works, but it is quite slow, taking about 10 seconds to return results for a 21 x 21 array.   I then modified the UDF to work as a subroutine, solving a short VBA function, rather than the text string on the spreadsheet:

Function TempFunc(Coefficients As Variant, T As Double)
Dim G_1 As Double, G_2 As Double, G_3 As Double, G_4 As Double, G_5 As Double, epsilon As Double, alpha As Double

G_1 = Coefficients(1, 1)
G_2 = Coefficients(2, 1)
G_3 = Coefficients(3, 1)
G_4 = Coefficients(4, 1)
G_5 = Coefficients(5, 1)
epsilon = Coefficients(6, 1)
alpha = Coefficients(7, 1)

    TempFunc = G_1 * epsilon * T ^ 4 + G_2 * (T - 320) ^ 1.25 - G_3 * alpha - G_4 - G_5

End Function

Input and results are shown below:

A 3D contour plot can now be generated quickly using Excel’s “surface chart” option:

This reduced the computation time for the 21×21 matrix down to about 0.25 seconds.

The xlwings/Python spreadsheet xlwScipy3.xlsb also has a function using Brent’s method (linking to the Scipy  brentq function).  I have modified this to return results as a 2D array, with input of a single column and row of data:

Input for the Eng-Tips problem is shown below:

The xl_BrentA function will work on either a function entered as text on the spreadsheet, or link to a Python function.  The screen-shot below shows results calling the Python function “TempFunc” (included in the download files).

Exactly the same results are generated using the text function on the spreadsheet:

Both options complete the calculation of the 21×21 array in about 5 milliseconds, about 50 times faster than the solution using a VBA function, or 2000 times faster than solving the string function entered on the spreadsheet!

Posted in Arrays, Charts, Excel, Link to Python, Maths, Newton, NumPy and SciPy, UDFs, VBA, xlwings | Tagged , , , , , , , | 2 Comments