OpenSees: An Open-Source Software for Structural Engineering Analysis and Design

Created By ChatGPT – Release Notes (Feb 13)

Free Stock photos by Vecteezy

OpenSees is an open-source software for structural engineering that has been developed by researchers at the Pacific Earthquake Engineering Research Center (PEER). It is used for the analysis and design of buildings, bridges, and other structures and has been widely adopted by engineers and researchers around the world. In this blog post, we will explore the features and benefits of using OpenSees for structural analysis and design.

Features of OpenSees

  1. Modelling Capabilities: OpenSees has a rich library of elements that can be used to model a wide range of structures, including beams, columns, shells, and cables. The software also supports the creation of user-defined elements, which allows users to extend the software’s capabilities to include their own specific requirements.
  2. Wide Range of Analysis Methods: OpenSees supports a variety of analysis methods, including linear and nonlinear static, dynamic, and pushover analysis. This makes it a versatile software that can be used for a wide range of applications.
  3. Flexibility: OpenSees has a flexible user interface that allows users to write their own scripts, create custom algorithms, and perform simulations using the data generated by other software. This makes it easy for users to integrate OpenSees with other software and tools.
  4. Robustness: OpenSees has been extensively tested and validated on a variety of structures, making it a robust software that can be relied upon for accurate results.

Benefits of using OpenSees

  1. Open-Source: OpenSees is open-source software, which means that it is free to use and is available for anyone to download and use. This makes it an attractive option for engineers and researchers who are working on a tight budget.
  2. Large User Community: OpenSees has a large and active user community that provides support and assistance to users. This makes it easy for users to get help and advice when they need it.
  3. Customization: As an open-source software, OpenSees can be easily customized to meet the specific needs of individual users. This makes it an ideal software for engineers who need to analyze structures with unique or unconventional requirements.
  4. Cost Effective: OpenSees is a cost-effective option for engineers who are looking for a powerful and flexible software for structural analysis and design.


OpenSees is a powerful and flexible software for structural engineering that is used by engineers and researchers around the world. With its rich library of elements, wide range of analysis methods, and flexible user interface, OpenSees is an ideal software for anyone who is looking for a cost-effective and customizable solution for their structural engineering needs.

Part 2: Excel VBA for Engineers-Rebar Custom Functions


If you haven’t done so see Part 1: Excel VBA for Engineers for an introduction on VBA and setting up the VBA development environment.


Below are the VBA custom functions I’ve develop. This is repeated here with modifications from Part 1: Excel VBA for Engineers for your convenience. See Figures 1-3 and the embedded video for examples of how these custom rebar functions can be utilized in Excel.

Figure 1 – Rebar Custom Functions
Figure 2 – Cell Reference
Figure 3 – String Parameter
Video 1 – Rebar Custom Functions


=RebarArea(value) – returns area (in2)

=RebarDiameter(value) – returns the diameter (in)

=RebarWeight(value) – returns the weight (lb/ft)

The RebarArea, RebarDiameter, and RebarWeight syntax has the following argument:

