Three tributes to John Clarke

From Michael Leunig at The Age:

From the ABC:
Remembering John Clarke

 

From North Palmerston City Council –
After an off-night at N Palmerston, John Cleese named the city “the suicide capital of New Zealand”.  John Clarke, who was born there, suggested that the city council should respond by naming the local rubbish dump after Cleese, which they duly did, complete with official signage.  Much to the amusement of Eric Idle:

Posted in Bach | Tagged | 1 Comment

RCInteract and RC Design Functions 7.03

Since the previous post, I have updated the notes in the RC Design Functions spreadsheet to reflect the fact that with the recent update to the Bridge Design Code (AS 5100) the reinforced concrete strength design requirements for beam bending and combined bending and axial load are now the same as in AS 3600.  The updated spreadsheet can be downloaded from:

RC Design Functions7.zip

The RCInteract function will generate a moment-axial load interaction diagram to a number of design codes.  For AS 3600, and now AS 5100 as well, it will also adjust the results according to the specified confinement steel.

The screen shot below shows input and plotted results for 65 MPa concrete to AS 3600 including the effect of compression steel (blue line), and with compression steel ignored:

If the confinement option is set to 1 the compression steel is included for axial loads <= 0.5Phi.Nu:

Confinement option 2 applies the AS 3600 limitations for standard confinement to Cl. 10.7.3, for concrete grades >= 65 MPa:

Confinement option 3 gives results where special confinement to Cl. 10.7.3 is provided, i.e. compression steel is included for all axial loads.

The function input is (arguments in italics are optional):
RCInteract(UMomin, PRange, NSteps, Muin, Code, CompFace, AxLoadA, Confinement):

  • UMomin: Section details (Range D4:D16 in the example data)
  • PRange: Axial load range; default = 0 to Phi.Pu
  • NSteps: Number of output increments; default = 20
  • Muin: Array of moments for each axial load, defining the compression face; default = use CompFace
  • Code: Design code; default = 1 = AS 3600 and AS 5100-2017
  • CompFace: Compression Face, 1 = top face, anything else = bottom face; default = 1
  • AxLoadA: Array of output axial loads; default = use Prange and NSteps
  • Confinement: Confinement option (Code = 1 only); default = -1 (include compression steel for all loads)

Output is an array with 3 or 1 columns, depending on whether AxLoadA was specified; see below:


To display all results the function must be entered as an array function, by selecting the required output range and pressing Ctrl-Shift-Enter.  See Using Array Functions and UDFs for details.

Posted in Beam Bending, Concrete, Excel, Newton, UDFs, VBA | Tagged , , , , , , , , , , | 16 Comments

RC Design Functions 7.03

The latest update to my RC Design Functions spreadsheet has just been uploaded, and is available for free download (including full open-source code) from:

RC Design Functions7.zip

The main new feature in the latest version is a new RCInteract function, which generates an axial load-moment capacity interaction diagram, including corrections for confinement steel type, to AS 3600.

The screen shot below shows sample input and output.  Further details will be given in the next post.

Posted in Concrete, Excel, Newton, UDFs, VBA | Tagged , , , , | 1 Comment

Little Unsaid

From Highgate Cemetery:

 

Posted in Bach | Tagged | Leave a comment

Indexing NumPy arrays with floats …

… now you can’t.

I recently updated to the latest version of NumPy (1.12.1), and today I discovered that some of my spreadsheets using NumPy arrays (via xlwings) were returning errors like:

IndexError: only integers, slices (`:`), ellipsis (`…`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

The problem was that using floats to index NumPy arrays previously generated a warning, but now generates an error:

DeprecationWarning to error
•Indexing with floats raises IndexError, e.g., a[0, 0.0].
•Indexing with non-integer array_like raises IndexError, e.g., a[‘1’, ‘2’]
•Indexing with multiple ellipsis raises IndexError, e.g., a[…, …].
•Non-integers used as index values raise TypeError, e.g., in reshape, take, and specifying reduce axis

You might ask, why use floats to index an array in the first place?  The reason is that if a range is copied from Excel to Python then by default all the values are passed as float64.  The array could be converted to all integers, but if the values are mixed integers and floats (such as an array of node numbers and coordinates) that won’t work.  In previous versions the values to be used as array indices could just be left as floats, but now it is necessary to convert them to integers before using them as index values.

I will be working through my Python code posted here and update as required, but if you come across an IndexError anywhere, please let me know.

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