Monday, November 28, 2011

Kleinlogel Formula at ExcelCalcs

An alternative source of the file is over on MiScion Pty Ltd: workbook for rigid frames using kleinlogel-formula.

Taken from the website.


  1. Now made available a simple 2D plane frame analysis command line program see:

Plane Frame Analysis

[28/11/2011] : Original
[12/05/2016] : Added alternative link to MiScion Pty Ltd

Monday, November 21, 2011

Design Methods: Quality Robust Design and Limit State Design

Soft Conversion of Permissible Stress Design to Limit State Design.

Some time around 1989, Australia started to convert their structural codes from permissible/allowable stress design to limit state design. Such conversions had apparently been tried many times before in the past, but always eventually scrapped, and this was the general view again, that the idea would be shorted lived. However by 2000 all relevant structural codes had been converted to limit state methodology, and the permissible stress codes scrapped. The one exception I know of, being the aluminium structures code for which there is both a permissible stress version and limit state version: the limit state version does not conform with any of the other limit state version codes.

Limit state theory is based on the concept that every product has multiple states-of-nature in which it operates, for each state-of-nature there are unique acceptable criteria for acceptance. A car for example may be fuel efficient for city driving but extremely inefficient for long cross country trips, another car may be the exact opposite. The end-user selects the vehicle which is optimum for their most frequent type of journey and accepts the inefficiency for the other type of journey. Alternatively if frequently make both types of journey, a vehicle which is optimum across both types of journey, but less than optimum on any individual type of journey compared to those vehicles optimised for one type of journey only. As a vehicle ages it also becomes less fuel efficient. As a vehicle ages, the brakes also become less effective, and stopping distances increase. Another concept known as quality robust design (QRD) aims to ensure that whilst there is high variability in the operating conditions, there is minimum variability in the performance. This also takes into consideration the variability in the production process, and the capability to produce an end-product with the required performance.

For example in a region where there is a high demand for housing, and a scarcity of steel, and where clearly the steel is not required in the concrete to prevent the building collapsing during construction or day to day usage, then the steel is not going to be installed in the reinforced concrete structure no matter how much inspection is implemented. The steel will be seen as an unwarranted and unnecessary expense and if not available it cannot be installed. The need for the steel will not become apparent until its too late, during an earthquake or hurricane. Traditional quality control (QC) would place the responsibility with the builder for not following the specifications. Modern quality assurance (QA) places the responsibility with the designer, for not designing a product which can be constructed from the available resources: labour skills, materials and equipment.

A product experiences differing states-of-nature during its fabrication and construction, handling and transportation, in-service usage, maintenance and repair and during and after future modifications and renovations. Structurally these states-of-nature are classified into 3 large groups:

  1. Stability
  2. Strength
  3. Serviceability

{As is usual I got side stepped from my original train of thought}. Limit state design and quality robust design are both dependent on statistics and probability to allow for the variability in operating condition of the product and the environment. The ultimate strength limit state, can be a state of collapse of a member or assembly or the fracture of materials. Most traditional design has been based on keeping materials in the linear elastic range, so that when a load is removed the deflection caused by that load is also removed: elastic recovery. The end of the linear elastic range is typically marked by the yield strength of the material if the material has one. Above the yield strength materials deform plastically: that is when the load causing deformation is removed the deformation remains. This is important for manufacturing where a large slab of steel is to be rolled into a a thin sheet or the I-section of a universal beam, or coiled sheet steel roll formed into a c-section. In these cases once the section has been formed, it is not desired that the material spring back to its original condition. Once these formed sections are put to use in the structure of a building or machine then any further permanent deformation would typically be considered end-of-life for the structure. Collapse or fracture of the structure is thus an important limit state, and the operating and environmental conditions under which this is acceptable need to be determined.

Risk analysis, failure mode, effect and criticality analysis (FMECA) can involve some highly qualitative reasoning before anything is quantitified, if at all. Probability concepts can also be relatively complex. Design for collapse involving probabilities of events can also be fairly daunting and scary, coming from a tradition of designing for operation and concept of safety. However it is this latter concept of safety, that wish to remove. In my mechanical engineering studies we were explicitly advised against making reference to factors-of-safety, or margins of safety, we were reprimanded if we used such terms. The preference was design factor or factor of ignorance. These numbers can in general be fairly arbitrary and give a false sense of safety which is not present.

For example a cable may be broken a certain load (N), and we choose to use the cable only for situations where the operating load is 50% of the load (0.5N). It is a mistake to assume that the cable is twice as strong as it needs to be. The cable may well break at a load less than 0.5N, it just as a lower probability of occurring than breakage at a load N, or 0.9N or 0.75N or what ever higher load chosen. The higher the load to N, the higher the probability of the cable breaking, the further away the lower the probability of failure so 0.1N may be good choice, but there is still a probability of failure. It is not safe from breaking. Further more we cannot be certain that the operating environment will not exceed N, or the 0.5N, or the 0.1N that we choose. All we know is that the strength of the cable can vary and that the load applied can vary, and we need to accomodate this variability in design. Whilst permissible stress design hides the probability and reliability concepts behind the scenes in the derivation of a design factor, limit state design wants to make these risk concepts foremost in the designers mind. But tradition is in the way, so a soft conversion of the permissible stress codes was carried out, to set a path in place towards a more risk based probabalistic approach to design.

With respect to bending the permissible stress formula for hot-rolled steel design was something of the form:

M <= 0.6.fy.Z

M = applied bending moment
fy = yield strength
Z = elastic section modulus {S=plastic section modulus. Though some countries may reverse these notations.}

