Anaïs Mitchell is an American singer-songwriter and musician, here performing another version of Tam Lin with Jefferson Hamer:

More on Anaïs Mitchell at Orpheus for the age of Trump: Anaïs Mitchell on her folk opera Hadestown.

The Melbourne Scottish Fiddle Club is an amateur group that explores the lively sounds of Scottish music, with repertoire that both acknowledges and reinvents traditional roots:

]]>I have made use of the EvalU spreadsheet, which evaluates functions entered as text, including evaluation of units. This spreadsheet is useful for anyone who wants to evaluate functions in Excel, so is worth a look even if you don’t work with reinforced concrete.

The EvalU spreadsheet can be downloaded from:

The input for the examples presented in this post is shown below:

All user-input cells are shaded, grey for numerical data and light blue for units, but note that no cells are protected.

The highlighted cell, J12, illustrates the use of the EvalU function to evaluate the simple function entered in H12:

- Input is the function to be evaluated (H12), the input data range (D11:F12), and the output units (K12).
- The input data range is a 3 column range listing all symbols used in the function, their values, and their units.
- The input data must be a continuous range, with text in every row of the first column, but any symbols not used in the function will be ignored.
- Unlike Excel range names, the symbols are case sensitive.
- The value of pi could be entered as input data, but as pi() is a built in Excel function it may be included in the function in Excel format, i.e. including the ().

The first example finds the depth of the NA under ultimate loads, for the axial load specified in cell E20, assuming a rectangular concrete stress block with constant stress alpha * f’c and depth gamma * x, where:

- alpha and gamma are code specified constants
- f’c is the specified concrete compressive strenth
- x is the depth of the NA (to be determined)

The steel reinforcement is assumed to be yielded, with a stress equal to the specified yield stress.

The depth of the NA, x, is then given by the expression in D34, with the EvalU function in D36:

The calculated value of x (108.8 mm) is checked to ensure that the nett reaction force is equal to the applied load (1000 kN), and the steel strain is checked to ensure that it is greater than the steel yield strain.

If the applied axial load is increased, the depth of the NA increases, and the strain in the reinforcement reduces so that at some point the steel strain will move into the elastic region, and the steel stress will depend on the depth of the NA, x:

steel stress, fst = epsc * (Dt-x)/x * Est

epsc = maximum concrete compressive strain

Dt = depyh of reinforcement from the compressive face

Est = steel Young’s Modulus

Equating the sum of concrete and steel forces to the applied load yields the quadratic equation for x, shown in bold below:

Solving this equation for the positive x value finds the depth of the neutral axis, which is checked above to ensure that the sum of the reaction forces is equal to the applied load, and the steel stress is less than the yield stress.

Note that the b coefficient of the quadratic equation includes the value of the increased axial load. The Evalu function has been modified to allow an optional additional range of input data; for example b is given by: =EvalU(C58,$D$6:$F$19,G58,$C$54:$E$54)

A similar approach can be used to determine the depth of the NA under a specified bending moment, with zero axial load and both steel and compressive concrete strain within the elastic region. In this case the concrete stress is not known, but if both concrete and steel are in the elastic range then the NA depth is constant for any applied moment. If the maximum concrete stress is assumed to be equal to x (depth of NA), then the concrete force is equal to the first moment of area of the concrete above the NA, and the depth x is given by the quadratic function shown in bold below:

If the axial load is not zero, the NA depth is no longer constant for varying bending moment, but the eccentricity of the reaction force must be equal to the eccentricity of the applied load, or to avoid division by zero when P = 0, equate P/M for the applied loads and reaction. As shown below, this yields a cubic equation in x, which can be solved with the user defined function (UDF) Cubic:

The calculated x value is then used to find the bending moment and axial force assuming unit maximum concrete stress; and then the bending moment for the actual applied axial force:

]]>

“vUsing adjHungarian nNotation vMakes nReading nCode adjDifficult”

But what really made the post useful for me was a comment from Freek van Gilst, who posted a couple of very useful keyboard short-cuts available in VBA:

]]>When you have the cursor on a variable you can press Ctrl-i to get a tooltip with the type (and scope).

Or press Shift-F2 to jump to the declaration (and Ctrl-Shift-F2 to return to your original position).

