Tuesday 7 November 2017

Onions

I am a long-time fan of onions. Raw, baked, in my salad or on my burger! But ... also onions in structural engineering, a.k.a. the concrete M-N-capacity curves for reinforced concrete sections:


My first introduction with the Onion was the in the Concrete Section Analysis (CSA) module of ESA Prima Win, the predecessor of the FEM software package SCIA Engineer. Of course there were and are more similar tools, but what has always been lacking in my opinion, was a way to do a "quick and dirty" design check on multiple combinations of normal forces (N) and bending moments (M).

Up until a few months ago, I myself mostly used tools like Technosoft's (Dutch-only software) "Kolomwapening" (Concrete column reinforcement) or "MN-Kappa" (for general concrete sections), or previously mentioned ESA (until ESA Prima WIN stopped to exist and the functionality of CSA ceased to exist). I even used IDEA's Statica once or twice the last few years.

The problem with those tools is that they are designed to (extensively) check sections: large numbers of options and settings in the software and not always the possibility to check a number of section force combinations at once.

So I first started to develop an easy Excel sheet to create a concrete "onion", based on some work of a colleague of mine at my previous employer (still a big fan, Sander!) His sheet of course was way too difficult for me, with complex VBA scripting, self-programmed Newton-Raphson iterations, crack width calculation, prestressing, etc. But it was a good starting point for my next exercise: how to create

The Onion

The basis in Excel was quite rudimentary: a fixed set of calculation lines, with varying strains on each line following the graph outline, calculating internal section forces and eventually the external section forces.

The general idea is to vary the strains in the section as follows:


(0) Full (plastic) pressure
(1) To full (plastic) tension in rebar side 1
(2) To full (plastic) tension in  rebar side 2
(3) To full (plastic) pressure in concrete outer fiber side 1
(4) To full (plastic) pressure in concrete outer fiber side 2

This is quite easy in Excel for one type of section (rectangular). The sheet below is the "background" calculation sheet:


Just add a presentable front sheet, with input options, capacity graph and the possibility to plot sets of M-N data, and you've got yourself a nice design sheet for ultimate limit capacities.

The result is also very robust (no VBA programming!), but unfortunately very limited in use (only rectangular sections, the accuracy of the graph is limited/fixed, etc.)

So I started to think on moving to MathCAD. There were 2 major steps to consider first:

  1. How to (automatically) calculate internal and external forces
  2. How to incorporate the strain flow described above and combine it with the calculations of internal forces

The first step 

screamed "FUNCTIONS!", see also my previous blog post about pile groups. So I started to define calculation of steel and concrete stresses based on strains, to internal forces, to external section forces. I've shown the used functions below, for those who are interested:


The result is fun, and can be easily visualized by plotting the functions, e.g. stresses and strains over the height of the section, with the corresponding external section forces:


The second step

was a bit harder. How to plot a graph in MathCAD with M-N relation, where N is not a function of M, or vice versa? So I tried a "step-wise" graph: Just define steps 0 to for strain (a function with 4 sections, one for each trajectory on the onion contour), make the strain follow the onion contour step by step, calculate M and N for these steps and plot those in relation to the steps counter. Somehow this worked almost immediately with function generated strains:


But... why not existing software?

First off, input is easy! The functions for generating the graph, can be hidden. That way, input and graph will fit on one A4:


Next: the way the calculation has been poured into functions, makes it usable in MathCAD Solve blocks. In other words: we can use MathCAD to find the strains corresponding with random combinations of normal force and bending moments. Those strains can be translated to curvature, which can be used for calculating stiffness of the section:


Those two advantages however can also be achieved with other software I guess. The one I haven't seen though, which is really handy when designing a structure: combining multiple capacity curves, using the same functions. Neat right?


What's next? Calibrating the formulas maybe, to incorporate tension stiffening, optimize for SLS crack calculation, take into account buckling? It's all possible...

Saturday 29 April 2017