{NB: actually not the exact form since code was based on permissible stresses, however much of the steel was designed using the Australian Institute of Steel Construction (AISC) safe load tables. Now the Australian Steel Institute (ASI) and design capacity tables (DCT's)}

The problem with the permissible stress equation is that it gets rearranged:

1.67M <= fy.Z

Thus inferring that the structure is 67% stronger than it needs to be. This however is incorrect, for it fails to allow for variability in the strength of the material (fy), and variability in the dimensions of the section used to calculate elastic section modulus (Z). It also fails to allow for variability in the actual design action-effect (M). Given that we can have fairly tight control on the strength of materials and the dimensions of the sections, the strength or resistance (fy.Z) has little variability (or small standard deviation), whilst the magnitude of the loading has significantly greater variability, the design factor (1.67) can be split into two parts to accommodate variability on both sides of the expression and remain calibrated against the old code and provide a step towards a new philosophy. Thus the expression becomes:

1.5M <= 0.9fy.Z

This can be expressed more generally as:

psi.M <= phi.fy.Z


psi = partial load factor
phi = capacity reduction factor

The fundamental requirement of the building code of Australia (BCA) is that the resistance in this case (phi.fy.Z) is the 5th percentile resistance of the part. The value of phi can therefore be adjusted to suit the origins of the values of fy and Z. In general fy should be the 5th percentile yield strength of the material, so that phi mostly applies to the variability in Z. So that phi is a simple way to allow for variability present in the dimensions of the section which go into calculating the elastic section modulus. The derivation of the value of phi=0.9 is something hidden behind the scenes of the code, but it is something which can be questioned and brought more into the open. Anycase it reflects an expected low variability in the resistance of the structural member. None the less there is variability and there is a 5% probability that this strength will not be achieved in practice.

Our code has no explicit reference on the probability of exceedance for the design load (psi.M), however in the 1989 version of the wind loading code, the 1000 year mean return period used back then was derived from a 5% probability of exceedance for a 50 year life expectancy. Currently wind loading is based on wind speed with a 1/500 annual probability of exceedance for buildings of normal importance, this relates to a 500 year mean return period. So unless otherwise noted the basic principle is that the design action and/or design action-effect should have a 5% probability of exceedance for a given life expectancy: or is otherwise the 95th percentile load.

So when we work with wind loads we do not use the psi=1.5, instead we use the design action (psi.M) which has the required probability of exceedance. So that the most generic version of limit state structural design is:

95th percentile action-effect <= 5th percentile member resistance

There is no safety as such, there is always some probability of failure. We could choose the 99th percentile action-effect, but there would still be some probability of it being exceeded. We cannot choose the 100th percentile action-effect because we don't know what it is: everything we measure has variability. Whilst statistical assessment of manufacturing output can control resistance fairly tightly, the statistical estimates of loading is fairly crude and in some instances possibly highly unreliable.

Engineers Australia in 1990 issued to its members a booklet titled :"Are you at risk! Managing expectations". Part of the exercise was to get engineers and other technical professionals away from declarring things to be safe. When something is declared as "safe" the public tends not to perceive that it will fail no matter what the conditions. Little seems to have changed: there are still engineers declaring buildings to be earthquake resistant, hurricane resistant and flood proof: and as to be expected they continue to fail. The response is make the design load bigger will make it safer. Keep making design loads bigger, just makes more expensive, uses more materials, and limits supply to fewer and fewer people.

The magnitude of the design load is not the issue. The real issue is the qualitative consideration of the modes of failure and the consequences, consideration of the full continuous spectrum of limit states.

Some of the poorest regions of the world, are also prone to seismic activity, and they have been making use of steel reinforced concrete. Whilst the concrete is obviously abundant, the investigations after destructive earthquakes, indicates the steel is obviously not so abundant.

Since the design load can always be exceeded, making the design load bigger is of little real benefit, it just makes the structures less affordable. Reading about the 2008 Sichuan earthquake, it reinforced the perspective that consequences of failure are the issue. Traditional Mongolian yurts may not have resisted the earthquake, but their collapse would have caused fewer deaths, less severe injuries, and further more could have been replaced rapidly. Far from being a disaster, would have been more like an inconvenience. Our ancestors were mobile, that is the benefit of being an animal rather than a plant. Plants are stuck in the paths of earthquakes, hurricanes and floods, animals are not. Architects and civil/structural engineers are turning us into plants, and many of our modern world problems are associated with us being more like static plants than mobile animals: not least of which is concentration of pollutants and waste of fuel. Sure there is an issue of travel: work/home/work/home etc... which is a major waste. But brought about because the city is a giant plant with massive global root system. If going to use concrete in a structure in these regions because it is abundant then make it a compression only structure, so that doesn't require the steel: get creative. However, if the design load is exceeded still going to get crushed. Tension membranes and cable-nets can certainly cover large areas: but back to issues of availability of suitable materials. Also what is housing for, protection from the environment or privacy? A large membrane structure could protect a village, but not provide privacy to the individuals within.

If we can get back to the qualitative issues instead of thinking we are smart because we can do some complex mathematics, then we can find better design solutions to the problems that we encounter. There are different states-of-nature, a great deal of variability and uncertainty to be accounted for, and differing criteria for acceptable performance.

At the moment the community has little to say on the performance requirements imposed in the built environment, yet it is the people who have to pay one way of another. The BCA talks about loss of amenity: at the present point in time the primary loss of amenity is not getting it in the first place. Further more most houses do not comply with current code requirements.

So first here is an opportunity to knock down the price of an established house because it is not compliant with current codes. Second an opportunity to assess when these established houses will fail, what the consequences of failure are, and then use this as a basis for BCA alternate-solutions, which will provide more affordable housing and less hazard to life when they actually collapse. Note the building doesn't have to be made of cotton wool so that when it collapses it cause minimum injury: rather the structure should provide adequate warning of its impending collapse. A warning from a government department not adequate because that may relate to current codes of practice, not the capability of existing structures. So need an early warning system which alerts occupants before they hear the loud cracking sound of the members of the structure failing.

Thursday, November 17, 2011

Earlier Attempt at Describing Probabilistic Structural Design

An Earlier attempt at describing Probabilistic Structural Design:

Metamorphs Journal on Scribd

Basically involves testing of a cable, then considering selection of a suitable cable for a baggage handling department where do not know the maximum weight of the baggage handled. Same principle could be applied to selection of suitable scales so that do know weight of baggage handled: but not the weight of that which arrives.

NB: Whilst the probabilities for independent events may generally be multiplied together, the approach taken in the above essay, is over simplistic. For more detail on reliability refer to Mechanical Engineering design by Shigley, or to Reinforced Concrete by Warner, Rangan and Hall.

Tuesday, November 01, 2011

Cold-Formed Steel Shed Industry: part:#2

As explained previously an Excel/vba macro is used to generate an AutoCAD script which is written to a default folder, and then AcadLT is launched from vba using command line parameters to run the Acad script automatically as Acad loads. The model space output of the script is shown in Fig 1, and the paper space output shown in Figs 2 to 6.

Fig 1: Model Space output of script.

Fig 2: Paper Space output of script. Footing plan showing stiffened raft (not typically required).

Fig 3: Framing Plan & Member Schedule

Fig 4: Side (Front) and End Elevation (Right)

Fig 5: Side (back) and End Elevation (Left)

Fig 6: Detail Section of Portal Frame

At present the script doesn't modify the paper space layouts to match the paper size. This is largely because in the first instance it requires using "print" and adjusting the layout parameters and then cancelling the print command. It can crash if invalid paper size names and printer names are provided, so it was left out. Text is all placed in paper space, with exception of the grid labels which are written in model space. The input parameters allow varying the paper size, the scale, and forcing either one view per sheet or everything to a single sheet. The scale can also be selected to be calculated. Either way the vba macro will determine one of a few different preferred layouts, and attempt to use as few sheets as possible. All the parameters to define the structural frame can be varied. Spacing of frames, girts and purlins are assumed to be constant. Except for the simplest of buildings, usually after the script has run a great deal of manual editing is required to produce finished drawings for development approval.

Fig 7: Screen Capture of Time Script Takes.

As can be seen from the screen capture, Fig 7, the script takes less than 9 seconds to run, this is significant decrease on the 5 to 20 hours that may be required for drawing such stick diagrams from scratch. Another 5 to 40 hours may be required for drawing connection details and other relevant detail sections. Given that the shed industry typically does not produce formal drawings, only a freehand sketch on square ruled paper order form, taking some 10 to 60 minutes whilst salesperson talks to customer: collapsing the drafting time is important. Whilst the freehand sketch is suitable for a small garden shed, its not suitable for a 4000 sq.m industrial warehouse with office space. But people go to the shed suppliers on the assumption that they have solved all the problems before and have standard designs which can be modified. Whilst the industry advertises custom manufacture it cannot provide custom design. The industry relies heavily on the local council, requesting further information, before they go and get architectural and engineering input. This results in delays for the customer as issues of  non-compliance with building codes are resolved.

Whilst high end building information modelling (BIM) software may be useful for the task, it is too complex for sales people to be using at the point-of-sale, and with costs from $5000 to $25,000 (AUD) per license it is also far too expensive. {Though any shed supplier setting up own engineering staff and making  use of such software, has the potential to make it financially viable, taking advantage of the software to improve their product and increase sales.}

Whilst the suppliers run around from one consultant to another, requesting standard designs for one shed or a range of sheds, there is a need to develop low cost, highly product specific software which produces drawings, and structural calculation reports, along with material take-off's,  cost estimates, and work shop details, along with any CNC machine instructions if appropriate, to resolve the problems of not using standard designs correctly.

There is already precedent for such software with the nail plated timber roof truss manufacturers, however their software started in the wrong direction: it failed to provide adequate evidence-of-suitability and was proprietary. This made it difficult for council to check the adequacy of the proposed trusses, and there is still need for improvement, but there is now a guide line for such software, put out by Planning SA.

Minister’s Specification: SA A2.2 : Structural engineering software

The problem with such software is that it tends to only produce specifications, and it can do so in a short period of time, a few minutes. Compare this to a few hours to check all the different roof trusses in a typical house, using either manual methods or standard frame analysis software. It seems no consultants providing technical certification services has automated their standard frame analysis software for checking timber roof trusses. Similarly they also haven't produced automation for sheds, carports and verandahs. So the industry can do fast, but the checkers and certifiers are slow. The big question though is the industry fast because its not doing engineering checks, or because it has fast design tools, and have those design tools been checked and are they being used correctly. Hence developing and releasing the software not just a matter of writing source code. Hence these things tend to get part developed as useful in-house productivity tools rather than commercial products. But not everyone has the time to develop such tools in-house, and that causes hindrance, and delays, when at the certifier level. So tools need to be readily available to all, not just limited to manufacturers, possibly under a GPL, so that source code viewable by all.

Any case primary task at moment is to reduce the drafting effort, since calculation effort has largely been reduced already for the typical gable frame shed.

AutoCAD Speed Test

As a simple test of the comparison between speed of manual CAD drafting and scripting (*.scr), a simple test can be carried out. This test comprises of drawing a rectangle and then diagonal lines and bisectors of the sides. All entities should be ordinary lines, no polylines or rectangles, and no drawing as such and exploding to ordinary lines. Running osnaps can be switched on to save time. I typically have osnaps switched off, it interferes with running scripts, and otherwise tends to waste time in manual drafting selecting the wrong points, so I typically select snaps manually, the right one at the right time. Anycase for the test I used running osnaps, because it is a situation where it clearly provides benefit rather than an hindrance. The dimensions of the rectangle are @10000,5000.

It should be noted that the larger the screen the longer the distance to travel from one corner to the other and therefore the longer the drawing time. So larger screens not altogether a benefit. Faster times can be achieved by reducing the size of the AutoCAD window, or by zooming to a fraction of the screen (eg. zoom 0.5x).

Fig 1: Screen image of finished drawing test.
{NB: click image to enlarge and scroll all images.}

Fig 2: Screen capture of time taken for manual drafting

The time taken with manual drafting is approx 26 seconds. With practice it may be possible to get the time down further. Starting out today it took 55 seconds, but for some reason I was typing the command "Line" rather than using the alias "L", also wasn't using running osnaps. But since I knew last time I did the test I did it in 26 seconds, I kept trying until could capture such time from screen. Faster  computers and faster operators may be able to get lower times, but unlikely to achieve the less than 1 second that the script takes to run.

Fig 3: Screen capture time taken by script, drag and drop onto CAD drawing.

Fig 4: Screen capture time taken when macro added to a toolbar button.

Not sure why but the script runs slower when called from a toolbar button than when script file is "drag and dropped" onto the drawing. However the button saves operator  time finding the script.

The script:

LINE 0,0
LINE 0,0 10000,5000

LINE 0,5000 10000,0

LINE 5000,0 5000,5000

LINE 0,2500 10000,2500

ZOOM s 0.5x


The button macro:

'_script speedTest1.scr 

Faster computers and larger monitors save time, but only when there is a great deal of interaction between the operator and the machine. To really save time and increase productivity need to get the computer to do the work, and a slow computer may be adequate for such purpose. If it takes a person 2 minutes to enter data, and the computer 1 second to respond, it does not make any perceptible difference if get a computer twice as fast to complete its task in 0.5 seconds. Its the 2 minutes of human interaction with the machine that needs to be reduced: and that is likely to become a political issue. There has to be some acceptable need to reduce the production time before effort gets applied to do so. After all what are you going to do with the free time if just reduce production time just because you can.

Related Posts:

Programming/Automating #Autocad LT
Automated Drawing List Update Acad LT (revised)

Cold-Formed Steel Shed Industry: part:#1 (Shed Framing Drawings)
Cold-Formed Steel Shed Industry: part:#2 (Shed Framing Drawings)

Monday, October 31, 2011

Cold-Formed Steel Shed Industry: part:#1

Sample drawings of framing plans for cold-formed steel shed, partially automated by the scripts(*.scr) mentioned in earlier blog, then extensively modified using manual CAD editing, using AcadLT 2000, to match the custom features of the project. Project is from a few years back, and drawing title blocks have been removed so as not to identify the project, client and supplier. The drawings have additional detail on them compared to that required for development approval, so as to assist with workshop detailing. The cold-formed shed industry typically does not produce drawings beyond scribble on the back of an order form: not for development approval and not for fabrication. The industry typically has salespeople and possibly estimators sketching out what they believe is required. The whole benefit of the cold-formed steel shed industry is that need little infrastructure, and simply need to fill in some purlin detail sheets and send of to local roll former of c-sections, and have a bundle of fabricated steel delivered straight to site depending on connection details. This typically fine for the smaller sheds but for larger warehouses with office space it is inappropriate.

In the past we typically worked with the suppliers and manufacturers and couldn't get them to change, very little interest in their product. Then  one day a steel erector turned up, he was unhappy about various issues with construction, and wanted to refine the design. Also turned out that supplier/manufacturers often failed to deliver all required parts for construction, and unable to get these parts from the suppliers on basis they contended that the parts not required. We recommended that the steel erector insist on workshop drawings being produced. The shed suppliers wouldn't provide, and workshop detailers not able to fit in with the nature of the shed industry. The result was the workshop detailing returned to my office, along with designing the sheds on a project by project basis, rather than the typical industry approach of having standard calculations and relying on local council to request further information to get calculations which match the proposed shed.

As long as the shed stays as a simple plain frame, then can analyse it using Kleinlogel formula in MS Excel, and the calculations are dropped to a few minutes. The time consuming effort is producing the framing plans for development approval, and the workshop details. Connection details are basically the same from one project to the next, and standard drawings simply need project name changing, though each new project may introduced additional detailing.

Now software like Autodesk Revit structural, or Tekla Structure, and other BIM  software, may be the ideal tool for such project: however they are far to expensive to justify given the amount of work involved and the relative simplicity of the structures. Also in terms of developing tools to improve point-of-sale decision making in the industry, tools like AutoCAD are too expensive to use as a graphics engine, whilst Multiframe is too expensive to use as an analysis engine. So MS Excel/VBA is typically the product to choose with possibly some low end CAD package, alternatively use the Excel shapes layer, and draw in Excel itself.

So slowly developing in-house tools to handle custom projects, whilst also developing tools which ultimately can be used by sales people at the point-of-sale. The objective is to reduce the problems caused, by bad design decisions at the point-of-sale. In particular the buildings that the industry can supply simply do not meet the needs of the buyers. But this is not identified until council rejects the suppliers development proposal, and requests further information, then everyone turns to consulting engineers to get calcs-for-council, as if that was all that was needed.

So the objective is to develop low cost automation tools based on simple parameters, which flags the need for custom engineering at the point-of-sale. Currently these buildings basically  sold like cars, except can ask for three of the wheels to be removed to cut costs and the sales person will say yes we can do that.

The real issue is developing a simply interface, at no point do want the sales-people operating a CAD package, but need to know the custom requirements for doors along the length of the building, and also know the different gable-end framing requirements. Also need to expand beyond the simple gable, to allow for double span, and the American barn type structure (gable, with lean-to each side).

So currently have a collection of different tools written in Excel/VBA, also some of which I originally wrote in Turbo C and others in Delphi. A part of development problem is deciding on application language, a great deal has now been written in Excel/VBA, but MS Access maybe better, and better again with respect to data storage and suitable user interface. In particular I can program a treeview in for my bill of materials (BOM) but not in VBA. On the otherhand I don't really like Basic programming language, its just that VBA is built into so many applications: and controlling anything and everything from Excel/VBA has been so convenient. For speed developing the Excel/VBA, and AutoCAD LT approach, with Microstran and Multiframe data file generation, seems to be the way to go, then slowly remove dependencies on other applications, and make stand alone. Part of which requires developing a 3D frame analysis program, already have 2D, but ultimately going to need it to be 3D.

Anycase currently finding all the bits and pieces cumbersome to use. So given that the purpose of this blog is to document the background as to how things develop, I thought I would document the current process, whilst I figure out in which direction to go and what to program next.

Fig:S01: Footing Layout

Fig:S02: Framing Plan

Fig:S03: Elevations:1

Fig:S04: Elevations:2

Fig:S05: Sections/ Portal Frames

Fig:S06: Gable End Wall Detail Section: Office End

Fig:S07: Gable End Wall Detail Section: Rear

Foot Note: Sample drawings printed to pdf file using pdfactory, then borders and title blocks removed, by taking snap shops using Bluebeam, and saving to jpeg using MS Paint, then file size reduced using Microsoft Office Picture Manager.

Related Posts:

Cold-Formed Steel Shed Industry: part:#2 : Dimension & Geometry (Acad LT)
Cold-Formed Steel Shed Industry: part:#3 : Summary of other requirements

Feasibility of Cold-formed Steel Shed (Simple Structural Software Application)

Other Blogs:

Other Information:

Monday, October 24, 2011

Structural Engineering

The art of moulding materials we do not really understand
into shapes we cannot really analyze,
so as to withstand forces we cannot really assess,
in such a way that the public does not really suspect.

Professor E. H Brown, (1967), Structural Analysis, Vol 1, Longmans, Green & Co.

Sunday, October 23, 2011

Manufactured Structural Products And Simplified Wind Classification

Manufactured products are typically classified into size ranges and/or performance grades. It is generally not practical or economical to have infinite variety of product offerings. Further more it is generally not economical to base the size ranges on an arithemetic series, and therefore size ranges are typically based on a geometric series usually a Renard series.

Buildings and other structures are typically designed and constructed one-off, rather than purchased off-the-shelf. However there is an increasing number of off-the-shelf buildings becoming available, the primary reason is that people want buildings not pictures of buildings. Unfortunately the industry is poorly served by consulting civil engineers, who are focused on one-off construction, and the need for consideration of site specific features. Whilst there are site specific features to consider it would be nice if the output of civil engineers actually reflected such custom consideration: rather than implementation of some routine solution and calculation of some point-value. Structural sections, bolts and a variety of other components all have standardised sizes and performance grades. All such components have critical characteristics for which minimum and/or maximum values can be determined for a specific generic application: there is no need to keep calculating from one project to the next: its a waste of time and paper. Simple selection criteria are required based on the controlling characteritics of the product. One such characteristic is the wind load.

To the wind loading code AS1170.2, a regional wind speed (VR) is selected: this is typically the wind speed experienced 10m of the ground, over terrain of category 2 (M[z,cat]=1): typically a local airport. This regional wind speed is then adjusted to match the site specific features, by the use of multipliers for terrain category (M[z,cat]), topography (Mt), shielding (Ms), and direction (Md), to give the site specific design wind speed (V[sit,beta])at a given reference height (z).

V[sit,beta] = VR Md (M[z,cat] Ms Mt)

The maximum from several different directions then becomes the design wind speed (V[des,theta])

This can then be converted into a reference pressure (qzu) as follows:

qzu = (0.5 rho[air]) V[des,theta]^2

The design pressure (p) on a given surface then obtained from:

p = qzu. Cfig Cdyn

{Example  Calculation sheet can be found at ExcelCalcs: schWindAssessment}

Where Cfig is a pressure coefficient dependent on the location of a given surface with in a given shape and configuration of building, and Cdyn is a dynamic response factor. From these formulae it can be seen that there are potentially an infinite number of pressures that a range of products need to be designed: not very practical. However for a generic application the values of Cfig and Cdyn are more or less lock in by AS1170.2, so the main variable is qzu, from one site to another. Whilst there are several factors which go into calculating qzu, the same value of qzu can be determined from a variety of differing inputs. Therefore wind load classes can be defined by the maximum value of qzu permitted in the class. And given that there is a minimum ultimate strength design wind speed of 30m/s, there is also a minimum value of qzu, which for the sake of argument could be called wind class N0. From the minimum then need a method of defining other classes. The basic principle adopted for AS4055, barring some historical anomalies and rounding, is that each wind class applies a pressure 1.5 times greater than the lower class. However due to the anomalies that doesn't quite hold true. Anycase 6 wind classes are defined N1 to N6, defined by ultimate strength design wind pressures (qzu), or otherwise by the associated design wind speed Vzu=V[des,theta]. Since tropical cyclones also impose fatigue issues, for the same wind speeds there are 4 cyclonic classifications C1 to C4.

Note that AS4055 is simplified wind loading for housing. The wind classification system itself does not have anything to do with houses, nor the dimensional constraints in AS4055 nor the pressure coefficients in AS4055: it would be far better if removed from AS4055 and placed in AS1170.2. For anything other than housing: AS1170.2 should be used to determine Vzu or qzu, and assign a wind class.

When defining a product, design to qzu determined from AS1170.2, then assign nearest lowest wind class. When selecting a product, assess the site to AS1170.2 and assign the nearest highest wind class. It should be noted that local government authorities (LGA's) produce wind speed maps for housing, a site classed as N1 for a house may not be classed as N1 for some other structure. A site can only be classified with respect to the reference height (z) of the structure. A three storey house is likely to fall outside the scope of the wind speed maps and the simplified tables in AS4055. Also the wind speed maps are roughly derived, so that it is beneficial to get a site specific wind load assessment.

For many N1 sites on the maps are at the lower end of wind class N2, and difficult to prove the full shielding which puts them into the lower class. However many of the N3 sites are near the upper end of wind class N2. In terms of timber framed housing to AS1684.2, this doesn't make much of a difference for there are only combined span tables for wind classes N1 and N2, member size largely controlled by live loading requirements rather than wind loading. However, the wind classification affects the requirements for lateral bracing and tie-down systems. The tie-down system mostly affects the connections, and that can be a matter of personal design philosophy. Not connecting the members to achieve the full capacity of the installed members, may be considered extremely wasteful. For eaxmple connections in a wind class N1 house have little to no reserve capacity for additional wind load, as may be imposed if a carport or verandah is attached to the house at some future date. {Contrary to popular opinion: you cannot attach any size carport or verandah you wish to a house structure in wind class N1. There is no reserve capacity, and chances are cannot attach one at all.}

Anycase the wind classification system permits simple selection, for a variety of manufactured structural products (sheds, carports, verandahs, houses, fences, windows, doors), however, determination of wind class should be by using AS1170.2 not AS4055. Alternatively additional design aids should be created to further simplify the assessment.

More importantly manufacturers should produce full technical specifications. Saying to AS1170.2, to AS4055, or to AS1684 is meaningless. The specific's of these codes should be identified in technical specifications for the product. In particular the internal and external pressure coefficients, or nett pressure coefficient used should be identified in the specification. Pressure coefficients do not vary between cyclonic and non-cyclonic regions. Those hanging baskets swinging from the pergola can equally well be thrown through the window in a cyclonic or non-cyclonic region. Determinining internal pressure coefficients is a complicated matter of assessing the risks associated with various states-of-nature that a building may experience. Assesssing all the states-of-nature is time consuming, so the simplest approach is to assume the building envelope is breached and that high internal pressures are generated. This is not however always conservative, since for a framed structure, it results in zero loading to the wind ward face. On the otherhand if high internal pressures do produce the maximum stresses in the frame it is not necessarily economical. The purpose of manufactured structural products is to be economical and provide fast supply.

The building code of Australia (BCA) requires consideration of the hazard to life, as well as the loss of amenity. Not having the amenity in the first place, may be fast becoming the major concept of loss. The magnitude of load has very little to do with the hazard to life. The design load always has a probability of being exceeded. so considering Tropical Cyclone Tracy, steel roof cladding was ripped from building and its sharp edges became lethal. All the cyclone testing of cladding and the cyclone washers, and the increased design loads, have failed to remove the sharp edges from the cladding. When the design load is exceeded as it will be one day, the hazard remains. But the population is going to become complacent about us having cyclone proof buildings, which we don't have: they will believe they are safe when they are not.

Safety is not a quantitative issue, it is a qualitative issue. When and how the structure fails when the design load is exceeded is the primary issue of design which is currently neglected. The current magnitude of design loads are largely determined by insurance councils and government with respect to the cost of replacing structure, not the hazard to life. Wind borne debris is a problem, but as indicated when the design loads are exceeded, it is still going to be there. The exercise is partly one of balancing inconvenience against disaster. Disaster arises when the community is not able to recover without external assistance. It should not be necessary for all parts of a building to have the same resistance nor to survive the same event. Many buildings, and many rooms within buildings are non-essential, and loss of such is not a major hardship. There are certain core facilities within houses which contribute to the quality of life in a modern city, these are primarily kitchens, bathrooms and laundries. Most other rooms in a house can be lost. More over buildings can be designed with weatherlocks which control the internal environment.

Another important issue to understand is that the BCA structural provisions are largely based on ultimate strength. That is stresses are permitted to exceed yield strength, and enter into the plastic behaviour zone of the material. This can be identified in the codes by the change from elastic modulus(Z) and use of plastic modulus (S), and the change from yield strength (fy) and the use of ultimate strength or fracture strength (fu). Materials are not expected to under go elastic recovery when the load is removed, they will remain permantly deformed even fractured. Probabilistic design permits less than or equal to the breaking load, it does not have to be strictly less than. The breaking load itself is an uncertain quantity which may be greater than the value used. The BCA uses 5th percentile characteristic strengths. After the structure has experienced its ultimate strength load it may have collapsed and ceased to be serviceable. This is important, a building is not designed to provide safe shelter during a hurricane, unless it is a post-disaster facility which is to remain serviceable after the event. After a design level event a normal building is expected to be no longer serviceable and to need replacement. The primary concern for the design level event is keeping the building anchored to the site, preventing it from becoming airborne debris. It is not the intent to keep it in service and operating.

For many years now the shed and garage industry has had members complaining about not being able to compete because there are those using internal pressure coefficients lower than the standard AS1170.2 specifies. Problem is AS1170.2 doesn't specify a value, it specifies a methodology for determining an appropriate pressure coefficient. That individual businesses in the industry cannot compete is largely because they rely on external consulting civil engineers, and otherwise know very little about structures and manufacturing or industrial engineering. Put simply they are mainly poorly designed businesses with poorly designed and even more poorly specified products. The businesses are also over loaded by sales people who get paid commissions to sell a product they of which they have zero understanding. A properly designed business could use significantly larger structural sections than most are using and wipe the majority of the suppliers off the map. The size of structual section has little to do with whether can compete or not.

So the Australian Steel Institute (ASI) shed group publishing documentation opposing the use of the wind classification system merely compounds the problems in the industry. The wind classification system is specifically for these types of manufactured products, and is far better to refer to wind class N1 or N2, than to refer to TC3 or TC2. The latter only gives consideration to one of the site characteristics whilst the wind class considers all the wind critical characteristics. To reiterate, AS4055 is for housing the wind classification system it defines is not limited to housing: but AS4055 can only be used to determine the wind class for housing, it is necessary to use AS1170.2 for other structures.

Damage to sheds during tropical cyclone Larry, and tropical cyclone Yasi, is not all together indicative of low quality non-compliant buildings. Many of the photos show the sheds collapsed, but it also shows the sheds still anchored to the original site: basic objective achieved. The BCA does not specify serviceability requirements, that is left as a subjective judgment for the designers and end-users, relative to the specific application.

One major problem with the shed industry is it runs around declaring their product complies with the BCA. Who cares? The product is required to comply with the BCA, so just provide the BCA evidence-of-suitability which demonstrates it complies. If it merely complies with the BCA then it is the lowest quality product permitted in the market. So forget about marketing BCA compliance, market how the product exceeds the BCA and provides higher levels of serviveability. We may not have tropical cyclones in South Australia, but we do experience tornadoes in the remote outback. Tornadoes are typically outside the scope of the BCA, but still need to be designed for. Design is not about code compliance it is about making the product fit-for-function, whilst giving due consideration to uncertainty and variability in its use and manufacture.

Now part of the problem is a failure to understand, that the fundamental law governing all supply is that for fair trading which requires goods are suitable for purpose. Once a product is released to the market or into the environment it will be used for all manner of purposes beyond the intentions of the designers. Technical specifications and product literature therefore need to make explicit the suitability of the product and the evidence-of-suitability. Shed manufacturers compete on price because one piece of junk is the same as any other, there is no added value for the higher price.

The building industry is not serious about the quality and performance of its products, it is largely why it is regulated. Buildings are failing because the component parts are not up to specification, and that is largely because the specifications of the major product itself is lacking.  Australia's relative isolation, and often monopolistic enterprises has seemingly resulted in many specifications being based on assumption. For example steel always from BHP, therefore don't really need to specify in detail. Coldformed steel sections always from Lysaght, so similarly don't need to specify in detail. This however is no longer the case, and those cheap c-sections are probably half the price because they are made from steel with half the strength. It is not the internal pressure coefficients that the ASI shed group should be concerning itself with. The products supplied need proper technical specicifications. Part of which requires putting  wind class N2 windows, along with wind class N2 doors, in a wind class N2 shed, on a wind class N2 site.

All the manufacturers need to get up to speed with the wind classification system, and the ASI shed group shouldn't be advising, near mandating that the wind classification system should not be used. Doing so makes te ASI shed group part of the problem. Door and window manufacturers need to provide their products with proper technical specifications. Due to the requirements of the glazing code, windows likely to be compliant, but door manufacturers do not yet appear to be paying any attention to the BCA. The doors to your house as well as the doors to your shed are highly likely non-compliant with the BCA. Consequently doors can be blown of their supports at less than design wind loads and lead to the development of high internal pressures not otherwise accounted for. Basically the economical design of the building is not taking into consideration the failure of the industry's ability to supply doors to a technical specification.

For a simple analogy. The walls to sheds have frames at 3m centres, with girts spanning 3m metres typically spaced less than 1.2m, the ribs in the wall cladding span the 1.2 m between girts. The roller doors are typically 6m wide, no frame behind, the ribs of the door cladding span 6m. The door clearly has no where near the resistance as the adjacent wall: the door is the weakest point on the wall. The wind will push the door in, causing it to balloon, until it stretches so much it slips from the door guides and is then torn from the building, at which point high internal pressures occur in the building and will end up loosing more than just the door. Make sure the doors are compatible with the specification of the shed.

Complacency is another problem in the building industry. People don't want any hassle, they go to shed manufacturers because there is an expectation that all design problems have properly resolved in the past. So delays because this door not compliant are typically over looked with, just get it finished: a doors a door. This is a suppliers problem. The supplier is supposed to have designed the product and be ahead of the local council and regulating authorities, not behind. There will always be delays experienced during development approval, if rely on the council to advise what regulations have to be complied with. The designers task is to assert which regulations are relevant and that they have been complied with. Sales people are not designers, and custom manufacture does not equate to custom design. If the shed supplier does not employ design personnel on staff, then buyers should seek the services of an independent consultant. Suppliers should seek to inform and educate the public.

Anycase I will essay shed design in more detail at a later date, along with design-for-failure. Other writings on wind loading to AS1170.2 with comparisons to ASCE7-05 can be found in the SEAint archives.

SEAint Archives:

Sunday, October 16, 2011

Programming/Automating #Autocad LT

As far as I am aware the main reasons for opting for the full version of Acad are:

1) AutoLISP
2) COM automation
3) Database connectivity and SQL
4) Extended data
5) Complex entities/objects, 3D and otherwise