But if we enter three text strings with 16 or more numerical characters, that are only different in the 16th or later characters, COUNTIF will say they are all the same:

This problem was reported by John Walkenbach at Daily Dose of Excel, back in 2006. The solution given then used the SUM function as an array function: =SUM((A1:A3=A1)*1). The alternative shown below gives the same results. Note that using SUM the function must be entered as an array, using Ctrl-Shift-Enter.

An alternative that does not require array function entry is to use the SUMPRODUCT function:

But after 11 years Lori Miller returned to Daily Dose of Excel with a way to get COUNTIF to work correctly. Precede the address of the criterion cell with CHAR(173)&:

CHAR(173) is a “soft hyphen” character, which will ensure that the contents of the data range are treated as text strings, rather than numbers, but is otherwise ignored. Now all numeric text strings of any length may be entered, and they will only be counted as being the same if they really are.

]]>The disappointing (but not very surprising) thing about the survey is that although it has several questions about areas of work, it does not use the words “engineer” or “engineering” once. So all you engineering Excel users out there, please complete the survey, and let Microsoft know what you use Excel for.

_________________________________________________________

Has the free software at this site saved you time and/or money?

If so, please contribute to the Raw Impact charity group providing practical help to poor communities in Cambodia:## Everydayhero – Cambodia 2018

*All contributions gratefully accepted.**Contributions are tax-deductible for Australian tax payers*

I have written an Excel front-end for these routines, allowing most of the functionality to be accessed quickly and easily, with no programming required. The spreadsheet, including full open source code, can be downloaded from:

The spreadsheet requires the following software to be installed:

- Windows version of Excel
- Python version 2.7 or later (not checked with version 3)
- xlwings version 0.11.4 or later
- Matplotlib, Numpy and Scipy
- The required MeshPY and other Python files are included with the download

The spreadsheet includes two calculation sheets:

- Twelve defined shapes
- Any shape defined by a series of coordinates

The screenshots below show the list of defined shapes and input and output for a rectangular hollow section:

Input cells are shaded blue. Select a section type by number (1-12) and the required dimensions will update. The optional input, Nu (Poisson’s Ratio) and mesh size (maximum area of each generated mesh element), is only required for the warping results. The applied actions are only required for display of stress results.

The section properties output is shown in the two screen-shots below. More detailed descriptions can be found at the on-line documentation.

For graphic display of the generated cross-section, element meshes, and stress plots under the input actions, click the “Display Stress Results” button:

17 images are shown in sequence in an external window. Close each image to move on to the next. There is currently no way to automatically save the images to the spreadsheet, but any image may be manually saved to disk as a png file. At present each image must be viewed in sequence before control is returned to the spreadsheet.

The image window may be dragged to any required size (or made full-screen):

Stress distributions are generated for each of applied actions, and combined stresses:

The image window has tools to zoom and pan, and edit output format:

Sections defined by co-ordinates may be analysed on the second sheet. The Python code has provision for analysis of sections with holes, but this is not yet implemented in the spreadsheet version:

The numerical results are as for the defined shapes:

The download file contains output for an asymmetrical I section, compared with the same section analysed in Strand7. The geometric results are in exact agreement, to machine accuracy, except for the plastic modulus results, which have larger, but still very small differences. The shear area, and torsion and warping constants have larger differences, due to different implementations of the finite element analysis, but are generally within 1%.

The output torsion and shear stress results from the spreadsheet are compared below with the equivalent results from Strand7:

]]>

Has the free software at this site saved you time and/or money?

If so, please contribute to the Raw Impact charity group providing practical help to poor communities in Cambodia:

*All contributions gratefully accepted.**Contributions are tax-deductible for Australian tax payers*

Brent’s Method is a refinement of Newton’s Method for the numerical solution of any equation with one variable. The User Defined Function (UDF) QuadBrent was described in: The Inverse Quadratic Method 3 – Brent’s Method

Following a recent question, I have updated the function and added some simple examples and additional documentation, linking to the Wikipedia article. The new spreadsheet can be downloaded from:

The main update is that in addition to calling a VBA function to solve, the equation may be entered as text on the spreadsheet. There is also a new function, QuadBrentT, for which this option is the default.