Pile groups: FEM vs. Math(CAD)


One of the regularly returning structural elements is the so called pile cap, plainly put a huge block of concrete with multiple foundation piles to transfer loads from (a column in) a building to the earth underneath.

Start of pile cap reinforcement,
with the pile heads visible
Final pile cap reinforcement, with the connecting column reinforcement.
All it needs now is a bit of liquid concrete (just a few cubic meters :-P)

These piles have a finite stiffness, whereas the stiffness of the concrete block can be considered (close to) inifinite most of the times. Due to construction tolerances or obstructions in de ground underneath a building, these pile groups are not necessary symmetrical in regard to the transferred load. Therefore stiffness and position of the piles determine the load distribution to the piles.

With large pile caps, nowadays normal practice would be to model the pile cap in a FEM (Finite Element Model) software package and calculate it there. This can be quite time consuming, so for design purposes it would be nice to have an easy calculation sheet that does the same.

Just to demonstrate, I've made a FEM model of a pile cap with some eccentricity in pile grouping and loading, with reaction forces resulting from the calculation of this model:


I was working on just such a sheet to calculate stiffness and load distribution on a foundation block. I imagined writing loads on and piles under the foundation blocks in arrays and then processing those very efficiently to get load- & pile group centre, calculate loads, etc. For this one I chose to investigate usage of tables in MathCAD.

Defining sets of data with tables

The tables work out nice! And they make it quite easy to execute aforementioned operations on the entire table like determining the load- and pile group center. Using that data I want to calculate the location of the resulting force (from the left table) and the center of the pile group (right table). This is done by summation of the distance of a load or pile mutiplied by respectively the load or the stiffness. In MathCAD these are simple mathematical operators, using table row references:


The functions are elegant, but are at the same time taking up a lot of space on the sheet when defining them one by one. In programming this is usually tackled by defining a function, so why not introduce this to MathCAD as well? It turned out to be easier than expected:


This has two major advantages: first, I can use one function to calculate both the resulting load X&Y coordinates AND the X&Y coordinates of the pile group. Second, I can define the function at the start of the sheet, even before creating the tables above. That way, the function can be used everywhere in the sheet. So I put the function outside of the print area at the top of the file, and I can calculate directly following the tables, very compact:


One thing left: the operation leaves an 1x1 matrix variable (the brackets around the resulting values), which is not what I want. A small adjustment of the function (adding an index 0) will result in a single variable as the result of the function:




Next step is calculating the distance from each load or pile to the group centre (left function below), and the total load on the pile group (right). Again I introduce functions. They're quite simple really, but make the sheet very scalable:


These functions help determine the overall pile cap make-up: load and pile centres (res subscripts), distances to load and pile group centres (z subscripts). From there the pile group properties and external forces on the group can be determined:


The content of Xp.z and Yp.z is not shown above. The zc function operates on a Matrix, resulting in another matrix:


I will not go into too much detail on the structural mechanics behind the stiffness of the pile group (Ix, Iy and Ixy); what it boils down to is that these properties determine the load distribution to the piles. Using these values, we can finally determine the load distribution and vertical deformations of the piles!


Resulting in:


Comparing these with the FEM calculation, an (almost) exact match! :-)



This pile cap clearly needs some added stiffness :-) To demonstrate that it also takes into account the stiffness of the supports, The stiffness of the first support is divided in half: k = 50 MN/m1. Also, a sixth pile is introduced with a stiffness of 200 MN/m1. Comparing MathCAD calculation with the sheet:




Advantage of a sheet like this one, is that it can be scaled to almost every size of pile (or anchor) group imaginable. As long as the transferring medium can be considered about infinitely stiff, of course...

One downside though: I have failed at making a viable pile cap. But hey, as long as it served a purpose!

Saturday 11 March 2017

MathCAD in Structural Engineering

