Continuous beam analysis with cubic splines

The last example in the previous post illustrated the use of cubic splines to find the bending moments in a continuous beam subject to prescribed lateral displacements.  A similar technique can be used to find bending moments, shear forces, reactions, and displacements in a continuous beam subject to lateral forces.  The spreadsheet SplineBeam.zip contains a description of this technique and a User Defined Function (UDF) to perform the analysis.

In outline, the procedure is:

For each loaded point:

  1. Apply unit deflection
  2. Fit cubic spline and find the curvature and bending moment in the segments either side of the loaded point
  3. Load = change of bending moment gradient at the point load
  4. Scale bending moments by Applied Load / Load for unit deflection

Sum bending moments for each loaded point

Calculate shear forces and reactions from bending moment diagram

This procedure is illustrated in this example for a single point load on a three span beam (click on any image below for a full size view):

SplineBeam1

Calculation of beam actions and deflections for a single point load on a 3 span beam

The beam support positions are specified with a Y value of zero in column B, and a deflection of -1 is entered for the load at X = 17.5.  The beam slope and curvature at each node and the load location are generated by the UDF CSPLINEA() (see previous post). 

 The bending moment in column G is simply the curvature multiplied by the beam flexural stiffness, EI; where E is the Young’s Modulus and I is the second moment of area of the beam cross section.

The force in column H is the force required to generate the prescribed unit deflection, and is equal to the change in slope of the bending moment diagram at the load position.   Dividing the specified applied load (100 kN) by the force for unit deflection gives the factor to be applied to the calculated bending moments; in this case -5.67E-04.  The beam actions and deflections in Columns I to K are found by multiplying the corresponding action under unit deflection by this factor.

SplineBeam2

Bending moments for a single point load on a 3 span beam

This procedure has been incorporated in the UDF SPLINEBEAM() which can be used to analyse continuous beams with any numbers of spans and any number of point loads:

SplineBeam3

SplineBeam input and top of output for a 3 span beam with 4 point loads

Note that loads can only be applied at node positions, and nodes are generated by dividing each beam into a specified number of equal length segments.  Nodes are numbered from 1 to number of segments + 1 from left to right for each beam.

SplineBeam4

Bending Moments for 3 span beam with 4 point loads

 

SplineBeam5

Deflections for 3 span beam with 4 point loads

 

SplineBeam6

Bending Moment output from the same analysis in Strand7

The same analysis performed in Strand7 gives identical results.

Cubic Splines

Cubic splines are used to fit a smooth curve to a series of points with a piecewise series of cubic polynomial curves.  In addition to their use in interpolation, they are of particular interest to engineers because the spline is defined as the shape that a thin flexible beam (of constant flexural stiffness) would take up if it was constrained to pass through the defined points.  This post will present an Excel User Defined Function (UDF) to generate a “natural” cubic spline for any series of 3 or more points.  Later posts will look at alternative spline formulations, and applications of the cubic spline to structural analysis.

A cubic spline is defined as the curve that for any two adjacent internal points:

  1. The curve passes exactly through both points
  2. The slope of the curve at the end points is equal to the slope of the adjacent segments
  3. The curvature of the curve at the end points is equal to the curvature of the adjacent segments

Alternative provisions for the end segments will generate different spline curves over the full extent of the curve.  The most common provision for the ends is that the curvature is zero at both ends.  This is known as a “natural cubic spline”.  In a structural analysis context this corresponds to a beam that is free to rotate at both ends, but is constrained in position at the ends and a number of internal points.

Further details of the theory of cubicl splines, and an algorithm for generating natural cubic splines are given in this Wikipedia article.

An excel spreadsheet with a UDF for generating cubic splines, based on the algorithm in the Wikipedia article, can be downloaded from: CSplineA.zip

The download is open source, and full VBA code for the UDF is freely accessible.

Example screen shots from this file are shown below:

Csplinea Function

Csplinea Function

Example 1; Fit spline to 5 data points

Example 1; Fit spline to 5 data points

 

Example 1; Fit spline to 5 data points

Example 1; Fit spline to 5 data points

 

Example 2; Fit spline to 9 data points on a circular arc

Example 2; Fit spline to 9 data points on a circular arc

 

Example 2; Fit spline to 9 data points on a circular arc

Example 2; Fit spline to 9 data points on a circular arc

 ”Dummy” data points at each end allow the curvature at the start and end points to be adjusted to the required value.

Example 2; Fit spline to 9 data points on a circular arc

Example 2; Fit spline to 9 data points on a circular arc

 

Example 3; Fit spline to the deflected shape of a 3 span beam

Example 3; Fit spline to the deflected shape of a 3 span beam

 

Example 3; Fit spline to the deflected shape of a 3 span beam

Example 3; Fit spline to the deflected shape of a 3 span beam

 

Polynomial coefficients from example 3

Polynomial coefficients from example 3

 

Example 3; Bending Moments

Example 3; Bending Moments

Bending moments are calculated by multiplying the curvature at each point by the beam flexural stiffness, EI.

Long Hair in Newquay

Talking of 1960’s UK folkies, I think this is hilarious.  Wizz Jones stars in the battle of the long-haired beatnicks v Newquay Town Council:

More Acoustic Routes

Parts 2-8 of Acoustic Routes have now been uploaded to Youtube.

Part 2:

Double click on the link above to go to Youtube and find the remaining 6 parts.

A catenary function

Following on from the previous post, here is an Excel User Defined Function (UDF) to calculate the coordinates of any specified catenary, with the option of also finding the tension force at any point.

Download from: Catenary.zip

