https://www.eng-tips.com/viewthread.cfm?qid=501339

The beam analysis functions in the ConbeamU spreadsheet allow for the use of any SI units, or any non-SI units found in the long list included with the spreadsheet. I usually use all SI units, but in this case I was wanting to use kip and foot units with the SSSpanU function, and found that the function did not work with the units as entered, and did not provide any indication of the problem. To improve that, I have added to the list of non-SI units (as described below), and modified the code so that it gives a more helpful message when input units are not recognised. The updated spreadsheet can be downloaded from:

The Eng-Tips discussion linked above concerned ways of finding the maximum deflection of a beam under non-symmetrical loading. This can be easily done using the SSpanU function together with the Excel Solver. A similar procedure can also be used with the ConBeam function. Input for an example beam is shown below (click image for full size view):

- Input and output units have been set to kip and feet units, with output deflections in inches.
- Unused inputs (support stiffness and point moment loads) have been left as SI units. These would normally be set to the same units as the other inputs, although mixed units will be converted and calculate correctly without a problem.
- Output was originally set to display at 2 foot intervals, as listed in column I

The screenshot blow shows the Solver input to find the point with maximum deflection. In general, with non-symmetric loading, this will not be at mid-span or at the point of maximum bending moment.

By inspection, the maximum deflection was seen to be between 13 and 14 ft from the left support. To use the Solver the deflection output for 14 ft has been multiplied by 1000 in cell O28. This is used as the Solver “objective value”. The Solver is set to minimise this value by changing the output location in cell I28. The Solver adjusts the value to 13.9234, with a deflection of -1.028 inches.

There are two reasons for using the factored value in O28, rather than the function output in N28:

- The SSSpanU function is entered as a dynamic array in cell J21. Excel displays the whole output array, but the Solver function does not recognise the cells other than J21 as containing a formula. You therefore need to enter another formula outside the array range, referring to the cell you want to maximise or minimise.
- For results that have a small numerical value such as deflections the Solver default tolerance may result in an inaccurate result.

The location and value of the maximum bending moment is found in a similar way, except the formula in cell O27 does not factor the moment value, and the Solver is set to maximise this value.

The latest version of the units functions now returns a more helpful message if it does not recognise one of the supplied units, as shown below:

The non-SI units list has now been modified to recognise the following abbreviations:

- kip or kipf is recognised as 1000 lbf
- Bending moments may be entered with a space (kip ft) or a point (kip.ft) and using kip or kipf
- Flexural stiffness (EI) may be entered as kipf.ft2, kip.ft2 or kip ft2

Non-SI units are listed on the Ext Unit List sheet. Adding new abbreviations to this list is easy. The example below shows kip.ft added to the list:

- Find the unit type you want to add to (e.g. “moment”).
- Insert a blank row below one of the existing units in that row.
- Copy the row above down into the new row.
- Enter the new unit abbreviation under Symbol (Column C).
- Check that columns E to H are copied correctly, and that the SI Factor is correct.
- Save the spreadsheet, close and re-start.

The beam consists of 3 spans, with lengths of 16 m, 21 m, and 16 m, and with post-tensioned reinforcement with parabolic profiles as shown above. The cable is assumed to be stressed at both ends, with an applied force of 1494 kN. The variation of force along the cable, calculated to AS 3600 friction losses, is shown in the graphs below.

The following methods were used to find the bending moments along the beam due to the prestress force, including secondary moments:

- 1: Apply prestress loads directly to beam; apply friction losses to AS 3600

a: Apply vertical loads to nodes on prestress cable profile, connected to beam with rigid link.

b: As a) + horizontal loads.

c: Apply point moments to beam at mid-segment locations.

d: As c) but apply moments at segment ends. - 2: Include prestress cable in the model, apply preload to the cable.

a: Connect cable to beam with rigid links, apply prestress as uniform average load, cable modelled as string group of truss elements.

b: As a) except include friction losses to AS 3600

c: As b) except no string group. Apply prestress as 3 uniform loads based on average load for each span.

d: As c) except cable modelled with beam elements.

e: As d) except links modelled with beam elements

f: As c: except prestress applied with friction losses to AS 3600 - 3: Include prestress cable, apply loads to the end of the cable. Cable modelled as beam elements, connected with friction contact elements.

a:) End loads applied as pre-strain applied to “jack elements”.

b:) End loads applied as point loads applied to the cable ends and equal and opposite loads to the beam ends.