The seemingly most dominant reason that full Acad is chosen is because it is programmable through AutoLISP. The common myth is that AutoLISP is required to program AutoCAD. Since AcadLT does not have AutoLISP it is not programmable or customisable. Wrong!

AcadLT can be customised and its is programmable without any tricks or add-in LISP engines. Forget about the pretty toolbars, AutoCAD has a command langauge, and supports script files for those commands. The command language and script support is not as powerful as that in say the old DBase II/III, but it is none the less available.

The common criticism aimed at scripting is that it cannot do anything. For example to draw a line, the script would be:

Line 0,0 1000,1000

where as in AutoLISP it would be:

(command "line" pt1 pt2 "")

Where pt1 and pt2 can have any coordinates desired, thus the AutoLISP script can draw different lines, whilst the command script can only draw one line. However, the AutoLISP script is part of a much larger program which determines the values of pt1 and pt2, and instead of sending instructions to the Acad command line, it could equally well write the instructions to a file as follows:

(write-line (strcat "LINE " (ptstr pt1) " " (ptStr pt2) " ") fp)

Where (ptstr) is a user written function to convert the point coordinate lists to text strings, which can be written to a file (fp). The resultant plain text file can then be excuted from within Acad or Acad LT via the run script command. For simplified usage the script can always be written to the same location and file, such as default.scr, and this script can be executed from either a menu macro or toolbar button: once again in either Acad or Acad LT.

