## Beam actions and deflections by Macaulay’s Method

Macaulay’s Method is a convenient method of applying beam slope-deflection equations to find the shear forces, bending moments, slopes and deflections of a structural beam subject to complex load conditions, including partial varying distributed loads and point loads and moments.  It is described in Wikipedia, and in more detail, with numerous examples by Colin Caprani.  I have developed a spreadsheet using this method to analyse simply supported beams, continuous beams, and to find fixed end moments.  The spreadsheet, including full open source code, may be downloaded from Macaulay.zip.

This post describes the background, and the User Defined Functions (UDFs) for analysis of simply supported beams.  Later posts will look at the extension of the method to fixed end actions, continuous beams, spring supports, shear deflections etc.

The essence of the method is to use “Macualay bracket” notation to integrate applied loads from the point at which they first become active up to the end of the beam.  If a load is terminated before the end of the beam then an equal and opposite load must be applied from that point to correctly model the applied loading.  Quoting Wikipedia:

This procedure is carried out by the UDF SSSpan():

• Transfer beam and load data from the spreadsheet
• Take moments about the left hand support to find the end support reactions
• Set up an array of integration limits
• Solve for shear forces, bending moments, curvatures, slopes and deflections, assuming zero rotation at the left hand end; adjusting for variations in the section stiffness if required.
• Rotate for zero deflection at the right hand end..
• Output results.

Function input and output are shown in the screenshots below:

SSSPan Input

SSSPan Output

Example Input

Output compared with Strand7 analysis of the same data (click for full size view)

Output Shear Forces

Output Bending Moments and Deflections

Full open source code is included in the download spreadsheet. The extracts below show how Macaulay’s Method is performed in the VBA code. The output results are generated in a 5 column array called SSRes, the columns being:

1. X: distance of the section from the left hand end
2. Shear force = integral of distributed applied loads + point loads + reaction at the left hand support
3. Moment = integral of the shear force + applied moments
4. Slope = integral of curvature = integral of Moment/EI (EI = section flexural stiffness)
5. Deflection = integral of slope

Note that columns 4 and 5 are initially determined with a unit EI value, then corrected for the specified EI.  This procedure is required to handle beams with varying flexural stiffness along their length.

Evaluate for distributed loads

```    For i = 1 To NumSegments
If i > 1 Then X0 = Segments(i - 1, 1) Else X0 = 0
X = Segments(i, 1)
DX = X - X0

For j = 1 To NumDloads

X1 = DLoads(j, 1)
X2 = DLoads(j, 2)
Q = DLoads(j, 3)
QNeg = -DLoads(j, 4)
If X2 <> X1 Then Qdash = (DLoads(j, 4) - DLoads(j, 3)) / (X2 - X1) Else Qdash = 0
DX1 = X - X1
If DX1 < 0 Then DX1 = 0
DX2 = X - X2
If DX2 < 0 Then DX2 = 0

SSRes(i + 1, 2) = SSRes(i + 1, 2) + Q * DX1 + Qdash * DX1 ^ 2 / 2 + QNeg * DX2 - Qdash * DX2 ^ 2 / 2
SSRes(i + 1, 3) = SSRes(i + 1, 3) + Q * DX1 ^ 2 / 2 + Qdash * DX1 ^ 3 / 6 + QNeg * DX2 ^ 2 / 2 - Qdash * DX2 ^ 3 / 6
SSRes(i + 1, 4) = SSRes(i + 1, 4) + (Q * DX1 ^ 3 / 6 + Qdash * DX1 ^ 4 / 24 + QNeg * DX2 ^ 3 / 6 - Qdash * DX2 ^ 4 / 24)
SSRes(i + 1, 5) = SSRes(i + 1, 5) + (Q * DX1 ^ 4 / 24 + Qdash * DX1 ^ 5 / 120 + QNeg * DX2 ^ 4 / 24 - Qdash * DX2 ^ 5 / 120)

Next j
```

Then point loads and moments

```        ' Point loads
For j = 1 To NumPloads
X1 = PLoads(j, 1)
DX1 = X - X1
W = PLoads(j, 2)
If DX1 < 0 Then DX1 = 0
If DX1 > 0 Then
SSRes(i + 1, 2) = SSRes(i + 1, 2) + W
SSRes(i + 1, 3) = SSRes(i + 1, 3) + W * DX1
SSRes(i + 1, 4) = SSRes(i + 1, 4) + (W * DX1 ^ 2 / 2)
SSRes(i + 1, 5) = SSRes(i + 1, 5) + (W * DX1 ^ 3 / 6)
End If
Next j

' Moments
If PloadCols > 2 Then
For j = 1 To NumPloads
X1 = PLoads(j, 1)
DX1 = X - X1
W = -PLoads(j, 3)
If DX1 < 0 Then DX1 = 0
If DX1 > 0 Then
SSRes(i + 1, 3) = SSRes(i + 1, 3) + W
SSRes(i + 1, 4) = SSRes(i + 1, 4) + W * DX1
SSRes(i + 1, 5) = SSRes(i + 1, 5) + (W * DX1 ^ 2 / 2)
End If
Next j

End If
Next i
```

