Posts by retug (37)

Concrete Design Tool Update

It's been awhile since I have posted, but I have a fun "new" tool released on the website.

You can take it for a spin here:

https://www.re-tug.com/concretedesign/

The github repo is here:

https://github.com/retug/concJS

and a how-to-use youtube link is here:

https://www.youtube.com/watch?v=ZiqJzKaldpw&t=36s

Coding

The code updates from the last release about 2 years ago are quite large. I have added the ability to add custom rebar and concrete materials allowing for any material setups, including tension only rebar if desired or concrete with small tension capacity. It also allows for non-linear material definitions which will be useful for my future hopes of creating a moment rotation functionality.

One of the best things that I did during this process was actually learn how to use the debugger in your web browser. Sometimes errors would be hard to trouble shoot and I was reluctant to use the debuggers in visual studio/your favorite web browser for some unknown reason. I thought that console.logging was quicker and more efficient, spoiler, it is NOT QUICKER. The sooner you learn to debug efficiently in any programming language, the quicker you will develop code, period, end of story.

To open up a quick and dirty debugging experience, just inject the word "debugger" into your javascript code and with the dev tool panel open in your web browser, you know have a debgugging, line by line experience. Super nice and easy.

Back to the coding side, the tool can now handle composite geometries, but only can handle one singular concrete material for the overall analysis at this point. This is due to the fact that my meshing algorithm relies on delunay triangulation which essentially is just throwing a bunch of point data at an algorithm to make triangles. If base geometry overlaps in this initial point generation, the tool does not know which material property belongs to which point. At some point in the future I will try to implement some form of composite shape geometry algorithm like the shapely package to hopefully handle differing concrete mixes in the same analysis. For now, please now that this is a limitation.

Some fun images from the composite geometry extension of the program and circle meshing, needing to add extra pruning steps.

 

I also added some nice prebuilt functions to quickly generate squares, rectangles, circles and bridge pier type shapes with evenly spaced rebar. This has to be me favorite feature added to the program. It saved SO much time in quick tests and debugging, one click of a button and you generate rebar and concrete shapes for quick testing. I should have done this awhile back when I first developed the concrete tool and I think I would have saved hours of time in manual clicks.

These prebuilt shapes are in the upper right of the webpage.

If there are any other prebuilt shapes that would be helpful for you, let me know, happy to try to get them added.

After building the tool, I realized that this tool does a lot of other stuff that I can reuse quite easily. 

A few that come to mind:

  • Calculate centroids of shapes
  • Calculate moment of inertias
  • Calculate composite concrete, steel shape moment capacities with a little tweaking
  • Calculate baseplate and anchorage capacities with a bit of tweaking

It will be fun to extend and add onto this tools capacities outside of PMM generation.

Moving Forward

There are a few next steps I want to take with this tool. 

First, I want to move some of the raw engineering calculations server side, rather than the current full client side setp. This will allow me to create an API and allow myself to ping the website for PMM capacities of given rebar and concrete information in a form a json type file and have the website respond with a json file of PMM point data for external tools to use. I plan on exposing this API as well for others so that they can use this tool in a more programtic way rather than having to use the three.js and web based interface. I envision a world where I can create a Revit plugin, draw shapes and rebar in revit, package this data up into a json file and ping the web server and have it respond with PMM capacities. How cool would that be? Concrete column and shear wall designs complete in seconds? One can dream...

I also want to program in explicit moment-moment curves into the tool, allow for the user to input the axial strength of interest and have the tool explicitly calculate the MM curve. Same for PM curves, right now the PMM curves can "wander" if the shape is non-symmetric. See below for the wandering PMM curve with a neutral axis bending angle of 15 degrees.

 

In addition, I want to work on formal documentation for the tool, working through sample problems to validate the tools accuracy.

Hope you enjoy the tool, it was a lot of fun to code and I hope it grows from here.

R2R - Update V1.1.0

Before we hop into the updates, I owe (3) people a very thankful shout out for assistance on this update. 

The MVTs (Most Valuable Testers)

First, Celt, who is a friend from eng-tips and fellow programmer. His website is awesome, check it out here or some awesome free and open source calculations: 

https://thestructuraltoolbox.com/

Celt helped out immensely with some good ideas on slowing down the program and general bug swatting, thank you!

Second, Liz, who reached out to be a beta tester early on. She runs a blog on bluebeam which is great: 

https://lizlarsen.me/bluebeamblog/

She was extremely dedicated and hopped on multiple zoom calls with me to help troubleshoot the bugs. Thanks again for your help!

Third, Seth with Bentley, who was awesome at helping us trouble shoot the problems with R2R. Thank you!