'_script default.scr 

Now such plain text files containing Acad command line instructions can be generated by any available programming language. On old MS DOS machines the most readily available programming language was GWBASIC, but other high level programming languages like Turbo Pascal and Turbo C may have been available. In the world of Windows XP and higher, every machine has available windows scripting host and can run VBscript or JScript.

For example in VBscript, can replace the AutoLISP instruction with:

fp.WriteLine("LINE " & ptStr(x1,y1) & " " & ptStr(x2,y2) & " ")

However most offices have MS Excel installed on most machines, and a few may have access to MS Access, in which case vba can be used to generate scripts. Script instructions can be generated in an Excel worksheet then copy/pasted into a text file, and run by the script command, alternatively the instructions can be pasted directly to the Acad LT command line. Similarly queries in MS Access can be used to generate a sequence of script commands either pasted to a file or direct to the Acad Lt command line. This approach is useful when converting simple data into graphics.

Example of Coldformed steel section generated from script pasted to Acad command line, from Excel worksheet. Worksheet can be found here.

For more advanced automation Excel/vba combination provides the means of collecting input in the worksheet and then writing a script file based on this worksheet data. In vba the typical script would be something like:

Print #fp, "LINE " & ptStr(pt1) & " " & ptStr(pt2) & " "

Where pt1 and pt2 are coordinates stored in a data structure as follows:

Public Type TCoord
  x As Double
  y As Double
  z As Double
End Type

To avoid keep writing the instructions for a line the following subroutine can be defined and used.

Public Sub write_line(fp As Integer, pt1 As TCoord, pt2 As TCoord)
  Print #fp, "LINE " & ptStr(pt1) & " " & ptStr(pt2) & " "
End Sub

call write_line(fp, pt1,pt2)

Similar subroutines can be written for other commonly used Acad LT commands. By building a library of such commands, it is possible to simply convert the program from one CAD package to another simply by rewriting the library to suit the CAD package. That is the main program written uses the users own subroutines and data structures, and should never need rewriting, but the library can be converted to use the data structures, objects and methods of a chosen CAD package. For example write libraries for scripts, DXF, Acad COM automation, TurboCAD, DesignCAD, MultiFrame, even the Excel shapes layer.

Now the problem with the script is it cannot select Acad entities, nor points. Many AutoLISP routines simply pick a single point on the screen then generate a parametric detail about this point. Most of the time (0,0,0) is a good enough start point and a new file is the place to start drawing, therefore no point needs to be selected. By generating a new file, and using xref to reference this file into the primary drawing, interaction with the Acad drawing editor can be minimised. Unless using handles and links to an external data base it is seldom necessary to modify entities. The primary objective is to automate drawing production, not interact with the drawing editor. If a full set of drawings for some parametric object can be generated in a few seconds there is no need to revise or modify the previous: simply regenerate using the modified parameters. Further more if critical parameters start out in Excel and are used to generate a drawing, then there is no need to extract such information from the Acad drawing database.