```   For i = 1 To NumSegments
X = Segments(i, 1)
If i = 1 Then DX = X Else DX = X - Segments(i - 1, 1)
SSRes(i + 1, 1) = X
SSRes(i + 1, 2) = SSRes(i + 1, 2) + SSRes(1, 2)
SSRes(i + 1, 3) = SSRes(i + 1, 3) + SSRes(1, 3) + SSRes(1, 2) * X
SSRes(i + 1, 4) = SSRes(i + 1, 4) + SSRes(1, 4) + (SSRes(1, 3) * X + SSRes(1, 2) * X ^ 2 / 2)
SSRes(i + 1, 5) = SSRes(i + 1, 5) + SSRes(1, 4) * X + SSRes(1, 5) + (SSRes(1, 3) * X ^ 2 / 2 + SSRes(1, 2) * X ^ 3 / 6)
Next i
```

Finally adjust slope and deflection for EI of each segment

```    ' Adjust slope and deflection for EI
For i = 1 To NumSegments
EI = Segments(i, 2)
X = Segments(i, 1)
If i = 1 Then DX = X Else DX = X - Segments(i - 1, 1)
If i = 1 Then StartSlope = SSRes(i, 4) Else StartSlope = EndSlope
If i = 1 Then StartDef = SSRes(i, 5) Else StartDef = EndDef

EndSlope = StartSlope + (SSRes(i + 1, 4) - SSRes(i, 4)) / EI
EndDef = StartDef + StartSlope * DX + (SSRes(i + 1, 5) - SSRes(i, 5) - (SSRes(i, 4) * DX)) / EI
SSRes(i, 4) = StartSlope
SSRes(i, 5) = StartDef
Next i
SSRes(i, 4) = EndSlope
SSRes(i, 5) = EndDef
```

The array SSRes at this stage has correct values for shear and bending moment, but the slopes and deflections are based on zero slope at the left hand end. This is corrected by finding the slope required to make the deflection at the right hand end equal to zero, then adding this slope and the associated deflection to the output values.

This entry was posted in Beam Bending, Excel, Frame Analysis, Newton, Numerical integration, UDFs, VBA and tagged , , , , . Bookmark the permalink.

### 13 Responses to Beam actions and deflections by Macaulay’s Method

1. tonyxtsi says:

Very good tutorial for me! Thanks a lot!

Like

2. Steve Ward says:

Thank you for posting such a useful tool. I was wondering how to get excel to add multiple loads on a SS-beam (analysis of a blast resistant door frame) at varying locations and realised the Macaulays method was probably the best way of evaluating the BM from which I could undertake a SDOF analysis of the door as a whole. Your spreadsheet will be invaluable.

Like

• dougaj4 says:

Glad you found it useful Steve.

Feel free to ask if anything isn’t clear, or suggest improvements and/or extensions.

Like

• Stephen Ward says:

Thank you, I am trying to edit the SSSpan worksheet as this best suits the side frame of a blast resistant door. Can I call you to discuss a few questions?

Regards

Stephen Ward Director

[cid:image001.png@01CE562C.A9E8F750]

Kingsmark Structural Ltd 32 Huntfield Road, Chepstow, NP16 5SA UK

Tel +44 (0)1291 626656 | Mob +44 (0) 7765 013408

Like

• setu says:

sir m having same problem of macaulay’s problem ..I have to submit this project in matlab ….please help me if u free

Like

• george says:

Any chance of a copy of excel sheet, link will not work for me

Like

3. dougaj4 says:

Steve – I’m off to bed now (Sydney time is 10 hours ahead of GMT (+9 UK summer time), but if you send me an e-mail to dougaj4 at gmail I’ll send contact details.

Like

4. dougaj4 says:

setu – I can’t help with matlab. If you have any specific questions with the spreadsheet feel free to post them here.

Like

5. dougaj4 says:

Comment received from Luis Barragan:

Just wanted to mention: Dr Colin Caprani’s site has desappeared. What do you know about this?
Thank you!

Like

• dougaj4 says:

Luis – I had a message from Colin that his site was down because of a problem with his service provider. That was some time ago so he probably has other priorities.

Like

6. Pascal Marggraff says:

I Have a proble with to roller supports in distances of 0.5 and 2.5(from left hand side) meters respectively.And a few pointloads. Can I still use your spreadsheed, because I see its only or a cantilever beam?

Regards
Pascal

Like

• dougaj4 says:

Please send an example to dougaj4 at gmail and I will have a look.

I don’t understand your second question. The continuous beam functions in the spreadsheet will work for any number of spans, with or without cantilevers at the ends.

Like

This site uses Akismet to reduce spam. Learn how your comment data is processed.