Both Celt and Liz were having trouble with making API calls to RAM structural through RAM DataAccess. Weird errors about reading and writing to protected memory occurred when retrieving grid data and beam data.

After the better part of around 3 months, I was finally able to pinpoint the error, the silly .usr file that RAM structural creates when opening a model persisted a bit after I told the program to close the RAM structural file with code. I would then tell the application to reopen the RSS file, creating a new .usr file, which is not allowed and would throw the exception of reading and writing to protected memory. To solve this, I added a check function that checks the folder where the .rss files exists and checks for the presence of a .usr file, if the .usr fie exists, time out for 0.5 seconds, then check again. With this check in place, it should resolve the reading and writing to protected memory error that occured.

New Features - Studs and Camber Checking

The datagrid got a big face lift, let's review how to read the data. Any row that has a grey highlight has been mapped from RAM into Revit, but there are discrepancies in either the beam size, camber or studs. Any data that is populated in the grey row will have text in red to flag differences, this is the Revit element differences between the RAM element. The engineer should review all grey data rows as this represents a difference between RAM and Revit.

In order to find your companies stud parameter and camber parameter, I have add a new button the first screen to set up your mapping parameters. Click the "Revit Paras" button to be greeted by this screen:

This screen will load in all structural framing family members, please select the one you would like pull instance parameters from, and then select the correct instance parameters from the selected family. Save this file as as prompted, R2R_Paras.json, in the same file location as your R2R_Map.json file location. The import function will attempt to load in both of these .json files so you only have to do this process once per structural project. The name of you instance parameters are saved into this file and read on import.

A this moment, the only item that can be updated while in the datagrid view is studs to match the RAM beam. If the user selects a row and hits "Shift + S" on the keyboard, the program will determine the RSS studs and write that value into the Revit beam instance parameter. Changes are automatic, so you will be able to see your revit model update instantly. In addition, the datagrid background for these cells are changed to light blue and the text is change to black to indicate that the user has reviewed this data.

In the future, I would like to make the stud parameter a user input where you could mix and match if you wanted. The tool is really starting to save the backchecking time and money for the end users, this is MUCH quicker than reviewing this manually by hand, marking up a PDF and having a drafter pick up the revisions. You can have confidence that your RAM model and revit model are now coordinated in the click of a button. 

Smart Tags

Make sure you have "smart" tags setup with your stud parameters, aka, handle any formatting of your companies stud tagging out side of the parameter. For example, let's say I had a composite girder with the following stud layout 20,4,20, please make sure your instance parameter would be "20,4,20" and not "[20,4,20]". Place the "[" "]" formatting in your text label, not the actual parameter. I plan on adding functionality to check and revise camber soon, but I need to chat with users to see what the most common way people handle this parameter. I would like to see a parameter like "0.25" (string) where you text label would add the ' " ' inch symbol in the tag. I would assume that some companies might like "1/4" or might actually store camber as a double. All this leads to added coded complexity that I will need to logically think about moving forward and handle as user input comes in. If your company would like a customized instance parameter tag, please let me know, I could share one that I like to use.

My current company will need to work on updating to smart tags for the camber parameter, we currently input ' " ' in all of our camber tags, which is just time consuming and does not work with the way the R2R tool is currently coded.

For the Future

I am looking for feedback from my east coasters that record shear end reactions, what would be the best way to handle writing reactions into RAM structure beam? I have this data right now, but I am not writing it into the beam. I have heard that some like only record reactions over a certain number "x". How is "x" determined? Let me know and we can work out a way to handle driving reaction data into the revit model quickly and accurately.

My next task is to upgrade R2R for revit 2025, which is a big undertaking as I understand. Revit 2025 upgraded to .net 8.0 which is a big leap from the current .net 4.8. From reading on the revit forums, it sounds like some users are struggling with this update, but I can only find out by trying. I've got revit 2025 installed on the home computer, so I will start trying to make this upgrade. Sounds like people are making (2) .dll files, one for revit prior to 2025 and after 2025, sounds like a pain to maintain, (2) separate code bases to maintain? Or is there some fancy way to link only certain changes to 2025 versioning and above? We will find out....

I am waiting to push this update live until I figure out the Revit 2025 thing, but if you want to take this version out for a beta test, please let me know, I can send you a test file. As always, if you run into any bugs/would like any features added, please let me know.

Capacity Based Design of BRBs in ETABs


Unfortunately from my research, a capacity based design module for BRBs in ETABs does not exist. See snip below.