Interaction with the drawing editor is not highly productive, nor are dialogue boxes. A common flaw with AutoLISP routines is that they have dialogue boxes collecting mutiple parameters. The number of parameters collected by these dialogue boxes exceeds the number of parameters used by engineering. The problem is that engineering calculates the other parameters, used to specify a part. Due to the division of labour between drafter and engineer: the drafter draws and the engineer crunches numbers, there is consequently a lack of integration in the design activity.

It is more productive to write the AutoLISP routines without dialogue input boxes, rather write as subroutines requiring passing of parameters. Then write additional subroutines using dialogue boxes to collect the parameters and call the routine which does the actual drawing. The reason for this is so that the drawing routine can be used in much larger drawing application. Just as machines and buildings are made from component parts, also is a drawing using blocks and xrefs, and similarly a computer program using functions and subroutines. Just as blocks simplify building large drawings, so to do subroutines simplify writing large programs.

The first use of a drawing subroutine, may be to call it from a routine using dialogue boxes to collect all the drawing parameters. A future use may collect far fewer drawing parameters and calculate the rest. But of far greater value is the potential to string multiple subroutines together in sequence to draw something much larger and more complex from a few simple parameters.
Similarly, if this can be done using AutoLISP it can equally well be done using Excel/vba and the generation of scripts. What is more without the use of Acad or Acad LT, an engineer or other designer can generate a series of scripts in a common location, these scripts are then executed by the drafter using either Acad or Acad LT.

