Parabolas, Rectangles, Triangles & Snakes (Part 1)

Part 1 – Prelude

So for a while I have been playing around with the idea of creating some kind of tool for the analysis, design and detailing of reinforced concrete sections. In the past I have used SPColumn at a previous employer (that could afford it) for the analysis of concrete members, and some other basic free tools at those employers that could not. I’d also started (and stopped) a few times working in Excel to develop my own solution/tool as these free tools just never cut it, either having clunky interfaces or missing vital functionality.

Any spreadsheets developed by my co-workers at the time for the analysis of reinforced concrete I simply just didn’t trust for one reason or another. Predominantly because usually they didn’t even give the right answer, or made some gross simplifications in the name of conservatism with little proof of said conservatism and generally had zero proof of verification.

I came to the realisation a while ago also based on my own personal experiences, that if anyone wants/needs to correct errors in someone else’s spreadsheets they should then probably take a good hard look at just simply starting again. i.e. best classified as something you wish upon others as some sort of sadistic punishment (I’ve meet plenty of people I consider worthy, but probably ultimately incapable of unraveling the mess others can generate at times if let loose in Excel). If you can’t understand the calculations and there’s no documentation/verification, then no thanks from me.

I actually finished one spreadsheet for circular columns a few years ago which was extensively used in my last place of employment, and definitely lead to some efficiencies in the design of circular columns and piles compared with past practices. Past practices generally comprised of undertaking half of the code checks required (the half understood by the designer) and then saying everything was fine and moving onto the next design.

In general though, when I look in my spreadsheet folder its more a case of too many half finished spreadsheets, compared with those that have actually been finished. At least being finished to a point where someone would be able to use it without them using it for inappropriate things/cases/situations, which as it happens will happen. Those type of sheep don’t know what they don’t know if you know what I mean.

I’d thought about extending this particular spreadsheet to encompass other section shapes because it was at least a good starting point, I had some working VBA code after all. But it all seemed too hard to adapt it once I got into the math again without rewriting an extensive amount of it. The circular case is pretty easy mathematically in some senses, because a rotated circle about its centroid is still a circle. So the complexities of varying neutral axis rotations and changes in the stress block geometry sort of drop out of the formulation.

Also trying to interpret the VBA I had written several years ago to go with the circular case left me with a feeling that I should actually document my code a whole lot better. Because it was damn hard to follow, and my coding style kind of relies in part on if it works, no matter how ugly it is, let it do its job and maybe address it again when I get time in a few years. So eventually I move onto other things, other priorities.

Fast forward a few years to the present and at this point (at least in my own opinion) I have gotten marginally better at VBA, but I’d also recognised VBA can be pretty clunky & prone to crashing Excel if you push it too hard. Nothing like loosing your work because you forgot to hit save.

About the same time I started asking myself why I had not learned Python yet, as I had been playing around with several open source structural packages and generally been impressed with what could be achieved. There was also some talk a while back about Microsoft adding official support for Python in Excel (still waiting for this). Python seemed to be all the rage in certain circles, and I was missing out so it seemed.

EC2 parabolic goodness

Also I started wondering one day about other types of stress blocks, of most interest was these parabolic-rectangular formulations like that outlined in Eurocode 2. The general consensus seemed to be that there were lots of benefits to using them compared to using an equivalent rectangular stress block. The math involved didn’t look to bad (always looks this way before you start) provided I could somehow remember how to do integration, i.e. deriving simple relationships like this for the x direction centroid using the EC2 parabolic rectangular stress block and resultant concrete compression force in an element with linearly varying sides between two limits y_1 & y_2 from the neutral axis:-

\overline{x}=\frac{\displaystyle{\int_{y_1}^{y_2}}\;\bigg[\frac{(x_1-x_2)(y_2-y)}{(y_2-y_1)}+x_2\bigg]\;\bigg[(1-(1-\displaystyle{\frac{y}{k_1c}})^n\bigg]\;\bigg[\frac{(x_{b\,mid}-x_{t\,mid})(y_2-y)}{(y_2-y_1)}+x_{t\,mid}\bigg]\;\bigg[dy\bigg]}{\displaystyle{\int_{y_1}^{y_2}}\;\bigg[\frac{(x_1-x_2)(y_2-y)}{(y_2-y_1)}+x_2\bigg]\;\bigg[(1-(1-\displaystyle{\frac{y}{k_1c}})^n\bigg]\;\bigg[dy\bigg]}

Totally as simple as I thought it was going to be in hindsight…

Integration is something I thought I’d use all the time out in industry when studying at University, but as a practicing structural engineer I think I had maybe used it 1-2 times in anger to solve particular engineering related problems in over 15 years of practice. Hence out of sight, and definitely out of mind as far as my mind was concerned at least.

However, after a lot of googling and some YouTube, I managed to re-teach myself the basics of again and turn scary looking integrals into something that was once again comprehensible to my brain. One downside of VBA/Excel is that it has no inbuilt way of numerically evaluating integrals, so an alternative was needed if this was going to work, maybe Python I thought…

Conclusion

So here I am now, mentally armed to deal with the Parabolas, Rectangles, Triangles and Snakes. Not some board game reinvented, but in other words, the perfect storm has developed to force me to put some real work into the development of an open source tool written in Python (the snake) with a view to facilitating the design of reinforced concrete sections under axial and moment loads using the EC2 parabolic-rectangular stress blocks (and others) to derive the concrete force part of the equation.

Onward…

One comment

Leave a Reply

Your email address will not be published. Required fields are marked *