Given this glaring missing feature, I figured I would outline how I have "tricked" ETABs into doing capacity based design, the poor man's pushover approach to capacity based design for BRBs. The example images presented above are from the AISC Seismic Manual and will serve as the reference for this post. AISC and ETABs own all rights to their documentation.

The Approach

To tackle this problem initially, I went down the route of wanting to apply manually calculated expected strength loads to the BRBF frame. This approach falls short in that load redistributes and goes where it wants given the elastic nature of the model that is built. Trying to tell a specified BRB in the ETABS model to be at x kips is not doable with a traditional force based approach.

With this in mind, I went to a pushover, nonlinear analysis route. This would allow me to specify an exact force at which the braces should yield in both tension and compression(BRBs have slightly higher compressive strength than tensile strength) so I thought this might be the ticket.

Model Setup

Model setup is nothing special, I built the (4) story example model and modelled pinned based braces and columns, with continuous columns (more on this later).

I have uploaded this model to github if you want to play with the model and review.

The Fun Parts

The cool part of the analysis was faking ETABs into doing a capacity based design of the beams and columns, this was done through a pushover load case and non-linear hinge definitions for the axial deformation and load in the BRBs.

Defining a pushover load case is pretty in ETABs, see the screenshots below:

Above, I asked ETABs to move the upper most level 4 node over 36 inches so that I can make each BRB yield in the frame system.

I also defined a specific BRB material, a BRB frame section, and a BRB nonlinear hinge for each BRB.

Above is the material definition, I am not sure if ETABs ever uses this non-linear material definition, but for completeness, I put this in. 

To define the frame sections used in the AISC example, I made the (4) differing core sizes, sample shown below.

To define the frame hinge, I input the specified w and beta factors that were noted in the AISC worked example. See blow:

with all this in place, I crossed my fingers and hoped the results would match.

Pushover Results

The results pretty much exactly matched the AISC worked example which is great, the poorman's capacity based design approach seems to work and capture the design effects that AISC asks designers to consider.

Below you see each brace getting pretty close to the specified yield force, with the tension values being less than the compression values as expected.

It's fun to step through the pushover as well and see how the frame reacts as more and more displacement is induced. You can see when each BRB begins to yield and redistribute load down to the next frame. Below is the forces about 20 steps in the forced displacement. You can see the upper most braces have not yet yielded.

The capacity based design value compression and tension values for columns and beams matches the design example as well.

With these correctly determined capacity based design values, you can feed this load case into the design combos of ETABs and verify you beams and columns can adequately resist the capacity based demands.

Words of Caution

One should pay attention to continuity of columns from floor to floor. None of the examples in the AISC manual seem to consider this, but ETABs does. I am inclined to ignore these moments and just design for the capacity based axial demands, but it might be worth considering these moments if you are concerned about them. Below you can seem some really large moments in the columns due to the large displacements. Given that the columns are elastic, they will continue to develop bending moment as they do not know when to yield and give up.

You can resolve these moments and maybe conservative design values in ETABs by pinning your columns as shown below:

The new bending moments look like this, that's much better!

How do other Structural Softwares Handle Capacity Based Design of BRBs?

Given that I just outlined this process, I figured I would research how other structural design software handles capacity based design of BRBs. 

RISA has a cool, "semi" finite element approach where they essentially remove the brace, apply the specified compression and tension yielding values, apply artificial frame restraints and then do the "semi" finite element analysis on the reduced structure. I thought this was a really cool approach, but I could see a few areas where this could possibly break down. I would have to test it out more to see if this works in all cases.

From my reading, it sounds like RAM structural does this as well.

RAM does not provide a nice write up like RISA on how it is determining these values for beams and columns, but appears to be doing some form of capacity based design based on D1.4a which is good.

All of this is to say, ETABs and CSI, let's step it up to make engineers lives easier. The process I outlined above can work to accurately design beams and columns for capacity based BRBs, but it's a bit convoluted, albeit cool.

NOTE: I am no expert in this and I hope the process I have outlined captures the intent of the code. If you see any flaws in my approach, please comment/message me. I want to make sure my beams and columns don't fail.

 

E2R - ETABS Revit Connection Tool

After the development of R2R, RAM Structural to Revit connection tool, I wanted to make an E2R, ETABS to Revit connection tool. Below are some screenshots of the newly developed tool.

I made a youtube video on how to use the tool here. This video goes in depth on each button and things to look out for while using the tool.

The tool will be available on the Autodesk App Store soon hopefully and freely available to download and test out. Please let me know if you encounter any bugs as you use the tool.

The tool works to check ETABS beams vs Revit beams and is ideal for large steel framed structures in ETABS to quickly backcheck framing sizing and discrepancies between ETABS and Revit.