Excel/vba can also be used to grab a list of files, either drawings (dwg), DXF and then execute a set of script commands on each of the drawings. Similarly vba can get a list of scripts, and combine them into a single script to be launched in Acad LT. An alternative approach is to execute each script one at a time by calling Acad LT with command line switches, unfortunately with Windows multitasking causes a a timing problem. It is however the approach that was taken with Acad when using MS DOS. It was the failure of my Turbo C multiScripting program in Windows using Acad LT which led me to experimenting with generating scripts using QuattroPro spreadsheet with which I could easily grab a list of file names.

To launch Acad automatically from an application and run the script call Acad using command line switches, for example.

"C:\Program Files\AutoDesk\AutoCAD LT 2000\aclt.exe" /b default.scr

This can be configured in an Excel worksheet, so that can vary CAD applications used and the script names used. More samples can be found here.

Here is some sample output generated by scripts (*.scr).

From a few parameters steel framing plans, elevations and section for simple building generated in model space and paper space, all text with exception of grids placed in paper space. The above view shows the model space 2D stick diagrams, and the lower view a close up of the framing plan.

The following was originally written using DesignCAD, generating a 3D stick diagram of a shed, but then translated to use Acad scripts and draw more detailed elevation.

Simple stick diagram above. Below, model with detailed elevation, and permitting any number of spans.