value – Rebar id. This is a string (i.e. #4, #5…….#18) or a reference to a cell holding a string.





Now will dive into the VBA code. For simplicity I created one module for this blog post. You can download the module here: VBA_Part2_Blog.bas. For production I typically move functions such as IsArrayAllocated(Arr As Variant) As Boolean into a “utility” module because of its applicability on other projects.

Figure 4 shows the Declarations for the module. Rebar data is stored in an array of arrays called RebarTable. These array types are also called jagged arrays. Each rebar array (i.e. BarNo3, BarNo4, and etc.) holds the rebar data – area, diameter, and weight. We’ll have more on this later. Note that these arrays hold Variants. A Variant in VBA is a variable datatype that can be any datatype. For more information on Variants see this reference. The BarNo arrays could have been declared to hold Doubles instead of Variants, but I came across a conflict when attempting to use the rebar custom functions with Combo Boxes.

Note that all variables in Figure 4 are declared as Private except for the array RebarTable which is Public. Public variables are available in other modules. I use RebarTable for design functions and subroutines that are defined in other modules. For more information on variable declarations see this reference.

Figure 4 – Declarations

Figure 5 shows one of the three Custom Rebar Functions. The other functions are coded similarly. The RebarArea function is declared Public so it will be available in the Excel Worksheets. See Figure 1 for an example. This function passes RebarId which is a String and returns the area of the bar as a Double. Figure 3 shows the call. The function can be called with a cell reference as shown in Figure 2. If the cell doesn’t hold a valid String (#4, #11, etc.) the return value will be 0. My production code returns an Error, but this feature is beyond the scope of this blog post.

You will notice at the beginning of the function I call IsArrayAllocated. This function checks to see if the RebarTable has been initialized with the rebar data. See Figure 5 for the code. If the RebarTable hasn’t been initialized I call the function InitializeRebarTable which is shown in Figure 6. I use Select Case to match the RebarId with the correct RebarTable array indexes. For more information on Select Case see this referernce. Here you see why I defined the Id and Prop Enums shown in Figure 4. For more information on Enums see this reference. Array calls with integer indexes can be error prone as shown below:

RebarTable(Id.No3)(Prop.Area) is equivalent to RebarTable(0,1)

Figure 5 – RebarArea Function

The InitializeRebarTable subroutine populates the BarNo arrays and RebarTable. For more information on Arrays see this reference. One thing of note in this subroutine is the line- continuation underscore character ( _ ). The underscore proceed by a space allows lines of code to broken into multiple lines.

Figure 6 – RebarTable Initialization

The IsArrayAllocated function was found at this website. This website is one of the better Excel VBA references.

Figure 7 – Array Allocation Check

Archived Caltrans Plans and Specifications


The California Department of Transportation (Caltrans) archives plans and specifications of past projects on their website. The archive is part of the Caltrans online bidding site called Caltrans Bidding Connect. The archive called the Project Bucket has project contract documents dating back to the 1980s. In this post I’ll show you how to access this archive.


To access the Project Bucket you’ll need to register for the Caltrans Bidding Connect. Click on the link: and fill out the required registration information as shown in Figure 1.

Figure 1 – Caltrans Bidding Connect Registration Form

To log into your account click on this link: and enter your username and password. The Log In form is shown below in Figure 2.

Figure 2 – Caltrans Bidding Connect Log In Form

Searching For Plans and Specs

Project Bucket

Awarded Contracts

Current and Past Advertised Projects

All Projects Currently Advertised

Additional Information

Caltrans registration and log in directions can be found here:

Tips for Working At Home

With the outbreak of the coronavirus many of us are being asked to work remotely. Over my 30+ year career I’ve telecommuted about a third of the time. Below are a few simple tips that I’ve learned over the years.

Setup a Dedicated Well Equipt Work Area

Try to find a spot in your home that’s quiet and away from distractions. That comfy couch in front of the TV is not the best choice. My first home office was in my bedroom. Having a door to close and lock was one of the key features of this office.

Don’t compromise on your home office equipment. Trying to do CAD on a laptop screen will not work. My equipment at home has always been better than any office I’ve worked in. I’ve had to invest my own money, but I’m pretty sure my career has benefited.

Seriously think about workspace ergonomics. Your work at home maybe temporary, but office related injuries can haunt you for the rest of your life. Mayo Clinic has office ergonomic guidelines here:

Schedule your Work and Breaks

It’s best to set a work schedule and keep to it. When I first started working from home I would set a timer to remind me of when to take breaks. The timer not only kept me from working too long but also kept me working too little. Homes have lots of distractions many of which are much more fun then working. Having a timer to remind you of when you can get up and waste time is helpful.

Set Rules for Family and Friends

Make sure family and friends understand your work schedule. Just because you are at home doesn’t mean you’re available for playtime, partying, and doing extra chores around the house. My solution for this problem has been to adopt a flexible work schedule instead of the typical 8am-5pm. When my kids were young I would work when they were sleeping. My dogs know I’m home so I always take a break in the middle of the day to take them for their walk. For chores around the house I just make excuses for not getting to them, and magically they get done. My wife is the best.

Over Communicate with Teammates

Working remotely requires a team to communicate constantly with each other. Face to face conversations at the water cooler and in cubicles are replaced with Instant Messaging. Conference room meetings get replaced with Zoom and Skype. Physically pointing to plans and discussing issues with teammates is done by sharing your screen and “pointing” with a cursor.

My personal opinion is when a team is physically separated communication will organically improve. Since my office was closed, and the Team has been relocated to their homes I’m pretty sure that the number of team “contacts” has gone up drastically. I’m IM’ing all day. I’m communicating with our young staff more often. Task leaders are setting up more short meetings to share information.

Don’t Overwork Yourself

For me overworking is the biggest problem I have with remote work. You can’t get away from the office by going home. You can’t even get away from work on vacation. It follows you everywhere. Laptops, cell phones, internet hot spots, all have contributed to my workaholic-ism. This dilemma reminds of a quote by Harold Kushner – “No one ever said on their deathbed ‘I wish I’d spent more time at the office.’ ” Food for thought!

Part 1: Excel VBA For Engineers


What is VBA?

Visual Basic for Applications (VBA) is the standard programming language for Microsoft Office products including Excel. VBA allows the user to automate Excel tasks by writing macros, subroutines, and functions

Why use VBA?

  • Automate repetitive tasks
  • Simplify complex Excel equations with Basic language code
  • Reduce spreadsheet errors
  • Make spreadsheets more maintainable
  • Automate tasks in software programs such as SAP2000 or AutoCAD

Note: This post uses Excel 2013 but the concepts will apply to any recent version of Excel.

Do you use the built-in Excel LOOKUP functions? Do you use these functions to extract reinforcement data (area, diameter, weight, and etc.) from a range of cells? Yuck! I can never remember the syntax for the LOOKUP functions. Over the years I have made many errors with these convoluted functions. Not only are they error prone, but creating a range of reinforcement data is another possible source of errors.

Here are the functions that bridgeautomation uses to enter reinforcement data into Excel replacing the error prone LOOKUP functions.


RebarArea, RebarDiameter, and RebarWeight returns the area, diameter, and weight in Imperial units respectively. The base units are inch and lb.





The RebarArea, RebarDiameter, and RebarWeight syntax has the following argument:

value – Rebar id. This is a string (i.e. #4, #5…….#18). This parameter must be enclosed in quotation marks (i.e. RebarArea(“#4”).

Start typing “Rebar” in a cell and a drop down box opens making it easy to remember the function name.

No LOOKUP tables or typing in reinforcement data into cells!

VBA Setup

Verify that the DEVELOPER menu item is visible.

If the DEVELOPER menu item is not visible navigate to the FILE / OPTIONS dialog box.

At the Options dialog box select Customize Ribbon and check the Developer checkbox and then press the OK button.

Hello World Example

Create a new Excel worksheet and save as an Excel Macro-Enabled Workbook (*.xlsm). From the main menu select the Developer menu item and then click on Visual Basic.

Select Insert and Module.

In the Project Tree in the left pane of the dialog box below click on Module 1. Enter the following code as shown below. You can either type the code in or copy and paste from code textbox below.

Source code for the HelloWorld function is below.

Public Function HelloWorld(flag As String)
     If flag = 0 Then
         MsgBox ("Hello World From Bridgeautomation")
         HelloWorld = "0 passed-Hello From Bridgeautomation"
         HelloWorld = flag + " passed-Hello World From Bridgeautomation"
     End If
 End Function


HelloWorld is a simple example function that shows how to pass parameters, return values, and use message boxes.

  • A 0 value parameter opens a message box and returns a string message to the cell
  • Any other numeric value parameter just returns a string message to the cell
  • Non-numeric value parameter returns a #Value! error



The HelloWorld function syntax has the following argument:

value – Any numeric value.

The graphic below shows how to use the HelloWorld function. In the example below cell C3 is referenced for input. Entering the integer 100 as a parameter would have worked as well (=helloworld(100)).

The graphic below shows the final results in cell C5 for an input value of 3 in cell C3.

The Excel file can be found here: Example HelloWorld