A simple example, solving a trigonometric equation, is shown in the screen-shot below (click on any image for full size view):

The function to be solved is entered as text in cell B4. Using the original QuadBrent function, the default function type is the name of a VBA function. To solve a text function on the spreadsheet, the new “EvalTxt” argument must be set to True. The full list of arguments is now:

QuadBrent(Func, Ak, Bk, *Coefficients, YTol , MaxIts , Subr, XTol, EvalTxt , ParamA , SolveFor* )

- Func: Name of VBA function, or function entered as text on the spreadsheet
- Ak: Minimum x value
- Bk: Maximum x value
- Coefficients: value of fixed parameters used in the function; default = none
- Ytol: solution tolerance on Y value; default = 1E-12
- MaxIts; maximum iterations, default = 20
- Subr: solution type; 1= Inverse Quadratic (default), 2 = Quadratic
- XTol: solution tolerance on X value; default = 1E-12
- EvalTxt: evaluate the entered text string; default = False
- ParamA; list of fixed parameters (required if EvalTxt = True only); default = none
- SolveFor: variable character (required if EvalTxt = True only); default = “x”

For the new QuadBrentT function the argument order and defaults are changed for greater convenience when evaluating text functions on the spreadsheet:

QuadBrentT(Func, Ak, Bk*, ParamA*, *Coefficients, SolveFor, YTol , MaxIts , Subr, XTol* )

Arguments are as listed above, except EvalTxt is no longer required, since it is always true.

In this example the solution to the equation could of course easily be found using the ASin function, but the method is easily applied to more complex equations, as shown below:

In this case two additional array arguments are required: the symbols representing constant values, and their associated values.

The next example illustrates the use of the QuadBrent function calling a VBA function to solve the same equation as above. The code for VBA_1 is:

Function VBA_1(Coeffa As Variant, x As Double) VBA_1 = Coeffa(1, 1) * Sin(x) - Coeffa(2, 1) * Cos(x) - Coeffa(3, 1) End Function

Note that all required data must be passed as a single variant array, followed by the function variable.

The algorithm for Brent’s Method (taken from the Wikipedia page) is shown below:

This is applied to the first simple example on the spreadsheet, showing the results for each step of each iteration:

The Wikipedia page has a more complex example, solving a cubic equation. This is solved with the QuadBrentT function below, and also with the Cubic UDF:

The step by step method is also shown on the spreadsheet:

This can be compared with the listing of the results at each iteration on the Wikipedia page:

Not that, at the time of writing, steps 7 to 9 have corrected results shown at the end of the line, and these corrected values agree with the spreadsheet results shown above.

]]>Has the free software at this site saved you time and/or money?

If so, please contribute to the Raw Impact charity group providing practical help to poor communities in Cambodia:

*All contributions gratefully accepted.**Contributions are tax-deductible for Australian tax payers*

The AL-Spline-Matrix spreadsheet contains a large number of VBA user defined functions (UDFs) performing spline fitting and matrix operations, using the free and open source ALGLIB library. It was recently pointed out that the Excel interface code for the CSplineFitCW1da function had an error. The function fits a cubic spline to scattered data, with provision for weighting and specified constraints, but the code error resulted in the constraints not working properly. The code has now been fixed, and an example with constrained data is shown below.

The revised spreadsheet, including full open source code, (Version 1.33; 27 Nov 2017) can be downloaded from:

The screen-shot below shows results with constraints applied at the minimum and maximum x-values, compared with unconstrained results, and the Hermite Fit function:

]]>Raw Impact is a charity group providing practical help to poor communities in Cambodia:

Sustainable and innovative projects with a hand-up model, focusing on simple yet powerful ways to change the game for the poorest of the poor by equipping and inspiring them forward.

In January next year I will be joining a Northridge Vineyard Church group helping to construct a Raw Impact project in Cambodia.

Please help Raw Impact to continue and expand their work with a charity donation through:

All donations are welcome, and are tax deductible for Australian tax payers.

]]>The version posted recently at Stress increments in prestressed concrete beams has also been updated, and can be downloaded from:

Composite Design Functions-Stress Inc

]]>