The analysis results shown below were generated with the Strand7 FEA program. Note that other programs may return significantly different results, especially for models including “string groups” or friction elements. The graphs below show the axial force along the prestress cable, compared with the calculated forces applied to the Type 1 beams. Results are shown for the left hand half of the beams, which are symmetrical about the mid-length.

The force distribution for all the Type 1 beams was calculated according to AS 3600. The step in the diagram is due to the deviation in the cable profile at the internal supports. A revised example with a more realistic profile will be examined in a later post, but for now the simplified profile has been maintained for consistency with the book calculation.

For beams 2a and 2b the prestressing cable was modelled as a string group, which behaves as a cable passing over frictionless pulleys, so any applied forces are equally distributed over the length of the cable. For beam 2a the average force from the AS 3600 distribution was applied over the full length. For beam 2b each beam segment in the model was assigned a different force, but these have been averaged over the string group, resulting in a slightly higher average force than my calculation.

For beam 2c the cable was not modelled as a string group, but as a series of truss elements, connected to the beam with rigid links. The cable in each span was allocated the average force for that span. The interaction of the prestressed cable with the beam concrete resulted in the line shown above.

Beams 2d and 2e were similar to 2c, except they were modelled with beam elements, rather than truss elements, and 2e was connected to the main beam with beam elements rather than rigid links. All 3 generated very similar loads along the cable.

Beam 2f was the same as 2c, except that a different prestress force was allocated to each segment. This has resulted in a profile following the trend of the AS 3600 line quite closely, but with a reduced force. In a later post the applied prestress force will be adjusted to allow for the distribution of the prestress force into the concrete.

Beams 3a and 3b were both modelled with beam elements connected to the main beam with friction elements and rigid links. The prestress force was applied to the ends of the cables, through a pre-strain applied to beam elements representing the stressing jacks for Beam 3a, and with direct axial forces applied to the ends of the cable for Beam 3b, with equal and opposite forces applied to the ends of the main beam. In both cases there were significantly reduced prestress losses in the end spans, compared with AS 3600, but the loss at the support was greater, and forces for the middle span were well matched. It should be possible to get a closer match to the AS 3600 forces by adjusting the friction element parameters. This will be examined in a later post.

The results for all beams are summarised below, showing the calculated prestress force at mid outer and internal spans, and bending moments due to the prestress at mid-spans and at the internal piers. The beams were also analysed with no internal supports, and the difference between these two values is the secondary moment.

Of the four models where prestress actions were applied directly to the main beam, 1b is the most accurate since this included the effects of horizontal loads. Comparing the other models with 1b:

- The models using a string group for the prestress cable (2a and 2b) had exactly equal prestress force over the beam length, even when the applied force was varied along the length. This results in significantly different behaviour, the main difference in this case being higher bending moments in the central span.
- The three models without string groups, but where the prestress was applied as the average load over each span (2c, 2d, 2e) gave better results, but the prestress distribution was still significantly different from model 1b, which may result in significant errors in some cases.
- For model 2f the prestress was applied as a different load for each segment. The resulting load followed the trend of loads calculated with AS 3600 friction losses, but was significantly lower over the full length, resulting in significantly lower bending moments at each section, compared with 1b. In future analyses the prestress load will be adjusted for this case, so that loads are equal to the required values after transfer.
- Models 3a and 3b had friction contact elements connecting to the main beam, with prestress loads applied as a strain in an element representing the stressing jack, or as applied end forces. In this case the end loads were adjusted so that they matched the required force at the beam ends, but the parameters used for the contact elements resulted in lower friction losses over the end spans.

In the next post in the series models 2f, 3a and 3b will be investigated in more detail to provide a better fit of the cable forces to that found using AS 3600 friction losses. The cable profile will also be modified over the internal supports to follow a realistic profile for a continuous cable.

]]>Although I am a huge fan of

The Hitchhiker’s Guide to the Galaxyin all its incarnations and have been quoting from it nearly all my life, I think Douglas’s single best line of writing actually comes fromThe Salmon of Doubt(a collection of previously published and unpublished material that was published one year after his untimely death):This is rather as if you imagine a puddle waking up one morning and thinking, ‘This is an interesting world I find myself in — an interesting hole I find myself in — fits me rather neatly, doesn’t it? In fact it fits me staggeringly well, must have been made to have me in it!’ This is such a powerful idea that as the sun rises in the sky and the air heats up and as, gradually, the puddle gets smaller and smaller, frantically hanging on to the notion that everything’s going to be alright, because this world was meant to have him in it, was built to have him in it; so the moment he disappears catches him rather by surprise. I think this may be something we need to be on the watch out for.