The Coding - More To Come

MVVM Magic and Modeless Mayhem in Revit

After making the RAM to Revit tool, I wanted to make a similiar tool, but with ETABs this time.

I learned a lot making the RAM to Revit tool, but also learned a few things that I would like to do differently given the chance. 

MVVM Magic

MVVM standards for Model-View-ViewModel and it serves as a way to effectively decouple the user interface (in my case my xaml code) from my data (Model). You do this through creating a ViewModel that allows the model and the view to be completely separate. 

I will admit, I am speaking like I know what this means, but it is still somewhat of mystery to me, but I think this will prove beneficial in making the ETABs to Revit tool. The amount of coding I spent keeping the UI and the data on the backend "sync"ed up for the R2R tool started to become overwhelming, and it is my understanding that MVVM will be a much cleaner way to keep the data and the view separate.

Below is a gif of the view being dynamically updated with updates that occur in the revit model, really cool stuff. Big thanks to scgq425 on the revit api forums for helping me out with this.

Sample code on github.

Learning Points with MVVM and Revit

I struggled with getting my MVVM code to work because I was using a IEnumerable (does not inherit a lot of the MVVM goodness) when I should have been using an ObservableCollection to store my revit beam data.

public ObservableCollection<RevitFramingModel> StructuralFramingElements
        {
            get { return _structuralFramingElements; }
            set
            {
                _structuralFramingElements = value;
                PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(StructuralFramingElements)));
            }
        }

I also struggled with trying to trigger the data to update when a change is performed in the revit document. After searching the revit api documentation, it seemed like the IUpdater interface would do the trick. From the revit documentation:

IUpdater Interface - The interface used to create an updater capable of reacting to changes in the Revit model.

I wanted to react to changes to my beams, so I thought this would do the trick. Throwing the IUpdater interface in the my View Model, my code seemed to be working.

public class StructuralFramingUpdater : IUpdater
    {
        static AddInId m_appId;
        static UpdaterId m_updaterId;
        private readonly MainViewModel _mainViewModel;

        public StructuralFramingUpdater(AddInId id, MainViewModel mainViewModel)
        {
            m_appId = id;
            m_updaterId = new UpdaterId(m_appId, new Guid("FBFBF6B2-4C06-42d4-97C1-D1B4EB593EFF"));
            _mainViewModel = mainViewModel;
        }
        public void Execute(UpdaterData data)
        {
            ObservableCollection<RevitFramingModel> structuralFramingElements = _mainViewModel.StructuralFramingElements;
            // Check if the modified element is a structural framing element
            foreach (ElementId elementId in data.GetModifiedElementIds())
            {
                Element element = data.GetDocument().GetElement(elementId);
                if (element != null && element.Category.Name == "Structural Framing")
                {
                    // Update the corresponding RevitFramingModel
                    RevitFramingModel framingModel = structuralFramingElements.FirstOrDefault(m => m.Id == element.UniqueId);
                    if (framingModel != null)
                    {
                        framingModel.Name = element.Name;
                    }
                }
            }
            _mainViewModel.StructuralFramingElements = structuralFramingElements;
        }
        public string GetAdditionalInformation()
        {
            return "Structural Framing Updater: updates structural framing models when changes occur";
        }
        public ChangePriority GetChangePriority()
        {
            return ChangePriority.Annotations;
        }
        public UpdaterId GetUpdaterId()
        {
            return m_updaterId;
        }
        public string GetUpdaterName()
        {
            return "Structural Framing Updater";
        }
    }

I used chatgpt to write a lot of this code, it was funny to see that chatgpt was essentially "copying" this portion of the web:

https://help.autodesk.com/view/RVT/2022/ENU/?guid=Revit_API_Revit_API_Developers_Guide_Advanced_Topics_Dynamic_Model_Update_Implementing_IUpdater_html

I noticed the the Guid between both programs was identical, pretty funny.

Modeless Mayhem

The next item I wanted to solve with the R2R tool was the lack interactiveness, when the popup window for R2R begins, you are not able to interact with your revit model. This is a huge downside that I want to come back to, but for now, I wanted to make sure the E2R would not be limited in the same way.

The fix to make the window "modeless", switching the popup window from 

mainWindow.ShowDialog(); to mainWindow.Show();

This simple little change did the trick. I think making the full fledged E2R tool modeless will be more complicated than this moving forward with multiple windows and popups, but for now, I hopefully optimistic that I can keep this application modeless with little coding brainpower spent.

ETABs to Revit tool coming soon... 

???

1 2 3 Next Last

Sidebar

Site Info

  • Latest Comments