The download file includes full open source code.  To view the results of the function it must be entered as an array function, i.e.:

  1. Enter the function in the top left cell of the output range.
  2. Select the entire output range.
  3. Press F2
  4. Press Ctrl-Shift-Enter

See screen shot below for typical input and output (click on the image for a full size view):

Catenary UDF

Catenary UDF

Elegant proofs 4 – The optimum shape of an arch

Large span arch structures have been constructed for well over two thousand years, but the first recorded analytical treatment was given by Robert Hooke in 1675 who at the end of his treatise on helioscopes added the following statement “to fill up the vacancy”:

“The true mathematical and mechanical form of all manner of arches for building, with the true butment necessary to each of them. A problem which no architectonick writer hath ever yet attemted, much less performed. abcccddeeeeefggiiiiiiiillmmmmnnnnnooprrsssttttttuuuuuuuvx” *

The solution to this anagram (no doubt written as such to annoy Newton) was published in 1705, after Hooke’s death as:
“Ut pendet continuum flexile, sic stabit contiguum rigidum inversum”
which translates as:
“As hangs the flexible line, so but inverted will stand the rigid arch”

In other words, the shape of a flexible line, a catenary, which is in pure tension, will if inverted be in pure compression, and hence the ideal shape for an arch. The same realisation was apparently used by the builders of the The Roof of the Taq-i-Kisra some 1000 years earlier, but in general the shape of large span arch structures is not a catenary, circular or elliptical shapes being almost universally used for masonry arch bridges, and parabolic shapes for free standing arches.  It is often suggested that these alternative shapes are used as convenient approximations to a catenary, but in fact there are two additional factors which change the optimum shape for arch structures:

  1. The catenary is the optimum shape for a free standing arch of constant cross section, but in a typical arch bridge the majority of the weight will be in the bridge deck, and the optimum supporting shape will tend towards a parabola.
  2. For arch structures in which the roadway is supported on fill (such as typical masonry bridges) the fill applies horizontal loads to the arch, as well as vertical, and the optimum supporting shape will tend towards a circular or elliptical arc for very high fills, or some more complex shape for shallower fills.
Arch bridge at Totnes, Devon

Arch bridge at Totnes, Devon

More details can be found at: Arch Structures

* Interestingly, all transcriptions of the anagram I have found on the Internet insert an additional e, but the reproduction of the original publication here clearly shows that there are only 5 e’s, and this is consistent with the solution of the anagram.  This appears to be an example of Stephen Jay Gould’s ”Fox-terrier fallacy” where an erroneous statement becomes accepted through repeated copying.

Applied Mechanics of Solids

Applied Mechanics of Solids is a free text on finite element analysis by Allan F Bower, who seems to have a gift for clear explanation of the topic combined with a wry sense of humour; not a combination you see every day in this field:

“This electronic text summarizes the physical laws, mathematical methods, and computer algorithms that are used to predict the response of materials and structures to mechanical or thermal loading.

Topics include: the mathematical descriptions of deformation and forces in solids; constitutive laws; analytical techniques and solutions to linear elastic and elastic-plastic boundary value problems; the use and theory of finite element analysis; fracture mechanics; and the theory of deformable rods, plates and shells.

Over 400 practice problems are provided, as well as demonstration finite element codes in MAPLE and MATLAB.

The text is intended for advanced undergraduate or graduate students, as well as practicing engineers and scientists. It will be particularly useful to readers who wish to learn enough about solid mechanics to impress their teachers, colleagues, research advisors, or managers, but who would prefer not to study the subject in depth.”

Adding Function Categories and Descriptions

User defined functions (UDF’s) are by default added to the “User Defined” category in the function list, and when a UDF is selected the words “no help available” appear, rather than a description of the function and it’s parameters.  A rather complex way of getting the full functionality of the built-in function descriptions is given at:  Registering a User Defined Function with Excel.  In this post I will describe a much simpler method to achieve the same end, but with the restriction that the total number of characters in the description must be less than 256.

The simple method uses a four column table in the workbook containing the functions as shown below:

Click for full-size view

Click for full-size view

The columns are:

  1. The function name
  2. The category name
  3. A 1 on any continuation lines
  4. The function description, with descriptions of each parameter on a separate line

Assign the range name “functionlist” to the list, excluding the column headings.

The macro listed below will create the category names and add the function descriptions to the function list:

Sub FuncDescriptions()
Dim FunctionA As Variant, NumRows As Long, NL As Long
Dim FuncName As String
Dim Descript As String
Dim Cat As Variant
Dim i As Long, j As Long
FunctionA = Range("functionlist").Value
NumRows = UBound(FunctionA)
On Error Resume Next
With Application
i = 1
Do While i <= NumRows
If NL = 0 Then
FuncName = FunctionA(i, 1)
Cat = FunctionA(i, 2)
Descript = FunctionA(i, 4)
Else
Descript = Descript & vbCrLf & FunctionA(i, 4)
End If
If i < NumRows Then NL = FunctionA(i + 1, 3)
If NL = 0 Or i = NumRows Then
.MacroOptions Macro:=FuncName, Description:=Descript, Category:=Cat
End If
i = i + 1
Loop
End With
End Sub

To run the macro automatically add:

Private Sub Workbook_Open()
FuncDescriptions
End Sub

under “ThisWorkbook”

Example code has been added to the String Functions worksheet here: StringFunctions.zip

Bert Jansch – Acoustic Routes

Just appeared on YouTube; the first part of a documentary about the music, life and times of Bert Jansch, made in 1992, including a rare appearance from Anne Briggs and commentary from a very youthful looking Billy Connolly.

Great Stuff!

Is light a wave or a particle?

This clever ambigram from Douglas Hofstadfter provides the answer:

Is light a wave or particle?

Is light a wave or particle?