For many more see: https://www.quora.com/Which-was-Douglas-Adams-single-best-line-of-writing

]]>Bert at the BBC from bandcamp:

https://bertjansch.bandcamp.com/album/bert-at-the-bbc

… and for something completely different, assorted recordings from Tom Lehrer:

]]>The code also includes the OptShearCap3600 function, described in the previous post.

The python code requires pyxll to connect to Excel. If this is installed, and “RC_UMom” is added to the list of modules to load at start-up in the pyxll.cfg file, the new functions should be available from any spreadsheet.

The included functions are:

py_UMom: ULS design of rectangular sections with two layers of reinforcement under combined bending, axial load, shear and torsion, to Australian and international codes. (Provision for prestressing will be added in the near future):

py_UmomPF: As above, but for Eurocode and British codes using a partial factor approach:

MaxAx: Maximum axial load for short or slender columns:

Devlength: Reinforcement development length to Australian, Eurocode, or British codes:

ShearCap3600: Shear capacity to current AS 3600 and 5100.5:

OptShearCap3600: Optimise shear capacity for given moment/shear ratio by adjusting the compression strut angle:

Extracts of the OptShearCap3600 function code are shown below. The scipy.optimize.brentq function is used to adjust the applied loads to be equal to the design section capacity:

```
# create list of arguments for the py_Umom function, called by the Scipy brentq function
args = [InCells, Puin, 13, 1, Muin, [] , ShearReo, Code, VTuin]
# Use scipy.optimize.brentq to adjust the input shear force to be equal to the design capacity
try:
res = sopt.brentq(call_Umom, mincap, maxcap, args = args, maxiter = 100)
except:
outA[0,0] = 1
return outA
# The call_Umom function adjusts the input loads in proportion to the shear force
# passed by brentq, then calls py_Umom and returns the difference between the
# applied shear and shear capacity
def call_Umom(Vstar, args):
args[8][0,0] = Vstar
args[4][0] = Vstar * MoV
if ToV != 0: args[8][0,1] = Vstar * ToV
if PoV != 0: args[1][0] = Vstar * PoV
res = py_Umom(*args )
return res[1]
```

Similar procedures are used to adjust the applied moment when this is critical, or the compression strut angle in the intermediate range, so that both shear and moment capacities are equal to the applied actions.

]]>- The design shear capacity reduces with increasing tensile strain at the mid-depth of the section, and the tensile strain increases with increasing applied moment and shear force. To find an accurate upper limit to the shear capacity it is therefore necessary to carry out an iterative analysis to match the applied shear force, and associated bending moment, with the shear capacity of the section. This is particularly important for the assessment of existing structures, where it is a requirement to find the actual maximum capacity of the structure, rather than designing for predefined maximum loads.
- The maximum shear capacity may be controlled by the shear failure or by the combined effect of bending, shear and torsion on the longitudinal force on the tensile reinforcement.
- As discussed previously, where the section capacity is controlled by the longitudinal tension force the design capacity can be increased by increasing the angle of the shear compression strut. This also requires an iterative process.

I have now written a Python function to carry out the iterations using the Scipy brentq function with the procedure outlined below:

- From the input data calculate the ratios: moment/shear (M/V) and torsion/shear (T/V)
- Adjust the shear force and associated actions so that the applied shear force equals the design shear capacity.
- If the design bending capacity, reduced for the longitudinal force due to shear and torsion, is greater than the applied moment then return the results, else:
- Set the shear compression strut angle to the maximum value allowed by the code (50 degrees) and adjust the shear force and associated actions so that the applied moment is equal to the reduced design bending capacity.
- If the design shear capacity is now greater than the applied shear force then return the results, else:
- Adjust the shear compression strut angle so the ratios Applied Shear/Design Shear Capacity and Applied Moment/Design Moment Capacity are equal.
- Adjust the shear force and associated actions so that the applied shear force equals the design shear capacity.
- Repeat 6 and 7 until the ratio of applied actions/design capacity equals 1 for both shear and bending.

Typical function output is shown in the screenshot below:

In this example the section has been analysed for a constant shear force with an increasing M/V ratio. The function output (Columns K to O) is:

- Design shear capacity, and the associated bending moment for the input M/V ratio.
- The “excess capacity” for shear and bending. Note that this has three zones where the capacity is initially controlled by shear only, then both shear and moment are at full capacity, then the adjusted bending capacity controls.
- The compression strut angle (Theta). The strain values in Column P are calculated with a simple on-sheet formula.

These results are plotted below with typical shear and bending loads, taken from a heavy road vehicle travelling over an 8 metre simply supported span, with the loads plotted at 0.4 and 1.0 metres from the support. The capacity is also plotted with no adjustment of the compression strut angle, showing a significantly reduced capacity.

Plotting the section capacity as a moment-shear interaction diagram allows the loads from all sections with identical reinforcement to be plotted on the same section, and load cases where the applied loads exceed the section capacity are immediately visible.

This is a work in progress, but a spreadsheet with all necessary Python files will be available for download shortly.

]]>One drawback with this approach is that text in an Excel cell must be ASCII or Unicode, which has limited capabilities for presenting maths text in a readable form. Excel does allow elaborate maths equations to be generated and displayed, but as far as I know there is no way to interact with these equations from VBA, so they can neither be generated by code, or evaluated by code.

Python on the other hand has libraries that will convert plain text equations to Latex (and other formats), and display Latex code. I have now written a Python function “plot_math” using a combination of Sympy, Pint, and Matplotlib to:

- Read any maths function from the spreadsheet
- Convert the text to Latex format
- Return a graphic image of the function
- Optionally evaluate the function using a table of values for each parameter
- Optionally adjust for the units of the input and output values.

The new code can be downloaded from:

The spreadsheet requires the following software:

- Python
- pyxll
- Numpy
- Scipy
- Pint (which includes sympy and mpmath)
- Matplotlib

The download file includes two Python files:

- startup_min.py
- py_Units4Excel.py

Startup_min.py includes the plot_math function, and should be added to the list of files to open at start-up in pyxll.cfg.

Note that this is a work in progress. If you have any problems with installation or running the programs, please let me know.

Some examples of the new function in action are shown below:

The text to be displayed (and optionally evaluated) should be entered as plain text at any chosen location. In the example below the plot_math function is then entered in the cell immediately above (C12).

When the plot_math function is entered the image will display immediately below:

The image can then be dragged to the desired location; in this case so that the original text and the function return value (0) are hidden. In this example the numerical value of the function for selected input values is displayed using the py_Evalu function.

Alternatively the plot_math function will return the value of the function if suitable input data is selected:

In this case a three column data range has been selected, and also an output unit, so the calculation will be unit aware:

As before, the image is displayed immediately below the plot_math input cell, but can be dragged to any desired location:

Some other features to note:

- If the data range has only two columns (variable name and value) the calculation will have no units.
- If the output unit is omitted, and the data range has three columns including units, the output value will be in base SI units.
- Names of Greek letters (e.g. alpha) will generate the Greek character
- In some case Greek letter names will be the name of a standard maths function (e.g. Gamma), in which case the text should be followed by an underscore (gamma_)
- Some English letters also represent standard maths values (e.g. e and i). If an upper-case E or I is required, these should be entered followed by an underscore, and will then be displayed in upper-case, without the underscore.
- The exponentiation symbol may be entered in either Excel (^) or Python (**) format. In either case the exponent will display as a superscript, and the calculation will be correct

An excellent cover of Anne Briggs’ song, Go Your Way:

And Anne Briggs herself singing the song, accompanied by Bert Jansch:

And another cover (posted here 12 years ago yesterday):

]]>The new version includes a number of corrections to the calculation of beam shear and torsion capacity to AS 3600 and AS 5100.5:

- Shear capacity under negative bending moments has been corrected.
- The sign of reported shear capacity is now the same as the input shear force (previously any input with negative moment returned a negative shear capacity).
- The contribution of any negative torsion to longitudinal tension forces, to AS 3600, was taken as zero. This is actually in accordance with equation 8.2.7(3) of the code (since Amendment 2), but clearly the absolute value of the torsion should be used.

In addition, the new version allows the minimum angle of the concrete compression strut to be specified, between 29 and 50 degrees. The specified angle is used to calculate a minimum value for the mid-depth strain, which is also used in the calculation of the kv factor. Increase in the mid-depth strain value is allowed under Cl. 8.2.4.2 in both AS 3600 and AS 5100.5.

Use of the compression strut angle adjustment is shown in the screen-shots below:

A beam has design loads of 400 kNm bending moment, and 275 kN shear force. With 10 mm shear reinforcement the shear capacity is just adequate, but taking account of the longitudinal forces due to shear the bending capacity is reduced to 371 kNm:

Increasing the shear reinforcement to 14 mm diameter increases the shear capacity, but using the code calculated compression strut angle to AS 3600 the reduced bending capacity is unchanged. (Note that AS 5100.5, and earlier versions of AS 3600, have a substantial increase in the bending capacity when the shear reinforcement is increased. This is discussed further below):

Entering a compression strut angle of 49.6 degrees (with the “Use simplified” option set to “False”) reduces the shear capacity back down to the required value (275 kN), but the moment capacity is now increased to 416 kNm. Note that any further increase in the shear reinforcement would have negligible effect (to AS 3600) because the compression strut angle is already very close to the maximum value of 50 degrees:

The effect of increasing the shear reinforcement on the adjusted bending capacity with different codes and approaches is shown in the graph below:

The lines are:

- 1) AS 3600, Amendment 2 or 3, default compression strut angle.
- 2) AS 3600 with compression strut adjusted to maintain constant shear capacity.
- 3) AS 5100.5, default compression strut angle.
- 4) AS 5100.5 with adjusted compression strut angle.
- 5) As 3), but shear reinforcement force limited in accordance with the Canadian Bridge Code.

So what is going on here?

In AS 5100.5 (and AS 3600 up to Amendment 1) the longitudinal force due to shear is defined as:

Vus is proportional to the area of shear steel, and is not limited, so increasing the shear steel area allows the value of DeltaFtd to be reduced to zero, even though in reality the actual force in the steel cannot be greater than the applied shear force (V*) minus the concrete shear force. The large increase in bending capacity with increased shear steel shown by line 3) is therefore not realistic.

Increasing the compression strut angle (Thetav) with the AS5100.5 equation reduces cot(Thetav), which reduces Vus, but also reduces DeltaFtd. The resulting calculated bending capacity is still unrealistic for large areas of shear reinforcement.

In AS 3600 Amendment 2 the equation for longitudinal force due to shear was revised to:

If the shear capacity of the section is exactly equal to V* then this equation is equivalent to the AS5100.5 version, but increasing the area of the shear reinforcement has no effect on Vuc, so there is no reduction in DeltaFtd, and the bending capacity remains constant, as seen in line 1.

In this case however increasing Thetav, which reduces cot(Thetav) reduces both Vuc and the resulting value of DeltaFtd. Increasing the shear reinforcement area therefore allows Thetav to be increased (so that the shear capacity remains equal to the design shear force), which reduces DeltaFtd, with the nett result that the bending capacity is very close to the values found from the AS 5100.5 equation, until Thetav reaches the upper limit of 50 degrees, after which the bending capacity remains constant (line 2).

Finally the Canadian Code requires the value of Phi.Vus to be limited to V*. In this case this restriction is more conservative than the approach taken in AS 3600. Bending capacities are similar to the other results for small shear reinforcement areas, but the maximum bending capacity is significantly lower than that found with AS 3600 with adjustment of the compression block angle.

In summary:

- The AS 3600 equation with default compression block angle is conservative, but shows no benefit from increased shear reinforcement area.
- Applying adjustments to the compression block angle, in accordance with the code, the AS 3600 equation gives results very close to those from AS 5100.5, up to a reasonable limit (i.e. maximum angle of 50 degrees, equivalent to a maximum mid-depth strain of 0.003).
- If the shear reinforcement area is increased well above the area required for the design shear force the AS 5100.5 equation gives bending capacity results that are highly unconservative.
- If design is required to follow the current AS 5100.5 (Amendment 1), it is recommended that the Canadian code limit (Phi.Vus < V*) be applied.

- A large number of Numpy functions added.
- Return function help documentation to the spreadsheet for a selected function.
- View Numpy on-line documentation from the function Wizard.

The new version can be downloaded from:

As before, the pyxll add-in is required for the connection from Excel to Python.

All the available functions are listed on the first sheet. Enter the index number for a function in cell F4, and the help for that function will be displayed:

The on-line help for all the listed Numpy functions can also be accessed quickly and easily through the Function Wizard.

Select a function and click on the “Insert Function” icon (immediately to the left of the Edit bar):

Then click “Help on this function” in the bottom left corner:

The Numpy on-line help for the selected function is displayed.

Note that this is a work in progress. Connecting to the on-line help requires a different html path to be generated for each function, and the path names are not always consistent. If you find any Numpy functions where the help is not displayed, please let me know.

]]>