The following is a close up of the knee connection.

A limitation of Acad Lt is not being able to generate 3D elements. I have used Lights for analysing tension membranes, and whilst it generated an Acad Script file, I was unable to run the file in Acad Lt since it could not create the 3D face elements, whilst intelliCAD 2000 used a different set of parameters to draw 3D faces so the script was incompatible. I therefore modified my Acad script library to use the intelliCAD COM objects. To produce the following, which is viewed in Acad LT.

I could have written the program using scripts in intelliCAD, but I used the opportunity to try out COM automation. The program reads the results from Lights, and then shades membranes elements in tension green, and elements in compression red. It is all on layers, so the membrane can be switched off, and the tension and compression elements of the supporting cables can also be viewed.

Another use of scripting is a simplified geographical information system (GIS). The following made use of MS Access, which was used to count the number of projects in a given area: mainly a UBD map. This data was then transfered to Excel, where a vba macro further sorted the data and generated a script which inserted a block on the appropriate layer. Red blocks represent areas with most projects, and paler blue blocks represent areas with least projects.

Each square represents one map from the UBD Adelaide street directory. The vba routines translate UBD map grid references into Australian Map Grid (AMG) coordinates so that can be located in Acad by (x,y) coordinates. In addition to the coloured blocks. circles were drawn at more localised positions, with the size of circle reflecting the number of projects in the area. The reference grid on each UBD map is about 250m x 250m, so objects typically located at the centre of these grids. For many things don't require the use of a fully blown GIS, since only concerned with relative distances between locations. For example nearest neighbours and hinterlands, or catchments of common facilities like shopping centres, hospitals, business competitors. The map shows that a lot of our work is dependent on the North East Road. It doesn't show projects outside the metropolitan area spread around the state and the country, and the occasional few outside the country. For an alternative GIS can take a look at MapMaker gratis this I have experimented with to generate contours whilst in the trial period with the professional version. The contours being for soil heave, caused by reactive clay soils. We have collected lots of bore logs over 16 years, and therefore, it should be possible to produce a contour map. At the moment I don't have subroutines to generate contours, but have found routines for generating Delaunay triangles, though generating Voronoi polygons would be even better for assessment of catchment areas. This far have written Acad scripts to do the triangulation, the rest is for a future date.

Any case if automation is the primary objective, and doesn't involve creation of 3D entities, then Acad LT can be used to automate a considerable amount of 2D work, or if stick diagrams are all that is required then it can also automate 3D models.

Recommended Reading
1 Microsoft Press (1997),"Micosoft Office 97 Visual Basic Programmers Guide", Microsoft Press
2 Jim Boyce, et al (1997), "Using Microsoft Office 97 Professional: Special Edition", Que
3 George Omura (1989),"AutoCAD instant Reference", Sybex
4 C W Sharp and W W Hamm (1989),"AutoCAD Advanced Techniques",Que
5 D Raker and H Rice (1990), "Inside AutoCAD: 5th Edition (metric)",New Riders Publishing
6 J Smith and R Gesner (1989),"Customising AutoCAD: 2nd Edition",New Riders Publishing
7 J Smith and R Gesner (1989),"Inside AutoLISP",New Riders Publishing
8 George Omura (1990),"The ABC's of AutoLISP", Sybex
9 Dennis N Jump (1989), "AutoCAD Programming", TAB Professional and Reference Books
10 AutoDesk(1995),"Users Guide: AutoCAD LT Release 2 for Windows",AutoDesk
11 Acad LT on line help system.
12 Burchard, Pitzer, Soen, et al (1997), "Inside AutoCAD 14", New Riders Publishing
13 AutoDesk(1999),"Getting Started: AutoCAD LT 2000",AutoDesk

Related Posts:

AutoCAD Speed Test
Automated Drawing List Update Acad LT (revised)

Cold-Formed Steel Shed Industry: part:#1 (Shed Framing Drawings)
Cold-Formed Steel Shed Industry: part:#2 (Shed Framing Drawings)