For basic calculations, I guess Microsoft's Excel is to GoTo software for many (structural) engineers. About 10 years ago, a colleague of mine introduced me to MathCAD, which is a PTC software package nowadays (it was MathSoft back then). I've been hooked ever since...
 
Shear Force and Bending moment due to wind load on a building in MathCAD

My first reaction, like with most engineers I guess, was: why? Excel does what I want right? Well, yes, but when the math gets more and more complex, the sheets in Excel become less and less transparant. This increases the risk of errors in the formulas exponentially with complexity, but also when used by colleagues that are not as familiar with the structure of the sheet.
 
Shear Force and Bending moment due to wind load one a building with Microsoft Excel

That's the main advantage of a program like MathCAD. In simple terms: you type the math, and the math calculates itself! :-)

A second advantage to me: it looks so professional! Calculations from structural engineers are not for them alone, but need to be used by third parties for manufacturing, or by the authorities (here in the Netherlands) for checks of the design. Complex Excel sheets are not transparant, so the third party will have to either accept that you didn't make mistakes, or has to recalculate to validate.

Last but not least, when Excel basic functionality fails, we resort to Visual Basic. However, this makes the sheets even more prone to errors or bad use by inexperienced users. MathCAD also offers up certain programming features (like checks, loops, global parameters, etc.)

So just to share an example of the ease of use of MathCAD for sheet building... This one's in PTC MathCAD Prime 3.1, which I use next to the more powerful (but older) PTC MathCAD 15.Last week I was working on a wind calculation sheet in MathCAD, for which I already had developed a sheet in Excel, as you can see above. The idea is to expand on the functionality of the Excel sheet easily for more complex wind analysis. The sheet's based on the Eurocode with Dutch National Annex. I'll go step by step through the sheet:

(1) Initiating basic parameters:


I chose to use tables for introducing basic parameters, like wind speed depending on wind area, and terrain roughness depending on terrain category. It's an arbitrary choice, parameters like these can of course also be introduced with {if...then} statements for instance.

However, for readability, I can now clearly define project specific wind area and terrain category:

(2) Project specific parameters:


I use lookup functionality, just as in Excel, to get the parameters for this project calculation.

Fun fact! MathCAD calculates using SI units! So if I take speed squared [(m/s)^2] and multiply this with air density [kg/m^3], I automatically get a pressure unit! [Pa] Since wind pressure is usually described in [kN/m^2], I can stear the unit of the result, however, MathCAD is brutal when the unit is misdirected.

Next: wind loads over the height of a building are cut into zones, depending on the width-height ratio of the building:

Wind load vs. height, according to the Eurocode

For programming enthusiasts this screams {if...then} statement! And thus we continue :-)

(3) {if...then} and wind load over building height:


I will not go into specifics on the values presented here and why they are what they are, but it marvels me every time again that calculating and plotting can be this easy. No splitting calculation into steps. No checking line after line to see if copy paste of formulas worked. The q'p(z) formula will be demonstrated in more detail in the next step: result presentation for reporting.

(4) Presentation of project specific wind pressure:


So this specific building has a large width, small depth and relatively small height. According to the Eurocode, we have to take the wind load at the top of the building and apply it over the total height, since B (width) > H (height). It's also possible that B < H, for instance in the direction perpendicular to the one presented above.

So if we switch B and D (depth), we get the following wind pressure over height:


It'll be even more interesting when H >> B, where according to the Eurocode we have to take into account a variable wind load over the middle height zone:


And all that, captured in one {if...then} formula:


(5) Shear Force and Bending Moment:

Following the project specific wind pressure, where we calculated wind loads as a function of the height (and the wind friction at the sides and top of the building not to forget), calculating shear forces and bending moments is child's play: we only need to integrate the pressure over the height (important detail: integrate from top to bottom!) to get the results presented at the beginning of this blog:


Also, we can now easily calculate the section forces at every height of the building:



That's it for now, I hope this small exercise shows some of the power of a tool like MathCAD!